Skip to contentSkip to conversation

dt-bindings: arm: rockchip: add support for Radxa ROCK Pi E v3.0

PATCH In review FUKAUMI Naoki 5 participants 17 messages Aug 16, 2024 – Aug 27, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/2 dt-bindings: arm: rockchip: add support for Radxa ROCK Pi E v3.0

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip.

[1] https://radxa.com/products/rockpi/pie

---
Changes in v5:
- revert compatible string
- describe rockchip.yaml properly
Changes in v4:
- update compatible string for OpenWrt
- drop A-b tag
Changes in v3:
- collect A-b tag
Changes in v2:
- fix typo in commit message
- add missing --- in commit message
- add new section instead of new item in rockchip.yaml

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/rockchip.yaml +3 -1
index 1f23b8b05a8f..684b779b2a40 100644
@@ -795,7 +795,9 @@ properties:
 
       - description: Radxa ROCK Pi E
         items:
-          - const: radxa,rockpi-e
+          - enum:
+              - radxa,rockpi-e
+              - radxa,rockpi-e-v3
           - const: rockchip,rk3328
 
       - description: Radxa ROCK Pi N8
Signature · 1 line
2.43.0
#1 lore raw

PATCH v5 2/2 arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM
- 4/8/16/32GB eMMC
- Micro SD Card slot
- WiFi 4 and BT 4, or WiFi 5 and BT 5
- 1x 1000M Ethernet supporting PoE with add‑on PoE HAT
- 1x 100M Ethernet
- 1x USB 3.0 Type-A port (Host)
- 1x 4-ring 3.5mm headphone jack
- 40 Pin GPIO header

[1] https://radxa.com/products/rockpi/pie

---
Changes in v5:
- revert compatible string
Changes in v4:
- update compatible string for OpenWrt
Changes in v3:
- fix conflict for recent change
Changes in v2:
- fix typo in commit message
- add missing --- in commit message

---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3328-rock-pi-e-v3.dts |  15 +
 .../boot/dts/rockchip/rk3328-rock-pi-e.dts    | 460 +-----------------
 ...28-rock-pi-e.dts => rk3328-rock-pi-e.dtsi} |   5 -
 4 files changed, 31 insertions(+), 450 deletions(-)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e-v3.dts
 rewrite arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts (97%)
 copy arch/arm64/boot/dts/rockchip/{rk3328-rock-pi-e.dts => rk3328-rock-pi-e.dtsi} (98%)
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index cb309b1975ba..cc74cd17850a 100644
@@ -25,6 +25,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e-v3.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-pc.dtb
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e-v3.dts new file +15 -0
new file mode 100644
index 000000000000..ad9c4c562914
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "rk3328-rock-pi-e.dtsi"
+
+/ {
+	model = "Radxa ROCK Pi E v3.0";
+	compatible = "radxa,rockpi-e-v3", "rockchip,rk3328";
+
+	aliases {
+		mmc0 = &emmc;
+		mmc1 = &sdmmc;
+	};
+};
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +15 -445

460 lines not on this page · raw message

arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dtsi renamed from arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +0 -5
similarity index 98%
copy from arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
copy to arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dtsi
index 3e08e2fd0a78..bb01143dc91a 100644
@@ -17,14 +17,9 @@
 #include "rk3328.dtsi"
 
 / {
-	model = "Radxa ROCK Pi E";
-	compatible = "radxa,rockpi-e", "rockchip,rk3328";
-
 	aliases {
 		ethernet0 = &gmac2io;
 		ethernet1 = &gmac2phy;
-		mmc0 = &sdmmc;
-		mmc1 = &emmc;
 	};
 
 	chosen {
Signature · 1 line
2.43.0
maintainer
#2 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 78 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM
- 4/8/16/32GB eMMC
- Micro SD Card slot
- WiFi 4 and BT 4, or WiFi 5 and BT 5
- 1x 1000M Ethernet supporting PoE with add‑on PoE HAT
- 1x 100M Ethernet
- 1x USB 3.0 Type-A port (Host)
- 1x 4-ring 3.5mm headphone jack
- 40 Pin GPIO header

[1] https://radxa.com/products/rockpi/pie

---
Changes in v5:
- revert compatible string
Changes in v4:
- update compatible string for OpenWrt
Changes in v3:
- fix conflict for recent change
Changes in v2:
- fix typo in commit message
- add missing --- in commit message

---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3328-rock-pi-e-v3.dts |  15 +
 .../boot/dts/rockchip/rk3328-rock-pi-e.dts    | 460 +-----------------
 ...28-rock-pi-e.dts => rk3328-rock-pi-e.dtsi} |   5 -
 4 files changed, 31 insertions(+), 450 deletions(-)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e-v3.dts
 rewrite arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts (97%)
 copy arch/arm64/boot/dts/rockchip/{rk3328-rock-pi-e.dts => rk3328-rock-pi-e.dtsi} (98%)
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index cb309b1975ba..cc74cd17850a 100644
@@ -25,6 +25,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e-v3.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-pc.dtb
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e-v3.dts new file +15 -0
new file mode 100644
index 000000000000..ad9c4c562914
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "rk3328-rock-pi-e.dtsi"
+
+/ {
+	model = "Radxa ROCK Pi E v3.0";
+	compatible = "radxa,rockpi-e-v3", "rockchip,rk3328";
+
+	aliases {
+		mmc0 = &emmc;
+		mmc1 = &sdmmc;
+	};
+};
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +0 -0
dissimilarity index 97%
index 3e08e2fd0a78..0929df3c803a 100644
@@ -1,445 +1,15 @@

[...]

Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +5 -0
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "rk3328-rock-pi-e.dtsi"

arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts line 15

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +10 -0
+
+/ {
+	model = "Radxa ROCK Pi E";
+	compatible = "radxa,rockpi-e", "rockchip,rk3328";
+
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &emmc;
+	};
+};

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Heiko

#3 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Hi,

Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

Quoted 6 lines

Heiko

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#4 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Hello Fukaumi,

Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

#5 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Quoted 26 lines · Dragan Simic

Hello Fukaumi,

Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

#6 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Hi,

Quoted 35 lines · Dragan Simic
Quoted 26 lines · Dragan Simic

Hello Fukaumi,

Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

Quoted 7 lines

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#7 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Quoted 39 lines · FUKAUMI Naoki
Quoted 38 lines · Dragan Simic
Quoted 24 lines · Dragan Simic
Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Quoted 8 lines
Quoted 2 lines

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

Could you, please, explain what's the actual issue with OpenWrt? I did read some GitHub issue that described it, IIRC, but I was unable to fully understand what's the underlying issue.

Quoted 2 lines

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Well, the above-mentioned Nano Pi M4 boards share the same DT and the same "compatible" value, because for all consumers of the DT, except for U-Boot that can already handle the differences, they are the same boards.

#8 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Quoted 46 lines · Dragan Simic
Quoted 45 lines · FUKAUMI Naoki
Quoted 33 lines · Dragan Simic
Quoted 24 lines · Dragan Simic
Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

Quoted 7 lines

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

Quoted 6 lines
Quoted 2 lines

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

Could you, please, explain what's the actual issue with OpenWrt?  I did read some GitHub issue that described it, IIRC, but I was unable to fully understand what's the underlying issue.

$ wget https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz
$ strings openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz | grep metadata
{  "metadata_version": "1.1", "compat_version": "1.0", "supported_devices":["radxa,rock-pi-e"], "version": { "dist": "OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386", "target": "rockchip/armv8", "board": "radxa_rock-pi-e" } }
$ wget https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz
$ strings openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz | grep metadata
{  "metadata_version": "1.1", "compat_version": "1.0", "supported_devices":["radxa,rock-pi-e-v3"], "version": { "dist": "OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386", "target": "rockchip/armv8", "board": "radxa_rock-pi-e-v3" } }

since they are incompatible firmware, it needs to have different "supported_devices" string. if both are "radxa,rockpi-e", firmware validation will not work correctly.

