diff mbox series

[v3] board: rockchip: Add Bananapi R2Pro Board

Message ID 20230820160004.44880-1-linux@fw-web.de
State Changes Requested
Delegated to: Marek Vasut
Headers show
Series [v3] board: rockchip: Add Bananapi R2Pro Board | expand

Commit Message

Frank Wunderlich Aug. 20, 2023, 4 p.m. UTC
From: Frank Wunderlich <frank-w@public-files.de>

Add Bananapi R2 Pro board.

Till now evb dts could be used, but iodomain is different
(evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
and with iodomain driver this can cause hardware fault.

Devicetree in mainline-Linux:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v3:
- disable gmac0 as switch-driver is not yet ready to attach to the mac
v2:
- drop switch-node for now as u-boot driver works differently to linux
---
 arch/arm/dts/Makefile                     |   3 +-
 arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi |  23 +
 arch/arm/dts/rk3568-bpi-r2pro.dts         | 549 ++++++++++++++++++++++
 configs/bpi-r2pro-rk3568_defconfig        | 101 ++++
 4 files changed, 675 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3568-bpi-r2pro.dts
 create mode 100644 configs/bpi-r2pro-rk3568_defconfig

Comments

Frank Wunderlich Sept. 16, 2023, 2:18 p.m. UTC | #1
Hi,

just a friedly reminder. would be great if it can be merged in next uboot-version.

regards Frank


> Gesendet: Sonntag, 20. August 2023 um 18:00 Uhr
> Von: "Frank Wunderlich" <linux@fw-web.de>
> An: u-boot@lists.denx.de
> Cc: "Frank Wunderlich" <frank-w@public-files.de>, "Simon Glass" <sjg@chromium.org>, "Philipp Tomsich" <philipp.tomsich@vrull.eu>, "Kever Yang" <kever.yang@rock-chips.com>, "Marek Vasut" <marex@denx.de>, "Jonas Karlman" <jonas@kwiboo.se>
> Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
>
> From: Frank Wunderlich <frank-w@public-files.de>
>
> Add Bananapi R2 Pro board.
>
> Till now evb dts could be used, but iodomain is different
> (evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
> and with iodomain driver this can cause hardware fault.
>
> Devicetree in mainline-Linux:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> v3:
> - disable gmac0 as switch-driver is not yet ready to attach to the mac
> v2:
> - drop switch-node for now as u-boot driver works differently to linux
> ---
>  arch/arm/dts/Makefile                     |   3 +-
>  arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi |  23 +
>  arch/arm/dts/rk3568-bpi-r2pro.dts         | 549 ++++++++++++++++++++++
>  configs/bpi-r2pro-rk3568_defconfig        | 101 ++++
>  4 files changed, 675 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
>  create mode 100644 arch/arm/dts/rk3568-bpi-r2pro.dts
>  create mode 100644 configs/bpi-r2pro-rk3568_defconfig
Marek Vasut Sept. 16, 2023, 4:07 p.m. UTC | #2
On 9/16/23 16:18, Frank Wunderlich wrote:
> Hi,
> 
> just a friedly reminder. would be great if it can be merged in next uboot-version.

+CC Tom

> regards Frank
> 
> 
>> Gesendet: Sonntag, 20. August 2023 um 18:00 Uhr
>> Von: "Frank Wunderlich" <linux@fw-web.de>
>> An: u-boot@lists.denx.de
>> Cc: "Frank Wunderlich" <frank-w@public-files.de>, "Simon Glass" <sjg@chromium.org>, "Philipp Tomsich" <philipp.tomsich@vrull.eu>, "Kever Yang" <kever.yang@rock-chips.com>, "Marek Vasut" <marex@denx.de>, "Jonas Karlman" <jonas@kwiboo.se>
>> Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
>>
>> From: Frank Wunderlich <frank-w@public-files.de>
>>
>> Add Bananapi R2 Pro board.
>>
>> Till now evb dts could be used, but iodomain is different
>> (evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
>> and with iodomain driver this can cause hardware fault.
>>
>> Devicetree in mainline-Linux:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts

What would be real helpful is a commit ID from which the DT was copied , 
so it can be easily updated in the future.
Frank Wunderlich Sept. 16, 2023, 4:45 p.m. UTC | #3
Am 16. September 2023 18:07:44 MESZ schrieb Marek Vasut <marex@denx.de>:
>On 9/16/23 16:18, Frank Wunderlich wrote:
>> Hi,
>> 
>> just a friedly reminder. would be great if it can be merged in next uboot-version.
>
>+CC Tom
>
>> regards Frank
>> 
>> 
>>> Gesendet: Sonntag, 20. August 2023 um 18:00 Uhr
>>> Von: "Frank Wunderlich" <linux@fw-web.de>
>>> An: u-boot@lists.denx.de
>>> Cc: "Frank Wunderlich" <frank-w@public-files.de>, "Simon Glass" <sjg@chromium.org>, "Philipp Tomsich" <philipp.tomsich@vrull.eu>, "Kever Yang" <kever.yang@rock-chips.com>, "Marek Vasut" <marex@denx.de>, "Jonas Karlman" <jonas@kwiboo.se>
>>> Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
>>> 
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>> 
>>> Add Bananapi R2 Pro board.
>>> 
>>> Till now evb dts could be used, but iodomain is different
>>> (evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
>>> and with iodomain driver this can cause hardware fault.
>>> 
>>> Devicetree in mainline-Linux:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
>
>What would be real helpful is a commit ID from which the DT was copied , so it can be easily updated in the future.

It is no plain copy...i removed parts not relevant for uboot now (from current linux version). E.g. switch driver is currently bundled in mtk ethernet driver and using different devicetree structure than linux dsa driver. We have to separate it before we can use it on r2pro. But this will take some time...also pcie(-phy) does not have a driver yet,so before adding dead code i dropped these parts for now.

regards Frank
Marek Vasut Sept. 16, 2023, 6:28 p.m. UTC | #4
On 9/16/23 18:45, Frank Wunderlich wrote:
> Am 16. September 2023 18:07:44 MESZ schrieb Marek Vasut <marex@denx.de>:
>> On 9/16/23 16:18, Frank Wunderlich wrote:
>>> Hi,
>>>
>>> just a friedly reminder. would be great if it can be merged in next uboot-version.
>>
>> +CC Tom
>>
>>> regards Frank
>>>
>>>
>>>> Gesendet: Sonntag, 20. August 2023 um 18:00 Uhr
>>>> Von: "Frank Wunderlich" <linux@fw-web.de>
>>>> An: u-boot@lists.denx.de
>>>> Cc: "Frank Wunderlich" <frank-w@public-files.de>, "Simon Glass" <sjg@chromium.org>, "Philipp Tomsich" <philipp.tomsich@vrull.eu>, "Kever Yang" <kever.yang@rock-chips.com>, "Marek Vasut" <marex@denx.de>, "Jonas Karlman" <jonas@kwiboo.se>
>>>> Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
>>>>
>>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>>
>>>> Add Bananapi R2 Pro board.
>>>>
>>>> Till now evb dts could be used, but iodomain is different
>>>> (evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
>>>> and with iodomain driver this can cause hardware fault.
>>>>
>>>> Devicetree in mainline-Linux:
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
>>
>> What would be real helpful is a commit ID from which the DT was copied , so it can be easily updated in the future.
> 
> It is no plain copy...i removed parts not relevant for uboot now (from current linux version).

Ouch, please don't do that. Instead, if you really do need to drop some 
nodes from U-Boot control DT, say board.dts, introduce new file called 
board-u-boot.dtsi and add '/delete-node/ &the_node_to_remove;' lines to 
remove nodes while DTC is processing the DT into .dtb .

This way, the imported board.dts from Linux can be later synchronized 
with newer version of Linux DT, and the U-Boot specific changes are in a 
separate file.

The U-Boot build system will first concatenate the files, i.e. cat 
board.dts board-u-boot.dtsi > temp.dts and then run DTC on the temp.dts 
, so whatever changes you do in the board-u-boot.dtsi will be processed 
after the original board.dts is processed by DTC (DTC processes the 
input DTS in order).

> E.g. switch driver is currently bundled in mtk ethernet driver and using different devicetree structure than linux dsa driver. We have to separate it before we can use it on r2pro. But this will take some time...also pcie(-phy) does not have a driver yet,so before adding dead code i dropped these parts for now.

See above, that should do the trick.
Jonas Karlman Sept. 16, 2023, 10:36 p.m. UTC | #5
On 2023-09-16 18:45, Frank Wunderlich wrote:
> Am 16. September 2023 18:07:44 MESZ schrieb Marek Vasut <marex@denx.de>:
>> On 9/16/23 16:18, Frank Wunderlich wrote:
>>> Hi,
>>>
>>> just a friedly reminder. would be great if it can be merged in next uboot-version.
>>
>> +CC Tom
>>
>>> regards Frank
>>>
>>>
>>>> Gesendet: Sonntag, 20. August 2023 um 18:00 Uhr
>>>> Von: "Frank Wunderlich" <linux@fw-web.de>
>>>> An: u-boot@lists.denx.de
>>>> Cc: "Frank Wunderlich" <frank-w@public-files.de>, "Simon Glass" <sjg@chromium.org>, "Philipp Tomsich" <philipp.tomsich@vrull.eu>, "Kever Yang" <kever.yang@rock-chips.com>, "Marek Vasut" <marex@denx.de>, "Jonas Karlman" <jonas@kwiboo.se>
>>>> Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
>>>>
>>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>>
>>>> Add Bananapi R2 Pro board.
>>>>
>>>> Till now evb dts could be used, but iodomain is different
>>>> (evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
>>>> and with iodomain driver this can cause hardware fault.
>>>>
>>>> Devicetree in mainline-Linux:
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
>>
>> What would be real helpful is a commit ID from which the DT was copied , so it can be easily updated in the future.
> 
> It is no plain copy...i removed parts not relevant for uboot now (from current linux version). E.g. switch driver is currently bundled in mtk ethernet driver and using different devicetree structure than linux dsa driver. We have to separate it before we can use it on r2pro. But this will take some time...also pcie(-phy) does not have a driver yet,so before adding dead code i dropped these parts for now.

pcie(-phy) should have a working driver for rk3568 as of v2023.10-rc2,
and is extended to support PCIe bifurcation with the following series:

rockchip: rk3568: Fix use of PCIe bifurcation
https://patchwork.ozlabs.org/project/uboot/list/?series=366997&state=*

Regards,
Jonas

> 
> regards Frank
Jonas Karlman Sept. 16, 2023, 10:51 p.m. UTC | #6
Hi Frank,

On 2023-08-20 18:00, Frank Wunderlich wrote:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add Bananapi R2 Pro board.
> 
> Till now evb dts could be used, but iodomain is different
> (evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
> and with iodomain driver this can cause hardware fault.
> 
> Devicetree in mainline-Linux:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> v3:
> - disable gmac0 as switch-driver is not yet ready to attach to the mac
> v2:
> - drop switch-node for now as u-boot driver works differently to linux
> ---
>  arch/arm/dts/Makefile                     |   3 +-
>  arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi |  23 +
>  arch/arm/dts/rk3568-bpi-r2pro.dts         | 549 ++++++++++++++++++++++
>  configs/bpi-r2pro-rk3568_defconfig        | 101 ++++
>  4 files changed, 675 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
>  create mode 100644 arch/arm/dts/rk3568-bpi-r2pro.dts
>  create mode 100644 configs/bpi-r2pro-rk3568_defconfig
> 
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index bd518064f35f..767bf9db39fb 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -182,7 +182,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \
>  	rk3568-nanopi-r5s.dtb \
>  	rk3568-odroid-m1.dtb \
>  	rk3568-radxa-e25.dtb \
> -	rk3568-rock-3a.dtb
> +	rk3568-rock-3a.dtb \
> +	rk3568-bpi-r2pro.dtb
>  
>  dtb-$(CONFIG_ROCKCHIP_RK3588) += \
>  	rk3588-edgeble-neu6a-io.dtb \
> diff --git a/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi b/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
> new file mode 100644
> index 000000000000..382a52a28b10
> --- /dev/null
> +++ b/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
> @@ -0,0 +1,23 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * (C) Copyright 2021 Rockchip Electronics Co., Ltd
> + */
> +
> +#include "rk356x-u-boot.dtsi"
> +
> +/ {
> +	chosen {
> +		stdout-path = &uart2;
> +		u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;

This is the default order in rk356x-u-boot.dtsi and can be dropped.

> +	};
> +};
> +
> +&sdmmc0 {
> +	status = "okay";

sdmmc0 is already enabled in rk3568-bpi-r2pro.dts

> +};
> +
> +&uart2 {
> +	clock-frequency = <24000000>;
> +	bootph-pre-ram;
> +	status = "okay";
> +};
> diff --git a/arch/arm/dts/rk3568-bpi-r2pro.dts b/arch/arm/dts/rk3568-bpi-r2pro.dts
> new file mode 100644
> index 000000000000..e4fcbb8a1174
> --- /dev/null
> +++ b/arch/arm/dts/rk3568-bpi-r2pro.dts

Should be a 1:1 copy from kernel.

[...]

> diff --git a/configs/bpi-r2pro-rk3568_defconfig b/configs/bpi-r2pro-rk3568_defconfig
> new file mode 100644
> index 000000000000..e8936261eab3
> --- /dev/null
> +++ b/configs/bpi-r2pro-rk3568_defconfig
> @@ -0,0 +1,101 @@
> +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="rk3568-bpi-r2pro"
> +CONFIG_ROCKCHIP_RK3568=y
> +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
> +CONFIG_SPL_SERIAL=y
> +CONFIG_SPL_STACK_R_ADDR=0x600000
> +CONFIG_SPL_STACK=0x400000
> +CONFIG_DEBUG_UART_BASE=0xFE660000
> +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_LEGACY_IMAGE_FORMAT=y
> +#CONFIG_OF_SYSTEM_SETUP=y
> +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-bpi-r2pro"
> +# CONFIG_DISPLAY_CPUINFO is not set
> +CONFIG_DISPLAY_BOARDINFO_LATE=y
> +CONFIG_SPL_MAX_SIZE=0x40000
> +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_GPIO=y
> +CONFIG_CMD_GPT=y
> +CONFIG_CMD_I2C=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_PMIC=y
> +CONFIG_CMD_REGULATOR=y
> +# CONFIG_SPL_DOS_PARTITION is not set
> +CONFIG_SPL_OF_CONTROL=y
> +CONFIG_OF_LIVE=y
> +CONFIG_NET=n
> +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
> +CONFIG_SPL_REGMAP=y
> +CONFIG_SPL_SYSCON=y
> +CONFIG_SPL_CLK=y
> +CONFIG_ROCKCHIP_GPIO=y
> +CONFIG_ROCKCHIP_GPIO_V2=y

This Kconfig option does not exits.

> +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

Please drop CONFIG_ETH_DESIGNWARE and CONFIG_GMAC_ROCKCHIP.

The following series that add GMAC support for RK3568 and RK3588 will
use DWC_ETH_QOS and DWC_ETH_QOS_ROCKCHIP Kconfig options.

rockchip: Add GMAC support for RK3568 and RK3588
https://patchwork.ozlabs.org/project/uboot/cover/20230807000817.1701012-1-jonas@kwiboo.se/

> +CONFIG_DM_PMIC=y
> +CONFIG_PMIC_RK8XX=y
> +CONFIG_REGULATOR_RK8XX=y
> +CONFIG_REGULATOR_PWM=y
> +CONFIG_PWM_ROCKCHIP=y
> +CONFIG_SPL_RAM=y
> +CONFIG_BAUDRATE=1500000
> +CONFIG_DEBUG_UART_SHIFT=2
> +CONFIG_SYS_NS16550_MEM32=y
> +CONFIG_SYSRESET=y
> +CONFIG_SYSRESET_PSCI=y
> +CONFIG_ERRNO_STR=y
> +CONFIG_SYS_PROMPT="BPI-R2PRO> "
> +CONFIG_CMD_SYSBOOT=y
> +CONFIG_CMD_BOOTDEV=y
> +CONFIG_BOOTSTD_FULL=y
> +CONFIG_CMD_EFICONFIG=n
> +CONFIG_EFI_LOADER=n
> +CONFIG_USB=y
> +CONFIG_USB_XHCI_HCD=y
> +CONFIG_USB_XHCI_DWC3=y

This should not be enabled for rk3568, USB_DWC3_GENERIC provide usb
support.

> +CONFIG_USB_DWC3_GENERIC=y
> +CONFIG_USB_EHCI_HCD=y
> +CONFIG_USB_EHCI_GENERIC=y
> +CONFIG_USB_OHCI_HCD=y
> +CONFIG_USB_OHCI_GENERIC=y
> +CONFIG_USB_UHCI_HCD=y
> +CONFIG_USB_DWC2=y

There should not be any need to enable this driver on rk3568.

> +CONFIG_USB_DWC3=y
> +CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
> +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
> +CONFIG_CMD_USB=y
> +CONFIG_AHCI=y
> +CONFIG_DWC_AHCI=y
> +CONFIG_SCSI=y
> +CONFIG_DM_SCSI=y
> +CONFIG_CMD_SCSI=y

Please run moveconfig.py to clean up and re-order the defconfig.

Regards,
Jonas
Frank Wunderlich Sept. 17, 2023, 7:19 a.m. UTC | #7
Hi,

thank you for your suggestions

> Gesendet: Sonntag, 17. September 2023 um 00:51 Uhr
> Von: "Jonas Karlman" <jonas@kwiboo.se>
> An: "Frank Wunderlich" <linux@fw-web.de>
> Cc: "Frank Wunderlich" <frank-w@public-files.de>, "Simon Glass" <sjg@chromium.org>, "Philipp Tomsich" <philipp.tomsich@vrull.eu>, "Kever Yang" <kever.yang@rock-chips.com>, "Marek Vasut" <marex@denx.de>, u-boot@lists.denx.de
> Betreff: Re: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
>
> Hi Frank,
>
> On 2023-08-20 18:00, Frank Wunderlich wrote:
> > From: Frank Wunderlich <frank-w@public-files.de>
> >
> > Add Bananapi R2 Pro board.
> >
> > Till now evb dts could be used, but iodomain is different
> > (evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
> > and with iodomain driver this can cause hardware fault.
> >
> > Devicetree in mainline-Linux:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
> >
> > Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> > ---
> > v3:
> > - disable gmac0 as switch-driver is not yet ready to attach to the mac
> > v2:
> > - drop switch-node for now as u-boot driver works differently to linux
> > ---
> >  arch/arm/dts/Makefile                     |   3 +-
> >  arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi |  23 +
> >  arch/arm/dts/rk3568-bpi-r2pro.dts         | 549 ++++++++++++++++++++++
> >  configs/bpi-r2pro-rk3568_defconfig        | 101 ++++
> >  4 files changed, 675 insertions(+), 1 deletion(-)
> >  create mode 100644 arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
> >  create mode 100644 arch/arm/dts/rk3568-bpi-r2pro.dts
> >  create mode 100644 configs/bpi-r2pro-rk3568_defconfig
> >
> > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > index bd518064f35f..767bf9db39fb 100644
> > --- a/arch/arm/dts/Makefile
> > +++ b/arch/arm/dts/Makefile
> > @@ -182,7 +182,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \
> >  	rk3568-nanopi-r5s.dtb \
> >  	rk3568-odroid-m1.dtb \
> >  	rk3568-radxa-e25.dtb \
> > -	rk3568-rock-3a.dtb
> > +	rk3568-rock-3a.dtb \
> > +	rk3568-bpi-r2pro.dtb
> >
> >  dtb-$(CONFIG_ROCKCHIP_RK3588) += \
> >  	rk3588-edgeble-neu6a-io.dtb \
> > diff --git a/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi b/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
> > new file mode 100644
> > index 000000000000..382a52a28b10
> > --- /dev/null
> > +++ b/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
> > @@ -0,0 +1,23 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * (C) Copyright 2021 Rockchip Electronics Co., Ltd
> > + */
> > +
> > +#include "rk356x-u-boot.dtsi"
> > +
> > +/ {
> > +	chosen {
> > +		stdout-path = &uart2;
> > +		u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;
>
> This is the default order in rk356x-u-boot.dtsi and can be dropped.
>
> > +	};
> > +};
> > +
> > +&sdmmc0 {
> > +	status = "okay";
>
> sdmmc0 is already enabled in rk3568-bpi-r2pro.dts
>
> > +};
> > +
> > +&uart2 {
> > +	clock-frequency = <24000000>;
> > +	bootph-pre-ram;
> > +	status = "okay";
> > +};

then i have only the uart here...right? do you remember i missed the -uboot.dtsi in first try and board does not find mmc in spl.

do i really not need the first 2 nodes here?

> > diff --git a/arch/arm/dts/rk3568-bpi-r2pro.dts b/arch/arm/dts/rk3568-bpi-r2pro.dts
> > new file mode 100644
> > index 000000000000..e4fcbb8a1174
> > --- /dev/null
> > +++ b/arch/arm/dts/rk3568-bpi-r2pro.dts
>
> Should be a 1:1 copy from kernel.

i try to do so, but this will result in many nodes not used in uboot like the switch i remove in the dtsi and graphics.
thx for pointing to the pcie driver then i can let these nodes in.

> [...]
>
> > diff --git a/configs/bpi-r2pro-rk3568_defconfig b/configs/bpi-r2pro-rk3568_defconfig
> > new file mode 100644
> > index 000000000000..e8936261eab3
> > --- /dev/null
> > +++ b/configs/bpi-r2pro-rk3568_defconfig
> > @@ -0,0 +1,101 @@
> > +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="rk3568-bpi-r2pro"
> > +CONFIG_ROCKCHIP_RK3568=y
> > +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
> > +CONFIG_SPL_SERIAL=y
> > +CONFIG_SPL_STACK_R_ADDR=0x600000
> > +CONFIG_SPL_STACK=0x400000
> > +CONFIG_DEBUG_UART_BASE=0xFE660000
> > +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_LEGACY_IMAGE_FORMAT=y
> > +#CONFIG_OF_SYSTEM_SETUP=y
> > +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-bpi-r2pro"
> > +# CONFIG_DISPLAY_CPUINFO is not set
> > +CONFIG_DISPLAY_BOARDINFO_LATE=y
> > +CONFIG_SPL_MAX_SIZE=0x40000
> > +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_GPIO=y
> > +CONFIG_CMD_GPT=y
> > +CONFIG_CMD_I2C=y
> > +CONFIG_CMD_MMC=y
> > +CONFIG_CMD_PMIC=y
> > +CONFIG_CMD_REGULATOR=y
> > +# CONFIG_SPL_DOS_PARTITION is not set
> > +CONFIG_SPL_OF_CONTROL=y
> > +CONFIG_OF_LIVE=y
> > +CONFIG_NET=n
> > +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
> > +CONFIG_SPL_REGMAP=y
> > +CONFIG_SPL_SYSCON=y
> > +CONFIG_SPL_CLK=y
> > +CONFIG_ROCKCHIP_GPIO=y
> > +CONFIG_ROCKCHIP_GPIO_V2=y
>
> This Kconfig option does not exits.
>
> > +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
>
> Please drop CONFIG_ETH_DESIGNWARE and CONFIG_GMAC_ROCKCHIP.
>
> The following series that add GMAC support for RK3568 and RK3588 will
> use DWC_ETH_QOS and DWC_ETH_QOS_ROCKCHIP Kconfig options.
>
> rockchip: Add GMAC support for RK3568 and RK3588
> https://patchwork.ozlabs.org/project/uboot/cover/20230807000817.1701012-1-jonas@kwiboo.se/
>
> > +CONFIG_DM_PMIC=y
> > +CONFIG_PMIC_RK8XX=y
> > +CONFIG_REGULATOR_RK8XX=y
> > +CONFIG_REGULATOR_PWM=y
> > +CONFIG_PWM_ROCKCHIP=y
> > +CONFIG_SPL_RAM=y
> > +CONFIG_BAUDRATE=1500000
> > +CONFIG_DEBUG_UART_SHIFT=2
> > +CONFIG_SYS_NS16550_MEM32=y
> > +CONFIG_SYSRESET=y
> > +CONFIG_SYSRESET_PSCI=y
> > +CONFIG_ERRNO_STR=y
> > +CONFIG_SYS_PROMPT="BPI-R2PRO> "
> > +CONFIG_CMD_SYSBOOT=y
> > +CONFIG_CMD_BOOTDEV=y
> > +CONFIG_BOOTSTD_FULL=y
> > +CONFIG_CMD_EFICONFIG=n
> > +CONFIG_EFI_LOADER=n
> > +CONFIG_USB=y
> > +CONFIG_USB_XHCI_HCD=y
> > +CONFIG_USB_XHCI_DWC3=y
>
> This should not be enabled for rk3568, USB_DWC3_GENERIC provide usb
> support.
>
> > +CONFIG_USB_DWC3_GENERIC=y
> > +CONFIG_USB_EHCI_HCD=y
> > +CONFIG_USB_EHCI_GENERIC=y
> > +CONFIG_USB_OHCI_HCD=y
> > +CONFIG_USB_OHCI_GENERIC=y
> > +CONFIG_USB_UHCI_HCD=y
> > +CONFIG_USB_DWC2=y
>
> There should not be any need to enable this driver on rk3568.
>
> > +CONFIG_USB_DWC3=y
> > +CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
> > +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
> > +CONFIG_CMD_USB=y
> > +CONFIG_AHCI=y
> > +CONFIG_DWC_AHCI=y
> > +CONFIG_SCSI=y
> > +CONFIG_DM_SCSI=y
> > +CONFIG_CMD_SCSI=y
>
> Please run moveconfig.py to clean up and re-order the defconfig.

can you give me an example how i can pass my defconfig with the script?

./tools/moveconfig.py configs/bpi-r2pro-rk3568_defconfig
./tools/moveconfig.py -d configs/bpi-r2pro-rk3568_defconfig

do not work here...have not found a way in the --help page...i guess i misunderstand the script

regards Frank

> Regards,
> Jonas
Jonas Karlman Sept. 17, 2023, 9:26 a.m. UTC | #8
On 2023-09-17 09:19, Frank Wunderlich wrote:
> Hi,
> 
> thank you for your suggestions
> 
>> Gesendet: Sonntag, 17. September 2023 um 00:51 Uhr
>> Von: "Jonas Karlman" <jonas@kwiboo.se>
>> An: "Frank Wunderlich" <linux@fw-web.de>
>> Cc: "Frank Wunderlich" <frank-w@public-files.de>, "Simon Glass" <sjg@chromium.org>, "Philipp Tomsich" <philipp.tomsich@vrull.eu>, "Kever Yang" <kever.yang@rock-chips.com>, "Marek Vasut" <marex@denx.de>, u-boot@lists.denx.de
>> Betreff: Re: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
>>
>> Hi Frank,
>>
>> On 2023-08-20 18:00, Frank Wunderlich wrote:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> Add Bananapi R2 Pro board.
>>>
>>> Till now evb dts could be used, but iodomain is different
>>> (evb has 1v8 on vccio2 and vccio4 which are 3v3 on r2pro)
>>> and with iodomain driver this can cause hardware fault.
>>>
>>> Devicetree in mainline-Linux:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>> ---
>>> v3:
>>> - disable gmac0 as switch-driver is not yet ready to attach to the mac
>>> v2:
>>> - drop switch-node for now as u-boot driver works differently to linux
>>> ---
>>>  arch/arm/dts/Makefile                     |   3 +-
>>>  arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi |  23 +
>>>  arch/arm/dts/rk3568-bpi-r2pro.dts         | 549 ++++++++++++++++++++++
>>>  configs/bpi-r2pro-rk3568_defconfig        | 101 ++++
>>>  4 files changed, 675 insertions(+), 1 deletion(-)
>>>  create mode 100644 arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
>>>  create mode 100644 arch/arm/dts/rk3568-bpi-r2pro.dts
>>>  create mode 100644 configs/bpi-r2pro-rk3568_defconfig
>>>
>>> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
>>> index bd518064f35f..767bf9db39fb 100644
>>> --- a/arch/arm/dts/Makefile
>>> +++ b/arch/arm/dts/Makefile
>>> @@ -182,7 +182,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \
>>>  	rk3568-nanopi-r5s.dtb \
>>>  	rk3568-odroid-m1.dtb \
>>>  	rk3568-radxa-e25.dtb \
>>> -	rk3568-rock-3a.dtb
>>> +	rk3568-rock-3a.dtb \
>>> +	rk3568-bpi-r2pro.dtb
>>>
>>>  dtb-$(CONFIG_ROCKCHIP_RK3588) += \
>>>  	rk3588-edgeble-neu6a-io.dtb \
>>> diff --git a/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi b/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
>>> new file mode 100644
>>> index 000000000000..382a52a28b10
>>> --- /dev/null
>>> +++ b/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
>>> @@ -0,0 +1,23 @@
>>> +// SPDX-License-Identifier: GPL-2.0+
>>> +/*
>>> + * (C) Copyright 2021 Rockchip Electronics Co., Ltd
>>> + */
>>> +
>>> +#include "rk356x-u-boot.dtsi"
>>> +
>>> +/ {
>>> +	chosen {
>>> +		stdout-path = &uart2;
>>> +		u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;
>>
>> This is the default order in rk356x-u-boot.dtsi and can be dropped.
>>
>>> +	};
>>> +};
>>> +
>>> +&sdmmc0 {
>>> +	status = "okay";
>>
>> sdmmc0 is already enabled in rk3568-bpi-r2pro.dts
>>
>>> +};
>>> +
>>> +&uart2 {
>>> +	clock-frequency = <24000000>;
>>> +	bootph-pre-ram;
>>> +	status = "okay";
>>> +};
> 
> then i have only the uart here...right? do you remember i missed the -uboot.dtsi in first try and board does not find mmc in spl.
> 
> do i really not need the first 2 nodes here?

The chosen node with stdout-path prop and uart2 node should probably
be the only nodes left.

If you are having issues with mmc in SPL, I would first look at pinctrl,
ensure pinctrl is enabled in SPL and that pinctrl-0 prop is defined for
your sdmmc0 and sdhci node. OF_SPL_REMOVE_PROPS should also not list
pinctrl nodes, look at defconfig for other rk356x boards, e.g.
rock-3a-rk3568_defconfig should be a good candidate and one I test
frequently.

And if that does not help and there is a regulator that is not enable by
default you may need to enable gpio and regulator pinconf nodes and
related Kconfig options for SPL.

See rk3566-quartz64-a-u-boot.dtsi where I had to enable gpio0, vcc3v3_sd
and vcc_sd_h node and related Kconfig options to have working sd-card.

> 
>>> diff --git a/arch/arm/dts/rk3568-bpi-r2pro.dts b/arch/arm/dts/rk3568-bpi-r2pro.dts
>>> new file mode 100644
>>> index 000000000000..e4fcbb8a1174
>>> --- /dev/null
>>> +++ b/arch/arm/dts/rk3568-bpi-r2pro.dts
>>
>> Should be a 1:1 copy from kernel.
> 
> i try to do so, but this will result in many nodes not used in uboot like the switch i remove in the dtsi and graphics.
> thx for pointing to the pcie driver then i can let these nodes in.

This file should be a full 1:1 copy, if you need to modify any node for
U-Boot you should do such override in -u-boot.dtsi file. You can use
/delete-property/ or /delete-node/ if you really need to remove
something that cause issues for U-Boot, else leave the nodes even if
they are not useful for U-Boot itself. Having full DT should make it
possible to EFI boot generic aarch64 distro images, e.g. fedora etc.

> 
>> [...]
>>
>>> diff --git a/configs/bpi-r2pro-rk3568_defconfig b/configs/bpi-r2pro-rk3568_defconfig
>>> new file mode 100644
>>> index 000000000000..e8936261eab3
>>> --- /dev/null
>>> +++ b/configs/bpi-r2pro-rk3568_defconfig
>>> @@ -0,0 +1,101 @@
>>> +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="rk3568-bpi-r2pro"
>>> +CONFIG_ROCKCHIP_RK3568=y
>>> +CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
>>> +CONFIG_SPL_SERIAL=y
>>> +CONFIG_SPL_STACK_R_ADDR=0x600000
>>> +CONFIG_SPL_STACK=0x400000
>>> +CONFIG_DEBUG_UART_BASE=0xFE660000
>>> +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_LEGACY_IMAGE_FORMAT=y
>>> +#CONFIG_OF_SYSTEM_SETUP=y
>>> +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-bpi-r2pro"
>>> +# CONFIG_DISPLAY_CPUINFO is not set
>>> +CONFIG_DISPLAY_BOARDINFO_LATE=y
>>> +CONFIG_SPL_MAX_SIZE=0x40000
>>> +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_GPIO=y
>>> +CONFIG_CMD_GPT=y
>>> +CONFIG_CMD_I2C=y
>>> +CONFIG_CMD_MMC=y
>>> +CONFIG_CMD_PMIC=y
>>> +CONFIG_CMD_REGULATOR=y
>>> +# CONFIG_SPL_DOS_PARTITION is not set
>>> +CONFIG_SPL_OF_CONTROL=y
>>> +CONFIG_OF_LIVE=y
>>> +CONFIG_NET=n
>>> +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
>>> +CONFIG_SPL_REGMAP=y
>>> +CONFIG_SPL_SYSCON=y
>>> +CONFIG_SPL_CLK=y
>>> +CONFIG_ROCKCHIP_GPIO=y
>>> +CONFIG_ROCKCHIP_GPIO_V2=y
>>
>> This Kconfig option does not exits.
>>
>>> +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
>>
>> Please drop CONFIG_ETH_DESIGNWARE and CONFIG_GMAC_ROCKCHIP.
>>
>> The following series that add GMAC support for RK3568 and RK3588 will
>> use DWC_ETH_QOS and DWC_ETH_QOS_ROCKCHIP Kconfig options.
>>
>> rockchip: Add GMAC support for RK3568 and RK3588
>> https://patchwork.ozlabs.org/project/uboot/cover/20230807000817.1701012-1-jonas@kwiboo.se/
>>
>>> +CONFIG_DM_PMIC=y
>>> +CONFIG_PMIC_RK8XX=y
>>> +CONFIG_REGULATOR_RK8XX=y
>>> +CONFIG_REGULATOR_PWM=y
>>> +CONFIG_PWM_ROCKCHIP=y
>>> +CONFIG_SPL_RAM=y
>>> +CONFIG_BAUDRATE=1500000
>>> +CONFIG_DEBUG_UART_SHIFT=2
>>> +CONFIG_SYS_NS16550_MEM32=y
>>> +CONFIG_SYSRESET=y
>>> +CONFIG_SYSRESET_PSCI=y
>>> +CONFIG_ERRNO_STR=y
>>> +CONFIG_SYS_PROMPT="BPI-R2PRO> "
>>> +CONFIG_CMD_SYSBOOT=y
>>> +CONFIG_CMD_BOOTDEV=y
>>> +CONFIG_BOOTSTD_FULL=y
>>> +CONFIG_CMD_EFICONFIG=n
>>> +CONFIG_EFI_LOADER=n
>>> +CONFIG_USB=y
>>> +CONFIG_USB_XHCI_HCD=y
>>> +CONFIG_USB_XHCI_DWC3=y
>>
>> This should not be enabled for rk3568, USB_DWC3_GENERIC provide usb
>> support.
>>
>>> +CONFIG_USB_DWC3_GENERIC=y
>>> +CONFIG_USB_EHCI_HCD=y
>>> +CONFIG_USB_EHCI_GENERIC=y
>>> +CONFIG_USB_OHCI_HCD=y
>>> +CONFIG_USB_OHCI_GENERIC=y
>>> +CONFIG_USB_UHCI_HCD=y
>>> +CONFIG_USB_DWC2=y
>>
>> There should not be any need to enable this driver on rk3568.
>>
>>> +CONFIG_USB_DWC3=y
>>> +CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
>>> +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
>>> +CONFIG_CMD_USB=y
>>> +CONFIG_AHCI=y
>>> +CONFIG_DWC_AHCI=y
>>> +CONFIG_SCSI=y
>>> +CONFIG_DM_SCSI=y
>>> +CONFIG_CMD_SCSI=y
>>
>> Please run moveconfig.py to clean up and re-order the defconfig.
> 
> can you give me an example how i can pass my defconfig with the script?
> 
> ./tools/moveconfig.py configs/bpi-r2pro-rk3568_defconfig
> ./tools/moveconfig.py -d configs/bpi-r2pro-rk3568_defconfig
> 
> do not work here...have not found a way in the --help page...i guess i misunderstand the script

Probably much easier to use make savedefconfig instead of the moveconfig.py script.

Regards,
Jonas

> 
> regards Frank
> 
>> Regards,
>> Jonas
diff mbox series

Patch

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index bd518064f35f..767bf9db39fb 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -182,7 +182,8 @@  dtb-$(CONFIG_ROCKCHIP_RK3568) += \
 	rk3568-nanopi-r5s.dtb \
 	rk3568-odroid-m1.dtb \
 	rk3568-radxa-e25.dtb \
-	rk3568-rock-3a.dtb
+	rk3568-rock-3a.dtb \
+	rk3568-bpi-r2pro.dtb
 
 dtb-$(CONFIG_ROCKCHIP_RK3588) += \
 	rk3588-edgeble-neu6a-io.dtb \
diff --git a/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi b/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
new file mode 100644
index 000000000000..382a52a28b10
--- /dev/null
+++ b/arch/arm/dts/rk3568-bpi-r2pro-u-boot.dtsi
@@ -0,0 +1,23 @@ 
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2021 Rockchip Electronics Co., Ltd
+ */
+
+#include "rk356x-u-boot.dtsi"
+
+/ {
+	chosen {
+		stdout-path = &uart2;
+		u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci;
+	};
+};
+
+&sdmmc0 {
+	status = "okay";
+};
+
+&uart2 {
+	clock-frequency = <24000000>;
+	bootph-pre-ram;
+	status = "okay";
+};
diff --git a/arch/arm/dts/rk3568-bpi-r2pro.dts b/arch/arm/dts/rk3568-bpi-r2pro.dts
new file mode 100644
index 000000000000..e4fcbb8a1174
--- /dev/null
+++ b/arch/arm/dts/rk3568-bpi-r2pro.dts
@@ -0,0 +1,549 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Author: Frank Wunderlich <frank-w@public-files.de>
+ *
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3568.dtsi"
+
+/ {
+	model = "Bananapi-R2 Pro (RK3568) DDR4 Board";
+	compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
+
+	aliases {
+		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
+		mmc0 = &sdmmc0;
+		mmc1 = &sdhci;
+	};
+
+	chosen: chosen {
+		stdout-path = "serial2:1500000n8";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&blue_led_pin &green_led_pin>;
+
+		blue_led: led-0 {
+			color = <LED_COLOR_ID_BLUE>;
+			default-state = "off";
+			function = LED_FUNCTION_STATUS;
+			gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
+		};
+
+		green_led: led-1 {
+			color = <LED_COLOR_ID_GREEN>;
+			default-state = "on";
+			function = LED_FUNCTION_POWER;
+			gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	dc_12v: dc-12v-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "dc_12v";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+	};
+
+	vcc3v3_sys: vcc3v3-sys-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v3_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&dc_12v>;
+	};
+
+	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>;
+		vin-supply = <&dc_12v>;
+	};
+
+	vcc5v0_usb: vcc5v0-usb-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_usb";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&dc_12v>;
+	};
+
+	vcc5v0_usb_host: vcc5v0-usb-host-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_usb_host_en>;
+		regulator-name = "vcc5v0_usb_host";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usb>;
+	};
+
+	vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_usb_otg_en>;
+		regulator-name = "vcc5v0_usb_otg";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usb>;
+	};
+};
+
+&combphy0 {
+	/* used for USB3 */
+	status = "okay";
+};
+
+&combphy1 {
+	/* used for USB3 */
+	status = "okay";
+};
+
+&combphy2 {
+	/* used for SATA */
+	status = "okay";
+};
+
+&gmac0 {
+	assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
+	assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
+	assigned-clock-rates = <0>, <125000000>;
+	clock_in_out = "input";
+	phy-mode = "rgmii";
+	pinctrl-names = "default";
+	pinctrl-0 = <&gmac0_miim
+		     &gmac0_tx_bus2
+		     &gmac0_rx_bus2
+		     &gmac0_rgmii_clk
+		     &gmac0_rgmii_bus>;
+	snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+	snps,reset-active-low;
+	/* Reset time is 20ms, 100ms for rtl8211f */
+	snps,reset-delays-us = <0 20000 100000>;
+	tx_delay = <0x4f>;
+	rx_delay = <0x0f>;
+	status = "disabled";
+
+	fixed-link {
+		speed = <1000>;
+		full-duplex;
+		pause;
+	};
+};
+
+&gmac1 {
+	assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
+	assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
+	assigned-clock-rates = <0>, <125000000>;
+	clock_in_out = "output";
+	phy-handle = <&rgmii_phy1>;
+	phy-mode = "rgmii";
+	pinctrl-names = "default";
+	pinctrl-0 = <&gmac1m1_miim
+		     &gmac1m1_tx_bus2
+		     &gmac1m1_rx_bus2
+		     &gmac1m1_rgmii_clk
+		     &gmac1m1_rgmii_bus>;
+	snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
+	snps,reset-active-low;
+	/* Reset time is 20ms, 100ms for rtl8211f */
+	snps,reset-delays-us = <0 20000 100000>;
+	tx_delay = <0x3c>;
+	rx_delay = <0x2f>;
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+
+	rk809: pmic@20 {
+		compatible = "rockchip,rk809";
+		reg = <0x20>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+		#clock-cells = <1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pmic_int>;
+		rockchip,system-power-controller;
+		vcc1-supply = <&vcc3v3_sys>;
+		vcc2-supply = <&vcc3v3_sys>;
+		vcc3-supply = <&vcc3v3_sys>;
+		vcc4-supply = <&vcc3v3_sys>;
+		vcc5-supply = <&vcc3v3_sys>;
+		vcc6-supply = <&vcc3v3_sys>;
+		vcc7-supply = <&vcc3v3_sys>;
+		vcc8-supply = <&vcc3v3_sys>;
+		vcc9-supply = <&vcc3v3_sys>;
+		wakeup-source;
+
+		regulators {
+			vdd_logic: DCDC_REG1 {
+				regulator-name = "vdd_logic";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-init-microvolt = <900000>;
+				regulator-initial-mode = <0x2>;
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <6001>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdd_gpu: DCDC_REG2 {
+				regulator-name = "vdd_gpu";
+				regulator-always-on;
+				regulator-init-microvolt = <900000>;
+				regulator-initial-mode = <0x2>;
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <6001>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc_ddr: DCDC_REG3 {
+				regulator-name = "vcc_ddr";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-initial-mode = <0x2>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+				};
+			};
+
+			vdd_npu: DCDC_REG4 {
+				regulator-name = "vdd_npu";
+				regulator-init-microvolt = <900000>;
+				regulator-initial-mode = <0x2>;
+				regulator-min-microvolt = <500000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <6001>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc_1v8: DCDC_REG5 {
+				regulator-name = "vcc_1v8";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdda0v9_image: LDO_REG1 {
+				regulator-name = "vdda0v9_image";
+				regulator-always-on;
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdda_0v9: LDO_REG2 {
+				regulator-name = "vdda_0v9";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vdda0v9_pmu: LDO_REG3 {
+				regulator-name = "vdda0v9_pmu";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <900000>;
+				regulator-max-microvolt = <900000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <900000>;
+				};
+			};
+
+			vccio_acodec: LDO_REG4 {
+				regulator-name = "vccio_acodec";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vccio_sd: LDO_REG5 {
+				regulator-name = "vccio_sd";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc3v3_pmu: LDO_REG6 {
+				regulator-name = "vcc3v3_pmu";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <3300000>;
+				};
+			};
+
+			vcca_1v8: LDO_REG7 {
+				regulator-name = "vcca_1v8";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcca1v8_pmu: LDO_REG8 {
+				regulator-name = "vcca1v8_pmu";
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1800000>;
+				};
+			};
+
+			vcca1v8_image: LDO_REG9 {
+				regulator-name = "vcca1v8_image";
+				regulator-always-on;
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc_3v3: SWITCH_REG1 {
+				regulator-name = "vcc_3v3";
+				regulator-always-on;
+				regulator-boot-on;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vcc3v3_sd: SWITCH_REG2 {
+				regulator-name = "vcc3v3_sd";
+				regulator-always-on;
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+		};
+	};
+};
+
+&i2c3 {
+	status = "okay";
+
+	hym8563: rtc@51 {
+		compatible = "haoyu,hym8563";
+		reg = <0x51>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <RK_PD3 IRQ_TYPE_EDGE_FALLING>;
+		#clock-cells = <0>;
+		clock-output-names = "rtcic_32kout";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hym8563_int>;
+		wakeup-source;
+	};
+};
+
+&i2c5 {
+	/* pin 3 (SDA) + 4 (SCL) of header con2 */
+	status = "disabled";
+};
+
+&mdio1 {
+	rgmii_phy1: ethernet-phy@0 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <0x0>;
+	};
+};
+
+&pinctrl {
+	leds {
+		blue_led_pin: blue-led-pin {
+			rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+		green_led_pin: green-led-pin {
+			rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	hym8563 {
+		hym8563_int: hym8563-int {
+			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	pmic {
+		pmic_int: pmic_int {
+			rockchip,pins =
+				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	usb {
+		vcc5v0_usb_host_en: vcc5v0_usb_host_en {
+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
+&pmu_io_domains {
+	pmuio1-supply = <&vcc3v3_pmu>;
+	pmuio2-supply = <&vcc3v3_pmu>;
+	vccio1-supply = <&vccio_acodec>;
+	vccio3-supply = <&vccio_sd>;
+	vccio4-supply = <&vcc_3v3>;
+	vccio5-supply = <&vcc_3v3>;
+	vccio6-supply = <&vcc_1v8>;
+	vccio7-supply = <&vcc_3v3>;
+	status = "okay";
+};
+
+&saradc {
+	vref-supply = <&vcca_1v8>;
+	status = "okay";
+};
+
+&sata2 {
+	status = "okay";
+};
+
+&sdhci {
+	bus-width = <8>;
+	max-frequency = <200000000>;
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
+	status = "okay";
+};
+
+&sdmmc0 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+	disable-wp;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
+	sd-uhs-sdr104;
+	vmmc-supply = <&vcc3v3_sd>;
+	vqmmc-supply = <&vccio_sd>;
+	status = "okay";
+};
+
+&tsadc {
+	rockchip,hw-tshut-mode = <1>;
+	rockchip,hw-tshut-polarity = <0>;
+	status = "okay";
+};
+
+&uart2 {
+	/* debug-uart */
+	status = "okay";
+};
+
+&usb_host0_ehci {
+	status = "okay";
+};
+
+&usb_host0_ohci {
+	status = "okay";
+};
+
+&usb_host0_xhci {
+	extcon = <&usb2phy0>;
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usb_host1_ehci {
+	status = "okay";
+};
+
+&usb_host1_ohci {
+	status = "okay";
+};
+
+&usb_host1_xhci {
+	status = "okay";
+};
+
+&usb2phy0 {
+	status = "okay";
+};
+
+&usb2phy0_host {
+	phy-supply = <&vcc5v0_usb_host>;
+	status = "okay";
+};
+
+&usb2phy0_otg {
+	phy-supply = <&vcc5v0_usb_otg>;
+	status = "okay";
+};
+
diff --git a/configs/bpi-r2pro-rk3568_defconfig b/configs/bpi-r2pro-rk3568_defconfig
new file mode 100644
index 000000000000..e8936261eab3
--- /dev/null
+++ b/configs/bpi-r2pro-rk3568_defconfig
@@ -0,0 +1,101 @@ 
+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="rk3568-bpi-r2pro"
+CONFIG_ROCKCHIP_RK3568=y
+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
+CONFIG_SPL_SERIAL=y
+CONFIG_SPL_STACK_R_ADDR=0x600000
+CONFIG_SPL_STACK=0x400000
+CONFIG_DEBUG_UART_BASE=0xFE660000
+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_LEGACY_IMAGE_FORMAT=y
+#CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-bpi-r2pro"
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_MAX_SIZE=0x40000
+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_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+# CONFIG_SPL_DOS_PARTITION is not set
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_LIVE=y
+CONFIG_NET=n
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_SPL_REGMAP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_SPL_CLK=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_ROCKCHIP_GPIO_V2=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_DM_PMIC=y
+CONFIG_PMIC_RK8XX=y
+CONFIG_REGULATOR_RK8XX=y
+CONFIG_REGULATOR_PWM=y
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_SPL_RAM=y
+CONFIG_BAUDRATE=1500000
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYS_NS16550_MEM32=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_PSCI=y
+CONFIG_ERRNO_STR=y
+CONFIG_SYS_PROMPT="BPI-R2PRO> "
+CONFIG_CMD_SYSBOOT=y
+CONFIG_CMD_BOOTDEV=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_CMD_EFICONFIG=n
+CONFIG_EFI_LOADER=n
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_GENERIC=y
+CONFIG_USB_UHCI_HCD=y
+CONFIG_USB_DWC2=y
+CONFIG_USB_DWC3=y
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_CMD_USB=y
+CONFIG_AHCI=y
+CONFIG_DWC_AHCI=y
+CONFIG_SCSI=y
+CONFIG_DM_SCSI=y
+CONFIG_CMD_SCSI=y