Skip to contentSkip to conversation

rockchip: RK3588: Enable display cpuinfo support on all boards

PATCH NAK Quentin Schulz 4 participants 19 messages May 16, 2024 – May 24, 2024 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/9 rockchip: RK3328: Read the reset cause from clock reset unit for RK3328 SoC

Read the reset cause from clock reset unit for RK3328 SoC.

---
 arch/arm/mach-rockchip/cpu-info.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-rockchip/cpu-info.c +6 -1
index 14c7331e1a..fce4bd7541 100644
@@ -8,12 +8,17 @@
 #include <init.h>
 #include <asm/arch-rockchip/clock.h>
 #include <asm/arch-rockchip/cru.h>
+#if IS_ENABLED(CONFIG_ROCKCHIP_RK3328)
+#include <asm/arch-rockchip/cru_rk3328.h>
+#endif
 #include <asm/arch-rockchip/hardware.h>
 #include <linux/err.h>
 
 char *get_reset_cause(void)
 {
-	struct rockchip_cru *cru = rockchip_get_cru();
+#if IS_ENABLED(CONFIG_ROCKCHIP_RK3328)
+	struct rk3328_cru *cru = rockchip_get_cru();
+#endif
 	char *cause = NULL;
 
 	if (IS_ERR(cru))
Signature · 1 line
2.45.0
author NAK
#2 lore raw

Re: [PATCH v1 1/9] rockchip: RK3328: Read the reset cause from clock reset unit for RK3328 SoC

Hi Anand,

Quoted 18 lines · Anand Moon

Read the reset cause from clock reset unit for RK3328 SoC.

---
  arch/arm/mach-rockchip/cpu-info.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-rockchip/cpu-info.c +2 -0
index 14c7331e1a..fce4bd7541 100644
@@ -8,12 +8,17 @@
  #include <init.h>
  #include <asm/arch-rockchip/clock.h>
  #include <asm/arch-rockchip/cru.h>
+#if IS_ENABLED(CONFIG_ROCKCHIP_RK3328)
+#include <asm/arch-rockchip/cru_rk3328.h>

arch/arm/mach-rockchip/cpu-info.c line 21

Quoted 10 lines
arch/arm/mach-rockchip/cpu-info.c +4 -1
+#endif
  #include <asm/arch-rockchip/hardware.h>
  #include <linux/err.h>
 
  char *get_reset_cause(void)
  {
-	struct rockchip_cru *cru = rockchip_get_cru();
+#if IS_ENABLED(CONFIG_ROCKCHIP_RK3328)
+	struct rk3328_cru *cru = rockchip_get_cru();
+#endif

NACK.

If I only apply this patch, it breaks support for rk3288 and rk3399 (the ones which have a rockchip_cru struct).

Do:

"""

#if IS_ENABLED(CONFIG_ROCKCHIP_RK3328)
    struct rk3328_cru *cru = rockchip_get_cru();
#else
    struct rockchip_cru *cru = rockchip_get_cru();

#endif
"""

instead to keep the current support and add stuff.

However, I very much don't like this. There's no need for cpuinfo.c to become SoC-specific.

I would recommend to move get_reset_cause() in some file that is SoC specific, and out of the DISPLAY_CPUINFO ifdef since it may be useful outside of this very specific print_cpuinfo function (c.f. the rk3399 firefly board).

Yes there's a bit of code duplication then, BUT, nothing guarantees us the reset reason will always be stored in that glb_rst_st register and moreover, RK3588 already has more reasons that currently supported, and this prevents us from expanding it.

You can have a

"""
__weak char *get_reset_cause(void)

{
    return "could not get reset cause";
}

"""
in replacement and let SoC-specific files expand it by overriding it.

And.... to think even further than that, maybe we should actually expand drivers/sysreset/sysreset_rockchip.c to support more SoCs.

Then we could get the status via get_status callback from sysreset_ops in

https://elixir.bootlin.com/u-boot/latest/source/common/board_f.c#L904

and remove this cpu-info.c file from the arch/arm/mach-rockchip.

Reporting the SoC could be done with a CPU UCLASS (c.f. what's done for IMX8 already), from https://elixir.bootlin.com/u-boot/latest/source/common/board_f.c#L176.

This honestly makes more sense to me.

Cheers,
Quentin

#3 lore raw

PATCH 2/9 rockchip: RK3328: Enable display cpuinfo support on all boards

In reply to a message not in the archive

Imply DISPLAY_CPUINFO Kconfig options to support on all RK3328 boards, Its used to determine the reset cause of the board.

---
 arch/arm/mach-rockchip/Kconfig                | 1 +
 configs/evb-rk3328_defconfig                  | 1 -
 configs/nanopi-r2c-plus-rk3328_defconfig      | 1 -
 configs/nanopi-r2c-rk3328_defconfig           | 1 -
 configs/nanopi-r2s-rk3328_defconfig           | 1 -
 configs/orangepi-r1-plus-lts-rk3328_defconfig | 1 -
 configs/orangepi-r1-plus-rk3328_defconfig     | 1 -
 configs/roc-cc-rk3328_defconfig               | 1 -
 configs/rock-pi-e-rk3328_defconfig            | 1 -
 configs/rock64-rk3328_defconfig               | 1 -
 10 files changed, 1 insertion(+), 9 deletions(-)
arch/arm/mach-rockchip/Kconfig +1 -0
index ec3697f358..ba1474bb9e 100644
@@ -206,6 +206,7 @@ config ROCKCHIP_RK3328
 	imply SPL_SEPARATE_BSS
 	imply SPL_SERIAL
 	imply TPL_SERIAL
+	imply DISPLAY_CPUINFO
 	help
 	  The Rockchip RK3328 is a ARM-based SoC with a quad-core Cortex-A53.
 	  including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two
configs/evb-rk3328_defconfig +0 -1
index bfb8522343..e1c2016cb3 100644
@@ -19,7 +19,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-evb.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/nanopi-r2c-plus-rk3328_defconfig +0 -1
index f311a0a80b..700ce47696 100644
@@ -20,7 +20,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2c-plus.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/nanopi-r2c-rk3328_defconfig +0 -1
index 533dc1029f..a594f329bf 100644
@@ -20,7 +20,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2c.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/nanopi-r2s-rk3328_defconfig +0 -1
index 2591a9cc8a..c1d0a1f396 100644
@@ -20,7 +20,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2s.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/orangepi-r1-plus-lts-rk3328_defconfig +0 -1
index 14cdbd813c..7e0b1b2773 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus-lts.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/orangepi-r1-plus-rk3328_defconfig +0 -1
index 7fe58e7a14..4525c99ca2 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/roc-cc-rk3328_defconfig +0 -1
index 91b9422e26..c1eb03c5e8 100644
@@ -19,7 +19,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-roc-cc.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/rock-pi-e-rk3328_defconfig +0 -1
index 5cc54af3ca..bb99670b8c 100644
@@ -19,7 +19,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-rock-pi-e.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/rock64-rk3328_defconfig +0 -1
index 9d77dfb709..836f18a806 100644
@@ -22,7 +22,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-rock64.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
Signature · 1 line
2.45.0
#4 lore raw

PATCH 3/9 rockchip: RK3399: Read the reset cause from clock reset unit for RK3399 SoC

In reply to a message not in the archive

Read the reset cause from clock reset unit for RK3399 SoC.

---
 arch/arm/mach-rockchip/cpu-info.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-rockchip/cpu-info.c +4 -0
index fce4bd7541..77833c8fce 100644
@@ -10,6 +10,8 @@
 #include <asm/arch-rockchip/cru.h>
 #if IS_ENABLED(CONFIG_ROCKCHIP_RK3328)
 #include <asm/arch-rockchip/cru_rk3328.h>
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
+#include <asm/arch-rockchip/cru_rk3399.h>
 #endif
 #include <asm/arch-rockchip/hardware.h>
 #include <linux/err.h>
@@ -18,6 +20,8 @@ char *get_reset_cause(void)
 {
 #if IS_ENABLED(CONFIG_ROCKCHIP_RK3328)
 	struct rk3328_cru *cru = rockchip_get_cru();
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
+	struct rockchip_cru *cru = rockchip_get_cru();
 #endif
 	char *cause = NULL;
 
Signature · 1 line
2.45.0
#5 lore raw

PATCH 4/9 rockchip: RK3399: Enable display cpuinfo support on all boards

In reply to a message not in the archive

Imply DISPLAY_CPUINFO Kconfig options to support on all RK3399 boards, Its used to determine the reset cause of the board.

---
 arch/arm/mach-rockchip/Kconfig     | 1 +
 configs/chromebook_bob_defconfig   | 1 -
 configs/chromebook_kevin_defconfig | 1 -
 3 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-rockchip/Kconfig +1 -0
index ba1474bb9e..1fd482e43b 100644
@@ -297,6 +297,7 @@ config ROCKCHIP_RK3399
 	imply TPL_SYS_MALLOC_SIMPLE
 	imply TPL_SYSCON
 	imply TPL_TINY_MEMSET
+	imply DISPLAY_CPUINFO
 	help
 	  The Rockchip RK3399 is a ARM-based SoC with a dual-core Cortex-A72
 	  and quad-core Cortex-A53.
configs/chromebook_bob_defconfig +0 -1
index acfe393410..2c1a8141c0 100644
@@ -30,7 +30,6 @@ CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_DEBUG_UART=y
 # CONFIG_SPL_FIT_SIGNATURE is not set
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-bob.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_BLOBLIST=y
configs/chromebook_kevin_defconfig +0 -1
index 95fdb418d8..f6649804c7 100644
@@ -31,7 +31,6 @@ CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_DEBUG_UART=y
 # CONFIG_SPL_FIT_SIGNATURE is not set
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-kevin.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_BLOBLIST=y
Signature · 1 line
2.45.0
#6 lore raw

PATCH 5/9 arm: rockchip: Enable display cpuinfo to be build with SPL_BUILD

In reply to a message not in the archive

Changes help enable CONFIG_DISPLAY_CPUINFO to build with SPL_BUILD for SoC RK356x and RK3588.

---
 arch/arm/mach-rockchip/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-rockchip/Makefile +1 -1
index c07bdaee4c..6722e7c9ea 100644
@@ -25,7 +25,7 @@ obj-y += boot_mode.o
 obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
 endif
 
-ifeq ($(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
 obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o
 endif
 
Signature · 1 line
2.45.0
#7 lore raw

Re: [PATCH v1 5/9] arm: rockchip: Enable display cpuinfo to be build with SPL_BUILD

Hi Anand,

Quoted 13 lines · Anand Moon

Changes help enable CONFIG_DISPLAY_CPUINFO to build with SPL_BUILD for SoC RK356x and RK3588.

Quoted 1 line
Cc Jagan Teki <[email protected]>
---
  arch/arm/mach-rockchip/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-rockchip/Makefile +0 -0
index c07bdaee4c..6722e7c9ea 100644

arch/arm/mach-rockchip/Makefile obj-y += boot_mode.o · line 28

Quoted 5 lines
arch/arm/mach-rockchip/Makefile +1 -1
@@ -25,7 +25,7 @@ obj-y += boot_mode.o
  obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
  endif
 
-ifeq ($(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)

If I'm not mistaken, this is a way for disabling building cpu-info.o if either in TPL or SPL build mode (therefore only compiling for proper build mode).

I think it'd make more sense to convert CONFIG_DISPLAY_CPUINFO into three symbols, e.g. CONFIG_TPL_DISPLAY_CPUINFO, CONFIG_SPL_DISPLAY_INFO and then use

"""
obj-$(CONFIG_$(TPL_SPL_)DISPLAY_CPUINFO) += cpu-info.o """

Also... considering the mail I sent to your first patch in this patch series, if we migrate to using sysreset driver to print the reset reason, we wouldn't need this file anymore so we could remove it and not have to care about this.

Cheers,
Quentin

#8 lore raw

Re: [PATCH v1 5/9] arm: rockchip: Enable display cpuinfo to be build with SPL_BUILD

In reply to Anand Moon

Hi Anand,

Quoted 14 lines · Anand Moon

Changes help enable CONFIG_DISPLAY_CPUINFO to build with SPL_BUILD for SoC RK356x and RK3588.

---
 arch/arm/mach-rockchip/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-rockchip/Makefile +0 -0
index c07bdaee4c..6722e7c9ea 100644

arch/arm/mach-rockchip/Makefile obj-y += boot_mode.o · line 28

Quoted 5 lines
arch/arm/mach-rockchip/Makefile +1 -1
@@ -25,7 +25,7 @@ obj-y += boot_mode.o
 obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
 endif
 
-ifeq ($(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)

Suggest you move the cpu-info.o line inside the ifeq/endif block above.

Regards,
Jonas

Quoted 3 lines
arch/arm/mach-rockchip/Makefile +0 -0
 obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o
 endif
 
#9 lore raw

PATCH 6/9 rockchip: RK3568: Read the reset cause from clock reset unit for RK356x SoC

In reply to a message not in the archive

Read the reset cause from clock reset unit for RK356x SoC.

---
 arch/arm/mach-rockchip/cpu-info.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-rockchip/cpu-info.c +4 -0
index 77833c8fce..114608b506 100644
@@ -12,6 +12,8 @@
 #include <asm/arch-rockchip/cru_rk3328.h>
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
 #include <asm/arch-rockchip/cru_rk3399.h>
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK33568)
+#include <asm/arch-rockchip/cru_rk3568.h>
 #endif
 #include <asm/arch-rockchip/hardware.h>
 #include <linux/err.h>
@@ -22,6 +24,8 @@ char *get_reset_cause(void)
 	struct rk3328_cru *cru = rockchip_get_cru();
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
 	struct rockchip_cru *cru = rockchip_get_cru();
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK3568)
+	struct rk3568_cru *cru = rockchip_get_cru();
 #endif
 	char *cause = NULL;
 
Signature · 1 line
2.45.0
#10 lore raw

Re: [PATCH v1 6/9] rockchip: RK3568: Read the reset cause from clock reset unit for RK356x SoC

Hi Anand,

Quoted 22 lines · Anand Moon

Read the reset cause from clock reset unit for RK356x SoC.

---
 arch/arm/mach-rockchip/cpu-info.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-rockchip/cpu-info.c +2 -0
index 77833c8fce..114608b506 100644
@@ -12,6 +12,8 @@
 #include <asm/arch-rockchip/cru_rk3328.h>
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
 #include <asm/arch-rockchip/cru_rk3399.h>
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK33568)
+#include <asm/arch-rockchip/cru_rk3568.h>
 #endif
 #include <asm/arch-rockchip/hardware.h>
 #include <linux/err.h>

arch/arm/mach-rockchip/cpu-info.c char *get_reset_cause(void) · line 28

Quoted 5 lines
arch/arm/mach-rockchip/cpu-info.c +2 -0
@@ -22,6 +24,8 @@ char *get_reset_cause(void)
 	struct rk3328_cru *cru = rockchip_get_cru();
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
 	struct rockchip_cru *cru = rockchip_get_cru();
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK3568)
+	struct rk3568_cru *cru = rockchip_get_cru();

This is strictly not needed for RK3568 after the commit 6e710897aa31 ("rockchip: cru: Enable cpu info support for rk3568").

Suggest you use same/similar workaround or cleanup the include/define statement in arch/arm/include/asm/arch-rockchip/cru.h for all SoCs.

Also at least one RK SoC have other bits set in the glb_rst_st reg.

Suggest you add following:

GLB_RST_MASK = GENMASK(5, 0),

and use something like:

  switch (cru->glb_rst_st & GLB_RST_MASK) {

or "unknown reset" is reported on affected SoCs.

I have also seen POR always being reported even after a reboot so please confirm that reset reason works on the SoCs/boards you enable this on.

Regards,
Jonas

Quoted 3 lines
arch/arm/mach-rockchip/cpu-info.c +0 -0
 #endif
 	char *cause = NULL;
 
#11 lore raw

Re: [PATCH v1 6/9] rockchip: RK3568: Read the reset cause from clock reset unit for RK356x SoC

Hi Jonas,

Dropping @edgeble.ai email ID as it is not working

Quoted 26 lines · Jonas Karlman

Hi Anand,

Quoted 22 lines · Anand Moon

Read the reset cause from the clock reset unit for RK356x SoC.

---
 arch/arm/mach-rockchip/cpu-info.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-rockchip/cpu-info.c +2 -0
index 77833c8fce..114608b506 100644
@@ -12,6 +12,8 @@
 #include <asm/arch-rockchip/cru_rk3328.h>
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
 #include <asm/arch-rockchip/cru_rk3399.h>
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK33568)
+#include <asm/arch-rockchip/cru_rk3568.h>
 #endif
 #include <asm/arch-rockchip/hardware.h>
 #include <linux/err.h>
@@ -22,6 +24,8 @@ char *get_reset_cause(void)
Quoted 8 lines

arch/arm/mach-rockchip/cpu-info.c char *get_reset_cause(void) · line 28

Quoted 5 lines
arch/arm/mach-rockchip/cpu-info.c +2 -0
      struct rk3328_cru *cru = rockchip_get_cru();
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
      struct rockchip_cru *cru = rockchip_get_cru();
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK3568)
+     struct rk3568_cru *cru = rockchip_get_cru();

This is strictly not needed for RK3568 after the commit 6e710897aa31 ("rockchip: cru: Enable cpu info support for rk3568").

Ok, thanks for this input.

Quoted 10 lines

Suggest you use same/similar workaround or cleanup the include/define statement in arch/arm/include/asm/arch-rockchip/cru.h for all SoCs.

Also at least one RK SoC have other bits set in the glb_rst_st reg.

Suggest you add following:

GLB_RST_MASK = GENMASK(5, 0),

Quoted 9 lines

and use something like:

  switch (cru->glb_rst_st & GLB_RST_MASK) {

or "unknown reset" is reported on affected SoCs.

I have also seen POR always being reported even after a reboot so please confirm that reset reason works on the SoCs/boards you enable this on.

Ok, I will check this and update you on this.

Quoted 3 lines

Regards,
Jonas

Thanks
-Anand

#12 lore raw

Re: [PATCH v1 6/9] rockchip: RK3568: Read the reset cause from clock reset unit for RK356x SoC

Hi Jonas,

Quoted 41 lines · Anand Moon

Hi Jonas,

Dropping @edgeble.ai email ID as it is not working

Quoted 26 lines · Jonas Karlman

Hi Anand,

Quoted 22 lines · Anand Moon

Read the reset cause from the clock reset unit for RK356x SoC.

---
 arch/arm/mach-rockchip/cpu-info.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-rockchip/cpu-info.c +2 -0
index 77833c8fce..114608b506 100644
@@ -12,6 +12,8 @@
 #include <asm/arch-rockchip/cru_rk3328.h>
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
 #include <asm/arch-rockchip/cru_rk3399.h>
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK33568)
+#include <asm/arch-rockchip/cru_rk3568.h>
 #endif
 #include <asm/arch-rockchip/hardware.h>
 #include <linux/err.h>
@@ -22,6 +24,8 @@ char *get_reset_cause(void)
Quoted 8 lines

arch/arm/mach-rockchip/cpu-info.c char *get_reset_cause(void) · line 28

Quoted 5 lines
arch/arm/mach-rockchip/cpu-info.c +2 -0
      struct rk3328_cru *cru = rockchip_get_cru();
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3399)
      struct rockchip_cru *cru = rockchip_get_cru();
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK3568)
+     struct rk3568_cru *cru = rockchip_get_cru();

This is strictly not needed for RK3568 after the commit 6e710897aa31 ("rockchip: cru: Enable cpu info support for rk3568").

Quoted 5 lines

Ok, thanks for this input.

Quoted 4 lines

Suggest you use same/similar workaround or cleanup the include/define statement in arch/arm/include/asm/arch-rockchip/cru.h for all SoCs.

I have made changes for all the SoC that supports this reading of CRU only build these SoCs,I don't have all the boards to test.

On rock64 with reboot command, it shows (RST)

U-Boot 2024.07-rc3-00021-gb23d5619e6-dirty (May 24 2024 - 12:55:26 +0530)

SoC: Rockchip rk3328
Reset cause: RST
Model: Pine64 Rock64

with poweroff command, it shows (POR)

U-Boot 2024.07-rc3-00021-gb23d5619e6-dirty (May 24 2024 - 12:55:26 +0530)

SoC: Rockchip rk3328
Reset cause: POR

Quoted 8 lines
Quoted 8 lines

Also at least one RK SoC have other bits set in the glb_rst_st reg.

Suggest you add following:

GLB_RST_MASK = GENMASK(5, 0),

and use something like:

Quoted 7 lines
Quoted 7 lines
  switch (cru->glb_rst_st & GLB_RST_MASK) {

or "unknown reset" is reported on affected SoCs.

I have also seen POR always being reported even after a reboot so please confirm that reset reason works on the SoCs/boards you enable this on.

Actually, for RK3568 and RK3688 SoC, we are not able to read the reset cause via CRU
glb_rst_st is always set to zero.

Either the user space with poweroff and reboot command not updating the CRU or the u-boot is not registering the sysreset to read the reset cause.

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

Ok, I will check this and update you on this.

Thanks
-Anand

#13 lore raw

PATCH 7/9 rockchip: RK356x: Enable display cpuinfo support on all boards

In reply to a message not in the archive

Imply DISPLAY_CPUINFO Kconfig options to support on all RK3566 and RK3568 boards, Its used to determine the reset cause of the board.

---
 arch/arm/mach-rockchip/Kconfig            | 1 +
 configs/anbernic-rgxx3-rk3566_defconfig   | 1 -
 configs/bpi-r2-pro-rk3568_defconfig       | 1 -
 configs/evb-rk3568_defconfig              | 1 -
 configs/generic-rk3568_defconfig          | 1 -
 configs/lubancat-2-rk3568_defconfig       | 1 -
 configs/nanopi-r5c-rk3568_defconfig       | 1 -
 configs/nanopi-r5s-rk3568_defconfig       | 1 -
 configs/odroid-m1-rk3568_defconfig        | 1 -
 configs/pinetab2-rk3566_defconfig         | 1 -
 configs/quartz64-a-rk3566_defconfig       | 1 -
 configs/quartz64-b-rk3566_defconfig       | 1 -
 configs/radxa-cm3-io-rk3566_defconfig     | 1 -
 configs/radxa-e25-rk3568_defconfig        | 1 -
 configs/rock-3a-rk3568_defconfig          | 1 -
 configs/soquartz-blade-rk3566_defconfig   | 1 -
 configs/soquartz-cm4-rk3566_defconfig     | 1 -
 configs/soquartz-model-a-rk3566_defconfig | 1 -
 18 files changed, 1 insertion(+), 17 deletions(-)
arch/arm/mach-rockchip/Kconfig +1 -0
index 1fd482e43b..2e9c71138e 100644
@@ -331,6 +331,7 @@ config ROCKCHIP_RK3568
 	imply ROCKCHIP_OTP
 	imply SPL_ATF_NO_PLATFORM_PARAM if SPL_ATF
 	imply SPL_MMC_HS200_SUPPORT if SPL_MMC && MMC_HS200_SUPPORT
+	imply DISPLAY_CPUINFO
 	help
 	  The Rockchip RK3568 is a ARM-based SoC with quad-core Cortex-A55,
 	  including NEON and GPU, 512K L3 cache, Mali-G52 based graphics,
configs/anbernic-rgxx3-rk3566_defconfig +0 -1
index a03509bf46..95f7cf0739 100644
@@ -21,7 +21,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-anbernic-rgxx3.dtb"
 # CONFIG_CONSOLE_MUX is not set
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_BOARD_RNG_SEED=y
 CONFIG_SPL_MAX_SIZE=0x40000
configs/bpi-r2-pro-rk3568_defconfig +0 -1
index eccc15a0ae..4955fd907c 100644
@@ -16,7 +16,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-bpi-r2-pro.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/evb-rk3568_defconfig +0 -1
index 2076f55122..e6da8fd246 100644
@@ -15,7 +15,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-evb1-v10.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/generic-rk3568_defconfig +0 -1
index 66a33afbba..ba2d995cdc 100644
@@ -20,7 +20,6 @@ CONFIG_SPL_LOAD_FIT=y
 # CONFIG_BOOTMETH_VBE is not set
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-generic.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/lubancat-2-rk3568_defconfig +0 -1
index 88593bfa70..384d0ecfc5 100644
@@ -15,7 +15,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-lubancat-2.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/nanopi-r5c-rk3568_defconfig +0 -1
index 4a6c320faf..b83796083d 100644
@@ -17,7 +17,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-nanopi-r5c.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/nanopi-r5s-rk3568_defconfig +0 -1
index 7ab12e619a..5d500963a2 100644
@@ -17,7 +17,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-nanopi-r5s.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/odroid-m1-rk3568_defconfig +0 -1
index b5263caff6..7bea6e6851 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-odroid-m1.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/pinetab2-rk3566_defconfig +0 -1
index e46acf3a3b..1441feb796 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-pinetab2-v2.0.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/quartz64-a-rk3566_defconfig +0 -1
index 1ea8e0f40c..458d6d6e81 100644
@@ -24,7 +24,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-quartz64-a.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/quartz64-b-rk3566_defconfig +0 -1
index f61b2c181a..029c184177 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-quartz64-b.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/radxa-cm3-io-rk3566_defconfig +0 -1
index 48c8fcf5a6..8d6990c403 100644
@@ -15,7 +15,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-radxa-cm3-io.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/radxa-e25-rk3568_defconfig +0 -1
index 496fee0e0a..2cfa34956d 100644
@@ -18,7 +18,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-radxa-e25.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/rock-3a-rk3568_defconfig +0 -1
index 66ac2f6d7a..9ac9ef8827 100644
@@ -22,7 +22,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-rock-3a.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/soquartz-blade-rk3566_defconfig +0 -1
index 82910daf7c..3d5344e43a 100644
@@ -18,7 +18,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-soquartz-blade.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/soquartz-cm4-rk3566_defconfig +0 -1
index 5744f1baa8..99e5dbe4fc 100644
@@ -18,7 +18,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-soquartz-cm4.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/soquartz-model-a-rk3566_defconfig +0 -1
index 920df9b622..656e0ef178 100644
@@ -18,7 +18,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-soquartz-model-a.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
Signature · 1 line
2.45.0
#14 lore raw

PATCH 8/9 rockchip: RK3588: Read the reset cause from clock reset unit for RK3588 SoC

In reply to a message not in the archive

Read the reset cause from clock reset unit for RK3588 SoC.

---
 arch/arm/mach-rockchip/cpu-info.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-rockchip/cpu-info.c +4 -0
index 114608b506..8415009fc5 100644
@@ -14,6 +14,8 @@
 #include <asm/arch-rockchip/cru_rk3399.h>
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK33568)
 #include <asm/arch-rockchip/cru_rk3568.h>
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK3588)
+#include <asm/arch-rockchip/cru_rk3588.h>
 #endif
 #include <asm/arch-rockchip/hardware.h>
 #include <linux/err.h>