(currently both values are wrong, it needs to be fixed, but it's another story)

Quoted 6 lines
Quoted 2 lines

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Well, the above-mentioned Nano Pi M4 boards share the same DT and the same "compatible" value, because for all consumers of the DT, except for U-Boot that can already handle the differences, they are the same boards.

(un)fortunately Nano Pi M4 boards seems not to be supported by OpenWrt

https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#9 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

for the record,

https://openwrt.org/docs/guide-developer/device-support-policies#modeldevice_name
https://openwrt.org/docs/techref/sysupgrade

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

Quoted 73 lines · FUKAUMI Naoki
Quoted 46 lines · Dragan Simic
Quoted 45 lines · FUKAUMI Naoki
Quoted 33 lines · Dragan Simic
Quoted 24 lines · Dragan Simic
Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

Quoted 7 lines

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

Quoted 6 lines
Quoted 2 lines

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

Could you, please, explain what's the actual issue with OpenWrt?  I did read some GitHub issue that described it, IIRC, but I was unable to fully understand what's the underlying issue.

$ wget https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz
$ strings openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz | grep metadata
{  "metadata_version": "1.1", "compat_version": "1.0", "supported_devices":["radxa,rock-pi-e"], "version": { "dist": "OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386", "target": "rockchip/armv8", "board": "radxa_rock-pi-e" } }
$ wget https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz
$ strings openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz | grep metadata
{  "metadata_version": "1.1", "compat_version": "1.0", "supported_devices":["radxa,rock-pi-e-v3"], "version": { "dist": "OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386", "target": "rockchip/armv8", "board": "radxa_rock-pi-e-v3" } }

since they are incompatible firmware, it needs to have different "supported_devices" string. if both are "radxa,rockpi-e", firmware validation will not work correctly.

(currently both values are wrong, it needs to be fixed, but it's another story)

Quoted 6 lines
Quoted 2 lines

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Well, the above-mentioned Nano Pi M4 boards share the same DT and the same "compatible" value, because for all consumers of the DT, except for U-Boot that can already handle the differences, they are the same boards.

Quoted 9 lines

(un)fortunately Nano Pi M4 boards seems not to be supported by OpenWrt

 https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/

Best regards,

Signature · 2 lines
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#10 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

In reply to FUKAUMI Naoki
Quoted 83 lines · FUKAUMI Naoki
Quoted 46 lines · Dragan Simic
Quoted 45 lines · FUKAUMI Naoki
Quoted 33 lines · Dragan Simic
Quoted 24 lines · Dragan Simic
Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

Quoted 7 lines

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

Quoted 6 lines
Quoted 2 lines

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

Could you, please, explain what's the actual issue with OpenWrt?  I did read some GitHub issue that described it, IIRC, but I was unable to fully understand what's the underlying issue.

$ wget
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz
$ strings
openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz | grep
metadata
{  "metadata_version": "1.1", "compat_version": "1.0",
"supported_devices":["radxa,rock-pi-e"], "version": { "dist":
"OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386",
"target": "rockchip/armv8", "board": "radxa_rock-pi-e" } }
$ wget
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz
$ strings
openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz |
grep metadata
{  "metadata_version": "1.1", "compat_version": "1.0",
"supported_devices":["radxa,rock-pi-e-v3"], "version": { "dist":
"OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386",
"target": "rockchip/armv8", "board": "radxa_rock-pi-e-v3" } }

since they are incompatible firmware, it needs to have different "supported_devices" string. if both are "radxa,rockpi-e", firmware validation will not work correctly.

(currently both values are wrong, it needs to be fixed, but it's another story)

Quoted 3 lines
Quoted 2 lines

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Quoted 7 lines
Quoted 3 lines

Well, the above-mentioned Nano Pi M4 boards share the same DT and the same "compatible" value, because for all consumers of the DT, except for U-Boot that can already handle the differences, they are the same boards.

(un)fortunately Nano Pi M4 boards seems not to be supported by OpenWrt

https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/

Thanks for the explanations. As discussed further in #linux-rockchip on Libera.Chat, we do need a general solution for this issue, which would get us covered for all the board variants that use different DRAM chips, which are currently known to U-Boot only.

I'll keep thinking about this in the next couple of days, and I'll come back with an update.

#11 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Hello Naoki,

Quoted 92 lines · Dragan Simic
Quoted 83 lines · FUKAUMI Naoki
Quoted 46 lines · Dragan Simic
Quoted 45 lines · FUKAUMI Naoki
Quoted 33 lines · Dragan Simic
Quoted 24 lines · Dragan Simic
Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

Quoted 7 lines

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

Quoted 6 lines
Quoted 2 lines

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

Could you, please, explain what's the actual issue with OpenWrt?  I did read some GitHub issue that described it, IIRC, but I was unable to fully understand what's the underlying issue.

$ wget
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz
$ strings
openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz | grep
metadata
{  "metadata_version": "1.1", "compat_version": "1.0",
"supported_devices":["radxa,rock-pi-e"], "version": { "dist":
"OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386",
"target": "rockchip/armv8", "board": "radxa_rock-pi-e" } }
$ wget
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz
$ strings
openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz |
grep metadata
{  "metadata_version": "1.1", "compat_version": "1.0",
"supported_devices":["radxa,rock-pi-e-v3"], "version": { "dist":
"OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386",
"target": "rockchip/armv8", "board": "radxa_rock-pi-e-v3" } }

since they are incompatible firmware, it needs to have different "supported_devices" string. if both are "radxa,rockpi-e", firmware validation will not work correctly.

(currently both values are wrong, it needs to be fixed, but it's another story)

Quoted 3 lines
Quoted 2 lines

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Quoted 7 lines
Quoted 3 lines

Well, the above-mentioned Nano Pi M4 boards share the same DT and the same "compatible" value, because for all consumers of the DT, except for U-Boot that can already handle the differences, they are the same boards.

(un)fortunately Nano Pi M4 boards seems not to be supported by OpenWrt

https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/

Quoted 7 lines

Thanks for the explanations. As discussed further in #linux-rockchip on Libera.Chat, we do need a general solution for this issue, which would get us covered for all the board variants that use different DRAM chips, which are currently known to U-Boot only.

I'll keep thinking about this in the next couple of days, and I'll come back with an update.

As a separate thought, is there some way to detect the actual ROCK Pi E board variant at runtime, using some GPIO line, ADC readout, or something similar? That would help with making it possible to have a single U-Boot build for both board variants.

#12 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Hi,

Quoted 100 lines · Dragan Simic

Hello Naoki,

Quoted 97 lines · Dragan Simic
Quoted 83 lines · FUKAUMI Naoki
Quoted 46 lines · Dragan Simic
Quoted 45 lines · FUKAUMI Naoki
Quoted 33 lines · Dragan Simic
Quoted 24 lines · Dragan Simic
Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

Quoted 7 lines

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

Quoted 6 lines
Quoted 2 lines

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

Could you, please, explain what's the actual issue with OpenWrt?  I did read some GitHub issue that described it, IIRC, but I was unable to fully understand what's the underlying issue.

$ wget
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz
$ strings
openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz | grep
metadata
{  "metadata_version": "1.1", "compat_version": "1.0",
"supported_devices":["radxa,rock-pi-e"], "version": { "dist":
"OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386",
"target": "rockchip/armv8", "board": "radxa_rock-pi-e" } }
$ wget
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz
$ strings
openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz |
grep metadata
{  "metadata_version": "1.1", "compat_version": "1.0",
"supported_devices":["radxa,rock-pi-e-v3"], "version": { "dist":
"OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386",
"target": "rockchip/armv8", "board": "radxa_rock-pi-e-v3" } }

since they are incompatible firmware, it needs to have different "supported_devices" string. if both are "radxa,rockpi-e", firmware validation will not work correctly.

(currently both values are wrong, it needs to be fixed, but it's another story)

Quoted 3 lines
Quoted 2 lines

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Quoted 7 lines
Quoted 3 lines

Well, the above-mentioned Nano Pi M4 boards share the same DT and the same "compatible" value, because for all consumers of the DT, except for U-Boot that can already handle the differences, they are the same boards.

(un)fortunately Nano Pi M4 boards seems not to be supported by OpenWrt

 https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/

Thanks for the explanations.  As discussed further in #linux-rockchip on Libera.Chat, we do need a general solution for this issue, which would get us covered for all the board variants that use different DRAM chips, which are currently known to U-Boot only.

Quoted 7 lines
Quoted 2 lines

I'll keep thinking about this in the next couple of days, and I'll come back with an update.

As a separate thought, is there some way to detect the actual ROCK Pi E board variant at runtime, using some GPIO line, ADC readout, or something similar?  That would help with making it possible to have a single U-Boot build for both board variants.

as far as I know, no difference. (I asked my colleague) I will compare schematics.

but, if there is difference, is it possible to replace RAM initialization on u-boot?

btw, RFC:

https://github.com/RadxaNaoki/u-boot/commit/ff1aa39ffb725d10fbb1608062debe6657f40acc

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#13 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

Hi,

RFC:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Best regards,

--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

Quoted 111 lines · FUKAUMI Naoki

Hi,

Quoted 100 lines · Dragan Simic

Hello Naoki,

Quoted 97 lines · Dragan Simic
Quoted 83 lines · FUKAUMI Naoki
Quoted 46 lines · Dragan Simic
Quoted 45 lines · FUKAUMI Naoki
Quoted 33 lines · Dragan Simic
Quoted 24 lines · Dragan Simic
Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

Quoted 7 lines

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

Quoted 6 lines
Quoted 2 lines

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

Could you, please, explain what's the actual issue with OpenWrt?  I did read some GitHub issue that described it, IIRC, but I was unable to fully understand what's the underlying issue.

$ wget
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz
$ strings
openwrt-rockchip-armv8-radxa_rock-pi-e-ext4-sysupgrade.img.gz | grep
metadata
{  "metadata_version": "1.1", "compat_version": "1.0",
"supported_devices":["radxa,rock-pi-e"], "version": { "dist":
"OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386",
"target": "rockchip/armv8", "board": "radxa_rock-pi-e" } }
$ wget
https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz
$ strings
openwrt-rockchip-armv8-radxa_rock-pi-e-v3-ext4-sysupgrade.img.gz |
grep metadata
{  "metadata_version": "1.1", "compat_version": "1.0",
"supported_devices":["radxa,rock-pi-e-v3"], "version": { "dist":
"OpenWrt", "version": "SNAPSHOT", "revision": "r27160-b72c4b5386",
"target": "rockchip/armv8", "board": "radxa_rock-pi-e-v3" } }

since they are incompatible firmware, it needs to have different "supported_devices" string. if both are "radxa,rockpi-e", firmware validation will not work correctly.

(currently both values are wrong, it needs to be fixed, but it's another story)

Quoted 3 lines
Quoted 2 lines

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Quoted 7 lines
Quoted 3 lines

Well, the above-mentioned Nano Pi M4 boards share the same DT and the same "compatible" value, because for all consumers of the DT, except for U-Boot that can already handle the differences, they are the same boards.

(un)fortunately Nano Pi M4 boards seems not to be supported by OpenWrt

 https://downloads.openwrt.org/snapshots/targets/rockchip/armv8/

Thanks for the explanations.  As discussed further in #linux-rockchip on Libera.Chat, we do need a general solution for this issue, which would get us covered for all the board variants that use different DRAM chips, which are currently known to U-Boot only.

Quoted 7 lines
Quoted 2 lines

I'll keep thinking about this in the next couple of days, and I'll come back with an update.

As a separate thought, is there some way to detect the actual ROCK Pi E board variant at runtime, using some GPIO line, ADC readout, or something similar?  That would help with making it possible to have a single U-Boot build for both board variants.

Quoted 12 lines

as far as I know, no difference. (I asked my colleague) I will compare schematics.

but, if there is difference, is it possible to replace RAM initialization on u-boot?

btw, RFC:

https://github.com/RadxaNaoki/u-boot/commit/ff1aa39ffb725d10fbb1608062debe6657f40acc

Signature · 2 lines
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#14 lore raw

Re: [PATCH v5 2/2] arm64: dts: rockchip: add support for Radxa ROCK Pi E v3.0

In reply to FUKAUMI Naoki
Quoted 43 lines · FUKAUMI Naoki

Hi,

Quoted 40 lines · Dragan Simic
Quoted 26 lines · Dragan Simic

Hello Fukaumi,

Quoted 16 lines · FUKAUMI Naoki
Quoted 7 lines · Heiko Stübner

Am Freitag, 16. August 2024, 23:34:29 CEST schrieb FUKAUMI Naoki:

Quoted 6 lines

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip that ships in a number of RAM/eMMC/WiFi/BT configurations:

- Rockchip RK3328 SoC
- Quad A53 CPU
- 512MB/1GB/2GB DDR4 RAM

(snip)

Quoted 6 lines

can you please describe what is different in that v3 board? Describing what is different to require a separate board should've been part of the commit message.

Because from those changes, the bottom line currently seems to be the same board with swapped mmc aliases?

Quoted 6 lines

it's new board which uses DDR4 RAM (instead of DDR3 RAM on Pi E). different bootloader (U-Boot) is required.

adding v3 dts seems not to be so important for Linux, but it's very important for U-Boot and OpenWrt(it includes bootloader for distributed binary).

Quoted 5 lines

Aren't there different methods that allow such board variants to be supported in U-Boot, with no need for a separate DT in the kernel? IIRC, there are already more than a few examples of such board variants, which require different DRAM initialization, which is covered in U-Boot by providing different builds that use the same DT.

As an example, please have a look at the following files in U-Boot:

- arch/arm/dts/rk3399-nanopi-m4-u-boot.dtsi
- arch/arm/dts/rk3399-nanopi-m4-2gb-u-boot.dtsi
- configs/nanopi-m4-rk3399_defconfig
- configs/nanopi-m4-2gb-rk3399_defconfig

Quoted 6 lines
Quoted 2 lines

Basically, there's no need for separate DTs in the kernel, just to support board variants with different DRAM types in U-Boot.

OpenWrt firmware upgrading tool (sysupgrade) refers "compatible" string to validate new firmware file is surely "for this board".

currently both Pi E dts have "radxa,rockpi-e", it makes flashing wrong firmware (include bootloaer, U-Boot) possible.

^Currently both Pi E firmware have ...

Quoted 7 lines

Radxa ROCK Pi E v1.x(DDR3) and ROCK Pi E v3(DDR4) are different incompatible boards, it must have different "compatible" string.

Best regards,

Signature · 2 lines
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#16 lore raw
In reply to FUKAUMI Naoki
Quoted 19 lines · FUKAUMI Naoki

Radxa ROCK Pi E v3.0 is a compact networking SBC[1] using the Rockchip RK3328 chip.

[1] https://radxa.com/products/rockpi/pie

---
Changes in v5:
- revert compatible string
- describe rockchip.yaml properly
Changes in v4:
- update compatible string for OpenWrt
- drop A-b tag
Changes in v3:
- collect A-b tag
Changes in v2:
- fix typo in commit message
- add missing --- in commit message
- add new section instead of new item in rockchip.yaml

Quoted 4 lines
---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

New warnings running 'make CHECK_DTBS=y rockchip/rk3328-rock-pi-e-v3.dtb rockchip/rk3328-rock-pi-e.dtb' for [email protected]:

arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e-v3.dtb: hdmi@ff3c0000: interrupts: [[0, 35, 4], [0, 71, 4]] is too long
from schema $id: http://devicetree.org/schemas/display/rockchip/rockchip,dw-hdmi.yaml#
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e-v3.dtb: /phy@ff430000: failed to match any schema with compatible: ['rockchip,rk3328-hdmi-phy'] arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e-v3.dtb: /clock-controller@ff440000: failed to match any schema with compatible: ['rockchip,rk3328-cru', 'rockchip,cru', 'syscon'] arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e-v3.dtb: /clock-controller@ff440000: failed to match any schema with compatible: ['rockchip,rk3328-cru', 'rockchip,cru', 'syscon']