Message ID | 20231031020715.684460-3-tim@feathertop.org |
---|---|
State | Accepted |
Commit | b01adfe59d16cbb426e2260f241b37c8a0235076 |
Delegated to: | Kever Yang |
Headers | show |
Series | rockchip: Support otp on rv1126 | expand |
On 2023/10/31 10:07, Tim Lunn wrote: > Provide configuration to read cpuid and generate a persistant > MAC address in ethaddr > > Signed-off-by: Tim Lunn <tim@feathertop.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > arch/arm/dts/rv1126-u-boot.dtsi | 12 ++++++++++++ > arch/arm/mach-rockchip/Kconfig | 2 ++ > 2 files changed, 14 insertions(+) > > diff --git a/arch/arm/dts/rv1126-u-boot.dtsi b/arch/arm/dts/rv1126-u-boot.dtsi > index 5e348278f2..811a3cee98 100644 > --- a/arch/arm/dts/rv1126-u-boot.dtsi > +++ b/arch/arm/dts/rv1126-u-boot.dtsi > @@ -15,6 +15,18 @@ > 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 { > diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig > index a6c69c300d..5e993383cf 100644 > --- a/arch/arm/mach-rockchip/Kconfig > +++ b/arch/arm/mach-rockchip/Kconfig > @@ -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
diff --git a/arch/arm/dts/rv1126-u-boot.dtsi b/arch/arm/dts/rv1126-u-boot.dtsi index 5e348278f2..811a3cee98 100644 --- a/arch/arm/dts/rv1126-u-boot.dtsi +++ b/arch/arm/dts/rv1126-u-boot.dtsi @@ -15,6 +15,18 @@ 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 { diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index a6c69c300d..5e993383cf 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -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
Provide configuration to read cpuid and generate a persistant MAC address in ethaddr Signed-off-by: Tim Lunn <tim@feathertop.org> --- arch/arm/dts/rv1126-u-boot.dtsi | 12 ++++++++++++ arch/arm/mach-rockchip/Kconfig | 2 ++ 2 files changed, 14 insertions(+)