@@ -26,6 +28,8 @@ char *get_reset_cause(void)
 	struct rockchip_cru *cru = rockchip_get_cru();
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3568)
 	struct rk3568_cru *cru = rockchip_get_cru();
+#elif IS_ENABLED(CONFIG_ROCKCHIP_RK3588)
+	struct rk3588_cru *cru = rockchip_get_cru();
 #endif
 	char *cause = NULL;
 
Signature · 1 line
2.45.0
#15 lore raw

PATCH 9/9 rockchip: RK3588: Enable display cpuinfo support on all boards

In reply to a message not in the archive

Imply DISPLAY_CPUINFO Kconfig options to support on all RK3588s and RK3588 boards, Its used to determine the reset cause of the board.

---
 arch/arm/mach-rockchip/Kconfig           | 1 +
 configs/coolpi-4b-rk3588s_defconfig      | 1 -
 configs/coolpi-cm5-evb-rk3588_defconfig  | 1 -
 configs/evb-rk3588_defconfig             | 1 -
 configs/generic-rk3588_defconfig         | 1 -
 configs/jaguar-rk3588_defconfig          | 1 -
 configs/nanopc-t6-rk3588_defconfig       | 1 -
 configs/neu6a-io-rk3588_defconfig        | 1 -
 configs/neu6b-io-rk3588_defconfig        | 1 -
 configs/orangepi-5-plus-rk3588_defconfig | 1 -
 configs/orangepi-5-rk3588s_defconfig     | 1 -
 configs/quartzpro64-rk3588_defconfig     | 1 -
 configs/rock5a-rk3588s_defconfig         | 1 -
 configs/rock5b-rk3588_defconfig          | 1 -
 configs/toybrick-rk3588_defconfig        | 1 -
 configs/turing-rk1-rk3588_defconfig      | 1 -
 16 files changed, 1 insertion(+), 15 deletions(-)
