Skip to content

RFC Enable display cpuinfo to get the reset cause

Anand Moon u-boot 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest posting 2/223 patches 14 repliesIn review
  2. v2 RFC posting 1/20 of 23 patches 0 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23rockchip: RK3328: Read the reset cause from clock reset unit for RK3328 SoCarch/arm/include/asm/arch-rockchip/cru.h arch/arm/mach-rockchip/cpu-info.c+5 -13 replies
2/23rockchip: RK3328: Enable display cpuinfo support on all boardsconfigs/evb-rk3328_defconfig configs/nanopi-r2c-plus-rk3328_defconfig configs/nanopi-r2c-rk3328_defconfig +6 more+0 -90 replies
3/23rockchip: RK3399: Read the reset cause from clock reset unit for RK3399 SoCarch/arm/mach-rockchip/cpu-info.c+2 -00 replies
4/23rockchip: RK3399: Enable display cpuinfo support on all boardsconfigs/chromebook_bob_defconfig configs/chromebook_kevin_defconfig+0 -20 replies
5/23arm: rockchip: Enable display cpuinfo to be build with SPL_BUILDarch/arm/mach-rockchip/Makefile+0 -30 replies
6/23rockchip: RK3568: Read the reset cause from clock reset unit for RK356x SoCarch/arm/mach-rockchip/cpu-info.c+2 -00 replies
7/23rockchip: RK3568: Enable display cpuinfo support on all boardsconfigs/anbernic-rgxx3-rk3566_defconfig configs/bpi-r2-pro-rk3568_defconfig configs/evb-rk3568_defconfig +14 more+0 -170 replies
8/23rockchip: RK3588: Read the reset cause from clock reset unit for RK3588 SoCarch/arm/include/asm/arch-rockchip/cru.h arch/arm/mach-rockchip/cpu-info.c+4 -01 reply
9/23rockchip: RK3588: Enable display cpuinfo support on all boardsconfigs/coolpi-4b-rk3588s_defconfig configs/coolpi-cm5-evb-rk3588_defconfig configs/evb-rk3588_defconfig +12 more+0 -150 replies
10/23rockchip: PX30: Read the reset cause from clock reset unit for PX30 SoCarch/arm/include/asm/arch-rockchip/cru.h arch/arm/mach-rockchip/cpu-info.c+4 -01 reply
11/23rockchip: PX30: Enable display cpuinfo support on all boardsconfigs/evb-px30_defconfig configs/firefly-px30_defconfig configs/px30-core-ctouch2-of10-px30_defconfig +3 more+0 -60 replies
12/23rockchip: RK3288: Read the reset cause from clock reset unit for RK3288 SoCarch/arm/mach-rockchip/cpu-info.c+2 -00 replies
13/23rockchip: RK3288: Enable display cpuinfo support on all boardsconfigs/chromebit_mickey_defconfig configs/chromebook_jerry_defconfig configs/chromebook_minnie_defconfig +1 more+0 -40 replies
14/23rockchip: RK3308: Read the reset cause from clock reset unit for RK3308 SoCarch/arm/include/asm/arch-rockchip/cru.h arch/arm/mach-rockchip/cpu-info.c+4 -01 reply
15/23rockchip: RK3308: Enable display cpuinfo support on all boardsconfigs/evb-rk3308_defconfig configs/roc-cc-rk3308_defconfig configs/rock-pi-s-rk3308_defconfig+0 -30 replies
16/23rockchip: RK3368: Read the reset cause from clock reset unit for RK3368 SoCarch/arm/include/asm/arch-rockchip/cru.h arch/arm/mach-rockchip/cpu-info.c+4 -01 reply
17/23rockchip: RK3368: Enable display cpuinfo support on all boardsconfigs/evb-px5_defconfig configs/geekbox_defconfig configs/lion-rk3368_defconfig +1 more+0 -40 replies
18/23rockchip: RV1108: Read the reset cause from clock reset unit for RV1108 SoCarch/arm/include/asm/arch-rockchip/cru.h arch/arm/mach-rockchip/cpu-info.c+4 -01 reply
19/23rockchip: RV1108: Enable display cpuinfo support on all boardsconfigs/elgin-rv1108_defconfig configs/evb-rv1108_defconfig+0 -20 replies
20/23rockchip: RV1126: Read the reset cause from clock reset unit for RV1126 SoCarch/arm/include/asm/arch-rockchip/cru.h arch/arm/mach-rockchip/cpu-info.c+4 -02 replies
21/23rockchip: RV1126: Enable display cpuinfo support on all boardsconfigs/neu2-io-rv1126_defconfig configs/sonoff-ihost-rv1126_defconfig+0 -20 replies
22/23sysreset: rockchip: use fst reset for ARM64 SOCdrivers/sysreset/sysreset_rockchip.c+5 -04 replies
23/23sysreset: rockchip: use dev_read_addr_ptr get cru basedrivers/sysreset/sysreset_rockchip.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH RFC v2 00/23] Enable display cpuinfo to get the reset cause

