Skip to contentSkip to conversation

ARM: Rockchip: Add rk3568 BananaPi R2 Pro board support

PATCH Superseded Frank Wunderlich 4 participants 6 messages Jan 23, 2022 – Feb 10, 2022

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Rockchip: Add rk3568 BananaPi R2 Pro board support

From: Frank Wunderlich <[email protected]>

This adds support for the BananaPi R2 Pro board.
It is basicly a copy of rk3568 evb board but with slightly modified DTS. Added GPIO-Leds to dts and modified the hw-detection a bit.

Tested features so far are:

- 1st stage booting
- Network
- SD card (Emmc not tested but basicly same as on EVB)
- power LED (green)

---
 arch/arm/boards/Makefile                      |   1 +
 .../rockchip-rk3568-bpi-r2pro/.gitignore      |   1 +
 .../boards/rockchip-rk3568-bpi-r2pro/Makefile |   2 +
 .../boards/rockchip-rk3568-bpi-r2pro/board.c  |  93 +++
 .../rockchip-rk3568-bpi-r2pro/lowlevel.c      |  49 ++
 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/rk3568-bpi-r2-pro.dts            | 593 ++++++++++++++++++
 arch/arm/mach-rockchip/Kconfig                |   6 +
 dts/Bindings/arm/rockchip.yaml                |   5 +
 images/Makefile.rockchip                      |   7 +
 10 files changed, 758 insertions(+)
 create mode 100644 arch/arm/boards/rockchip-rk3568-bpi-r2pro/.gitignore
 create mode 100644 arch/arm/boards/rockchip-rk3568-bpi-r2pro/Makefile
 create mode 100644 arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
 create mode 100644 arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c
 create mode 100644 arch/arm/dts/rk3568-bpi-r2-pro.dts
arch/arm/boards/Makefile +1 -0
index 6fe1b5991455..c26f84dcd8de 100644
@@ -186,4 +186,5 @@ obj-$(CONFIG_MACH_TQMLS1046A)			+= tqmls1046a/
 obj-$(CONFIG_MACH_MNT_REFORM)			+= mnt-reform/
 obj-$(CONFIG_MACH_SKOV_ARM9CPU)			+= skov-arm9cpu/
 obj-$(CONFIG_MACH_RK3568_EVB)			+= rockchip-rk3568-evb/
+obj-$(CONFIG_MACH_RK3568_R2PRO)			+= rockchip-rk3568-bpi-r2pro/
 obj-$(CONFIG_MACH_PINE64_QUARTZ64)		+= pine64-quartz64/
arch/arm/boards/rockchip-rk3568-bpi-r2pro/.gitignore new file +1 -0
new file mode 100644
index 000000000000..f458f794b54c
@@ -0,0 +1 @@
+sdram-init.bin
arch/arm/boards/rockchip-rk3568-bpi-r2pro/Makefile new file +2 -0
new file mode 100644
index 000000000000..01c7a259e9a5
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +93 -0

93 lines not on this page · raw message

arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c new file +49 -0

49 lines not on this page · raw message

arch/arm/dts/Makefile +1 -0
index 8ae8244bfeee..54e020a160c9 100644
@@ -105,6 +105,7 @@ lwl-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o
 lwl-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += rk3288-phycore-som.dtb.o
 lwl-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o
 lwl-$(CONFIG_MACH_RK3568_EVB) += rk3568-evb1-v10.dtb.o
+lwl-$(CONFIG_MACH_RK3568_R2PRO) += rk3568-bpi-r2-pro.dtb.o
 lwl-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o
 lwl-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o
 lwl-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o
arch/arm/dts/rk3568-bpi-r2-pro.dts new file +593 -0

593 lines not on this page · raw message

arch/arm/mach-rockchip/Kconfig +6 -0
index 3c6b3dd9b531..7d54f357cfda 100644
@@ -68,6 +68,12 @@ config MACH_RK3568_EVB
 	help
 	  Say Y here if you are using a RK3568 EVB
 