arch/arm/mach-rockchip/Kconfig +1 -0
index 2e9c71138e..1b5cc34f99 100644
@@ -366,6 +366,7 @@ config ROCKCHIP_RK3588
 	imply SCMI_FIRMWARE
 	imply SPL_ATF_NO_PLATFORM_PARAM if SPL_ATF
 	imply SPL_MMC_HS200_SUPPORT if SPL_MMC && MMC_HS200_SUPPORT
+	imply DISPLAY_CPUINFO
 	help
 	  The Rockchip RK3588 is a ARM-based SoC with quad-core Cortex-A76 and
 	  quad-core Cortex-A55 including NEON and GPU, 6TOPS NPU, Mali-G610 MP4,
configs/coolpi-4b-rk3588s_defconfig +0 -1
index 3d45d939ab..b094224f6e 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-coolpi-4b.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/coolpi-cm5-evb-rk3588_defconfig +0 -1
index 5190d69c1c..382ee97fc9 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-coolpi-cm5-evb.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/evb-rk3588_defconfig +0 -1
index 1d5585677a..bfc505a4b7 100644
@@ -16,7 +16,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-evb1-v10.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/generic-rk3588_defconfig +0 -1
index 42bc2c9a76..ddb23b035b 100644
@@ -17,7 +17,6 @@ CONFIG_SPL_LOAD_FIT=y
 # CONFIG_BOOTMETH_VBE is not set
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-generic.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/jaguar-rk3588_defconfig +0 -1
index b69cf4cd05..712a936539 100644
@@ -22,7 +22,6 @@ CONFIG_SPL_LOAD_FIT=y
 # CONFIG_BOOTMETH_VBE is not set
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-jaguar.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_CYCLIC=y
 CONFIG_SPL_MAX_SIZE=0x40000
