Commit | Line | Data |
---|---|---|
275876e2 XL |
1 | Device-Tree binding for regmap |
2 | ||
3 | The endianness mode of CPU & Device scenarios: | |
4 | Index Device Endianness properties | |
5 | --------------------------------------------------- | |
6 | 1 BE 'big-endian' | |
7 | 2 LE 'little-endian' | |
a06c488d | 8 | 3 Native 'native-endian' |
275876e2 XL |
9 | |
10 | For one device driver, which will run in different scenarios above | |
11 | on different SoCs using the devicetree, we need one way to simplify | |
12 | this. | |
13 | ||
a06c488d MB |
14 | Optional properties: |
15 | - {big,little,native}-endian: these are boolean properties, if absent | |
16 | then the implementation will choose a default based on the device | |
17 | being controlled. These properties are for register values and all | |
18 | the buffers only. Native endian means that the CPU and device have | |
19 | the same endianness. | |
275876e2 XL |
20 | |
21 | Examples: | |
22 | Scenario 1 : CPU in LE mode & device in LE mode. | |
23 | dev: dev@40031000 { | |
24 | compatible = "name"; | |
25 | reg = <0x40031000 0x1000>; | |
26 | ... | |
27 | }; | |
28 | ||
29 | Scenario 2 : CPU in LE mode & device in BE mode. | |
30 | dev: dev@40031000 { | |
31 | compatible = "name"; | |
32 | reg = <0x40031000 0x1000>; | |
33 | ... | |
34 | big-endian; | |
35 | }; | |
36 | ||
37 | Scenario 3 : CPU in BE mode & device in BE mode. | |
38 | dev: dev@40031000 { | |
39 | compatible = "name"; | |
40 | reg = <0x40031000 0x1000>; | |
41 | ... | |
42 | }; | |
43 | ||
44 | Scenario 4 : CPU in BE mode & device in LE mode. | |
45 | dev: dev@40031000 { | |
46 | compatible = "name"; | |
47 | reg = <0x40031000 0x1000>; | |
48 | ... | |
49 | little-endian; | |
50 | }; |