[PATCH 00/11] rockchip: Add efuse and otp support to more SoCs

Jonas Karlman jonas at kwiboo.se
Thu Feb 16 00:48:57 CET 2023


This series refactors and add support for more SoCs to the rockchip
efuse and otp driver.

Support is added for the following SoCs:
- efuse: RK3036, RK3066, RK3128, RK3188, RK3228, RK3288 and RK3328
- otp: RK3568 and RK3588

This also changes so that eth1addr is also set when there is a ethernet1
alias in the fdt. And a small change so that ethernet addresses is set
based on CONFIG_HASH and CONFIG_SHA256 instead of CONFIG_CMD_NET.

I have only been able to test the efuse driver on RK3288, RK3328, RK3399
and the otp driver on RK3568 and RK3588. Information on the remaining
SoCs is based on information at [1], [2] and in TRM.

The final patch enables use of the otp driver for RK3568. To handle this
SoCs unique cpuid offset a new const CFG_CPUID_OFFSET was added.

Ideally, we should get this cpuid offset from the id node in the fdt.
Maybe adding a custom ioctl that these drivers support and misc.c can
call to get the cpuid. Something that can be improved in a future series.

This series can also be found at [3].

[1] https://github.com/rockchip-linux/kernel/blob/release-3.10/arch/arm/mach-rockchip/efuse.c
[2] https://github.com/rockchip-linux/kernel/blob/develop-5.10/drivers/nvmem/rockchip-otp.c
[2] https://github.com/Kwiboo/u-boot-rockchip/commits/rk3568-efuse-otp

Jonas Karlman (11):
  rockchip: otp: Refactor to use driver data and ops
  rockchip: otp: Add support for RK3568
  rockchip: otp: Add support for RK3588
  rockchip: otp: Add dump_otp debug command
  rockchip: efuse: Refactor to use driver data and ops
  rockchip: efuse: Add support for RK3288 and more
  rockchip: efuse: Add support for RK3328
  rockchip: efuse: Add support for RK3128
  rockchip: efuse: Add support for RK3036
  rockchip: misc: Set eth1addr mac address
  rockchip: rk3568: Read cpuid from otp

 arch/arm/dts/rk356x-u-boot.dtsi   |  12 ++
 arch/arm/mach-rockchip/Kconfig    |   2 +
 arch/arm/mach-rockchip/board.c    |   2 +-
 arch/arm/mach-rockchip/misc.c     |  10 +-
 drivers/misc/Kconfig              |   4 -
 drivers/misc/rockchip-efuse.c     | 333 +++++++++++++++++++++++-------
 drivers/misc/rockchip-otp.c       | 230 +++++++++++++++++----
 include/configs/rk3568_common.h   |   3 +
 include/configs/rockchip-common.h |   2 +
 9 files changed, 480 insertions(+), 118 deletions(-)

-- 
2.39.1



More information about the U-Boot mailing list