configs/nanopc-t6-rk3588_defconfig +0 -1
index 926267f93a..978c62aee6 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-nanopc-t6.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/neu6a-io-rk3588_defconfig +0 -1
index ac281e6539..6f2765c640 100644
@@ -16,7 +16,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-edgeble-neu6a-io.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/neu6b-io-rk3588_defconfig +0 -1
index c01e5fb0d0..13b542a752 100644
@@ -16,7 +16,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-edgeble-neu6b-io.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/orangepi-5-plus-rk3588_defconfig +0 -1
index 138a633f32..c8c64bdeaf 100644
@@ -24,7 +24,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-orangepi-5-plus.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/orangepi-5-rk3588s_defconfig +0 -1
index 33529d4cac..d71eb7c3f9 100644
@@ -23,7 +23,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-orangepi-5.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/quartzpro64-rk3588_defconfig +0 -1
index 06c5cff3ca..99422282bc 100644
@@ -19,7 +19,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-quartzpro64.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/rock5a-rk3588s_defconfig +0 -1
index c09e6655f0..a64d8a071d 100644
@@ -16,7 +16,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-rock-5a.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/rock5b-rk3588_defconfig +0 -1
index fc118cea7b..234bc76bf2 100644
@@ -24,7 +24,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-rock-5b.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/toybrick-rk3588_defconfig +0 -1
index 5a190357e4..bd33c648ed 100644
@@ -16,7 +16,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-toybrick-x0.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
configs/turing-rk1-rk3588_defconfig +0 -1
index e6e1bda7ec..0ca33e95d7 100644
@@ -19,7 +19,6 @@ CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-turing-rk1.dtb"
-# CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
Signature · 1 line
2.45.0
#16 lore raw

