[PATCH v4 4/5] arm64: dts: rockchip: Move RK3576 OTP cells into a fixed layout

Alexey Charkov alchark at flipper.net
Tue Nov 24 04:04:34 PST 2026


The RK3576 OTP describes its cells as direct children of the OTP node,
which is the deprecated syntax predating NVMEM layouts. It does not
allow a compatible on a cell, which describing the CPU ID cell needs.

Move the cells into a fixed layout, as already done for RK3528, RK3562
and RK356x. Labels and node names stay the same, so the cells keep their
names and existing references keep working.

Signed-off-by: Alexey Charkov <alchark at flipper.net>
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 105 ++++++++++++++++---------------
 1 file changed, 54 insertions(+), 51 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
index 6f5780af4192..2e83a73ddbb2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
@@ -2298,63 +2298,66 @@ rng: rng at 2a410000 {
 		otp: otp at 2a580000 {
 			compatible = "rockchip,rk3576-otp";
 			reg = <0x0 0x2a580000 0x0 0x400>;
-			#address-cells = <1>;
-			#size-cells = <1>;
 			clocks = <&cru CLK_OTPC_NS>, <&cru PCLK_OTPC_NS>,
 				 <&cru CLK_OTP_PHY_G>;
 			clock-names = "otp", "apb_pclk", "phy";
 			resets = <&cru SRST_OTPC_NS>, <&cru SRST_P_OTPC_NS>;
 			reset-names = "otp", "apb";
 
-			/* Data cells */
-			cpu_code: cpu-code at 2 {
-				reg = <0x02 0x2>;
-			};
-			otp_cpu_version: cpu-version at 5 {
-				reg = <0x05 0x1>;
-				bits = <3 3>;
-			};
-			otp_id: id at a {
-				reg = <0x0a 0x10>;
-			};
-			cpub_leakage: cpub-leakage at 1e {
-				reg = <0x1e 0x1>;
-			};
-			cpul_leakage: cpul-leakage at 1f {
-				reg = <0x1f 0x1>;
-			};
-			npu_leakage: npu-leakage at 20 {
-				reg = <0x20 0x1>;
-			};
-			gpu_leakage: gpu-leakage at 21 {
-				reg = <0x21 0x1>;
-			};
-			log_leakage: log-leakage at 22 {
-				reg = <0x22 0x1>;
-			};
-			bigcore_tsadc_trim: bigcore-tsadc-trim at 24 {
-				reg = <0x24 0x2>;
-				bits = <0 10>;
-			};
-			litcore_tsadc_trim: litcore-tsadc-trim at 26 {
-				reg = <0x26 0x2>;
-				bits = <0 10>;
-			};
-			ddr_tsadc_trim: ddr-tsadc-trim at 28 {
-				reg = <0x28 0x2>;
-				bits = <0 10>;
-			};
-			npu_tsadc_trim: npu-tsadc-trim at 2a {
-				reg = <0x2a 0x2>;
-				bits = <0 10>;
-			};
-			gpu_tsadc_trim: gpu-tsadc-trim at 2c {
-				reg = <0x2c 0x2>;
-				bits = <0 10>;
-			};
-			soc_tsadc_trim: soc-tsadc-trim at 64 {
-				reg = <0x64 0x2>;
-				bits = <0 10>;
+			nvmem-layout {
+				compatible = "fixed-layout";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				cpu_code: cpu-code at 2 {
+					reg = <0x02 0x2>;
+				};
+				otp_cpu_version: cpu-version at 5 {
+					reg = <0x05 0x1>;
+					bits = <3 3>;
+				};
+				otp_id: id at a {
+					reg = <0x0a 0x10>;
+				};
+				cpub_leakage: cpub-leakage at 1e {
+					reg = <0x1e 0x1>;
+				};
+				cpul_leakage: cpul-leakage at 1f {
+					reg = <0x1f 0x1>;
+				};
+				npu_leakage: npu-leakage at 20 {
+					reg = <0x20 0x1>;
+				};
+				gpu_leakage: gpu-leakage at 21 {
+					reg = <0x21 0x1>;
+				};
+				log_leakage: log-leakage at 22 {
+					reg = <0x22 0x1>;
+				};
+				bigcore_tsadc_trim: bigcore-tsadc-trim at 24 {
+					reg = <0x24 0x2>;
+					bits = <0 10>;
+				};
+				litcore_tsadc_trim: litcore-tsadc-trim at 26 {
+					reg = <0x26 0x2>;
+					bits = <0 10>;
+				};
+				ddr_tsadc_trim: ddr-tsadc-trim at 28 {
+					reg = <0x28 0x2>;
+					bits = <0 10>;
+				};
+				npu_tsadc_trim: npu-tsadc-trim at 2a {
+					reg = <0x2a 0x2>;
+					bits = <0 10>;
+				};
+				gpu_tsadc_trim: gpu-tsadc-trim at 2c {
+					reg = <0x2c 0x2>;
+					bits = <0 10>;
+				};
+				soc_tsadc_trim: soc-tsadc-trim at 64 {
+					reg = <0x64 0x2>;
+					bits = <0 10>;
+				};
 			};
 		};
 

-- 
2.56.0




More information about the Linux-rockchip mailing list