Skip to content

Commit a2fb37f

Browse files
committed
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: #6196 Signed-off-by: Phil Elwell <[email protected]>
1 parent b5f843f commit a2fb37f

File tree

3 files changed

+69
-52
lines changed

3 files changed

+69
-52
lines changed

arch/arm/boot/dts/broadcom/bcm2708-rpi.dtsi

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,24 @@
2626
};
2727

2828
&soc {
29-
nvmem_otp: nvmem_otp {
30-
compatible = "raspberrypi,rpi-otp";
31-
firmware = <&firmware>;
32-
reg = <0 192>;
33-
status = "okay";
34-
};
35-
36-
nvmem_cust: nvmem_cust {
37-
compatible = "raspberrypi,rpi-otp";
38-
firmware = <&firmware>;
39-
reg = <1 8>;
40-
status = "okay";
29+
nvmem {
30+
compatible = "simple-bus";
31+
#address-cells = <1>;
32+
#size-cells = <1>;
33+
34+
nvmem_otp: nvmem_otp {
35+
compatible = "raspberrypi,rpi-otp";
36+
firmware = <&firmware>;
37+
reg = <0 192>;
38+
status = "okay";
39+
};
40+
41+
nvmem_cust: nvmem_cust {
42+
compatible = "raspberrypi,rpi-otp";
43+
firmware = <&firmware>;
44+
reg = <1 8>;
45+
status = "okay";
46+
};
4147
};
4248
};
4349

arch/arm/boot/dts/broadcom/bcm2711-rpi-ds.dtsi

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,31 @@
9090
/* Add the physical <-> DMA mapping for the I/O space */
9191
dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>,
9292
<0x7c000000 0x0 0xfc000000 0x03800000>;
93+
nvmem {
94+
compatible = "simple-bus";
95+
#address-cells = <1>;
96+
#size-cells = <1>;
9397

94-
nvmem_otp: nvmem_otp {
95-
compatible = "raspberrypi,rpi-otp";
96-
firmware = <&firmware>;
97-
reg = <0 166>;
98-
status = "okay";
99-
};
98+
nvmem_otp: nvmem_otp {
99+
compatible = "raspberrypi,rpi-otp";
100+
firmware = <&firmware>;
101+
reg = <0 166>;
102+
status = "okay";
103+
};
100104

101-
nvmem_cust: nvmem_cust {
102-
compatible = "raspberrypi,rpi-otp";
103-
firmware = <&firmware>;
104-
reg = <1 8>;
105-
status = "okay";
106-
};
105+
nvmem_cust: nvmem_cust {
106+
compatible = "raspberrypi,rpi-otp";
107+
firmware = <&firmware>;
108+
reg = <1 8>;
109+
status = "okay";
110+
};
107111

108-
nvmem_priv: nvmem_priv {
109-
compatible = "raspberrypi,rpi-otp";
110-
firmware = <&firmware>;
111-
reg = <3 8>;
112-
status = "okay";
112+
nvmem_priv: nvmem_priv {
113+
compatible = "raspberrypi,rpi-otp";
114+
firmware = <&firmware>;
115+
reg = <3 8>;
116+
status = "okay";
117+
};
113118
};
114119
};
115120

arch/arm/boot/dts/broadcom/bcm2712-rpi.dtsi

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,38 @@
4545
trickle-charge-microvolt = <0>;
4646
};
4747

48-
nvmem_otp: nvmem_otp {
49-
compatible = "raspberrypi,rpi-otp";
50-
firmware = <&firmware>;
51-
reg = <0 192>;
52-
status = "okay";
53-
};
48+
nvmem {
49+
compatible = "simple-bus";
50+
#address-cells = <1>;
51+
#size-cells = <1>;
5452

55-
nvmem_cust: nvmem_cust {
56-
compatible = "raspberrypi,rpi-otp";
57-
firmware = <&firmware>;
58-
reg = <1 8>;
59-
status = "okay";
60-
};
53+
nvmem_otp: nvmem_otp {
54+
compatible = "raspberrypi,rpi-otp";
55+
firmware = <&firmware>;
56+
reg = <0 192>;
57+
status = "okay";
58+
};
6159

62-
nvmem_mac: nvmem_mac {
63-
compatible = "raspberrypi,rpi-otp";
64-
firmware = <&firmware>;
65-
reg = <2 6>;
66-
status = "okay";
67-
};
60+
nvmem_cust: nvmem_cust {
61+
compatible = "raspberrypi,rpi-otp";
62+
firmware = <&firmware>;
63+
reg = <1 8>;
64+
status = "okay";
65+
};
6866

69-
nvmem_priv: nvmem_priv {
70-
compatible = "raspberrypi,rpi-otp";
71-
firmware = <&firmware>;
72-
reg = <3 16>;
73-
status = "okay";
67+
nvmem_mac: nvmem_mac {
68+
compatible = "raspberrypi,rpi-otp";
69+
firmware = <&firmware>;
70+
reg = <2 6>;
71+
status = "okay";
72+
};
73+
74+
nvmem_priv: nvmem_priv {
75+
compatible = "raspberrypi,rpi-otp";
76+
firmware = <&firmware>;
77+
reg = <3 16>;
78+
status = "okay";
79+
};
7480
};
7581

7682
/* Define these notional regulators for use by overlays, etc. */

0 commit comments

Comments
 (0)