Skip to contentSkip to conversation

rockchip: rk3308: Update otp node in u-boot dtsi to match v6.11-rc1

PATCH In review Jonas Karlman 3 participants 7 messages Jul 30, 2024 – Aug 9, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover rockchip: rk3308: Update otp node in u-boot dtsi to match v6.11-rc1

The merged upstream DT node for OTP differs in nodename and a future update of dts/upstream to devicetree-rebasing v6.11-rc1-dts tag or newer will cause build issues.

This series replace the node in soc u-boot dtsi with the upstream node.

Changes in v2:
- Drop patch that changed the nodename to match v6.11-rc1
- Add patch to remove the OTP device node from rk3308-u-boot.dtsi
- Cherry-pick upstream commit from devicetree-rebasing v6.11-rc1-dts

Jonas Karlman (2):
rockchip: rk3308: Remove OTP device node from soc u-boot dtsi
arm64: dts: rockchip: Add OTP device node for RK3308

 arch/arm/dts/rk3308-u-boot.dtsi             | 16 --------------
 dts/upstream/src/arm64/rockchip/rk3308.dtsi | 24 +++++++++++++++++++++
 2 files changed, 24 insertions(+), 16 deletions(-)
Signature · 1 line
2.45.2
#1 lore raw

PATCH v2 1/2 rockchip: rk3308: Remove OTP device node from soc u-boot dtsi

The merged upstream DT node for OTP differs in nodename and will cause following build errors once rk3308.dtsi in dts/upstream is updated:

ERROR (duplicate_label): /nvmem@ff210000: Duplicate label 'otp' on /nvmem@ff210000 and /efuse@ff210000 ERROR (duplicate_label): /nvmem@ff210000/id@7: Duplicate label 'cpu_id' on /nvmem@ff210000/id@7 and /efuse@ff210000/id@7

Remove the OTP device node from soc u-boot dtsi in preparation for replacing it with the merged upstream DT node in dts/upstream.

---
v2: New patch

---
 arch/arm/dts/rk3308-u-boot.dtsi | 16 ----------------
 1 file changed, 16 deletions(-)
arch/arm/dts/rk3308-u-boot.dtsi +0 -16
index 684fa7abddb1..b7964e2756f3 100644
@@ -21,22 +21,6 @@
 		bootph-all;
 	};
 
-	otp: nvmem@ff210000 {
-		compatible = "rockchip,rk3308-otp";
-		reg = <0x0 0xff210000 0x0 0x4000>;
-		clocks = <&cru SCLK_OTP_USR>, <&cru PCLK_OTP_NS>,
-			 <&cru PCLK_OTP_PHY>;
-		clock-names = "otp", "apb_pclk", "phy";
-		resets = <&cru SRST_OTP_PHY>;
-		reset-names = "phy";
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		cpu_id: id@7 {
-			reg = <0x07 0x10>;
-		};
-	};
-
 	rng: rng@ff2f0000 {
 		compatible = "rockchip,cryptov2-rng";
 		reg = <0x0 0xff2f0000 0x0 0x4000>;
Signature · 1 line
2.45.2
#2 lore raw

Re: [PATCH v2 1/2] rockchip: rk3308: Remove OTP device node from soc u-boot dtsi

Reviewed-by on v2 1/2
#3 lore raw

Re: [PATCH v2 1/2] rockchip: rk3308: Remove OTP device node from soc u-boot dtsi

In reply to Jonas Karlman
Quoted 10 lines · Jonas Karlman

The merged upstream DT node for OTP differs in nodename and will cause following build errors once rk3308.dtsi in dts/upstream is updated:

ERROR (duplicate_label): /nvmem@ff210000: Duplicate label 'otp' on /nvmem@ff210000 and /efuse@ff210000 ERROR (duplicate_label): /nvmem@ff210000/id@7: Duplicate label 'cpu_id' on /nvmem@ff210000/id@7 and /efuse@ff210000/id@7

Remove the OTP device node from soc u-boot dtsi in preparation for replacing it with the merged upstream DT node in dts/upstream.

Thanks,
- Kever

Quoted 33 lines

---
v2: New patch

---
  arch/arm/dts/rk3308-u-boot.dtsi | 16 ----------------
  1 file changed, 16 deletions(-)
arch/arm/dts/rk3308-u-boot.dtsi +0 -16
index 684fa7abddb1..b7964e2756f3 100644
@@ -21,22 +21,6 @@
  		bootph-all;
  	};
 
