rockchip: rk3588s: Add support for ROC-PC-RK3588S
Subsystems (3)
PATCH v2 1/1 rockchip: rk3588s: Add support for ROC-PC-RK3588S
From: Fabio Estevam <[email protected]>
The ROC-PC-RK3588S board is an SBC made by Firefly, based on the RK3588S SoC.
Add support for it.
---
Changes since v1:
- Use the traditional environment offsets of 0x3f8000 and 0x400000.
- Keep clock-names in the SPL device tree.
- Drop CONFIG_RTL8169 as the onboard RTL8211F uses CONFIG_PHY_REALTEK.
- Add the accepted upstream USB device-mode changes to rk3588s-roc-pc-u-boot.dtsi pending the next devicetree-rebasing sync:
https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=for-next&id=9d1e32bfdda1aef3291e47c2949b3b9978162a5c
arch/arm/dts/rk3588s-roc-pc-u-boot.dtsi | 13 ++++ arch/arm/mach-rockchip/rk3588/Kconfig | 7 ++ board/firefly/roc-pc-rk3588s/Kconfig | 12 ++++ board/firefly/roc-pc-rk3588s/MAINTAINERS | 7 ++ configs/roc-pc-rk3588s_defconfig | 90 ++++++++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/roc-pc-rk3588s.h | 8 +++ 7 files changed, 138 insertions(+) create mode 100644 arch/arm/dts/rk3588s-roc-pc-u-boot.dtsi create mode 100644 board/firefly/roc-pc-rk3588s/Kconfig create mode 100644 board/firefly/roc-pc-rk3588s/MAINTAINERS create mode 100644 configs/roc-pc-rk3588s_defconfig create mode 100644 include/configs/roc-pc-rk3588s.h
arch/arm/dts/rk3588s-roc-pc-u-boot.dtsi new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +#include "rk3588s-u-boot.dtsi" + +&usb_host0_xhci { + role-switch-default-mode = "peripheral"; + usb-role-switch; + status = "okay"; +}; + +&usbdp_phy0 { + status = "okay"; +};
arch/arm/mach-rockchip/rk3588/Kconfig +7 -0
@@ -208,6 +208,12 @@ 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 6B(Neu6B) IO platform. +config TARGET_ROC_PC_RK3588S + bool "Firefly ROC PC RK3588S" + help + ROC-PC-RK3588S is a single board computer from Firefly + using the Rockchip RK3588S. + config TARGET_ROCK5A_RK3588 bool "Radxa ROCK5A RK3588 board" help
@@ -421,6 +427,7 @@ config SYS_SOC source "board/armsom/sige7-rk3588/Kconfig" source "board/coolpi/genbook_cm5_rk3588/Kconfig" source "board/edgeble/neural-compute-module-6/Kconfig" +source "board/firefly/roc-pc-rk3588s/Kconfig" source "board/friendlyelec/cm3588-nas-rk3588/Kconfig" source "board/friendlyelec/nanopc-t6-rk3588/Kconfig" source "board/friendlyelec/nanopi-r6c-rk3588s/Kconfig"
board/firefly/roc-pc-rk3588s/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_ROC_PC_RK3588S + +config SYS_BOARD + default "roc-pc-rk3588s" + +config SYS_VENDOR + default "firefly" + +config SYS_CONFIG_NAME + default "roc-pc-rk3588s" + +endif
board/firefly/roc-pc-rk3588s/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +ROC-PC-RK3588S +M: Fabio Estevam <[email protected]> +S: Maintained +F: arch/arm/dts/rk3588s-roc-pc-u-boot.dtsi +F: board/firefly/roc-pc-rk3588s/ +F: configs/roc-pc-rk3588s_defconfig +F: include/configs/roc-pc-rk3588s.h
configs/roc-pc-rk3588s_defconfig new file +90 -0
90 lines not on this page · raw message
doc/board/rockchip/rockchip.rst +1 -0
@@ -155,6 +155,7 @@ List of mainline supported Rockchip boards: - Rockchip EVB (evb-rk3588) - Edgeble Neural Compute Module 6A SoM - Neu6a (neu6a-io-rk3588) - Edgeble Neural Compute Module 6B SoM - Neu6b (neu6b-io-rk3588) + - Firefly ROC-PC-RK3588S (roc-pc-rk3588s) - FriendlyElec CM3588 NAS (cm3588-nas-rk3588) - FriendlyElec NanoPC-T6 (nanopc-t6-rk3588) - FriendlyElec NanoPi R6C (nanopi-r6c-rk3588s)
include/configs/roc-pc-rk3588s.h new file +8 -0
@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __ROC_PC_RK3588S_H +#define __ROC_PC_RK3588S_H + +#include <configs/rk3588_common.h> + +#endif /* __ROC_PC_RK3588S_H */
Signature · 1 line
2.43.0
Hi Fabio,
Quoted 40 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
The ROC-PC-RK3588S board is an SBC made by Firefly, based on the RK3588S SoC.
Add support for it.
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Use the traditional environment offsets of0x3f8000and0x400000.
- Keep clock-names in the SPL device tree.
- DropCONFIG_RTL8169as the onboard RTL8211F usesCONFIG_PHY_REALTEK.
- Add the accepted upstream USB device-mode changes tork3588s-roc-pc-u-boot.dtsipending the next devicetree-rebasing sync:https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=for-next&id=9d1e32bfdda1aef3291e47c2949b3b9978162a5carch/arm/dts/rk3588s-roc-pc-u-boot.dtsi | 13 ++++ arch/arm/mach-rockchip/rk3588/Kconfig | 7 ++ board/firefly/roc-pc-rk3588s/Kconfig | 12 ++++ board/firefly/roc-pc-rk3588s/MAINTAINERS | 7 ++ configs/roc-pc-rk3588s_defconfig | 90 ++++++++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/roc-pc-rk3588s.h | 8 +++ 7 files changed, 138 insertions(+)create mode 100644
arch/arm/dts/rk3588s-roc-pc-u-boot.dtsicreate mode 100644 board/firefly/roc-pc-rk3588s/Kconfig create mode 100644 board/firefly/roc-pc-rk3588s/MAINTAINERS create mode 100644 configs/roc-pc-rk3588s_defconfig create mode 100644include/configs/roc-pc-rk3588s.harch/arm/dts/rk3588s-roc-pc-u-boot.dtsi new file +3
-0@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +#include "rk3588s-u-boot.dtsi"
arch/arm/dts/rk3588s-roc-pc-u-boot.dtsi line 13
Quoted 10 lines
arch/arm/dts/rk3588s-roc-pc-u-boot.dtsi new file +10
-0+ +&usb_host0_xhci { + role-switch-default-mode = "peripheral"; + usb-role-switch; + status = "okay"; +}; + +&usbdp_phy0 { + status = "okay"; +};
This is not fixing an important bug, so I would rather we wait for it to appear in devicetree-rebasing and then cherry-pick it (or wait for it to eventually make it to U-Boot during one of the dts/upstream sync in a few months).
Ideally, we shouldn't also enable drivers in the defconfig for things that aren't available (yet) in the Device Tree as to not mislead the user as to what's currently supported by U-Boot for this device. Dropping the above Deivce Tree changes would mean USBDP and OTG-related symbols would better be removed from the defconfig as well.
Quoted 62 lines
arch/arm/mach-rockchip/rk3588/Kconfig +7
-0@@ -208,6 +208,12 @@ 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 6B(Neu6B) IO platform. +config TARGET_ROC_PC_RK3588S + bool "Firefly ROC PC RK3588S" + help + ROC-PC-RK3588S is a single board computer from Firefly + using the Rockchip RK3588S. + config TARGET_ROCK5A_RK3588 bool "Radxa ROCK5A RK3588 board" help@@ -421,6 +427,7 @@ config SYS_SOC source "board/armsom/sige7-rk3588/Kconfig" source "board/coolpi/genbook_cm5_rk3588/Kconfig" source "board/edgeble/neural-compute-module-6/Kconfig" +source "board/firefly/roc-pc-rk3588s/Kconfig" source "board/friendlyelec/cm3588-nas-rk3588/Kconfig" source "board/friendlyelec/nanopc-t6-rk3588/Kconfig" source "board/friendlyelec/nanopi-r6c-rk3588s/Kconfig"board/firefly/roc-pc-rk3588s/Kconfig new file +12
-0@@ -0,0 +1,12 @@ +if TARGET_ROC_PC_RK3588S + +config SYS_BOARD + default "roc-pc-rk3588s" + +config SYS_VENDOR + default "firefly" + +config SYS_CONFIG_NAME + default "roc-pc-rk3588s" + +endifboard/firefly/roc-pc-rk3588s/MAINTAINERS new file +7
-0@@ -0,0 +1,7 @@ +ROC-PC-RK3588S +M: Fabio Estevam <[email protected]> +S: Maintained +F: arch/arm/dts/rk3588s-roc-pc-u-boot.dtsi +F: board/firefly/roc-pc-rk3588s/ +F: configs/roc-pc-rk3588s_defconfig +F: include/configs/roc-pc-rk3588s.hconfigs/roc-pc-rk3588s_defconfig new file +0
-0
configs/roc-pc-rk3588s_defconfig line 6
Quoted 6 lines
configs/roc-pc-rk3588s_defconfig new file +6
-0@@ -0,0 +1,90 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_SYS_HAS_NONCACHED_MEMORY=y +CONFIG_COUNTER_FREQUENCY=24000000 +CONFIG_ARCH_ROCKCHIP=y +CONFIG_ENV_OFFSET=0x3F8000
Can you please use 0x3f8000 here (that is, lowercase f). It'll then match the default value we specify for Rockchip and not appear in the defconfig.
Please also use savedefconfig before sending upstream, CONFIG_SYS_HAS_NONCACHED_MEMORY cannot be y for example, as it depends on CONFIG_RTL8169=y, which we don't have anymore since v2.
The rest looks good to me, thanks!
Quentin