Hi Anand,

This is patch 9/9 but somehow I didn't receive any other patch, nor did the mailing list? c.f. https://lists.denx.de/pipermail/u-boot/2024-May/thread.html and https://lore.kernel.org/u-boot/. Are you registered on the ML?

Quoted 29 lines · Anand Moon

Imply DISPLAY_CPUINFO Kconfig options to support on all RK3588s and RK3588 boards, Its used to determine the reset cause of the board.

---
  arch/arm/mach-rockchip/Kconfig           | 1 +
  configs/coolpi-4b-rk3588s_defconfig      | 1 -
  configs/coolpi-cm5-evb-rk3588_defconfig  | 1 -
  configs/evb-rk3588_defconfig             | 1 -
  configs/generic-rk3588_defconfig         | 1 -
  configs/jaguar-rk3588_defconfig          | 1 -
  configs/nanopc-t6-rk3588_defconfig       | 1 -
  configs/neu6a-io-rk3588_defconfig        | 1 -
  configs/neu6b-io-rk3588_defconfig        | 1 -
  configs/orangepi-5-plus-rk3588_defconfig | 1 -
  configs/orangepi-5-rk3588s_defconfig     | 1 -
  configs/quartzpro64-rk3588_defconfig     | 1 -
  configs/rock5a-rk3588s_defconfig         | 1 -
  configs/rock5b-rk3588_defconfig          | 1 -
  configs/toybrick-rk3588_defconfig        | 1 -
  configs/turing-rk1-rk3588_defconfig      | 1 -
  16 files changed, 1 insertion(+), 15 deletions(-)
