board: rockchip: add Anbernic RG-DS
Subsystems (3)
PATCH v2 1/1 board: rockchip: add Anbernic RG-DS
From: Chris Morgan <[email protected]>
Add support for the Anbernic RG-DS dual-screen handheld gaming device.
---
Changes since V1:
- Added entry to doc/board/rockchip/rockchip.rst.
- Removed &sdhci and added &vccio_sd to u-boot device tree.
- Added rk3568 to board path.
- Corrected defconfig and include files in MAINTAINERS.
- Removed CONFIG_EFI_LOADER, CONFIG_LEGACY_IMAGE_FORMAT, and CONFIG_DISABLE_CONSOLE from defconfig.
--- .../arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi | 41 +++++++++++ arch/arm/mach-rockchip/rk3568/Kconfig | 7 ++ board/anbernic/rg-ds_rk3568/Kconfig | 12 +++ board/anbernic/rg-ds_rk3568/MAINTAINERS | 7 ++ configs/anbernic-rg-ds-rk3568_defconfig | 73 +++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/anbernic-rg-ds-rk3568.h | 12 +++ 7 files changed, 153 insertions(+) create mode 100644 arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi create mode 100644 board/anbernic/rg-ds_rk3568/Kconfig create mode 100644 board/anbernic/rg-ds_rk3568/MAINTAINERS create mode 100644 configs/anbernic-rg-ds-rk3568_defconfig create mode 100644 include/configs/anbernic-rg-ds-rk3568.h
arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi new file +41 -0
@@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include "rk356x-u-boot.dtsi" + +&gpio0 { + bootph-pre-ram; +}; + +&i2c0 { + bootph-pre-ram; +}; + +&i2c0_xfer { + bootph-pre-ram; +}; + +&i2s1m0_mclk { + bootph-pre-ram; +}; + +&pmic_int_l { + bootph-pre-ram; +}; + +&rk817 { + regulators { + bootph-pre-ram; + }; +}; + +&sdmmc_pwren_l { + bootph-pre-ram; +}; + +&vcc3v3_sd { + bootph-pre-ram; +}; + +&vccio_sd { + bootph-pre-ram; +};
arch/arm/mach-rockchip/rk3568/Kconfig +7 -0
@@ -8,6 +8,12 @@ config TARGET_EVB_RK3568 help RK3568 EVB is a evaluation board for Rockchp RK3568. +config TARGET_ANBERNIC_RG_DS_RK3568 + bool "Anbernic RG DS" + help + Anbernic RG DS gaming device with Rockchip RK3568 and dual + displays. + config TARGET_ANBERNIC_RGXX3_RK3566 bool "Anbernic RGXX3" help
@@ -71,6 +77,7 @@ config SYS_SOC default "rk3568" source "board/rockchip/evb_rk3568/Kconfig" +source "board/anbernic/rg-ds_rk3568/Kconfig" source "board/anbernic/rgxx3_rk3566/Kconfig" source "board/hardkernel/odroid_m1/Kconfig" source "board/hardkernel/odroid_m1s/Kconfig"
board/anbernic/rg-ds_rk3568/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_RG_DS_RK3568 + +config SYS_BOARD + default "rg-ds_rk3568" + +config SYS_VENDOR + default "anbernic" + +config SYS_CONFIG_NAME + default "anbernic-rg-ds-rk3568" + +endif
board/anbernic/rg-ds_rk3568/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +ANBERNIC-RG-DS-RK3568 +M: Chris Morgan <[email protected]> +S: Maintained +F: arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi +F: board/anbernic/rg-ds_rk3568 +F: configs/anbernic-rg-ds-rk3568_defconfig +F: include/configs/anbernic-rg-ds-rk3568.h
configs/anbernic-rg-ds-rk3568_defconfig new file +73 -0
73 lines not on this page · raw message
doc/board/rockchip/rockchip.rst +1 -0
@@ -126,6 +126,7 @@ List of mainline supported Rockchip boards: - Xunlong Orange Pi 3B (orangepi-3b-rk3566) * rk3568 + - Anbernic RG-DS (anbernic-rg-ds-rk3568) - Rockchip Evb-RK3568 (evb-rk3568) - Banana Pi BPI-R2 Pro (bpi-r2-pro-rk3568) - EmbedFire LubanCat 2 (lubancat-2-rk3568)
include/configs/anbernic-rg-ds-rk3568.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __ANBERNIC_RG_DS_RK3568_H +#define __ANBERNIC_RG_DS_RK3568_H + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +#include <configs/rk3568_common.h> + +#endif
Signature · 1 line
2.43.0
Hi Chris,
Quoted 4 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Add support for the Anbernic RG-DS dual-screen handheld gaming device.
Can you please augment the commit log to specify why we need to list clock-names in CONFIG_OF_SPL_REMOVE_PROPS? It's quite important as it's not meant to be an oversight! Verbatim what you said in v1 as an answer to my question is perfectly fine :)
I'm a bit puzzled as to why removing clock-names (I'm assumign the one in &rk817) helps. Isn't clocks property still here? Don't have time to investigate today though.
Quoted 31 lines
Signed-off-by Chris Morgan <[email protected]>---
Changes since V1:
- Added entry todoc/board/rockchip/rockchip.rst.
- Removed &sdhci and added&vccio_sdto u-boot device tree.
- Added rk3568 to board path.
- Corrected defconfig and include files inMAINTAINERS.
- RemovedCONFIG_EFI_LOADER,CONFIG_LEGACY_IMAGE_FORMAT, andCONFIG_DISABLE_CONSOLEfrom defconfig.--- .../arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi | 41 +++++++++++ arch/arm/mach-rockchip/rk3568/Kconfig | 7 ++ board/anbernic/rg-ds_rk3568/Kconfig | 12 +++ board/anbernic/rg-ds_rk3568/MAINTAINERS | 7 ++ configs/anbernic-rg-ds-rk3568_defconfig | 73 +++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/anbernic-rg-ds-rk3568.h | 12 +++ 7 files changed, 153 insertions(+)create mode 100644
arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsicreate mode 100644 board/anbernic/rg-ds_rk3568/Kconfig create mode 100644 board/anbernic/rg-ds_rk3568/MAINTAINERS create mode 100644 configs/anbernic-rg-ds-rk3568_defconfig create mode 100644include/configs/anbernic-rg-ds-rk3568.harch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi new file +0
-0
arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi line 3
Quoted 3 lines
arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi new file +3
-0@@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include "rk356x-u-boot.dtsi"
We know it's based on rk3568, so include rk3568-u-boot.dtsi instead. Considering all other boards are including this, I guess it's fine for now and a follow-up patch to change them all would be ok.
[...]
Quoted 37 lines
configs/anbernic-rg-ds-rk3568_defconfig new file +31
-0@@ -0,0 +1,73 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=24000000 +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SPL_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-anbernic-rg-ds" +CONFIG_ROCKCHIP_RK3568=y +CONFIG_ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON=y +CONFIG_SPL_SERIAL=y +CONFIG_TARGET_ANBERNIC_RG_DS_RK3568=y +CONFIG_SYS_LOAD_ADDR=0xc00800 +CONFIG_DEBUG_UART_BASE=0xFE660000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-anbernic-rg-ds.dtb" +# CONFIG_CONSOLE_MUX is not set +CONFIG_BOARD_TYPES=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_BOARD_RNG_SEED=y +CONFIG_SPL_MAX_SIZE=0x40000 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_POWER=y +CONFIG_SPL_ATF=y +CONFIG_CMD_PWM=y +CONFIG_CMD_GPT=y
configs/anbernic-rg-ds-rk3568_defconfig line 41
Quoted 10 lines
configs/anbernic-rg-ds-rk3568_defconfig new file +10
-0+CONFIG_CMD_MMC=y +# CONFIG_CMD_SETEXPR is not set +# CONFIG_CMD_CLS is not set +# CONFIG_SPL_DOS_PARTITION is not set +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_LIST="rockchip/rk3568-anbernic-rg-ds" +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_NO_NET=y
Please disable NET instead of enabling NO_NET, I would like all users of NO_NET to eventually stop using it so we can get rid of it (or make it a transitional Kconfig symbol once our kbuild supports it).
Looks good to me otherwise!
Cheers,
Quentin
Quoted 8 lines · Quentin Schulz
Hi Chris,
Quoted 4 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Add support for the Anbernic RG-DS dual-screen handheld gaming device.
Quoted 8 lines
Can you please augment the commit log to specify why we need to list clock-names in
CONFIG_OF_SPL_REMOVE_PROPS? It's quite important as it's not meant to be an oversight! Verbatim what you said in v1 as an answer to my question is perfectly fine :)I'm a bit puzzled as to why removing clock-names (I'm assumign the one in &rk817) helps. Isn't clocks property still here? Don't have time to investigate today though.
I've double checked, and it *does* not appear that it's necessary to specify. So I've eliminated it from the config file.
Quoted 26 lines
Quoted 26 lines
Signed-off-by Chris Morgan <[email protected]>---
Changes since V1:
- Added entry todoc/board/rockchip/rockchip.rst.
- Removed &sdhci and added&vccio_sdto u-boot device tree.
- Added rk3568 to board path.
- Corrected defconfig and include files inMAINTAINERS.
- RemovedCONFIG_EFI_LOADER,CONFIG_LEGACY_IMAGE_FORMAT, andCONFIG_DISABLE_CONSOLEfrom defconfig.--- .../arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi | 41 +++++++++++ arch/arm/mach-rockchip/rk3568/Kconfig | 7 ++ board/anbernic/rg-ds_rk3568/Kconfig | 12 +++ board/anbernic/rg-ds_rk3568/MAINTAINERS | 7 ++ configs/anbernic-rg-ds-rk3568_defconfig | 73 +++++++++++++++++++ doc/board/rockchip/rockchip.rst | 1 + include/configs/anbernic-rg-ds-rk3568.h | 12 +++ 7 files changed, 153 insertions(+)create mode 100644
arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsicreate mode 100644 board/anbernic/rg-ds_rk3568/Kconfig create mode 100644 board/anbernic/rg-ds_rk3568/MAINTAINERS create mode 100644 configs/anbernic-rg-ds-rk3568_defconfig create mode 100644include/configs/anbernic-rg-ds-rk3568.h
Quoted 14 lines
arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi line 3
Quoted 9 lines
arch/arm/dts/rk3568-anbernic-rg-ds-u-boot.dtsi new file +3
-0@@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include "rk356x-u-boot.dtsi"We know it's based on rk3568, so include
rk3568-u-boot.dtsiinstead. Considering all other boards are including this, I guess it's fine for now and a follow-up patch to change them all would be ok.
Done, I'll make the change.
Quoted 54 lines
[...]
Quoted 37 lines
configs/anbernic-rg-ds-rk3568_defconfig new file +31
-0@@ -0,0 +1,73 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=24000000 +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SPL_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3568-anbernic-rg-ds" +CONFIG_ROCKCHIP_RK3568=y +CONFIG_ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON=y +CONFIG_SPL_SERIAL=y +CONFIG_TARGET_ANBERNIC_RG_DS_RK3568=y +CONFIG_SYS_LOAD_ADDR=0xc00800 +CONFIG_DEBUG_UART_BASE=0xFE660000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_OF_STDOUT_VIA_ALIAS=y +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-anbernic-rg-ds.dtb" +# CONFIG_CONSOLE_MUX is not set +CONFIG_BOARD_TYPES=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_BOARD_RNG_SEED=y +CONFIG_SPL_MAX_SIZE=0x40000 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_POWER=y +CONFIG_SPL_ATF=y +CONFIG_CMD_PWM=y +CONFIG_CMD_GPT=yconfigs/anbernic-rg-ds-rk3568_defconfig line 41
Quoted 10 lines
configs/anbernic-rg-ds-rk3568_defconfig new file +10
-0+CONFIG_CMD_MMC=y +# CONFIG_CMD_SETEXPR is not set +# CONFIG_CMD_CLS is not set +# CONFIG_SPL_DOS_PARTITION is not set +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIVE=y +CONFIG_OF_LIST="rockchip/rk3568-anbernic-rg-ds" +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_NO_NET=yPlease disable NET instead of enabling
NO_NET, I would like all users ofNO_NETto eventually stop using it so we can get rid of it (or make it a transitionalKconfigsymbol once our kbuild supports it).
Quoted 2 lines
Looks good to me otherwise!
Done, thank you.
Quoted 2 lines
Cheers,
Quentin