Skip to content

rockchip: Add efuse and otp support to more SoCs

Jonas Karlman u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 1 replyIn review
  2. v111 patches 14 repliesSuperseded

Changes in v2 from the cover letter

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12rockchip: otp: Refactor to use driver data and opsdrivers/misc/rockchip-otp.c+44 -410 replies
2/12rockchip: otp: Add support for RK3568drivers/misc/rockchip-otp.c+66 -10 replies
3/12rockchip: otp: Add support for RK3588drivers/misc/rockchip-otp.c+57 -60 replies
4/12rockchip: otp: Add dump_otp debug commanddrivers/misc/rockchip-otp.c+35 -00 replies
5/12rockchip: efuse: Refactor to use driver data and opsdrivers/misc/rockchip-efuse.c+85 -750 replies
6/12rockchip: efuse: Add support for RK3288 and moredrivers/misc/Kconfig drivers/misc/rockchip-efuse.c+60 -120 replies
7/12rockchip: efuse: Add support for RK3328drivers/misc/rockchip-efuse.c+45 -00 replies
8/12rockchip: efuse: Add support for RK3128drivers/misc/rockchip-efuse.c+39 -00 replies
9/12rockchip: efuse: Add support for RK3036drivers/misc/rockchip-efuse.c+39 -00 replies
10/12rockchip: misc: Set eth1addr mac addressarch/arm/mach-rockchip/misc.c+5 -10 replies
11/12rockchip: rk3568: Read cpuid from otparch/arm/dts/rk356x-u-boot.dtsi arch/arm/mach-rockchip/Kconfig arch/arm/mach-rockchip/board.c +2 more+21 -10 replies
12/12rockchip: rk3588: Read cpuid from otparch/arm/dts/rk3588s-u-boot.dtsi arch/arm/mach-rockchip/Kconfig+14 -01 reply

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

PatchKever Yang
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b
10/12R-b
11/12R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/12] rockchip: Add efuse and otp support to more SoCs

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 along with ethaddr. And a small change so that ethernet mac 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.

Alex Bee found and fixed an issue on RK3188 and RK3128, fix is included in v2, thanks!

The last patches enables use of the otp driver for RK3568 and RK3588. To handle the unique cpuid offset used on RK3568 a new const CFG_CPUID_OFFSET was added.

Ideally, we should get this cpuid offset from the id node in the fdt. Something that can be improved in a future series.

This series can also be found at [3].

Changes in v2:
- Use readl instead of readb/readw (Alex Bee)
- Always set eth1addr (Chen-Yu Tsai)
- Collect r-b tags
- Add patch to enable read of cpuid on rk3588

[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 (12):
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
rockchip: rk3588: Read cpuid from otp

 arch/arm/dts/rk356x-u-boot.dtsi   |  12 ++
 arch/arm/dts/rk3588s-u-boot.dtsi  |  12 ++
 arch/arm/mach-rockchip/Kconfig    |   4 +
 arch/arm/mach-rockchip/board.c    |   2 +-
 arch/arm/mach-rockchip/misc.c     |   6 +-
 drivers/misc/Kconfig              |   4 -
 drivers/misc/rockchip-efuse.c     | 333 +++++++++++++++++++++++-------
 drivers/misc/rockchip-otp.c       | 230 +++++++++++++++++----
 include/configs/rk3568_common.h   |   2 +
 include/configs/rockchip-common.h |   4 +
 10 files changed, 491 insertions(+), 118 deletions(-)
Signature · 1 line
2.39.2