+config MACH_RK3568_R2PRO
+	select ARCH_RK3568
+	bool "RK3568 R2PRO"
+	help
+	  Say Y here if you are using a RK3568 Bananpi R2 Pro
+
 config MACH_PINE64_QUARTZ64
 	select ARCH_RK3568
 	bool "Pine64 Quartz64"
dts/Bindings/arm/rockchip.yaml +5 -0
index 4aed16176434..109f885d970f 100644
@@ -651,6 +651,11 @@ properties:
           - const: rockchip,rk3568-evb1-v10
           - const: rockchip,rk3568
 
+      - description: Rockchip RK3568 Bananapi R2 Pro board
+        items:
+          - const: rockchip,rk3568-bpi-r2pro
+          - const: rockchip,rk3568
+
 additionalProperties: true
 
 ...
images/Makefile.rockchip +7 -0
index 0a485cad24d1..6726ee333818 100644
@@ -14,6 +14,9 @@ image-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += barebox-rk3288-phycore-som.img
 pblb-$(CONFIG_MACH_RK3568_EVB) += start_rk3568_evb
 image-$(CONFIG_MACH_RK3568_EVB) += barebox-rk3568-evb.img
 
+pblb-$(CONFIG_MACH_RK3568_R2PRO) += start_rk3568_r2pro
+image-$(CONFIG_MACH_RK3568_R2PRO) += barebox-rk3568-r2pro.img
+
 pblb-$(CONFIG_MACH_PINE64_QUARTZ64) += start_quartz64a
 image-$(CONFIG_MACH_PINE64_QUARTZ64) += barebox-quartz64a.img
 
@@ -24,6 +27,10 @@ $(obj)/barebox-rk3568-evb.img: $(obj)/start_rk3568_evb.pblb \
                 $(board)/rockchip-rk3568-evb/sdram-init.bin
 	$(call if_changed,rkimg_image)
 
+$(obj)/barebox-rk3568-r2pro.img: $(obj)/start_rk3568_r2pro.pblb \
+                $(board)/rockchip-rk3568-bpi-r2pro/sdram-init.bin
+	$(call if_changed,rkimg_image)
+
 $(obj)/barebox-quartz64a.img: $(obj)/start_quartz64a.pblb \
                 $(board)/pine64-quartz64/sdram-init.bin
 	$(call if_changed,rkimg_image)
Signature · 7 lines
2.25.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 77 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

This adds support for the BananaPi R2 Pro board.
It is basicly a copy of rk3568 evb board but with slightly modified DTS. Added GPIO-Leds to dts and modified the hw-detection a bit.

Tested features so far are:

- 1st stage booting
- Network
- SD card (Emmc not tested but basicly same as on EVB)
- power LED (green)

---
 arch/arm/boards/Makefile                      |   1 +
 .../rockchip-rk3568-bpi-r2pro/.gitignore      |   1 +
 .../boards/rockchip-rk3568-bpi-r2pro/Makefile |   2 +
 .../boards/rockchip-rk3568-bpi-r2pro/board.c  |  93 +++
 .../rockchip-rk3568-bpi-r2pro/lowlevel.c      |  49 ++
 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/rk3568-bpi-r2-pro.dts            | 593 ++++++++++++++++++
 arch/arm/mach-rockchip/Kconfig                |   6 +
 dts/Bindings/arm/rockchip.yaml                |   5 +
 images/Makefile.rockchip                      |   7 +
 10 files changed, 758 insertions(+)
 create mode 100644 arch/arm/boards/rockchip-rk3568-bpi-r2pro/.gitignore
 create mode 100644 arch/arm/boards/rockchip-rk3568-bpi-r2pro/Makefile
 create mode 100644 arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
 create mode 100644 arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c
 create mode 100644 arch/arm/dts/rk3568-bpi-r2-pro.dts