arch/arm/mach-rockchip/Kconfig +0 -0
index 2e9c71138e..1b5cc34f99 100644

arch/arm/mach-rockchip/Kconfig config ROCKCHIP_RK3588 · line 369

Quoted 4 lines
arch/arm/mach-rockchip/Kconfig +1 -0
@@ -366,6 +366,7 @@ config ROCKCHIP_RK3588
  	imply SCMI_FIRMWARE
  	imply SPL_ATF_NO_PLATFORM_PARAM if SPL_ATF
  	imply SPL_MMC_HS200_SUPPORT if SPL_MMC && MMC_HS200_SUPPORT
+	imply DISPLAY_CPUINFO

This is unnecessary, it's already defaulting to y if building for ARM boards: https://elixir.bootlin.com/u-boot/latest/source/common/Kconfig#L596

I also don't think this is SO useful that we need to enable it on all rk3588 boards? But also, doesn't hurt, so... whatever I guess :) ?

While looking at the code, I think we can remove the ifdef in https://elixir.bootlin.com/u-boot/latest/source/arch/arm/mach-rockchip/cpu-info.c#L47 because this file is anyway only compiled when CONFIG_DISPLAY_CPUINFO is set, c.f. https://elixir.bootlin.com/u-boot/latest/source/arch/arm/mach-rockchip/Makefile#L30

which also means...

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/include/asm/arch-rockchip/cru.h#L35 should probably be ifdef'ed

which means...

https://elixir.bootlin.com/u-boot/latest/source/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c#L64 should probably also be ifdef'ed (but the config is enabled already (well... it wouldn't compile otherwsie), so I guess this is fine?).

Cheers,
Quentin

#17 lore raw

Hi Quentin

Quoted 8 lines · Quentin Schulz

Hi Anand,

This is patch 9/9 but somehow I didn't receive any other patch, nor did the mailing list? c.f.
https://lists.denx.de/pipermail/u-boot/2024-May/thread.html and
https://lore.kernel.org/u-boot/. Are you registered on the ML?

Thanks for your review comments.

Something went wrong with git sendmail,
Your message have not reached my email client (gmail)

Quoted 25 lines · Anand Moon
Quoted 24 lines

Imply DISPLAY_CPUINFO Kconfig options to support on all RK3588s and RK3588 boards, Its used to determine the reset cause of the board.

---
  arch/arm/mach-rockchip/Kconfig           | 1 +
  configs/coolpi-4b-rk3588s_defconfig      | 1 -
  configs/coolpi-cm5-evb-rk3588_defconfig  | 1 -
  configs/evb-rk3588_defconfig             | 1 -
  configs/generic-rk3588_defconfig         | 1 -
  configs/jaguar-rk3588_defconfig          | 1 -
  configs/nanopc-t6-rk3588_defconfig       | 1 -
  configs/neu6a-io-rk3588_defconfig        | 1 -
  configs/neu6b-io-rk3588_defconfig        | 1 -
  configs/orangepi-5-plus-rk3588_defconfig | 1 -
  configs/orangepi-5-rk3588s_defconfig     | 1 -
  configs/quartzpro64-rk3588_defconfig     | 1 -
  configs/rock5a-rk3588s_defconfig         | 1 -
  configs/rock5b-rk3588_defconfig          | 1 -
  configs/toybrick-rk3588_defconfig        | 1 -
  configs/turing-rk1-rk3588_defconfig      | 1 -
  16 files changed, 1 insertion(+), 15 deletions(-)
