Re: Aw: Re: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
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" >> An: "Frank Wunderlich" >> Cc: "Frank Wunderlich" , "Simon Glass" >> , "Philipp Tomsich" , "Kever >> Yang" , "Marek Vasut" , >> 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 >>> >>> 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 >>> --- >>> 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 ..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 = <2400>; >>> + 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 >>> ind
Aw: Re: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
Hi, thank you for your suggestions > Gesendet: Sonntag, 17. September 2023 um 00:51 Uhr > Von: "Jonas Karlman" > An: "Frank Wunderlich" > Cc: "Frank Wunderlich" , "Simon Glass" > , "Philipp Tomsich" , "Kever > Yang" , "Marek Vasut" , > 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 > > > > 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 > > --- > > 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 ..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 = <2400>; > > + 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 ..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 ..e8936261eab3 > > --- /dev/null > > +++ b/configs/bpi-r2pro-rk3568_defconfig > > @@ -0,0 +1,101 @@ > > +CONFIG_ARM=y > > +CONFIG_SKIP_LOWLEVEL_INIT=y > > +CONFIG_COUNTER_FREQUENCY=2400 > > +CONFIG_ARCH_ROCKCHIP=y > > +CONFIG_TEXT_BASE=0x00a0 > > +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=0xc0 > > +CONFIG_DEFAULT_DEVICE_TREE="rk3568-bpi-r2pro" > > +CONFIG_ROCKCHIP_RK3568=y > > +CONF
Re: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
Hi Frank, On 2023-08-20 18:00, Frank Wunderlich wrote: > From: Frank Wunderlich > > 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 > --- > 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 ..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 = <2400>; > + 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 ..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 ..e8936261eab3 > --- /dev/null > +++ b/configs/bpi-r2pro-rk3568_defconfig > @@ -0,0 +1,101 @@ > +CONFIG_ARM=y > +CONFIG_SKIP_LOWLEVEL_INIT=y > +CONFIG_COUNTER_FREQUENCY=2400 > +CONFIG_ARCH_ROCKCHIP=y > +CONFIG_TEXT_BASE=0x00a0 > +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=0xc0 > +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=0x60 > +CONFIG_SPL_STACK=0x40 > +CONFIG_DEBUG_UART_BASE=0xFE66 > +CONFIG_DEBUG_UART_CLOCK=2400 > +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=0x4 > +CONFIG_SPL_PAD_TO=0x7f8000 > +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y > +CONFIG_SPL_BSS_START_ADDR=0x400 > +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_G
Re: Aw: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
On 2023-09-16 18:45, Frank Wunderlich wrote: > Am 16. September 2023 18:07:44 MESZ schrieb Marek Vasut : >> 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" >>>> An: u-boot@lists.denx.de >>>> Cc: "Frank Wunderlich" , "Simon Glass" >>>> , "Philipp Tomsich" , "Kever >>>> Yang" , "Marek Vasut" , "Jonas >>>> Karlman" >>>> Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board >>>> >>>> From: Frank Wunderlich >>>> >>>> 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
Re: Aw: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
On 9/16/23 18:45, Frank Wunderlich wrote: Am 16. September 2023 18:07:44 MESZ schrieb Marek Vasut : 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" An: u-boot@lists.denx.de Cc: "Frank Wunderlich" , "Simon Glass" , "Philipp Tomsich" , "Kever Yang" , "Marek Vasut" , "Jonas Karlman" Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board From: Frank Wunderlich 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.
Re: Aw: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
Am 16. September 2023 18:07:44 MESZ schrieb Marek Vasut : >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" >>> An: u-boot@lists.denx.de >>> Cc: "Frank Wunderlich" , "Simon Glass" >>> , "Philipp Tomsich" , "Kever >>> Yang" , "Marek Vasut" , "Jonas >>> Karlman" >>> Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board >>> >>> From: Frank Wunderlich >>> >>> 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
Re: Aw: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
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" An: u-boot@lists.denx.de Cc: "Frank Wunderlich" , "Simon Glass" , "Philipp Tomsich" , "Kever Yang" , "Marek Vasut" , "Jonas Karlman" Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board From: Frank Wunderlich 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.
Aw: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board
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" > An: u-boot@lists.denx.de > Cc: "Frank Wunderlich" , "Simon Glass" > , "Philipp Tomsich" , "Kever > Yang" , "Marek Vasut" , "Jonas > Karlman" > Betreff: [PATCH v3] board: rockchip: Add Bananapi R2Pro Board > > From: Frank Wunderlich > > 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 > --- > 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
[PATCH v3] board: rockchip: Add Bananapi R2Pro Board
From: Frank Wunderlich 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 --- 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 ..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 = <2400>; + 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 ..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 + * + */ + +/dts-v1/; +#include +#include +#include +#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:150n8"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&blue_led_pin &green_led_pin>; + + blue_led: led-0 { + color = ; + default-state = "off"; + function = LED_FUNCTION_STATUS; + gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>; + }; + + green_led: led-1 { + color = ; + 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 = <1200>; + regulator-max-microvolt = <1200>; + }; + + vcc3v3_sys: vcc3v3-sys-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + 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 = <500>; + regulator-max-microvolt = <500>; + 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 = <500>; + regulator-max-microvolt = <500>; + vin-supply = <&d