All the Rockchip SoC support reset cauee like POR_RST, GLB_RST, TSADC_RST, WD_RST by reading the clock reset unit register.

V2: with the feedback from Jonas Karlman and Quentin Schulz
drop the inply for CONFIG_DISPLAY_CPUINFO as it defaault enabled. re-organized the code.

As pointed only as of now RK3328, RK3399 supports this feature for POR and RST.

On RK3568 and RK3588 SoC it only return POR, for all the case of reboot and poweroff. I have tried to debug this issue, found Clock Reset Unit will bind to rockchip_sysreset to determine the reset cause. if there is ant input on this please share.

I have update two new patches from u-boot-radxa, but with no success.

[0] https://elixir.bootlin.com/u-boot/v2024.07-rc3/source/drivers/clk/rockchip/clk_rk3568.c#L2945

# dm tree # RK3568
 clk           5  [ + ]   rockchip_rk3588_cru   |-- clock-controller@fd7c0000
 sysreset      0  [   ]   rockchip_sysreset     |   |-- sysreset
 reset         0  [ + ]   rockchip_reset        |   `-- reset

[1] https://elixir.bootlin.com/u-boot/v2024.07-rc3/source/drivers/clk/rockchip/clk_rk3588.c#L2006

# dm tree  # RK3588
 clk           5  [ + ]   rockchip_rk3588_cru   |-- clock-controller@fd7c0000
 sysreset      0  [   ]   rockchip_sysreset     |   |-- sysreset
 reset         0  [   ]   rockchip_reset        |   `-- reset

Tested on Rock64, Rock-3a, Rock-5b boards.

I have update few Rockchip SoC to verify this feature, Only Build to since I dont have the hardware.

Thanks
-Anand

Anand Moon (21):
rockchip: RK3328: Read the reset cause from clock reset unit for

    RK3328 SoC
  rockchip: RK3328: Enable display cpuinfo support on all boards
  rockchip: RK3399: Read the reset cause from clock reset unit for
    RK3399 SoC
  rockchip: RK3399: Enable display cpuinfo support on all boards
  arm: rockchip: Enable display cpuinfo to be build with SPL_BUILD
  rockchip: RK3568: Read the reset cause from clock reset unit for
    RK356x SoC
  rockchip: RK3568: Enable display cpuinfo support on all boards
  rockchip: RK3588: Read the reset cause from clock reset unit for
    RK3588 SoC
  rockchip: RK3588: Enable display cpuinfo support on all boards
  rockchip: PX30: Read the reset cause from clock reset unit for PX30
    SoC
  rockchip: PX30: Enable display cpuinfo support on all boards
  rockchip: RK3288: Read the reset cause from clock reset unit for
    RK3288 SoC
  rockchip: RK3288: Enable display cpuinfo support on all boards
  rockchip: RK3308: Read the reset cause from clock reset unit for
    RK3308 SoC
  rockchip: RK3308: Enable display cpuinfo support on all boards
  rockchip: RK3368: Read the reset cause from clock reset unit for
    RK3368 SoC
  rockchip: RK3368: Enable display cpuinfo support on all boards
  rockchip: RV1108: Read the reset cause from clock reset unit for
    RV1108 SoC
  rockchip: RV1108: Enable display cpuinfo support on all boards
  rockchip: RV1126: Read the reset cause from clock reset unit for
    RV1126 SoC

rockchip: RV1126: Enable display cpuinfo support on all boards

Andy Yan (1):
sysreset: rockchip: use dev_read_addr_ptr get cru base

