[PATCH v2 12/12] rockchip: rk3588: Read cpuid from otp

Jonas Karlman jonas at kwiboo.se
Wed Feb 22 23:44:41 CET 2023


Read cpuid from otp and set ethaddr for RK3588.

Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
---
v2:
- New patch

 arch/arm/dts/rk3588s-u-boot.dtsi | 12 ++++++++++++
 arch/arm/mach-rockchip/Kconfig   |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/arch/arm/dts/rk3588s-u-boot.dtsi b/arch/arm/dts/rk3588s-u-boot.dtsi
index 58123489f3c1..f880f4a16741 100644
--- a/arch/arm/dts/rk3588s-u-boot.dtsi
+++ b/arch/arm/dts/rk3588s-u-boot.dtsi
@@ -31,6 +31,18 @@
 		pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
 		status = "disabled";
 	};
+
+	otp: nvmem at fecc0000 {
+		compatible = "rockchip,rk3588-otp";
+		reg = <0x0 0xfecc0000 0x0 0x400>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		status = "okay";
+
+		cpu_id: id at 7 {
+			reg = <0x07 0x10>;
+		};
+	};
 };
 
 &xin24m {
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 88be06811c53..0390431601f9 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -310,6 +310,8 @@ config ROCKCHIP_RK3588
 	select SYSCON
 	select BOARD_LATE_INIT
 	imply ROCKCHIP_COMMON_BOARD
+	imply ROCKCHIP_OTP
+	imply MISC_INIT_R
 	help
 	  The Rockchip RK3588 is a ARM-based SoC with quad-core Cortex-A76 and
 	  quad-core Cortex-A55 including NEON and GPU, 6TOPS NPU, Mali-G610 MP4,
-- 
2.39.2



More information about the U-Boot mailing list