board: rockchip: add Radxa ROCK5B Rk3588 board
Subsystems (3)
PATCH 1/2 board: rockchip: add Radxa ROCK5B Rk3588 board
ROCK 5B is a Rockchip RK3588 based SBC (Single Board Computer) by Radxa.
There are tree variants depending on the DRAM size : 4G, 8G and 16G.
Specification:
Rockchip Rk3588 SoC
4x ARM Cortex-A76, 4x ARM Cortex-A55
4/8/16GB memory LPDDR4x
Mali G610MC4 GPU
MIPI CSI 2 multiple lanes connector
eMMC module connector
uSD slot (up to 128GB)
2x USB 2.0, 2x USB 3.0
2x HDMI output, 1x HDMI input
Ethernet port
40-pin IO header including UART, SPI, I2C and 5V DC power in USB PD over USB Type-C
Size: 85mm x 54mm
---
This board comes on top of Jagan's series for adding the rk3588 support:
https://lists.denx.de/pipermail/u-boot/2023-January/506784.html
And Jonas' series of patches that adds support for DDR v3 :
https://lists.denx.de/pipermail/u-boot/2023-January/504923.html
and another series from Jonas about rockchip TPL
https://lists.denx.de/pipermail/u-boot/2023-February/509051.html
And a workaround to make SD-Card 400 kHz clock working from Jonas' private tree
Thanks,
Eugen
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 22 +++++++ arch/arm/dts/rk3588-rock-5b.dts | 44 ++++++++++++++ arch/arm/mach-rockchip/rk3588/Kconfig | 26 +++++++++ board/radxa/rock5b-rk3588/Kconfig | 15 +++++ board/radxa/rock5b-rk3588/MAINTAINERS | 6 ++ board/radxa/rock5b-rk3588/Makefile | 6 ++ board/radxa/rock5b-rk3588/rock5b-rk3588.c | 4 ++ configs/rock5b-rk3588_defconfig | 71 +++++++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/rock5b-rk3588.h | 15 +++++ 10 files changed, 210 insertions(+) create mode 100644 arch/arm/dts/rk3588-rock-5b-u-boot.dtsi create mode 100644 arch/arm/dts/rk3588-rock-5b.dts create mode 100644 board/radxa/rock5b-rk3588/Kconfig create mode 100644 board/radxa/rock5b-rk3588/MAINTAINERS create mode 100644 board/radxa/rock5b-rk3588/Makefile create mode 100644 board/radxa/rock5b-rk3588/rock5b-rk3588.c create mode 100644 configs/rock5b-rk3588_defconfig create mode 100644 include/configs/rock5b-rk3588.h
arch/arm/dts/rk3588-rock-5b-u-boot.dtsi new file +22 -0
@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2023 Collabora Ltd. + */ + +#include "rk3588-u-boot.dtsi" + +/ { + aliases { + mmc0 = &sdmmc; + }; + + chosen { + u-boot,spl-boot-order = &sdmmc; + }; +}; + +&sdmmc { + bus-width = <4>; + u-boot,dm-spl; + status = "okay"; +};
arch/arm/dts/rk3588-rock-5b.dts new file +44 -0
44 lines not on this page · raw message
arch/arm/mach-rockchip/rk3588/Kconfig +26 -0
@@ -13,6 +13,31 @@ config TARGET_RK3588_NEU6 IO board and Neu6a needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 6(Neu6) IO platform. +config TARGET_ROCK5B_RK3588 + bool "Radxa ROCK5B RK3588 board" + select BOARD_LATE_INIT + help + Radxa ROCK5B is a Rockchip RK3588 based SBC (Single Board Computer) + by Radxa. + + There are tree variants depending on the DRAM size : 4G, 8G and 16G. + + Specification: + + Rockchip Rk3588 SoC + 4x ARM Cortex-A76, 4x ARM Cortex-A55 + 4/8/16GB memory LPDDR4x + Mali G610MC4 GPU + MIPI CSI 2 multiple lanes connector + eMMC module connector + uSD slot (up to 128GB) + 2x USB 2.0, 2x USB 3.0 + 2x HDMI output, 1x HDMI input + Ethernet port + 40-pin IO header including UART, SPI, I2C and 5V DC power in + USB PD over USB Type-C + Size: 85mm x 54mm + config ROCKCHIP_BOOT_MODE_REG default 0xfd588080
@@ -26,5 +51,6 @@ config SYS_MALLOC_F_LEN default 0x80000 source board/edgeble/neural-compute-module-6/Kconfig +source board/radxa/rock5b-rk3588/Kconfig endif
board/radxa/rock5b-rk3588/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_ROCK5B_RK3588 + +config SYS_BOARD + default "rock5b-rk3588" + +config SYS_VENDOR + default "radxa" + +config SYS_CONFIG_NAME + default "rock5b-rk3588" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif
board/radxa/rock5b-rk3588/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +ROCK5B-RK3588 +M: Eugen Hristev <[email protected]> +S: Maintained +F: board/radxa/rock5b-rk3588 +F: include/configs/rock5b-rk3588 +F: configs/rock5b-rk3588_defconfig
board/radxa/rock5b-rk3588/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2022 Collabora Ltd. +# + +obj-y += rock5b-rk3588.o
board/radxa/rock5b-rk3588/rock5b-rk3588.c new file +4 -0
@@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright (c) 2023 Collabora Ltd. +*/
configs/rock5b-rk3588_defconfig new file +71 -0
71 lines not on this page · raw message
doc/board/rockchip/rockchip.rst +1 -0
@@ -88,6 +88,7 @@ List of mainline supported Rockchip boards: - Theobroma Systems RK3399-Q7 SoM - Puma (puma_rk3399) * rk3588 - Edgeble Neural Compute Module 6 SoM - Neu6a (neu6a-io-r1126) + - Radxa ROCK 5B (rock5b-rk3588) * rv1108 - Rockchip Evb-rv1108 (evb-rv1108) - Elgin-R1 (elgin-rv1108)
include/configs/rock5b-rk3588.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (c) 2022 Collabora Ltd. +*/ + +#ifndef __ROCK5B_RK3588_H +#define __ROCK5B_RK3588_H + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +#include <configs/rk3588_common.h> + +#endif /* __ROCK5B_RK3588_H */
Signature · 1 line
2.34.1
PATCH 2/2 board: rock5b-rk3588: add memory gaps into kernel's DTB
RK3588 has two memory gaps when using 16 GiB DRAM size:
[0x3fc000000 , 0x3fc500000]
and
[0x3fff00000 , 0x3ffffffff]
If the kernel is agnostic to these gaps, accessing the area causes a SError panic.
Hence, add reserved memory areas in kernel's DTB before booting.
---
Hi,
These memory gaps are required because the kernel crashes with a SError if accessing that area.
It appears the ATAGs provide DDR banks that do not include those specific two regions.
To be able to boot the kernel, those areas have to be reserved. Maybe someone from Rockchip could have an explanation to this behavior? Otherwise we have to block them at this level.
If those memory ranges are reserved for a dedicated purpose we can come up with a better solution, w.r.t. the purpose of the regions.
Thanks !
Eugen
board/radxa/rock5b-rk3588/rock5b-rk3588.c | 35 +++++++++++++++++++++++ configs/rock5b-rk3588_defconfig | 1 + 2 files changed, 36 insertions(+)
board/radxa/rock5b-rk3588/rock5b-rk3588.c +35 -0
@@ -2,3 +2,38 @@/* * Copyright (c) 2023 Collabora Ltd. */ + +#include <fdtdec.h> +#include <fdt_support.h> + +#ifdef CONFIG_OF_BOARD_SETUP +int rock5b_add_reserved_memory_fdt_nodes (void *new_blob) +{ +struct fdt_memory gap1 = { + .start =0x3fc000000 , + .end =0x3fc4fffff , + }; +struct fdt_memory gap2 = { + .start =0x3fff00000 , + .end =0x3ffffffff , + }; +unsigned long flags =FDTDEC_RESERVED_MEMORY_NO_MAP ; +unsigned int ret; + +/* +* Inject the reserved-memory nodes into the DTS +*/ + ret =fdtdec_add_reserved_memory (new_blob,"gap1" , &gap1,NULL ,0 , +NULL , flags); +if (ret) +return ret; + +return fdtdec_add_reserved_memory (new_blob,"gap2" , &gap2,NULL ,0 , +NULL , flags); +} + +int ft_board_setup (void *blob,struct bd_info *bd) +{ +return rock5b_add_reserved_memory_fdt_nodes (blob); +} +#endif
configs/rock5b-rk3588_defconfig +1 -0
@@ -26,6 +26,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y CONFIG_SPL_LOAD_FIT=y +CONFIG_OF_BOARD_SETUP=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-rock-5b.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y
Signature · 1 line
2.34.1
Re: [PATCH 2/2] board: rock5b-rk3588: add memory gaps into kernel's DTB
Quoted 8 lines
From: Eugen Hristev <[email protected]>
Date: Thu, 16 Feb 2023 15:29:05 +0200RK3588 has two memory gaps when using 16 GiB DRAM size:
[0x3fc000000,0x3fc500000]
and
[0x3fff00000,0x3ffffffff]
Quoted 4 lines
If the kernel is agnostic to these gaps, accessing the area causes a SError panic.
Hence, add reserved memory areas in kernel's DTB before booting.
I can confirm that using the full 16GB of memory on the rock5b causes prolems for OpenBSD as well.
Was wondering whether excluding these regions was better done by adding reserved-memory nodes in the device tree though like what is done in the meson-g12-common.dtsi file for example.
Quoted 81 lines
Signed-off-by Eugen Hristev <[email protected]>---
Hi,
These memory gaps are required because the kernel crashes with a SError if accessing that area.
It appears the ATAGs provide DDR banks that do not include those specific two regions.
To be able to boot the kernel, those areas have to be reserved. Maybe someone from Rockchip could have an explanation to this behavior? Otherwise we have to block them at this level.
If those memory ranges are reserved for a dedicated purpose we can come up with a better solution, w.r.t. the purpose of the regions.Thanks !
Eugenboard/radxa/rock5b-rk3588/rock5b-rk3588.c | 35 +++++++++++++++++++++++ configs/rock5b-rk3588_defconfig | 1 + 2 files changed, 36 insertions(+)board/radxa/rock5b-rk3588/rock5b-rk3588.c +35
-0@@ -2,3 +2,38 @@/* * Copyright (c) 2023 Collabora Ltd. */ + +#include <fdtdec.h> +#include <fdt_support.h> + +#ifdef CONFIG_OF_BOARD_SETUP +int rock5b_add_reserved_memory_fdt_nodes (void *new_blob) +{ +struct fdt_memory gap1 = { + .start =0x3fc000000 , + .end =0x3fc4fffff , + }; +struct fdt_memory gap2 = { + .start =0x3fff00000 , + .end =0x3ffffffff , + }; +unsigned long flags =FDTDEC_RESERVED_MEMORY_NO_MAP ; +unsigned int ret; + +/* +* Inject the reserved-memory nodes into the DTS +*/ + ret =fdtdec_add_reserved_memory (new_blob,"gap1" , &gap1,NULL ,0 , +NULL , flags); +if (ret) +return ret; + +return fdtdec_add_reserved_memory (new_blob,"gap2" , &gap2,NULL ,0 , +NULL , flags); +} + +int ft_board_setup (void *blob,struct bd_info *bd) +{ +return rock5b_add_reserved_memory_fdt_nodes (blob); +} +#endif configs/rock5b-rk3588_defconfig +1
-0@@ -26,6 +26,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y CONFIG_SPL_LOAD_FIT=y +CONFIG_OF_BOARD_SETUP=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-rock-5b.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=ySignature · 1 line
2.34.1
Re: [PATCH 2/2] board: rock5b-rk3588: add memory gaps into kernel's DTB
Quoted 11 lines · Mark Kettenis
Quoted 11 lines
From: Eugen Hristev <[email protected]>
Date: Thu, 16 Feb 2023 15:29:05 +0200RK3588 has two memory gaps when using 16 GiB DRAM size:
[0x3fc000000,0x3fc500000]
and
[0x3fff00000,0x3ffffffff]If the kernel is agnostic to these gaps, accessing the area causes a SError panic.
Quoted 8 lines
Quoted 1 line
Hence, add reserved memory areas in kernel's DTB before booting.
I can confirm that using the full 16GB of memory on the rock5b causes prolems for OpenBSD as well.
Was wondering whether excluding these regions was better done by adding reserved-memory nodes in the device tree though like what is done in the
meson-g12-common.dtsifile for example.
But does it work fine with this patch ?
Quoted 82 lines
Quoted 82 lines
Signed-off-by Eugen Hristev <[email protected]>---
Hi,
These memory gaps are required because the kernel crashes with a SError if accessing that area.
It appears the ATAGs provide DDR banks that do not include those specific two regions.
To be able to boot the kernel, those areas have to be reserved. Maybe someone from Rockchip could have an explanation to this behavior? Otherwise we have to block them at this level.
If those memory ranges are reserved for a dedicated purpose we can come up with a better solution, w.r.t. the purpose of the regions.Thanks !
Eugenboard/radxa/rock5b-rk3588/rock5b-rk3588.c | 35 +++++++++++++++++++++++ configs/rock5b-rk3588_defconfig | 1 + 2 files changed, 36 insertions(+)board/radxa/rock5b-rk3588/rock5b-rk3588.c +35
-0@@ -2,3 +2,38 @@/* * Copyright (c) 2023 Collabora Ltd. */ + +#include <fdtdec.h> +#include <fdt_support.h> + +#ifdef CONFIG_OF_BOARD_SETUP +int rock5b_add_reserved_memory_fdt_nodes (void *new_blob) +{ +struct fdt_memory gap1 = { + .start =0x3fc000000 , + .end =0x3fc4fffff , + }; +struct fdt_memory gap2 = { + .start =0x3fff00000 , + .end =0x3ffffffff , + }; +unsigned long flags =FDTDEC_RESERVED_MEMORY_NO_MAP ; +unsigned int ret; + +/* +* Inject the reserved-memory nodes into the DTS +*/ + ret =fdtdec_add_reserved_memory (new_blob,"gap1" , &gap1,NULL ,0 , +NULL , flags); +if (ret) +return ret; + +return fdtdec_add_reserved_memory (new_blob,"gap2" , &gap2,NULL ,0 , +NULL , flags); +} + +int ft_board_setup (void *blob,struct bd_info *bd) +{ +return rock5b_add_reserved_memory_fdt_nodes (blob); +} +#endif configs/rock5b-rk3588_defconfig +1
-0@@ -26,6 +26,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y CONFIG_SPL_LOAD_FIT=y +CONFIG_OF_BOARD_SETUP=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-rock-5b.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=ySignature · 1 line
2.34.1
Re: [PATCH 2/2] board: rock5b-rk3588: add memory gaps into kernel's DTB
Quoted 17 lines
Date: Tue, 21 Feb 2023 10:35:18 +0200
From: Eugen Hristev <[email protected]>Quoted 13 lines · Mark Kettenis
Quoted 12 lines
From: Eugen Hristev <[email protected]>
Date: Thu, 16 Feb 2023 15:29:05 +0200RK3588 has two memory gaps when using 16 GiB DRAM size:
[0x3fc000000,0x3fc500000]
and
[0x3fff00000,0x3ffffffff]If the kernel is agnostic to these gaps, accessing the area causes a SError panic.
Hence, add reserved memory areas in kernel's DTB before booting.
Quoted 8 lines
Quoted 6 lines
I can confirm that using the full 16GB of memory on the rock5b causes prolems for OpenBSD as well.
Was wondering whether excluding these regions was better done by adding reserved-memory nodes in the device tree though like what is done in the
meson-g12-common.dtsifile for example.But does it work fine with this patch ?
Yes, it does.
Quoted 83 lines
Quoted 81 lines
Quoted 81 lines
Signed-off-by Eugen Hristev <[email protected]>---
Hi,
These memory gaps are required because the kernel crashes with a SError if accessing that area.
It appears the ATAGs provide DDR banks that do not include those specific two regions.
To be able to boot the kernel, those areas have to be reserved. Maybe someone from Rockchip could have an explanation to this behavior? Otherwise we have to block them at this level.
If those memory ranges are reserved for a dedicated purpose we can come up with a better solution, w.r.t. the purpose of the regions.Thanks !
Eugenboard/radxa/rock5b-rk3588/rock5b-rk3588.c | 35 +++++++++++++++++++++++ configs/rock5b-rk3588_defconfig | 1 + 2 files changed, 36 insertions(+)board/radxa/rock5b-rk3588/rock5b-rk3588.c +35
-0@@ -2,3 +2,38 @@/* * Copyright (c) 2023 Collabora Ltd. */ + +#include <fdtdec.h> +#include <fdt_support.h> + +#ifdef CONFIG_OF_BOARD_SETUP +int rock5b_add_reserved_memory_fdt_nodes (void *new_blob) +{ +struct fdt_memory gap1 = { + .start =0x3fc000000 , + .end =0x3fc4fffff , + }; +struct fdt_memory gap2 = { + .start =0x3fff00000 , + .end =0x3ffffffff , + }; +unsigned long flags =FDTDEC_RESERVED_MEMORY_NO_MAP ; +unsigned int ret; + +/* +* Inject the reserved-memory nodes into the DTS +*/ + ret =fdtdec_add_reserved_memory (new_blob,"gap1" , &gap1,NULL ,0 , +NULL , flags); +if (ret) +return ret; + +return fdtdec_add_reserved_memory (new_blob,"gap2" , &gap2,NULL ,0 , +NULL , flags); +} + +int ft_board_setup (void *blob,struct bd_info *bd) +{ +return rock5b_add_reserved_memory_fdt_nodes (blob); +} +#endif configs/rock5b-rk3588_defconfig +1
-0@@ -26,6 +26,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_FIT_SIGNATURE=y CONFIG_SPL_LOAD_FIT=y +CONFIG_OF_BOARD_SETUP=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-rock-5b.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=ySignature · 1 line
2.34.1
Hi Eugen,
The board dts is suppose to sync from kernel, so kernel commit message will needed.
eg. Sync from kernel v6.2-rc1 or commit number in mainline kernel.
Thanks,
- Kever
Quoted 340 lines · Eugen Hristev
ROCK 5B is a Rockchip RK3588 based SBC (Single Board Computer) by Radxa.
There are tree variants depending on the DRAM size : 4G, 8G and 16G.
Specification:
Rockchip Rk3588 SoC
4x ARM Cortex-A76, 4x ARM Cortex-A55
4/8/16GB memory LPDDR4x
Mali G610MC4 GPU
MIPI CSI 2 multiple lanes connector
eMMC module connector
uSD slot (up to 128GB)
2x USB 2.0, 2x USB 3.0
2x HDMI output, 1x HDMI input
Ethernet port
40-pin IO header including UART, SPI, I2C and 5V DC power in USB PD over USB Type-C
Size: 85mm x 54mmSigned-off-by Eugen Hristev <[email protected]>---
This board comes on top of Jagan's series for adding the rk3588 support:
https://lists.denx.de/pipermail/u-boot/2023-January/506784.html
And Jonas' series of patches that adds support for DDR v3 :
https://lists.denx.de/pipermail/u-boot/2023-January/504923.html
and another series from Jonas about rockchip TPL
https://lists.denx.de/pipermail/u-boot/2023-February/509051.html
And a workaround to make SD-Card 400 kHz clock working from Jonas' private treeThanks,
Eugenarch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 22 +++++++ arch/arm/dts/rk3588-rock-5b.dts | 44 ++++++++++++++ arch/arm/mach-rockchip/rk3588/Kconfig | 26 +++++++++ board/radxa/rock5b-rk3588/Kconfig | 15 +++++ board/radxa/rock5b-rk3588/MAINTAINERS | 6 ++ board/radxa/rock5b-rk3588/Makefile | 6 ++ board/radxa/rock5b-rk3588/rock5b-rk3588.c | 4 ++ configs/rock5b-rk3588_defconfig | 71 +++++++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/rock5b-rk3588.h | 15 +++++ 10 files changed, 210 insertions(+)create mode 100644
arch/arm/dts/rk3588-rock-5b-u-boot.dtsicreate mode 100644arch/arm/dts/rk3588-rock-5b.dtscreate mode 100644 board/radxa/rock5b-rk3588/Kconfig create mode 100644 board/radxa/rock5b-rk3588/MAINTAINERS create mode 100644 board/radxa/rock5b-rk3588/Makefile create mode 100644board/radxa/rock5b-rk3588/rock5b-rk3588.ccreate mode 100644 configs/rock5b-rk3588_defconfig create mode 100644include/configs/rock5b-rk3588.harch/arm/dts/rk3588-rock-5b-u-boot.dtsi new file +22
-0@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2023 Collabora Ltd. + */ + +#include "rk3588-u-boot.dtsi" + +/ { + aliases { + mmc0 = &sdmmc; + }; + + chosen { + u-boot,spl-boot-order = &sdmmc; + }; +}; + +&sdmmc { + bus-width = <4>; + u-boot,dm-spl; + status = "okay"; +};arch/arm/dts/rk3588-rock-5b.dts new file +44
-0@@ -0,0 +1,44 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk3588.dtsi" + +/ { + model = "Radxa ROCK 5 Model B"; + compatible = "radxa,rock-5b", "rockchip,rk3588"; + + aliases { + mmc0 = &sdhci; + serial2 = &uart2; + }; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + vcc5v0_sys: vcc5v0-sys-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; +}; + +&sdhci { + bus-width = <8>; + no-sdio; + no-sd; + non-removable; + max-frequency = <200000000>; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + status = "okay"; +}; + +&uart2 { + pinctrl-0 = <&uart2m0_xfer>; + status = "okay"; +};arch/arm/mach-rockchip/rk3588/Kconfig +26
-0@@ -13,6 +13,31 @@ config TARGET_RK3588_NEU6 IO board and Neu6a needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 6(Neu6) IO platform. +config TARGET_ROCK5B_RK3588 + bool "Radxa ROCK5B RK3588 board" + select BOARD_LATE_INIT + help + Radxa ROCK5B is a Rockchip RK3588 based SBC (Single Board Computer) + by Radxa. + + There are tree variants depending on the DRAM size : 4G, 8G and 16G. + + Specification: + + Rockchip Rk3588 SoC + 4x ARM Cortex-A76, 4x ARM Cortex-A55 + 4/8/16GB memory LPDDR4x + Mali G610MC4 GPU + MIPI CSI 2 multiple lanes connector + eMMC module connector + uSD slot (up to 128GB) + 2x USB 2.0, 2x USB 3.0 + 2x HDMI output, 1x HDMI input + Ethernet port + 40-pin IO header including UART, SPI, I2C and 5V DC power in + USB PD over USB Type-C + Size: 85mm x 54mm + config ROCKCHIP_BOOT_MODE_REG default 0xfd588080@@ -26,5 +51,6 @@ config SYS_MALLOC_F_LEN default 0x80000 source board/edgeble/neural-compute-module-6/Kconfig +source board/radxa/rock5b-rk3588/Kconfig endifboard/radxa/rock5b-rk3588/Kconfig new file +15
-0@@ -0,0 +1,15 @@ +if TARGET_ROCK5B_RK3588 + +config SYS_BOARD + default "rock5b-rk3588" + +config SYS_VENDOR + default "radxa" + +config SYS_CONFIG_NAME + default "rock5b-rk3588" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endifboard/radxa/rock5b-rk3588/MAINTAINERS new file +6
-0@@ -0,0 +1,6 @@ +ROCK5B-RK3588 +M: Eugen Hristev <[email protected]> +S: Maintained +F: board/radxa/rock5b-rk3588 +F: include/configs/rock5b-rk3588 +F: configs/rock5b-rk3588_defconfigboard/radxa/rock5b-rk3588/Makefile new file +6
-0@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2022 Collabora Ltd. +# + +obj-y += rock5b-rk3588.oboard/radxa/rock5b-rk3588/rock5b-rk3588.c new file +4
-0@@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright (c) 2023 Collabora Ltd. +*/ configs/rock5b-rk3588_defconfig new file +71
-0@@ -0,0 +1,71 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=24000000 +CONFIG_ARCH_ROCKCHIP=y +CONFIG_TEXT_BASE=0x00a00000 +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 +CONFIG_DEFAULT_DEVICE_TREE="rk3588-rock-5b" +CONFIG_DM_RESET=y +CONFIG_ROCKCHIP_RK3588=y +CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y +CONFIG_SPL_MMC=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_STACK_R_ADDR=0x600000 +CONFIG_TARGET_ROCK5B_RK3588=y +CONFIG_SPL_STACK=0x400000 +CONFIG_DEBUG_UART_BASE=0xFEB50000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SYS_LOAD_ADDR=0xc00800 +CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=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=0x20000 +CONFIG_SPL_PAD_TO=0x7f8000 +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +CONFIG_SPL_BSS_START_ADDR=0x4000000 +CONFIG_SPL_BSS_MAX_SIZE=0x4000 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_SPL_STACK_R=y +CONFIG_SPL_ATF=y +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +# CONFIG_CMD_SETEXPR is not set +# CONFIG_SPL_DOS_PARTITION is not set +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_REGMAP=y +CONFIG_SPL_SYSCON=y +CONFIG_SPL_CLK=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MISC=y +CONFIG_SUPPORT_EMMC_RPMB=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y +CONFIG_MMC_SDHCI_ROCKCHIP=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_REGULATOR_PWM=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_SPL_RAM=y +CONFIG_BAUDRATE=1500000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_SYSRESET=y +# CONFIG_BINMAN_FDT is not set +CONFIG_ERRNO_STR=ydoc/board/rockchip/rockchip.rst +1
-0@@ -88,6 +88,7 @@ List of mainline supported Rockchip boards: - Theobroma Systems RK3399-Q7 SoM - Puma (puma_rk3399) * rk3588 - Edgeble Neural Compute Module 6 SoM - Neu6a (neu6a-io-r1126) + - Radxa ROCK 5B (rock5b-rk3588) * rv1108 - Rockchip Evb-rv1108 (evb-rv1108) - Elgin-R1 (elgin-rv1108)include/configs/rock5b-rk3588.h new file +15
-0@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (c) 2022 Collabora Ltd. +*/ + +#ifndef __ROCK5B_RK3588_H +#define __ROCK5B_RK3588_H + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +#include <configs/rk3588_common.h> + +#endif /* __ROCK5B_RK3588_H */
Quoted 7 lines · Kever Yang
Hi Eugen,
The board dts is suppose to sync from kernel, so kernel commit message will needed.
eg. Sync from kernel v6.2-rc1 or commit number in mainline kernel.
Hi Kever,
Yes, sure, I sent a v2 with updated commit message. Thanks
Eugen
Quoted 344 lines
Thanks,
- Kever
Quoted 339 lines · Eugen Hristev
ROCK 5B is a Rockchip RK3588 based SBC (Single Board Computer) by Radxa.
There are tree variants depending on the DRAM size : 4G, 8G and 16G.
Specification:
Rockchip Rk3588 SoC
4x ARM Cortex-A76, 4x ARM Cortex-A55
4/8/16GB memory LPDDR4x
Mali G610MC4 GPU
MIPI CSI 2 multiple lanes connector
eMMC module connector
uSD slot (up to 128GB)
2x USB 2.0, 2x USB 3.0
2x HDMI output, 1x HDMI input
Ethernet port
40-pin IO header including UART, SPI, I2C and 5V DC power in USB PD over USB Type-C
Size: 85mm x 54mmSigned-off-by Eugen Hristev <[email protected]>---
This board comes on top of Jagan's series for adding the rk3588 support:
https://lists.denx.de/pipermail/u-boot/2023-January/506784.html
And Jonas' series of patches that adds support for DDR v3 :
https://lists.denx.de/pipermail/u-boot/2023-January/504923.html
and another series from Jonas about rockchip TPL
https://lists.denx.de/pipermail/u-boot/2023-February/509051.html
And a workaround to make SD-Card 400 kHz clock working from Jonas' private treeThanks,
Eugenarch/arm/dts/rk3588-rock-5b-u-boot.dtsi | 22 +++++++ arch/arm/dts/rk3588-rock-5b.dts | 44 ++++++++++++++ arch/arm/mach-rockchip/rk3588/Kconfig | 26 +++++++++ board/radxa/rock5b-rk3588/Kconfig | 15 +++++ board/radxa/rock5b-rk3588/MAINTAINERS | 6 ++ board/radxa/rock5b-rk3588/Makefile | 6 ++
board/radxa/rock5b-rk3588/rock5b-rk3588.c| 4 ++configs/rock5b-rk3588_defconfig | 71 +++++++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/rock5b-rk3588.h | 15 +++++ 10 files changed, 210 insertions(+)create mode 100644
arch/arm/dts/rk3588-rock-5b-u-boot.dtsicreate mode 100644arch/arm/dts/rk3588-rock-5b.dtscreate mode 100644 board/radxa/rock5b-rk3588/Kconfig create mode 100644 board/radxa/rock5b-rk3588/MAINTAINERS create mode 100644 board/radxa/rock5b-rk3588/Makefile create mode 100644board/radxa/rock5b-rk3588/rock5b-rk3588.ccreate mode 100644 configs/rock5b-rk3588_defconfig create mode 100644include/configs/rock5b-rk3588.harch/arm/dts/rk3588-rock-5b-u-boot.dtsi new file +22
-0@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2023 Collabora Ltd. + */ + +#include "rk3588-u-boot.dtsi" + +/ { + aliases { + mmc0 = &sdmmc; + }; + + chosen { + u-boot,spl-boot-order = &sdmmc; + }; +}; + +&sdmmc { + bus-width = <4>; + u-boot,dm-spl; + status = "okay"; +};arch/arm/dts/rk3588-rock-5b.dts new file +44
-0@@ -0,0 +1,44 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk3588.dtsi" + +/ { + model = "Radxa ROCK 5 Model B"; + compatible = "radxa,rock-5b", "rockchip,rk3588"; + + aliases { + mmc0 = &sdhci; + serial2 = &uart2; + }; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + vcc5v0_sys: vcc5v0-sys-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; +}; + +&sdhci { + bus-width = <8>; + no-sdio; + no-sd; + non-removable; + max-frequency = <200000000>; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + status = "okay"; +}; + +&uart2 { + pinctrl-0 = <&uart2m0_xfer>; + status = "okay"; +};arch/arm/mach-rockchip/rk3588/Kconfig +0
-0@@ -13,6 +13,31 @@ config TARGET_RK3588_NEU6IO board and Neu6a needs to mount on top of this IO board in order to create complete Edgeble Neural Compute Module 6(Neu6) IO platform. +config
TARGET_ROCK5B_RK3588
+ bool "Radxa ROCK5B RK3588 board"
+ selectBOARD_LATE_INIT
+ help
+ Radxa ROCK5B is a Rockchip RK3588 based SBC (Single Board Computer)
+ by Radxa.
+
+ There are tree variants depending on the DRAM size : 4G, 8G and 16G.arch/arm/mach-rockchip/rk3588/Kconfig +17
-0+ + Specification: + + Rockchip Rk3588 SoC + 4x ARM Cortex-A76, 4x ARM Cortex-A55 + 4/8/16GB memory LPDDR4x + Mali G610MC4 GPU + MIPI CSI 2 multiple lanes connector + eMMC module connector + uSD slot (up to 128GB) + 2x USB 2.0, 2x USB 3.0 + 2x HDMI output, 1x HDMI input + Ethernet port + 40-pin IO header including UART, SPI, I2C and 5V DC power in + USB PD over USB Type-C + Size: 85mm x 54mm +config
ROCKCHIP_BOOT_MODE_REG
default0xfd588080arch/arm/mach-rockchip/rk3588/Kconfig +0
-0@@ -26,5 +51,6 @@ config SYS_MALLOC_F_LENdefault
0x80000
source board/edgeble/neural-compute-module-6/Kconfig +source board/radxa/rock5b-rk3588/Kconfig endifboard/radxa/rock5b-rk3588/Kconfig new file +15
-0@@ -0,0 +1,15 @@ +if TARGET_ROCK5B_RK3588 + +config SYS_BOARD + default "rock5b-rk3588" + +config SYS_VENDOR + default "radxa" + +config SYS_CONFIG_NAME + default "rock5b-rk3588" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endifboard/radxa/rock5b-rk3588/MAINTAINERS new file +6
-0@@ -0,0 +1,6 @@ +ROCK5B-RK3588 +M: Eugen Hristev <[email protected]> +S: Maintained +F: board/radxa/rock5b-rk3588 +F: include/configs/rock5b-rk3588 +F: configs/rock5b-rk3588_defconfigboard/radxa/rock5b-rk3588/Makefile new file +6
-0@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2022 Collabora Ltd. +# + +obj-y += rock5b-rk3588.oboard/radxa/rock5b-rk3588/rock5b-rk3588.c new file +4
-0@@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright (c) 2023 Collabora Ltd. +*/ configs/rock5b-rk3588_defconfig new file +47
-0@@ -0,0 +1,71 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=24000000 +CONFIG_ARCH_ROCKCHIP=y +CONFIG_TEXT_BASE=0x00a00000 +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 +CONFIG_DEFAULT_DEVICE_TREE="rk3588-rock-5b" +CONFIG_DM_RESET=y +CONFIG_ROCKCHIP_RK3588=y +CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y +CONFIG_SPL_MMC=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_STACK_R_ADDR=0x600000 +CONFIG_TARGET_ROCK5B_RK3588=y +CONFIG_SPL_STACK=0x400000 +CONFIG_DEBUG_UART_BASE=0xFEB50000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SYS_LOAD_ADDR=0xc00800 +CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=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=0x20000 +CONFIG_SPL_PAD_TO=0x7f8000 +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +CONFIG_SPL_BSS_START_ADDR=0x4000000 +CONFIG_SPL_BSS_MAX_SIZE=0x4000 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_SPL_STACK_R=y +CONFIG_SPL_ATF=y +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +# CONFIG_CMD_SETEXPR is not set +# CONFIG_SPL_DOS_PARTITION is not set +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-namesinterrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
configs/rock5b-rk3588_defconfig new file +24
-0+CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_REGMAP=y +CONFIG_SPL_SYSCON=y +CONFIG_SPL_CLK=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MISC=y +CONFIG_SUPPORT_EMMC_RPMB=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y +CONFIG_MMC_SDHCI_ROCKCHIP=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_REGULATOR_PWM=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_SPL_RAM=y +CONFIG_BAUDRATE=1500000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_SYSRESET=y +# CONFIG_BINMAN_FDT is not set +CONFIG_ERRNO_STR=ydoc/board/rockchip/rockchip.rst +1
-0@@ -88,6 +88,7 @@ List of mainline supported Rockchip boards: - Theobroma Systems RK3399-Q7 SoM - Puma (puma_rk3399) * rk3588 - Edgeble Neural Compute Module 6 SoM - Neu6a (neu6a-io-r1126) + - Radxa ROCK 5B (rock5b-rk3588) * rv1108 - Rockchip Evb-rv1108 (evb-rv1108) - Elgin-R1 (elgin-rv1108)include/configs/rock5b-rk3588.h new file +15
-0@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (c) 2022 Collabora Ltd. +*/ + +#ifndef __ROCK5B_RK3588_H +#define __ROCK5B_RK3588_H + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +#include <configs/rk3588_common.h> + +#endif /* __ROCK5B_RK3588_H */