* [PATCH v3 0/3] rockchip: Add initial RK3582 support
@ 2025-08-10 22:26 Jonas Karlman
2025-08-10 22:26 ` [PATCH v3 1/3] " Jonas Karlman
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jonas Karlman @ 2025-08-10 22:26 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich, Tom Rini
Cc: FUKAUMI Naoki, Quentin Schulz, u-boot, Jonas Karlman
This series add initial support for RK3582 support. The RK3582 is a
variant of the RK3588S with a few ip blocks disabled. What blocks are
disabled/non-working is indicated by the ip-state in OTP.
Compared to the vendor U-Boot variant, this mark cpu and vdec/venc with
status=fail instead of removing nodes during DT fixup. Linux skip cpu
cores marked as failed staring from v5.17-rc1, however the GIC driver
will generate a harmless WARN_ON that safely can be ignored. A patch for
Linux will be sent to skip the WARN_ON for failed/disabled cpu cores.
It is recommended to use rk3588_ddr_lp4_1848MHz_lp5_2112MHz_v1.19.bin
as DRAM init blob RK3582, listed in latest RKBOOT/RK3582MINIALL.ini.
Changes in v3:
- Apply same policy for RK3582/RK3583 to match vendor U-Boot
linux-6.1-stan-rkr6 tag, allow use of the GPU and one vdec core.
- Update rkvdec node name to match latest mainling Linux DT patches.
- Update commit message to reflect updated policy
Changes in v2:
- Refactor code to first apply policy to ip-state and then fail cores
based on the updated ip-state
- Add support for failing rkvdec and rkvenc cores
- Append soc compatible to board model
- Add patch to add support for ROCK 5C Lite variant
Jonas Karlman (3):
rockchip: Add initial RK3582 support
rockchip: rk3588-generic: Enable support for RK3582
rockchip: rk3588s-rock-5c: Add support for ROCK 5C Lite variant
arch/arm/dts/rk3588-generic.dts | 4 +-
arch/arm/mach-rockchip/rk3588/Kconfig | 9 +-
arch/arm/mach-rockchip/rk3588/rk3588.c | 206 +++++++++++++++++++++++++
configs/generic-rk3588_defconfig | 1 +
configs/rock-5c-rk3588s_defconfig | 1 +
doc/board/rockchip/rockchip.rst | 4 +-
6 files changed, 217 insertions(+), 8 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 1/3] rockchip: Add initial RK3582 support
2025-08-10 22:26 [PATCH v3 0/3] rockchip: Add initial RK3582 support Jonas Karlman
@ 2025-08-10 22:26 ` Jonas Karlman
2025-08-11 15:44 ` Quentin Schulz
2025-08-10 22:26 ` [PATCH v3 2/3] rockchip: rk3588-generic: Enable support for RK3582 Jonas Karlman
2025-08-10 22:26 ` [PATCH v3 3/3] rockchip: rk3588s-rock-5c: Add support for ROCK 5C Lite variant Jonas Karlman
2 siblings, 1 reply; 8+ messages in thread
From: Jonas Karlman @ 2025-08-10 22:26 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich, Tom Rini
Cc: FUKAUMI Naoki, Quentin Schulz, u-boot, Jonas Karlman
The RK3582 SoC is a variant of the RK3588S with some IP blocks disabled.
What blocks are disabled/non-working is indicated by ip-state in OTP.
This add initial support for RK3582 by using ft_system_setup() to mark
any cpu and/or vdec/venc node with status=fail as indicated by ip-state.
This apply same policy as vendor U-Boot for RK3582, i.e. two big cpu
cores and one vdec/venc core is always failed/disabled.
Enable Kconfig option OF_SYSTEM_SETUP in board defconfig to make use of
the required DT fixups for RK3582 board variants.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
Changes in v3:
- Apply same policy for RK3582/RK3583 to match vendor U-Boot
linux-6.1-stan-rkr6 tag, allow use of the GPU and one vdec core.
- Update rkvdec node name to match latest mainling Linux DT patches.
Changes in v2:
- Refactor code to first apply policy to ip-state and then fail cores
based on the updated ip-state
- Add support for failing rkvdec and rkvenc cores
- Append soc compatible to board model
- Not picking up t-b tag due to significant changes to patch
---
arch/arm/mach-rockchip/rk3588/rk3588.c | 206 +++++++++++++++++++++++++
1 file changed, 206 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c b/arch/arm/mach-rockchip/rk3588/rk3588.c
index c01a40020896..6de13882c7f9 100644
--- a/arch/arm/mach-rockchip/rk3588/rk3588.c
+++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
@@ -7,6 +7,7 @@
#define LOG_CATEGORY LOGC_ARCH
#include <dm.h>
+#include <fdt_support.h>
#include <misc.h>
#include <spl.h>
#include <asm/armv8/mmu.h>
@@ -200,6 +201,15 @@ int arch_cpu_init(void)
#define RK3588_OTP_CPU_CODE_OFFSET 0x02
#define RK3588_OTP_SPECIFICATION_OFFSET 0x06
+#define RK3588_OTP_IP_STATE_OFFSET 0x1d
+
+#define FAIL_CPU_CLUSTER0 GENMASK(3, 0)
+#define FAIL_CPU_CLUSTER1 GENMASK(5, 4)
+#define FAIL_CPU_CLUSTER2 GENMASK(7, 6)
+#define FAIL_RKVDEC0 BIT(6)
+#define FAIL_RKVDEC1 BIT(7)
+#define FAIL_RKVENC0 BIT(0)
+#define FAIL_RKVENC1 BIT(2)
int checkboard(void)
{
@@ -245,3 +255,199 @@ int checkboard(void)
return 0;
}
+
+static int fdt_path_del_node(void *fdt, const char *path)
+{
+ int nodeoffset;
+
+ nodeoffset = fdt_path_offset(fdt, path);
+ if (nodeoffset < 0)
+ return nodeoffset;
+
+ return fdt_del_node(fdt, nodeoffset);
+}
+
+static int fdt_path_set_name(void *fdt, const char *path, const char *name)
+{
+ int nodeoffset;
+
+ nodeoffset = fdt_path_offset(fdt, path);
+ if (nodeoffset < 0)
+ return nodeoffset;
+
+ return fdt_set_name(fdt, nodeoffset, name);
+}
+
+/*
+ * RK3582 is a variant of the RK3588S with some IP blocks disabled. What blocks
+ * are disabled/non-working is indicated by ip-state in OTP. ft_system_setup()
+ * is used to mark any cpu and/or vdec/venc node with status=fail as indicated
+ * by ip-state. Apply same policy as vendor U-Boot for RK3582, i.e. two big cpu
+ * cores and one vdec/venc core is always failed. Enable OF_SYSTEM_SETUP to make
+ * use of the required DT fixups for RK3582 board variants.
+ */
+int ft_system_setup(void *blob, struct bd_info *bd)
+{
+ static const char * const cpu_node_names[] = {
+ "cpu@0", "cpu@100", "cpu@200", "cpu@300",
+ "cpu@400", "cpu@500", "cpu@600", "cpu@700",
+ };
+ int parent, node, i, comp_len, len, ret;
+ bool cluster1_removed = false;
+ u8 cpu_code[2], ip_state[3];
+ struct udevice *dev;
+ char soc_comp[16];
+ const char *comp;
+ void *data;
+
+ if (!IS_ENABLED(CONFIG_OF_SYSTEM_SETUP))
+ return 0;
+
+ if (!IS_ENABLED(CONFIG_ROCKCHIP_OTP) || !CONFIG_IS_ENABLED(MISC))
+ return -ENOSYS;
+
+ ret = uclass_get_device_by_driver(UCLASS_MISC,
+ DM_DRIVER_GET(rockchip_otp), &dev);
+ if (ret) {
+ log_debug("Could not find otp device, ret=%d\n", ret);
+ return ret;
+ }
+
+ /* cpu-code: SoC model, e.g. 0x35 0x82 or 0x35 0x88 */
+ ret = misc_read(dev, RK3588_OTP_CPU_CODE_OFFSET, cpu_code, 2);
+ if (ret < 0) {
+ log_debug("Could not read cpu-code, ret=%d\n", ret);
+ return ret;
+ }
+
+ log_debug("cpu-code: %02x %02x\n", cpu_code[0], cpu_code[1]);
+
+ /* only fail cores on rk3582/rk3583 */
+ if (!(cpu_code[0] == 0x35 && cpu_code[1] == 0x82) &&
+ !(cpu_code[0] == 0x35 && cpu_code[1] == 0x83))
+ return 0;
+
+ ret = misc_read(dev, RK3588_OTP_IP_STATE_OFFSET, &ip_state, 3);
+ if (ret < 0) {
+ log_err("Could not read ip-state, ret=%d\n", ret);
+ return ret;
+ }
+
+ log_debug("ip-state: %02x %02x %02x (otp)\n",
+ ip_state[0], ip_state[1], ip_state[2]);
+
+ /* policy: fail entire big core cluster when one or more core is bad */
+ if (ip_state[0] & FAIL_CPU_CLUSTER1)
+ ip_state[0] |= FAIL_CPU_CLUSTER1;
+ if (ip_state[0] & FAIL_CPU_CLUSTER2)
+ ip_state[0] |= FAIL_CPU_CLUSTER2;
+
+ /* policy: always fail one big core cluster on rk3582/rk3583 */
+ if (!(ip_state[0] & (FAIL_CPU_CLUSTER1 | FAIL_CPU_CLUSTER2)))
+ ip_state[0] |= FAIL_CPU_CLUSTER2;
+
+ /* policy: always fail one rkvdec core on rk3582/rk3583 */
+ if (!(ip_state[1] & (FAIL_RKVDEC0 | FAIL_RKVDEC1)))
+ ip_state[1] |= FAIL_RKVDEC1;
+
+ /* policy: always fail one rkvenc core on rk3582/rk3583 */
+ if (!(ip_state[2] & (FAIL_RKVENC0 | FAIL_RKVENC1)))
+ ip_state[2] |= FAIL_RKVENC1;
+
+ log_debug("ip-state: %02x %02x %02x (policy)\n",
+ ip_state[0], ip_state[1], ip_state[2]);
+
+ /* cpu cluster1: ip_state[0]: bit4~5 */
+ if ((ip_state[0] & FAIL_CPU_CLUSTER1) == FAIL_CPU_CLUSTER1) {
+ log_debug("remove cpu-map cluster1\n");
+ fdt_path_del_node(blob, "/cpus/cpu-map/cluster1");
+ cluster1_removed = true;
+ }
+
+ /* cpu cluster2: ip_state[0]: bit6~7 */
+ if ((ip_state[0] & FAIL_CPU_CLUSTER2) == FAIL_CPU_CLUSTER2) {
+ log_debug("remove cpu-map cluster2\n");
+ fdt_path_del_node(blob, "/cpus/cpu-map/cluster2");
+ } else if (cluster1_removed) {
+ /* cluster nodes must be named in a continuous series */
+ log_debug("rename cpu-map cluster2\n");
+ fdt_path_set_name(blob, "/cpus/cpu-map/cluster2", "cluster1");
+ }
+
+ /* rkvdec: ip_state[1]: bit6,7 */
+ if (ip_state[1] & FAIL_RKVDEC0) {
+ log_debug("fail rkvdec0\n");
+ fdt_status_fail_by_pathf(blob, "/video-codec@fdc38100");
+ fdt_status_fail_by_pathf(blob, "/iommu@fdc38700");
+ }
+ if (ip_state[1] & FAIL_RKVDEC1) {
+ log_debug("fail rkvdec1\n");
+ fdt_status_fail_by_pathf(blob, "/video-codec@fdc40100");
+ fdt_status_fail_by_pathf(blob, "/iommu@fdc40700");
+ }
+
+ /* rkvenc: ip_state[2]: bit0,2 */
+ if (ip_state[2] & FAIL_RKVENC0) {
+ log_debug("fail rkvenc0\n");
+ fdt_status_fail_by_pathf(blob, "/video-codec@fdbd0000");
+ fdt_status_fail_by_pathf(blob, "/iommu@fdbdf000");
+ }
+ if (ip_state[2] & FAIL_RKVENC1) {
+ log_debug("fail rkvenc1\n");
+ fdt_status_fail_by_pathf(blob, "/video-codec@fdbe0000");
+ fdt_status_fail_by_pathf(blob, "/iommu@fdbef000");
+ }
+
+ parent = fdt_path_offset(blob, "/cpus");
+ if (parent < 0) {
+ log_err("Could not find /cpus, parent=%d\n", parent);
+ return parent;
+ }
+
+ /* cpu: ip_state[0]: bit0~7 */
+ for (i = 0; i < 8; i++) {
+ /* fail any bad cpu core */
+ if (!(ip_state[0] & BIT(i)))
+ continue;
+
+ node = fdt_subnode_offset(blob, parent, cpu_node_names[i]);
+ if (node >= 0) {
+ log_debug("fail cpu %s\n", cpu_node_names[i]);
+ fdt_status_fail(blob, node);
+ } else {
+ log_err("Could not find %s, node=%d\n",
+ cpu_node_names[i], node);
+ return node;
+ }
+ }
+
+ node = fdt_path_offset(blob, "/");
+ if (node < 0) {
+ log_err("Could not find /, node=%d\n", node);
+ return node;
+ }
+
+ snprintf(soc_comp, sizeof(soc_comp), "rockchip,rk35%x", cpu_code[1]);
+
+ for (i = 0, comp_len = 0;
+ (comp = fdt_stringlist_get(blob, node, "compatible", i, &len));
+ i++) {
+ /* stop at soc compatible */
+ if (!strcmp(comp, soc_comp) ||
+ !strcmp(comp, "rockchip,rk3588s") ||
+ !strcmp(comp, "rockchip,rk3588"))
+ break;
+
+ log_debug("compatible[%d]: %s\n", i, comp);
+ comp_len += len + 1;
+ }
+
+ /* truncate to only include board compatible */
+ fdt_setprop_placeholder(blob, node, "compatible", comp_len, &data);
+
+ /* append soc compatible */
+ fdt_appendprop_string(blob, node, "compatible", soc_comp);
+ fdt_appendprop_string(blob, node, "compatible", "rockchip,rk3588s");
+
+ return 0;
+}
--
2.50.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/3] rockchip: rk3588-generic: Enable support for RK3582
2025-08-10 22:26 [PATCH v3 0/3] rockchip: Add initial RK3582 support Jonas Karlman
2025-08-10 22:26 ` [PATCH v3 1/3] " Jonas Karlman
@ 2025-08-10 22:26 ` Jonas Karlman
2025-08-10 22:26 ` [PATCH v3 3/3] rockchip: rk3588s-rock-5c: Add support for ROCK 5C Lite variant Jonas Karlman
2 siblings, 0 replies; 8+ messages in thread
From: Jonas Karlman @ 2025-08-10 22:26 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich, Tom Rini, Jonas Karlman
Cc: FUKAUMI Naoki, Quentin Schulz, u-boot
Add Kconfig option OF_SYSTEM_SETUP=y to support booting boards with a
RK3582 SoC. CPU and GPU cores are failed based on ip-state and policy.
Tested on a ROCK 5C Lite v1.1:
cpu-code: 35 82
ip-state: 10 00 00 (otp)
ip-state: 30 80 04 (policy)
remove cpu-map cluster1
rename cpu-map cluster2
fail rkvdec1
fail rkvenc1
fail cpu cpu@400
fail cpu cpu@500
and on a Radxa E52C:
cpu-code: 35 82
ip-state: 00 04 00 (otp)
ip-state: c0 84 04 (policy)
remove cpu-map cluster2
fail rkvdec1
fail rkvenc1
fail cpu cpu@600
fail cpu cpu@700
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
v3: Update commit message to reflect updated policy
v2: Mention RK3582 in generic board device tree and documentation
---
arch/arm/dts/rk3588-generic.dts | 4 ++--
configs/generic-rk3588_defconfig | 1 +
doc/board/rockchip/rockchip.rst | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/rk3588-generic.dts b/arch/arm/dts/rk3588-generic.dts
index 6740f9866f17..04144e2ad128 100644
--- a/arch/arm/dts/rk3588-generic.dts
+++ b/arch/arm/dts/rk3588-generic.dts
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
- * Minimal generic DT for RK3588S/RK3588 with eMMC, SD-card and USB OTG enabled
+ * Minimal generic DT for RK3582/RK3588S/RK3588 with eMMC, SD-card and USB OTG enabled
*/
/dts-v1/;
#include "rk3588s.dtsi"
/ {
- model = "Generic RK3588S/RK3588";
+ model = "Generic RK3582/RK3588S/RK3588";
compatible = "rockchip,rk3588";
aliases {
diff --git a/configs/generic-rk3588_defconfig b/configs/generic-rk3588_defconfig
index dfa8efabe6be..7a8c176912e1 100644
--- a/configs/generic-rk3588_defconfig
+++ b/configs/generic-rk3588_defconfig
@@ -16,6 +16,7 @@ CONFIG_SPL_FIT_SIGNATURE=y
CONFIG_SPL_LOAD_FIT=y
# CONFIG_BOOTMETH_VBE is not set
CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-generic.dtb"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_MAX_SIZE=0x40000
diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
index 7a1385789c20..726eed4ea45b 100644
--- a/doc/board/rockchip/rockchip.rst
+++ b/doc/board/rockchip/rockchip.rst
@@ -145,7 +145,7 @@ List of mainline supported Rockchip boards:
- FriendlyElec NanoPC-T6 (nanopc-t6-rk3588)
- FriendlyElec NanoPi R6C (nanopi-r6c-rk3588s)
- FriendlyElec NanoPi R6S (nanopi-r6s-rk3588s)
- - Generic RK3588S/RK3588 (generic-rk3588)
+ - Generic RK3582/RK3588S/RK3588 (generic-rk3588)
- Hardkernel ODROID-M2 (odroid-m2-rk3588s)
- Indiedroid Nova (nova-rk3588s)
- Khadas Edge2 (khadas-edge2-rk3588s)
--
2.50.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 3/3] rockchip: rk3588s-rock-5c: Add support for ROCK 5C Lite variant
2025-08-10 22:26 [PATCH v3 0/3] rockchip: Add initial RK3582 support Jonas Karlman
2025-08-10 22:26 ` [PATCH v3 1/3] " Jonas Karlman
2025-08-10 22:26 ` [PATCH v3 2/3] rockchip: rk3588-generic: Enable support for RK3582 Jonas Karlman
@ 2025-08-10 22:26 ` Jonas Karlman
2 siblings, 0 replies; 8+ messages in thread
From: Jonas Karlman @ 2025-08-10 22:26 UTC (permalink / raw)
To: Kever Yang, Simon Glass, Philipp Tomsich, Tom Rini, FUKAUMI Naoki
Cc: Quentin Schulz, u-boot, Jonas Karlman
Add Kconfig option OF_SYSTEM_SETUP=y to support booting ROCK 5C Lite
boards with a RK3582 SoC. CPU and GPU cores are failed based on ip-state
and policy.
Tested on a ROCK 5C Lite v1.1:
cpu-code: 35 82
ip-state: 00 80 00 (otp)
ip-state: c0 80 04 (policy)
remove cpu-map cluster2
fail rkvdec1
fail rkvenc1
fail cpu cpu@600
fail cpu cpu@700
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
v3: Update commit message to reflect updated policy
v2: New patch
---
arch/arm/mach-rockchip/rk3588/Kconfig | 9 +++++----
configs/rock-5c-rk3588s_defconfig | 1 +
doc/board/rockchip/rockchip.rst | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-rockchip/rk3588/Kconfig b/arch/arm/mach-rockchip/rk3588/Kconfig
index 4e7942ada875..afc26b0b3c6a 100644
--- a/arch/arm/mach-rockchip/rk3588/Kconfig
+++ b/arch/arm/mach-rockchip/rk3588/Kconfig
@@ -269,14 +269,15 @@ config TARGET_ROCK_5_ITX_RK3588
Powered by either 12V, ATX power-supply or PoE
config TARGET_ROCK_5C_RK3588S
- bool "Radxa ROCK 5C RK3588S2 board"
+ bool "Radxa ROCK 5C/5C Lite"
help
- Radxa ROCK 5C is a Rockchip RK3588S2 based single board computer.
+ Radxa ROCK 5C/5C Lite is a Rockchip RK3588S2/RK3582 based SBC (Single
+ Board Computer) by Radxa.
Specification:
- Quad A76 and Quad A55 CPU
- 6 TOPS NPU
+ Quad/Dual A76 and Quad A55 CPU
+ 6/5 TOPS NPU
up to 32GB LPDDR4x RAM
eMMC / SPI flash connector
Micro SD Card slot
diff --git a/configs/rock-5c-rk3588s_defconfig b/configs/rock-5c-rk3588s_defconfig
index 2748fb488c2d..f83d3f6d6c92 100644
--- a/configs/rock-5c-rk3588s_defconfig
+++ b/configs/rock-5c-rk3588s_defconfig
@@ -18,6 +18,7 @@ CONFIG_FIT_VERBOSE=y
CONFIG_SPL_FIT_SIGNATURE=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-rock-5c.dtb"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_MAX_SIZE=0x40000
diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
index 726eed4ea45b..c025191302bc 100644
--- a/doc/board/rockchip/rockchip.rst
+++ b/doc/board/rockchip/rockchip.rst
@@ -153,7 +153,7 @@ List of mainline supported Rockchip boards:
- Radxa ROCK 5 ITX (rock-5-itx-rk3588)
- Radxa ROCK 5A (rock5a-rk3588s)
- Radxa ROCK 5B/5B+ (rock5b-rk3588)
- - Radxa ROCK 5C (rock-5c-rk3588s)
+ - Radxa ROCK 5C/5C Lite (rock-5c-rk3588s)
- Rockchip Toybrick TB-RK3588X (toybrick-rk3588)
- Theobroma Systems RK3588-SBC Jaguar (jaguar-rk3588)
- Theobroma Systems SOM-RK3588-Q7 - Tiger (tiger-rk3588)
--
2.50.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] rockchip: Add initial RK3582 support
2025-08-10 22:26 ` [PATCH v3 1/3] " Jonas Karlman
@ 2025-08-11 15:44 ` Quentin Schulz
2025-08-11 17:09 ` Jonas Karlman
2025-08-17 14:30 ` Kever Yang
0 siblings, 2 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-08-11 15:44 UTC (permalink / raw)
To: Jonas Karlman, Kever Yang, Simon Glass, Philipp Tomsich, Tom Rini
Cc: FUKAUMI Naoki, u-boot
Hi Jonas,
On 8/11/25 12:26 AM, Jonas Karlman wrote:
> The RK3582 SoC is a variant of the RK3588S with some IP blocks disabled.
> What blocks are disabled/non-working is indicated by ip-state in OTP.
>
> This add initial support for RK3582 by using ft_system_setup() to mark
> any cpu and/or vdec/venc node with status=fail as indicated by ip-state.
>
> This apply same policy as vendor U-Boot for RK3582, i.e. two big cpu
> cores and one vdec/venc core is always failed/disabled.
>
> Enable Kconfig option OF_SYSTEM_SETUP in board defconfig to make use of
> the required DT fixups for RK3582 board variants.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> Changes in v3:
> - Apply same policy for RK3582/RK3583 to match vendor U-Boot
> linux-6.1-stan-rkr6 tag, allow use of the GPU and one vdec core.
Isn't the GPU supposed to be possibly non-fonctional on RK3582/RK3583?
If we don't disable it in the DT, how will the system actually behave?
@Kever may have more official info on that?
See remarks on v2 otherwise, most of them still apply.
> - Update rkvdec node name to match latest mainling Linux DT patches.
Should we rather wait for the patches to be actually merged before
trying to patch the device tree nodes that do not exist yet?
Cheers,
Quentin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] rockchip: Add initial RK3582 support
2025-08-11 15:44 ` Quentin Schulz
@ 2025-08-11 17:09 ` Jonas Karlman
2025-08-11 17:12 ` Quentin Schulz
2025-08-17 14:30 ` Kever Yang
1 sibling, 1 reply; 8+ messages in thread
From: Jonas Karlman @ 2025-08-11 17:09 UTC (permalink / raw)
To: Quentin Schulz, Kever Yang
Cc: Simon Glass, Philipp Tomsich, Tom Rini, FUKAUMI Naoki, u-boot
Hi Quentin,
On 8/11/2025 5:44 PM, Quentin Schulz wrote:
> Hi Jonas,
>
> On 8/11/25 12:26 AM, Jonas Karlman wrote:
>> The RK3582 SoC is a variant of the RK3588S with some IP blocks disabled.
>> What blocks are disabled/non-working is indicated by ip-state in OTP.
>>
>> This add initial support for RK3582 by using ft_system_setup() to mark
>> any cpu and/or vdec/venc node with status=fail as indicated by ip-state.
>>
>> This apply same policy as vendor U-Boot for RK3582, i.e. two big cpu
>> cores and one vdec/venc core is always failed/disabled.
>>
>> Enable Kconfig option OF_SYSTEM_SETUP in board defconfig to make use of
>> the required DT fixups for RK3582 board variants.
>>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
>> Changes in v3:
>> - Apply same policy for RK3582/RK3583 to match vendor U-Boot
>> linux-6.1-stan-rkr6 tag, allow use of the GPU and one vdec core.
>
> Isn't the GPU supposed to be possibly non-fonctional on RK3582/RK3583?
> If we don't disable it in the DT, how will the system actually behave?
Not sure about this, I was also wondering what happened to the GPU, but
this matches the updated policy [1] in vendor U-Boot and I do not want to
deviate from the vendor policy:
[1] https://github.com/Kwiboo/u-boot-rockchip/commit/5566d7d920d20932d2188c0cec57cb9036a9eefd
>
> @Kever may have more official info on that?
>
> See remarks on v2 otherwise, most of them still apply.
>
>> - Update rkvdec node name to match latest mainling Linux DT patches.
>
> Should we rather wait for the patches to be actually merged before
> trying to patch the device tree nodes that do not exist yet?
This is what I did for v1, however Kever mentioned:
"it would better to follow the vendor U-Boot as-is to handle the dts, eg.
seems you have skip the dts handle for rkvenc/rkvdec".
So for v2+ I tried to anticipate those node names, and have also sent
multiple reviews [2] to Linux ML for the rkvdec nodes to ensure the
names matches. However, the latest DT patch [3] changed the reg order
and thus the node name changed once again.
We could drop the rkvdec/rkvenc handling and add it later once nodes
have finally landed, or keep the handling and just patch U-Boot in
case the node names ends up being changed before merge.
[2] https://lore.kernel.org/linux-rockchip/c73a32b0-cc58-4d07-a0e5-719e5434adc3@kwiboo.se/
[3] https://lore.kernel.org/linux-rockchip/20250808193602.142527-2-detlev.casanova@collabora.com/
Regards,
Jonas
>
> Cheers,
> Quentin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] rockchip: Add initial RK3582 support
2025-08-11 17:09 ` Jonas Karlman
@ 2025-08-11 17:12 ` Quentin Schulz
0 siblings, 0 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-08-11 17:12 UTC (permalink / raw)
To: Jonas Karlman, Kever Yang
Cc: Simon Glass, Philipp Tomsich, Tom Rini, FUKAUMI Naoki, u-boot
Hi Jonas,
On 8/11/25 7:09 PM, Jonas Karlman wrote:
> Hi Quentin,
>
> On 8/11/2025 5:44 PM, Quentin Schulz wrote:
>> Hi Jonas,
>>
>> On 8/11/25 12:26 AM, Jonas Karlman wrote:
>>> The RK3582 SoC is a variant of the RK3588S with some IP blocks disabled.
>>> What blocks are disabled/non-working is indicated by ip-state in OTP.
>>>
>>> This add initial support for RK3582 by using ft_system_setup() to mark
>>> any cpu and/or vdec/venc node with status=fail as indicated by ip-state.
>>>
>>> This apply same policy as vendor U-Boot for RK3582, i.e. two big cpu
>>> cores and one vdec/venc core is always failed/disabled.
>>>
>>> Enable Kconfig option OF_SYSTEM_SETUP in board defconfig to make use of
>>> the required DT fixups for RK3582 board variants.
>>>
>>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>>> ---
>>> Changes in v3:
>>> - Apply same policy for RK3582/RK3583 to match vendor U-Boot
>>> linux-6.1-stan-rkr6 tag, allow use of the GPU and one vdec core.
>>
>> Isn't the GPU supposed to be possibly non-fonctional on RK3582/RK3583?
>> If we don't disable it in the DT, how will the system actually behave?
>
> Not sure about this, I was also wondering what happened to the GPU, but
> this matches the updated policy [1] in vendor U-Boot and I do not want to
> deviate from the vendor policy:
>
> [1] https://github.com/Kwiboo/u-boot-rockchip/commit/5566d7d920d20932d2188c0cec57cb9036a9eefd
>
Fair enough.
>>
>> @Kever may have more official info on that?
>>
>> See remarks on v2 otherwise, most of them still apply.
>>
>>> - Update rkvdec node name to match latest mainling Linux DT patches.
>>
>> Should we rather wait for the patches to be actually merged before
>> trying to patch the device tree nodes that do not exist yet?
>
> This is what I did for v1, however Kever mentioned:
>
> "it would better to follow the vendor U-Boot as-is to handle the dts, eg.
> seems you have skip the dts handle for rkvenc/rkvdec".
>
> So for v2+ I tried to anticipate those node names, and have also sent
> multiple reviews [2] to Linux ML for the rkvdec nodes to ensure the
> names matches. However, the latest DT patch [3] changed the reg order
> and thus the node name changed once again.
>
> We could drop the rkvdec/rkvenc handling and add it later once nodes
> have finally landed, or keep the handling and just patch U-Boot in
> case the node names ends up being changed before merge.
>
I just don't want to have to support patching multiple addresses if they
change again before beign merged in linux :)
But Kever is the maintainer here and I don't have a strong opinion on
this, so I would go with what Kever said.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] rockchip: Add initial RK3582 support
2025-08-11 15:44 ` Quentin Schulz
2025-08-11 17:09 ` Jonas Karlman
@ 2025-08-17 14:30 ` Kever Yang
1 sibling, 0 replies; 8+ messages in thread
From: Kever Yang @ 2025-08-17 14:30 UTC (permalink / raw)
To: Quentin Schulz, Jonas Karlman, Simon Glass, Philipp Tomsich,
Tom Rini
Cc: FUKAUMI Naoki, u-boot
Hi Quentin, Jonas,
On 2025/8/11 23:44, Quentin Schulz wrote:
> Hi Jonas,
>
> On 8/11/25 12:26 AM, Jonas Karlman wrote:
>> The RK3582 SoC is a variant of the RK3588S with some IP blocks disabled.
>> What blocks are disabled/non-working is indicated by ip-state in OTP.
>>
>> This add initial support for RK3582 by using ft_system_setup() to mark
>> any cpu and/or vdec/venc node with status=fail as indicated by ip-state.
>>
>> This apply same policy as vendor U-Boot for RK3582, i.e. two big cpu
>> cores and one vdec/venc core is always failed/disabled.
>>
>> Enable Kconfig option OF_SYSTEM_SETUP in board defconfig to make use of
>> the required DT fixups for RK3582 board variants.
>>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
>> Changes in v3:
>> - Apply same policy for RK3582/RK3583 to match vendor U-Boot
>> linux-6.1-stan-rkr6 tag, allow use of the GPU and one vdec core.
>
> Isn't the GPU supposed to be possibly non-fonctional on RK3582/RK3583?
> If we don't disable it in the DT, how will the system actually behave?
>
> @Kever may have more official info on that?
RK3582 and RK3583 is different on GPU, RK3582 do not have GPU, while
RK3583 has limited GPU.
Did you see any RK3583 device on the market, it should only available in
limited device instead of public, so maybe we can support rk3582 first
due to
we have a ROCK 5C Lite with this chipset.
Thanks,
- Kever
>
> See remarks on v2 otherwise, most of them still apply.
>
>> - Update rkvdec node name to match latest mainling Linux DT patches.
>
> Should we rather wait for the patches to be actually merged before
> trying to patch the device tree nodes that do not exist yet?
>
> Cheers,
> Quentin
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-08-17 14:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-10 22:26 [PATCH v3 0/3] rockchip: Add initial RK3582 support Jonas Karlman
2025-08-10 22:26 ` [PATCH v3 1/3] " Jonas Karlman
2025-08-11 15:44 ` Quentin Schulz
2025-08-11 17:09 ` Jonas Karlman
2025-08-11 17:12 ` Quentin Schulz
2025-08-17 14:30 ` Kever Yang
2025-08-10 22:26 ` [PATCH v3 2/3] rockchip: rk3588-generic: Enable support for RK3582 Jonas Karlman
2025-08-10 22:26 ` [PATCH v3 3/3] rockchip: rk3588s-rock-5c: Add support for ROCK 5C Lite variant Jonas Karlman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.