Quoted 13 lines

arch/arm/mach-rockchip/Kconfig config ROCKCHIP_RK3588 · line 369

Quoted 9 lines
arch/arm/mach-rockchip/Kconfig +1 -0
index 2e9c71138e..1b5cc34f99 100644
@@ -366,6 +366,7 @@ config ROCKCHIP_RK3588
      imply SCMI_FIRMWARE
      imply SPL_ATF_NO_PLATFORM_PARAM if SPL_ATF
      imply SPL_MMC_HS200_SUPPORT if SPL_MMC && MMC_HS200_SUPPORT
+     imply DISPLAY_CPUINFO

This is unnecessary, it's already defaulting to y if building for ARM
boards: https://elixir.bootlin.com/u-boot/latest/source/common/Kconfig#L596

See below...

Quoted 7 lines

I also don't think this is SO useful that we need to enable it on all rk3588 boards? But also, doesn't hurt, so... whatever I guess :) ?

While looking at the code, I think we can remove the ifdef in
https://elixir.bootlin.com/u-boot/latest/source/arch/arm/mach-rockchip/cpu-info.c#L47
because this file is anyway only compiled when CONFIG_DISPLAY_CPUINFO is set, c.f.

Oops I missed this changes, my bad I will dop my changes over here.

Quoted 2 lines

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/mach-rockchip/Makefile#L30

On Rockchip SoC CONFIG_DISPLAY_CPUINFO is been disable on most of the configs files.

-# CONFIG_DISPLAY_CPUINFO is not set

My changes are related to determine the reset cause of the board and display the results.
its only enable on selected SoC hence I have to used this logic.

U-Boot 2024.07-rc2-00397-g0370324feb-dirty (May 16 2024 - 13:11:14 +0530)

SoC: Rockchip rk3568
Reset cause: POR         <-----------
Model: Radxa ROCK3 Model A
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK8090 (on=0x40, off=0x00)
Core:  344 devices, 31 uclasses,
Quoted 10 lines

which also means...

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/include/asm/arch-rockchip/cru.h#L35
should probably be ifdef'ed

which means...

https://elixir.bootlin.com/u-boot/latest/source/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c#L64
should probably also be ifdef'ed (but the config is enabled already (well... it wouldn't compile otherwsie), so I guess this is fine?).

This code changes will not affect this feature by default its enable on RK3399 boards.

Quoted 3 lines

Cheers,
Quentin

Thanks

-Anand

#18 lore raw

Hi Anand,

Quoted 12 lines · Anand Moon

Hi Quentin

Quoted 8 lines · Quentin Schulz

Hi Anand,

This is patch 9/9 but somehow I didn't receive any other patch, nor did the mailing list? c.f.
https://lists.denx.de/pipermail/u-boot/2024-May/thread.html and
https://lore.kernel.org/u-boot/. Are you registered on the ML?

Quoted 5 lines

Thanks for your review comments.

Something went wrong with git sendmail,
Your message have not reached my email client (gmail)

A mail server rejected the mail to edgeble.ai domain (both you and Jagan) /me shrugs.

Quoted 52 lines
Quoted 25 lines · Anand Moon
Quoted 24 lines

Imply DISPLAY_CPUINFO Kconfig options to support on all RK3588s and RK3588 boards, Its used to determine the reset cause of the board.

---
   arch/arm/mach-rockchip/Kconfig           | 1 +
   configs/coolpi-4b-rk3588s_defconfig      | 1 -
   configs/coolpi-cm5-evb-rk3588_defconfig  | 1 -
   configs/evb-rk3588_defconfig             | 1 -
   configs/generic-rk3588_defconfig         | 1 -
   configs/jaguar-rk3588_defconfig          | 1 -
   configs/nanopc-t6-rk3588_defconfig       | 1 -
   configs/neu6a-io-rk3588_defconfig        | 1 -
   configs/neu6b-io-rk3588_defconfig        | 1 -
   configs/orangepi-5-plus-rk3588_defconfig | 1 -
   configs/orangepi-5-rk3588s_defconfig     | 1 -
   configs/quartzpro64-rk3588_defconfig     | 1 -
   configs/rock5a-rk3588s_defconfig         | 1 -
   configs/rock5b-rk3588_defconfig          | 1 -
   configs/toybrick-rk3588_defconfig        | 1 -
   configs/turing-rk1-rk3588_defconfig      | 1 -
   16 files changed, 1 insertion(+), 15 deletions(-)
Quoted 13 lines

arch/arm/mach-rockchip/Kconfig config ROCKCHIP_RK3588 · line 369

Quoted 9 lines
arch/arm/mach-rockchip/Kconfig +1 -0
index 2e9c71138e..1b5cc34f99 100644
@@ -366,6 +366,7 @@ config ROCKCHIP_RK3588
       imply SCMI_FIRMWARE
       imply SPL_ATF_NO_PLATFORM_PARAM if SPL_ATF
       imply SPL_MMC_HS200_SUPPORT if SPL_MMC && MMC_HS200_SUPPORT
+     imply DISPLAY_CPUINFO

This is unnecessary, it's already defaulting to y if building for ARM
boards: https://elixir.bootlin.com/u-boot/latest/source/common/Kconfig#L596

See below...

Quoted 7 lines

I also don't think this is SO useful that we need to enable it on all rk3588 boards? But also, doesn't hurt, so... whatever I guess :) ?

While looking at the code, I think we can remove the ifdef in
https://elixir.bootlin.com/u-boot/latest/source/arch/arm/mach-rockchip/cpu-info.c#L47
because this file is anyway only compiled when CONFIG_DISPLAY_CPUINFO is set, c.f.

Oops I missed this changes, my bad I will dop my changes over here.

Quoted 2 lines

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/mach-rockchip/Makefile#L30

