]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rv1126: Read cpuid from otp and set ethaddr
authorTim Lunn <tim@feathertop.org>
Tue, 31 Oct 2023 02:07:15 +0000 (13:07 +1100)
committerTom Rini <trini@konsulko.com>
Fri, 10 Nov 2023 15:58:44 +0000 (10:58 -0500)
Provide configuration to read cpuid and generate a persistent
MAC address in ethaddr

Signed-off-by: Tim Lunn <tim@feathertop.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/dts/rv1126-u-boot.dtsi
arch/arm/mach-rockchip/Kconfig

index 918c307743ec8cdbde9b38af1eef1c064c027367..4485980135783c70f377103e70fefb6a691cedb4 100644 (file)
                compatible = "rockchip,rv1126-dmc";
                bootph-all;
        };
+
+       otp: otp@ff5c0000 {
+               compatible = "rockchip,rv1126-otp";
+               reg = <0xff5c0000 0x1000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               status = "okay";
+
+               cpu_id: id@7 {
+                       reg = <0x07 0x10>;
+               };
+       };
 };
 
 &gpio0 {
index a6c69c300d00009b159c4f0827d9cd05ffdebdf6..5e993383cfb6c54195909e152ee6cb82e0ec13ef 100644 (file)
@@ -359,6 +359,8 @@ config ROCKCHIP_RV1126
        select BOARD_LATE_INIT
        imply ROCKCHIP_COMMON_BOARD
        imply OF_LIBFDT_OVERLAY
+       imply ROCKCHIP_OTP
+       imply MISC_INIT_R
        imply TPL_DM
        imply TPL_LIBCOMMON_SUPPORT
        imply TPL_LIBGENERIC_SUPPORT