arch/arm/boards/Makefile +1 -0
index 6fe1b5991455..c26f84dcd8de 100644
@@ -186,4 +186,5 @@ obj-$(CONFIG_MACH_TQMLS1046A)			+= tqmls1046a/
 obj-$(CONFIG_MACH_MNT_REFORM)			+= mnt-reform/
 obj-$(CONFIG_MACH_SKOV_ARM9CPU)			+= skov-arm9cpu/
 obj-$(CONFIG_MACH_RK3568_EVB)			+= rockchip-rk3568-evb/
+obj-$(CONFIG_MACH_RK3568_R2PRO)			+= rockchip-rk3568-bpi-r2pro/
 obj-$(CONFIG_MACH_PINE64_QUARTZ64)		+= pine64-quartz64/
arch/arm/boards/rockchip-rk3568-bpi-r2pro/.gitignore new file +1 -0
new file mode 100644
index 000000000000..f458f794b54c
@@ -0,0 +1 @@
+sdram-init.bin
arch/arm/boards/rockchip-rk3568-bpi-r2pro/Makefile new file +2 -0
new file mode 100644
index 000000000000..01c7a259e9a5
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +14 -0
new file mode 100644
index 000000000000..37634a7e33ed
@@ -0,0 +1,93 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#define pr_fmt(fmt) "rk3568-r2pro: " fmt
+
+#include <common.h>
+#include <init.h>
+#include <mach/bbu.h>
+#include <aiodev.h>
+#include <bootsource.h>
+#include <environment.h>
+#include <globalvar.h>
+#include <magicvar.h>
+#include <deep-probe.h>
+

arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c line 24