Quoted 9 lines

On Rockchip SoC CONFIG_DISPLAY_CPUINFO is been disable on most of the configs files.

-# CONFIG_DISPLAY_CPUINFO is not set

My changes are related to determine the reset cause of the board and display the results.
its only enable on selected SoC hence I have to used this logic.

It's enabled for all Aarch64/Aarch32 SoCs by default. People explicitly disabled them in their own defconfig, either because the first person who added a board based on rk3588 didn't know or didn't care and everybody just copied it as a base, or because they don't care about it/don't want it.

In any case, you only need to change the defconfigs, nothing else.

Quoted 13 lines

U-Boot 2024.07-rc2-00397-g0370324feb-dirty (May 16 2024 - 13:11:14 +0530)

SoC: Rockchip rk3568
Reset cause: POR         <-----------
Model: Radxa ROCK3 Model A
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK8090 (on=0x40, off=0x00)
Core:  344 devices, 31 uclasses,
Quoted 5 lines
Quoted 1 line

which also means...

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/include/asm/arch-rockchip/cru.h#L35
should probably be ifdef'ed

Quoted 9 lines
Quoted 5 lines

which means...

https://elixir.bootlin.com/u-boot/latest/source/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c#L64
should probably also be ifdef'ed (but the config is enabled already (well... it wouldn't compile otherwsie), so I guess this is fine?).

This code changes will not affect this feature by default its enable on RK3399 boards.

Yes, but if you disable it, it won't compile anymore. (I'm not asking you to fix anything I've reported here though).

Cheers,
Quentin

#19 lore raw

Hi Quentin

Quoted 16 lines · Quentin Schulz

Hi Anand,

Quoted 12 lines · Anand Moon

Hi Quentin

Quoted 8 lines · Quentin Schulz

Hi Anand,

This is patch 9/9 but somehow I didn't receive any other patch, nor did the mailing list? c.f.
https://lists.denx.de/pipermail/u-boot/2024-May/thread.html and
https://lore.kernel.org/u-boot/. Are you registered on the ML?

Quoted 9 lines
Quoted 5 lines

Thanks for your review comments.

Something went wrong with git sendmail,
Your message have not reached my email client (gmail)

A mail server rejected the mail to edgeble.ai domain (both you and Jagan) /me shrugs.

Yeah, something went wrong. It's Gmail server or u-boot mail server blocked I don't know the reason for this.

Remove me and Jagan (edgeble.ai) for now as of now.

Quoted 41 lines
Quoted 31 lines
Quoted 17 lines · Anand Moon

arch/arm/mach-rockchip/Kconfig config ROCKCHIP_RK3588 · line 369

Quoted 12 lines

Imply DISPLAY_CPUINFO Kconfig options to support on all RK3588s and RK3588 boards, Its used to determine the reset cause of the board.

arch/arm/mach-rockchip/Kconfig +1 -0
index 2e9c71138e..1b5cc34f99 100644
@@ -366,6 +366,7 @@ config ROCKCHIP_RK3588
       imply SCMI_FIRMWARE
       imply SPL_ATF_NO_PLATFORM_PARAM if SPL_ATF
       imply SPL_MMC_HS200_SUPPORT if SPL_MMC && MMC_HS200_SUPPORT
+     imply DISPLAY_CPUINFO

This is unnecessary, it's already defaulting to y if building for ARM
boards: https://elixir.bootlin.com/u-boot/latest/source/common/Kconfig#L596

See below...

Quoted 7 lines

I also don't think this is SO useful that we need to enable it on all rk3588 boards? But also, doesn't hurt, so... whatever I guess :) ?

While looking at the code, I think we can remove the ifdef in
https://elixir.bootlin.com/u-boot/latest/source/arch/arm/mach-rockchip/cpu-info.c#L47
because this file is anyway only compiled when CONFIG_DISPLAY_CPUINFO is set, c.f.

Oops I missed this changes, my bad I will dop my changes over here.

Quoted 2 lines

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/mach-rockchip/Makefile#L30

Quoted 9 lines

On Rockchip SoC CONFIG_DISPLAY_CPUINFO is been disable on most of the configs files.

-# CONFIG_DISPLAY_CPUINFO is not set

My changes are related to determine the reset cause of the board and display the results.
its only enable on selected SoC hence I have to used this logic.

Quoted 6 lines

It's enabled for all Aarch64/Aarch32 SoCs by default. People explicitly disabled them in their own defconfig, either because the first person who added a board based on rk3588 didn't know or didn't care and everybody just copied it as a base, or because they don't care about it/don't want it.

My series focuses on determining the reset cause of the boards Do we need to enable this feature ?

We are not compiling DISPLAY_CPUINFO for all for RK3568 and RK3588 But with the following changes enable this to be built for SPL_BUILD ( patch v5) in this series. wow it is built for all SoC.

arch/arm/mach-rockchip/Makefile +1 -1
index c07bdaee4c..6722e7c9ea 100644
@@ -25,7 +25,7 @@ obj-y += boot_mode.o
 obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
 endif
 
-ifeq ($(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
 obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o
 endif
 
Quoted 21 lines

In any case, you only need to change the defconfigs, nothing else.

Quoted 19 lines

U-Boot 2024.07-rc2-00397-g0370324feb-dirty (May 16 2024 - 13:11:14 +0530)

SoC: Rockchip rk3568
Reset cause: POR         <-----------
Model: Radxa ROCK3 Model A
DRAM:  8 GiB (effective 7.7 GiB)
PMIC:  RK8090 (on=0x40, off=0x00)
Core:  344 devices, 31 uclasses,
Quoted 10 lines
Quoted 1 line

which also means...

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/include/asm/arch-rockchip/cru.h#L35
should probably be ifdef'ed

which means...

https://elixir.bootlin.com/u-boot/latest/source/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c#L64
should probably also be ifdef'ed (but the config is enabled already (well... it wouldn't compile otherwsie), so I guess this is fine?).

Quoted 7 lines
Quoted 3 lines

This code changes will not affect this feature by default its enable on RK3399 boards.

Yes, but if you disable it, it won't compile anymore. (I'm not asking you to fix anything I've reported here though).

Ok I will check this.

Quoted 2 lines

Cheers,
Quentin

Thanks
-Anand