-	otp: nvmem@ff210000 {
-		compatible = "rockchip,rk3308-otp";
-		reg = <0x0 0xff210000 0x0 0x4000>;
-		clocks = <&cru SCLK_OTP_USR>, <&cru PCLK_OTP_NS>,
-			 <&cru PCLK_OTP_PHY>;
-		clock-names = "otp", "apb_pclk", "phy";
-		resets = <&cru SRST_OTP_PHY>;
-		reset-names = "phy";
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		cpu_id: id@7 {
-			reg = <0x07 0x10>;
-		};
-	};
-
  	rng: rng@ff2f0000 {
  		compatible = "rockchip,cryptov2-rng";
  		reg = <0x0 0xff2f0000 0x0 0x4000>;
#4 lore raw

PATCH v2 2/2 arm64: dts: rockchip: Add OTP device node for RK3308

In reply to Jonas Karlman

The RK3308 SoC contains a controller for one-time-programmable memory, add a device node for it.

[ upstream commit: 36d3bbc8cdbef2f83391f7708888265ac4c37a99 ]

(cherry picked from commit db11d284200d0f811a8f8238dbc9c63daf4e6131)
---
v2: New patch

---
 dts/upstream/src/arm64/rockchip/rk3308.dtsi | 24 +++++++++++++++++++++
 1 file changed, 24 insertions(+)
dts/upstream/src/arm64/rockchip/rk3308.dtsi +24 -0
index c00da150a22f..6531ede13af9 100644
@@ -556,6 +556,30 @@
 		status = "disabled";
 	};
 
+	otp: efuse@ff210000 {
+		compatible = "rockchip,rk3308-otp";
+		reg = <0x0 0xff210000 0x0 0x4000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		clocks = <&cru SCLK_OTP_USR>, <&cru PCLK_OTP_NS>,
+			 <&cru PCLK_OTP_PHY>;
+		clock-names = "otp", "apb_pclk", "phy";
+		resets = <&cru SRST_OTP_PHY>;
+		reset-names = "phy";
+
+		cpu_id: id@7 {
+			reg = <0x07 0x10>;
+		};
+
+		cpu_leakage: cpu-leakage@17 {
+			reg = <0x17 0x1>;
+		};
+
+		logic_leakage: logic-leakage@18 {
+			reg = <0x18 0x1>;
+		};
+	};
+
 	dmac0: dma-controller@ff2c0000 {
 		compatible = "arm,pl330", "arm,primecell";
 		reg = <0x0 0xff2c0000 0x0 0x4000>;
Signature · 1 line
2.45.2
#5 lore raw

Re: [PATCH v2 2/2] arm64: dts: rockchip: Add OTP device node for RK3308

Reviewed-by on v2 2/2
#6 lore raw

Re: [PATCH v2 2/2] arm64: dts: rockchip: Add OTP device node for RK3308

In reply to Jonas Karlman
Quoted 10 lines · Jonas Karlman

The RK3308 SoC contains a controller for one-time-programmable memory, add a device node for it.

[ upstream commit: 36d3bbc8cdbef2f83391f7708888265ac4c37a99 ]

(cherry picked from commit db11d284200d0f811a8f8238dbc9c63daf4e6131)

Thanks,
- Kever

Quoted 41 lines

---
v2: New patch

---
  dts/upstream/src/arm64/rockchip/rk3308.dtsi | 24 +++++++++++++++++++++
  1 file changed, 24 insertions(+)
dts/upstream/src/arm64/rockchip/rk3308.dtsi +24 -0
index c00da150a22f..6531ede13af9 100644
@@ -556,6 +556,30 @@
  		status = "disabled";
  	};
 
+	otp: efuse@ff210000 {
+		compatible = "rockchip,rk3308-otp";
+		reg = <0x0 0xff210000 0x0 0x4000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		clocks = <&cru SCLK_OTP_USR>, <&cru PCLK_OTP_NS>,
+			 <&cru PCLK_OTP_PHY>;
+		clock-names = "otp", "apb_pclk", "phy";
+		resets = <&cru SRST_OTP_PHY>;
+		reset-names = "phy";
+
+		cpu_id: id@7 {
+			reg = <0x07 0x10>;
+		};
+
+		cpu_leakage: cpu-leakage@17 {
+			reg = <0x17 0x1>;
+		};
+
+		logic_leakage: logic-leakage@18 {
+			reg = <0x18 0x1>;
+		};
+	};
+
  	dmac0: dma-controller@ff2c0000 {
  		compatible = "arm,pl330", "arm,primecell";
  		reg = <0x0 0xff2c0000 0x0 0x4000>;