Kever Yang (1):
sysreset: rockchip: use fst reset for ARM64 SOC

 arch/arm/include/asm/arch-rockchip/cru.h      | 14 +++++++++++++
 arch/arm/mach-rockchip/Makefile               |  3 ---
 arch/arm/mach-rockchip/cpu-info.c             | 20 +++++++++++++++++++
 configs/anbernic-rgxx3-rk3566_defconfig       |  1 -
 configs/bpi-r2-pro-rk3568_defconfig           |  1 -
 configs/chromebit_mickey_defconfig            |  1 -
 configs/chromebook_bob_defconfig              |  1 -
 configs/chromebook_jerry_defconfig            |  1 -
 configs/chromebook_kevin_defconfig            |  1 -
 configs/chromebook_minnie_defconfig           |  1 -
 configs/chromebook_speedy_defconfig           |  1 -
 configs/coolpi-4b-rk3588s_defconfig           |  1 -
 configs/coolpi-cm5-evb-rk3588_defconfig       |  1 -
 configs/elgin-rv1108_defconfig                |  1 -
 configs/evb-px30_defconfig                    |  1 -
 configs/evb-px5_defconfig                     |  1 -
 configs/evb-rk3308_defconfig                  |  1 -
 configs/evb-rk3328_defconfig                  |  1 -
 configs/evb-rk3568_defconfig                  |  1 -
 configs/evb-rk3588_defconfig                  |  1 -
 configs/evb-rv1108_defconfig                  |  1 -
 configs/firefly-px30_defconfig                |  1 -
 configs/geekbox_defconfig                     |  1 -
 configs/generic-rk3568_defconfig              |  1 -
 configs/generic-rk3588_defconfig              |  1 -
 configs/jaguar-rk3588_defconfig               |  1 -
 configs/lion-rk3368_defconfig                 |  1 -
 configs/lubancat-2-rk3568_defconfig           |  1 -
 configs/nanopc-t6-rk3588_defconfig            |  1 -
 configs/nanopi-r2c-plus-rk3328_defconfig      |  1 -
 configs/nanopi-r2c-rk3328_defconfig           |  1 -
 configs/nanopi-r2s-rk3328_defconfig           |  1 -
 configs/nanopi-r5c-rk3568_defconfig           |  1 -
 configs/nanopi-r5s-rk3568_defconfig           |  1 -
 configs/neu2-io-rv1126_defconfig              |  1 -
 configs/neu6a-io-rk3588_defconfig             |  1 -
 configs/neu6b-io-rk3588_defconfig             |  1 -
 configs/odroid-m1-rk3568_defconfig            |  1 -
 configs/orangepi-5-plus-rk3588_defconfig      |  1 -
 configs/orangepi-5-rk3588s_defconfig          |  1 -
 configs/orangepi-r1-plus-lts-rk3328_defconfig |  1 -
 configs/orangepi-r1-plus-rk3328_defconfig     |  1 -
 configs/pinetab2-rk3566_defconfig             |  1 -
 configs/px30-core-ctouch2-of10-px30_defconfig |  1 -
 configs/px30-core-ctouch2-px30_defconfig      |  1 -
 configs/px30-core-edimm2.2-px30_defconfig     |  1 -
 configs/quartz64-a-rk3566_defconfig           |  1 -
 configs/quartz64-b-rk3566_defconfig           |  1 -
 configs/quartzpro64-rk3588_defconfig          |  1 -
 configs/radxa-cm3-io-rk3566_defconfig         |  1 -
 configs/radxa-e25-rk3568_defconfig            |  1 -
 configs/ringneck-px30_defconfig               |  1 -
 configs/roc-cc-rk3308_defconfig               |  1 -
 configs/roc-cc-rk3328_defconfig               |  1 -
 configs/rock-3a-rk3568_defconfig              |  1 -
 configs/rock-pi-e-rk3328_defconfig            |  1 -
 configs/rock-pi-s-rk3308_defconfig            |  1 -
 configs/rock5a-rk3588s_defconfig              |  1 -
 configs/rock5b-rk3588_defconfig               |  1 -
 configs/rock64-rk3328_defconfig               |  1 -
 configs/sheep-rk3368_defconfig                |  1 -
 configs/sonoff-ihost-rv1126_defconfig         |  1 -
 configs/soquartz-blade-rk3566_defconfig       |  1 -
 configs/soquartz-cm4-rk3566_defconfig         |  1 -
 configs/soquartz-model-a-rk3566_defconfig     |  1 -
 configs/toybrick-rk3588_defconfig             |  1 -
 configs/turing-rk1-rk3588_defconfig           |  1 -
 drivers/sysreset/sysreset_rockchip.c          |  9 +++++++--
 68 files changed, 41 insertions(+), 69 deletions(-)
Signature · 1 line
2.44.0