ARM: dts: Move rpi-otp nodes onto a dedicated bus

The rpi-otp driver uses a virtualised, OTP-relative addressing scheme.
However, when instance nodes are children of "/soc" they appear to be
addressable directly by the host, which is wrong (but not in a way which
causes an error unless one goes looking for one).

Add a wrapper (bus) node without a "ranges" property to make the
separation clear.

See: https://github.com/raspberrypi/linux/issues/6196

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
Phil Elwell
2024-05-30 15:59:52 +01:00
committed by Dom Cobley
parent e82ad4a8bc
commit ea34d5aaf9
3 changed files with 68 additions and 51 deletions

View File

@@ -26,18 +26,24 @@
}; };
&soc { &soc {
nvmem_otp: nvmem_otp { nvmem {
compatible = "raspberrypi,rpi-otp"; compatible = "simple-bus";
firmware = <&firmware>; #address-cells = <1>;
reg = <0 192>; #size-cells = <1>;
status = "okay";
};
nvmem_cust: nvmem_cust { nvmem_otp: nvmem_otp {
compatible = "raspberrypi,rpi-otp"; compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>; firmware = <&firmware>;
reg = <1 8>; reg = <0 192>;
status = "okay"; status = "okay";
};
nvmem_cust: nvmem_cust {
compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>;
reg = <1 8>;
status = "okay";
};
}; };
}; };

View File

@@ -90,26 +90,31 @@
/* Add the physical <-> DMA mapping for the I/O space */ /* Add the physical <-> DMA mapping for the I/O space */
dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>, dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>,
<0x7c000000 0x0 0xfc000000 0x03800000>; <0x7c000000 0x0 0xfc000000 0x03800000>;
nvmem {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
nvmem_otp: nvmem_otp { nvmem_otp: nvmem_otp {
compatible = "raspberrypi,rpi-otp"; compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>; firmware = <&firmware>;
reg = <0 166>; reg = <0 166>;
status = "okay"; status = "okay";
}; };
nvmem_cust: nvmem_cust { nvmem_cust: nvmem_cust {
compatible = "raspberrypi,rpi-otp"; compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>; firmware = <&firmware>;
reg = <1 8>; reg = <1 8>;
status = "okay"; status = "okay";
}; };
nvmem_priv: nvmem_priv { nvmem_priv: nvmem_priv {
compatible = "raspberrypi,rpi-otp"; compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>; firmware = <&firmware>;
reg = <3 8>; reg = <3 8>;
status = "okay"; status = "okay";
};
}; };
}; };

View File

@@ -45,32 +45,38 @@
trickle-charge-microvolt = <0>; trickle-charge-microvolt = <0>;
}; };
nvmem_otp: nvmem_otp { nvmem {
compatible = "raspberrypi,rpi-otp"; compatible = "simple-bus";
firmware = <&firmware>; #address-cells = <1>;
reg = <0 192>; #size-cells = <1>;
status = "okay";
};
nvmem_cust: nvmem_cust { nvmem_otp: nvmem_otp {
compatible = "raspberrypi,rpi-otp"; compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>; firmware = <&firmware>;
reg = <1 8>; reg = <0 192>;
status = "okay"; status = "okay";
}; };
nvmem_mac: nvmem_mac { nvmem_cust: nvmem_cust {
compatible = "raspberrypi,rpi-otp"; compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>; firmware = <&firmware>;
reg = <2 6>; reg = <1 8>;
status = "okay"; status = "okay";
}; };
nvmem_priv: nvmem_priv { nvmem_mac: nvmem_mac {
compatible = "raspberrypi,rpi-otp"; compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>; firmware = <&firmware>;
reg = <3 16>; reg = <2 6>;
status = "okay"; status = "okay";
};
nvmem_priv: nvmem_priv {
compatible = "raspberrypi,rpi-otp";
firmware = <&firmware>;
reg = <3 16>;
status = "okay";
};
}; };
/* Define these notional regulators for use by overlays, etc. */ /* Define these notional regulators for use by overlays, etc. */