Quoted 10 lines
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +10 -0
+static bool machine_is_rk3568_r2pro = false;
+
+static int rk3568_r2pro_probe(struct device_d *dev)
+{
+	enum bootsource bootsource = bootsource_get();
+	int instance = bootsource_get_instance();
+
+	barebox_set_model("RK3568 R2PRO");
+	barebox_set_hostname("rk3568-r2pro");
+	machine_is_rk3568_r2pro = true;

Maybe add a bpi to the hostname, model, variable names and instead drop the rk3568?

Quoted 7 lines
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +7 -0
+	if (!IS_ENABLED(CONFIG_AIODEV))
+		return 0;
+
+	if (!machine_is_rk3568_r2pro)
+		return 0;
+
+	hwid_chan = aiochannel_by_name("aiodev0.in_value1_mV");

arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c line 74

Quoted 10 lines
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +10 -0
+	if (IS_ERR(hwid_chan)) {
+		ret = PTR_ERR(hwid_chan);
+		goto err_hwid;
+	}
+
+	ret = aiochannel_get_value(hwid_chan, &hwid_voltage);
+	if (ret)
+		goto err_hwid;
+
+	pr_info("hwid_voltage: %d\n", hwid_voltage);

The voltage is not really interesting. This should be a pr_debug.

arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c line 79

Quoted 5 lines
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +5 -0
+
+	if (hwid_voltage == 1800)
+		hwid = "V00";
+	else
+		hwid = "unknown";

Have you verified this board really encodes the hardware revision using this adc channel?

arch/arm/dts/rk3568-bpi-r2-pro.dts

Quoted 1 line
arch/arm/dts/rk3568-bpi-r2-pro.dts +0 -0

I saw this device tree looks different from the one you sent for kernel inclusion. This is not a problem now, but once the kernel dts is upstream it will show up in dts/ in the barebox tree. We then usually include the upstream dts from the barebox board dts, so that only the barebox specific additions are in the barebox dts. Given that it would be nice if you could minimize the differences now already, so that later inclusion of the upstream dts becomes easier.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Hi,

Quoted 16 lines

Gesendet: Montag, 24. Januar 2022 um 09:55 Uhr
Von: "Sascha Hauer" <[email protected]>

arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c line 24

Quoted 10 lines
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +10 -0
+static bool machine_is_rk3568_r2pro = false;
+
+static int rk3568_r2pro_probe(struct device_d *dev)
+{
+	enum bootsource bootsource = bootsource_get();
+	int instance = bootsource_get_instance();
+
+	barebox_set_model("RK3568 R2PRO");
+	barebox_set_hostname("rk3568-r2pro");
+	machine_is_rk3568_r2pro = true;

Maybe add a bpi to the hostname, model, variable names and instead drop the rk3568?

i can do...

Quoted 11 lines
Quoted 11 lines
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +11 -0
+	if (!IS_ENABLED(CONFIG_AIODEV))
+		return 0;
+
+	if (!machine_is_rk3568_r2pro)
+		return 0;
+
+	hwid_chan = aiochannel_by_name("aiodev0.in_value1_mV");
+	if (IS_ERR(hwid_chan)) {
+		ret = PTR_ERR(hwid_chan);
+		goto err_hwid;
+	}
Quoted 8 lines

arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c line 74

Quoted 6 lines
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +6 -0
+
+	ret = aiochannel_get_value(hwid_chan, &hwid_voltage);
+	if (ret)
+		goto err_hwid;
+
+	pr_info("hwid_voltage: %d\n", hwid_voltage);

The voltage is not really interesting. This should be a pr_debug.

ok, i change this

Quoted 8 lines

arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c line 79

Quoted 5 lines
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c new file +5 -0
+
+	if (hwid_voltage == 1800)
+		hwid = "V00";
+	else
+		hwid = "unknown";

Have you verified this board really encodes the hardware revision using this adc channel?

yes, in shematics it is named SARADC_VIN1_HW_ID (which should map the in_value1_mV), but i have only this one prototype for testing.

Quoted 9 lines

arch/arm/dts/rk3568-bpi-r2-pro.dts

Quoted 1 line
arch/arm/dts/rk3568-bpi-r2-pro.dts +0 -0

I saw this device tree looks different from the one you sent for kernel inclusion. This is not a problem now, but once the kernel dts is upstream it will show up in dts/ in the barebox tree. We then usually include the upstream dts from the barebox board dts, so that only the barebox specific additions are in the barebox dts. Given that it would be nice if you could minimize the differences now already, so that later inclusion of the upstream dts becomes easier.

ok, we can wait for kernel dts to be merged, but most stuff in kernel dts will be unused in barebox. so i started with the evb one which is enough for barebox atm. Only added the leds.

regards Frank

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#5 lore raw
In reply to Frank Wunderlich

Hello Frank,

arch/arm/dts/rk3568-bpi-r2-pro.dts line 21

Quoted 12 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

arch/arm/dts/rk3568-bpi-r2-pro.dts new file +10 -0
+/ {
+	model = "Rockchip RK3568 Bananapi R2 Pro Board";
+	compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
+
+	aliases {
+		emmc = &sdhci;
+		sd = &sdmmc0;
+	};
+
+	chosen: chosen {

You can drop the label.

arch/arm/mach-rockchip/Kconfig config MACH_RK3568_EVB · line 75

Quoted 13 lines
arch/arm/mach-rockchip/Kconfig +5 -0
index 3c6b3dd9b531..7d54f357cfda 100644
@@ -68,6 +68,12 @@ config MACH_RK3568_EVB
 	help
 	  Say Y here if you are using a RK3568 EVB
 
+config MACH_RK3568_R2PRO
+	select ARCH_RK3568
+	bool "RK3568 R2PRO"
+	help
+	  Say Y here if you are using a RK3568 Bananpi R2 Pro

Banana Pi BPI-R2 Pro*. Perhaps include the Banana Pi bit in the prompt text as well?

dts/Bindings/arm/rockchip.yaml

Quoted 8 lines
arch/arm/mach-rockchip/Kconfig +1 -0
+
 config MACH_PINE64_QUARTZ64
 	select ARCH_RK3568
 	bool "Pine64 Quartz64"
dts/Bindings/arm/rockchip.yaml +0 -0
index 4aed16176434..109f885d970f 100644

dts/ is synchronized with Linux, so patches here are not accepted in barebox. You can add new bindings to Documentation/devicetree/bindings/, although boards are usually not documented in the bindings, but instead in board docs:

Could you add an entry to Documentation/boards/rockchip.rst -> Rockchip RK356x -> Supported Boards?

And enabling the board in arch/arm/configs/rockchip_v8_defconfig would be nice as well.

Cheers,
Ahmad

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw
In reply to Sascha Hauer
Quoted 11 lines

Gesendet: Montag, 24. Januar 2022 um 09:55 Uhr
Von: "Sascha Hauer" <[email protected]>

I saw this device tree looks different from the one you sent for kernel inclusion. This is not a problem now, but once the kernel dts is upstream it will show up in dts/ in the barebox tree. We then usually include the upstream dts from the barebox board dts, so that only the barebox specific additions are in the barebox dts. Given that it would be nice if you could minimize the differences now already, so that later inclusion of the upstream dts becomes easier.

Hi,

after dts got merged to linux i used it to find differences and minimized them.

have not added io-domain as i don't know if they change in future and they are not needed in barebox.

needed to add tsadc+pinctrl and spi3 to rk3568*.dtsi as they are referenced in my linux board dts

can you look if the dts is now ok for upstreaming?

https://github.com/frank-w/barebox-r2pro/blob/r2pro/arch/arm/dts/rk3568-bpi-r2-pro.dts

regards Frank

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#4 lore raw
Quoted 16 lines · Frank Wunderlich
Quoted 11 lines

Gesendet: Montag, 24. Januar 2022 um 09:55 Uhr
Von: "Sascha Hauer" <[email protected]>

I saw this device tree looks different from the one you sent for kernel inclusion. This is not a problem now, but once the kernel dts is upstream it will show up in dts/ in the barebox tree. We then usually include the upstream dts from the barebox board dts, so that only the barebox specific additions are in the barebox dts. Given that it would be nice if you could minimize the differences now already, so that later inclusion of the upstream dts becomes easier.

Hi,

after dts got merged to linux i used it to find differences and minimized them.

Quoted 7 lines

have not added io-domain as i don't know if they change in future and they are not needed in barebox.

needed to add tsadc+pinctrl and spi3 to rk3568*.dtsi as they are referenced in my linux board dts

can you look if the dts is now ok for upstreaming?

https://github.com/frank-w/barebox-r2pro/blob/r2pro/arch/arm/dts/rk3568-bpi-r2-pro.dts

Here's the diff for the two files. Most stuff looks ok, but some there are a few things:

Quoted 80 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +51 -4
@@ -15,13 +15,29 @@
 	compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
 
 	aliases {
-		ethernet0 = &gmac0;
-		mmc0 = &sdmmc0;
-		mmc1 = &sdhci;
+		emmc = &sdhci;
+		sd = &sdmmc0;
 	};
 
-	chosen: chosen {
+	chosen {
 		stdout-path = "serial2:1500000n8";
+
+		environment-sd {
+			compatible = "barebox,environment";
+			device-path = &environment_sd;
+			status = "disabled";
+		};
+
+		environment-emmc {
+			compatible = "barebox,environment";
+			device-path = &environment_emmc;
+			status = "disabled";
+		};
+	};
+
+	memory@a00000 {
+		device_type = "memory";
+		reg = <0x0 0x00a00000 0x0 0x7f600000>;
 	};
 
 	leds {
@@ -72,11 +88,42 @@
 		regulator-max-microvolt = <5000000>;
 		vin-supply = <&dc_12v>;
 	};
+
+	vcc3v3_lcd0_n: vcc3v3-lcd0-n {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v3_lcd0_n";
+		regulator-boot-on;
+
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
+	vcc3v3_lcd1_n: vcc3v3-lcd1-n {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc3v3_lcd1_n";
+		regulator-boot-on;
+
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
+	vcc5v0_host: vcc5v0-host-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_host";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_host_en>;
+		regulator-always-on;
+	};
 };
 
 &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-handle = <&rgmii_phy0>;
 	phy-mode = "rgmii";

bb.dts line 92

Quoted 7 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +0 -4
@@ -86,10 +133,6 @@
 		     &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>;

Why is this removed?

Quoted 16 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +5 -0
 	tx_delay = <0x3c>;
 	rx_delay = <0x2f>;
 	status = "okay";
@@ -106,6 +149,11 @@
 		#clock-cells = <1>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pmic_int>;
+
+		clock-output-names = "rk808-clkout1", "rk808-clkout2";
+		/* 1: rst regs (default in codes), 0: rst the pmic */
+		pmic-reset-func = <0>;
+
 		rockchip,system-power-controller;
 		vcc1-supply = <&vcc3v3_sys>;
 		vcc2-supply = <&vcc3v3_sys>;

bb.dts line 171

Quoted 6 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +3 -0
@@ -118,6 +166,10 @@
 		vcc9-supply = <&vcc3v3_sys>;
 		wakeup-source;
 
+		pwrkey {
+			status = "okay";
+		};

This is unused in barebox, right? If so, please drop.

Quoted 13 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +6 -0
+
 		regulators {
 			vdd_logic: DCDC_REG1 {
 				regulator-name = "vdd_logic";
@@ -337,19 +389,28 @@
 			rockchip,pins =
 				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
+
+		soc_slppin_gpio: soc_slppin_gpio {
+			rockchip,pins =
+				<0 RK_PA2 RK_FUNC_GPIO &pcfg_output_low>;
+		};

bb.dts line 406

Quoted 10 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +10 -0
+
+		soc_slppin_slp: soc_slppin_slp {
+			rockchip,pins =
+				<0 RK_PA2 1 &pcfg_pull_none>;
+		};
+
+		soc_slppin_rst: soc_slppin_rst {
+			rockchip,pins =
+				<0 RK_PA2 2 &pcfg_pull_none>;
+		};

These are unused.

Quoted 36 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +13 -11
 	};
-};
 
-&pmu_io_domains {
-	pmuio1-supply = <&vcc3v3_pmu>;
-	pmuio2-supply = <&vcc3v3_pmu>;
-	vccio1-supply = <&vccio_acodec>;
-	vccio3-supply = <&vccio_sd>;
-	vccio4-supply = <&vcc_1v8>;
-	vccio5-supply = <&vcc_3v3>;
-	vccio6-supply = <&vcc_3v3>;
-	vccio7-supply = <&vcc_3v3>;
-	status = "okay";
+	usb {
+		vcc5v0_host_en: vcc5v0-host-en {
+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
 };
 
 &pwm8 {
@@ -404,22 +465,46 @@
 	bus-width = <8>;
 	max-frequency = <200000000>;
 	non-removable;
+	no-sd;
 	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
 	status = "okay";
+
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <2>;
+		#size-cells = <2>;
+
+		environment_emmc: partition@408000 {

bb.dts line 415

Quoted 10 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +4 -1
+			label = "barebox-environment";
+			reg = <0x0 0x408000 0x0 0x8000>;
+		};
+	};
 };
 
 &sdmmc0 {
 	bus-width = <4>;
 	cap-sd-highspeed;
-	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;

Could be added to barebox dts as well.

bb.dts line 493

Quoted 6 lines
bb.dts renamed from rk3568-bpi-r2-pro.dts +2 -0
 	disable-wp;
+	max-frequency = <150000000>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
 	sd-uhs-sdr104;
+	supports-sd;

Please drop. This is used nowhere.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox