^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) Devicetree binding for regmap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Optional properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) little-endian,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) big-endian,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) native-endian: See common-properties.txt for a definition
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) Note:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Regmap defaults to little-endian register access on MMIO based
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) devices, this is by far the most common setting. On CPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) architectures that typically run big-endian operating systems
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) (e.g. PowerPC), registers can be defined as big-endian and must
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) be marked that way in the devicetree.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) On SoCs that can be operated in both big-endian and little-endian
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) modes, with a single hardware switch controlling both the endianness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) of the CPU and a byteswap for MMIO registers (e.g. many Broadcom MIPS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) chips), "native-endian" is used to allow using the same device tree
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) blob in both cases.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Examples:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) Scenario 1 : a register set in big-endian mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) dev: dev@40031000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) compatible = "syscon";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) reg = <0x40031000 0x1000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) big-endian;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) ...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) };