Skip to contentSkip to conversation

add rk3318 A95X Z2 board

RFC PATCH In review Johan Jonker 4 participants 13 messages Jun 30, 2021 – Mar 11, 2022

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

cover add rk3318 A95X Z2 board

With a new board from a recent Linux DT the U-boot rk3328.dtsi is in need for an update.

Please advise what to do with usb3 regulators, aliases and other stuff that has to change.

Also some of the U-boot board files could use some dtbs_check for bogus properties and restyling... ;)

rk3328 USB2 and USB3 only roughly tested.

===

Howto use:

Compile bl31.elf:

git clone --depth 1 https://github.com/ARM-software/arm-trusted-firmware.git
cd arm-trusted-firmware
make realclean
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328

export BL31=/<path-to>/arm-trusted-firmware/build/rk3328/release/bl31/bl31.elf cd ..

Compile U-boot:

git clone --depth 1 https://github.com/u-boot/u-boot.git uboot cd uboot
make CROSS_COMPILE=aarch64-linux-gnu- a95x-z2-rk3318_defconfig all

===

Use U-boot to create a GPT on a SD card,
because of partition GUID and sizes.

mmc dev 0
mmc info
gpt write mmc 0 $partitions
mmc part

===

Write to SD card:

export DISK=/dev/mmcblk0
sudo dd if=./idbloader.img of=${DISK} seek=64
sudo dd if=./u-boot.itb of=${DISK} seek=16384
sync

===

Format boot partition with fat16.
Add /Image and /rk3318-a95x-z2.dtb
Add extlinux dir with extlinux.conf

label kernel

    kernel /Image
    fdt /rk3318-a95x-z2.dtb
    append root=/dev/mmcblk0p5 rw console=tty0 console=ttyS2,1500000n8 earlycon=uart8250,mmio32,0xff130000,keep $

===

Use fastboot:

Hit any key to stop autoboot:
usb start
usb dev 1
fastboot usb 1
=
sudo fastboot devices -l
sudo fastboot erase loader1
sudo fastboot erase loader2
sudo fastboot flash loader1 idbloader.img
sudo fastboot flash loader2 u-boot.itb
=
ctrl-c
reset

===

Johan Jonker (6):
arm: dts: rockchip: update rk3328.dtsi
arm: dts: rockchip: remove usb_host0_xhci node from rk3328-u-boot.dtsi
arm: dts: rockchip: move mmc aliases to board files
arm: dts: rockchip: move spi0 u-boot,dm-pre-reloc and alias to rk3328
board files
rockchip: rk3318: add a95x-z2-rk3318_defconfig file
arm: dts: rockchip: add rk3318 A95X Z2 board

 arch/arm/dts/Makefile                      |   1 +
 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi    |  59 +++++
 arch/arm/dts/rk3318-a95x-z2.dts            | 384 +++++++++++++++++++++++++++++
 arch/arm/dts/rk3328-evb-u-boot.dtsi        |   2 +-
 arch/arm/dts/rk3328-evb.dts                |   8 +-
 arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi |   2 +-
 arch/arm/dts/rk3328-nanopi-r2s.dts         |   6 +-
 arch/arm/dts/rk3328-roc-cc-u-boot.dtsi     |   4 +-
 arch/arm/dts/rk3328-roc-cc.dts             |   7 +-
 arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi  |   4 +-
 arch/arm/dts/rk3328-rock-pi-e.dts          |   7 +-
 arch/arm/dts/rk3328-rock64-u-boot.dtsi     |  10 +-
 arch/arm/dts/rk3328-rock64.dts             |   7 +-
 arch/arm/dts/rk3328-u-boot.dtsi            |  21 --
 arch/arm/dts/rk3328.dtsi                   | 109 ++++----
 board/rockchip/evb_rk3328/MAINTAINERS      |   6 +
 configs/a95x-z2-rk3318_defconfig           | 102 ++++++++
 doc/board/rockchip/rockchip.rst            |   2 +
 18 files changed, 661 insertions(+), 80 deletions(-)
 create mode 100644 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3318-a95x-z2.dts
 create mode 100644 configs/a95x-z2-rk3318_defconfig
Signature · 7 lines
2.11.0


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

RFC PATCH 1/6 arm: dts: rockchip: update rk3328.dtsi

In the Linux DT the file rk3328.dtsi has recently had some updates. Update this for U-boot as well. The rk3328 usb3 port has now support in the Linux DT. Rename node names ending on 'gpio' to 'pin' or 'pins'.

---
 arch/arm/dts/rk3328-evb.dts                |   2 +-
 arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi |   2 +-
 arch/arm/dts/rk3328-nanopi-r2s.dts         |   2 +-
 arch/arm/dts/rk3328-roc-cc-u-boot.dtsi     |   2 +-
 arch/arm/dts/rk3328-roc-cc.dts             |   2 +-
 arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi  |   2 +-
 arch/arm/dts/rk3328-rock-pi-e.dts          |   2 +-
 arch/arm/dts/rk3328-rock64-u-boot.dtsi     |   2 +-
 arch/arm/dts/rk3328-rock64.dts             |   2 +-
 arch/arm/dts/rk3328.dtsi                   | 109 +++++++++++++++++------------
 10 files changed, 72 insertions(+), 55 deletions(-)
arch/arm/dts/rk3328-evb.dts +1 -1
index 6abc6f4a86..a0000d072c 100644
@@ -41,7 +41,7 @@
 		compatible = "regulator-fixed";
 		gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
-		pinctrl-0 = <&sdmmc0m1_gpio>;
+		pinctrl-0 = <&sdmmc0m1_pin>;
 		regulator-name = "vcc_sd";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi +1 -1
index 9e2ced1541..8db5e55af6 100644
@@ -20,7 +20,7 @@
 	u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
 	u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-nanopi-r2s.dts +1 -1
index 5445c5cb3d..b1e45c01a9 100644
@@ -79,7 +79,7 @@
 	vcc_sd: sdmmc-regulator {
 		compatible = "regulator-fixed";
 		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
-		pinctrl-0 = <&sdmmc0m1_gpio>;
+		pinctrl-0 = <&sdmmc0m1_pin>;
 		pinctrl-names = "default";
 		regulator-name = "vcc_sd";
 		regulator-boot-on;
arch/arm/dts/rk3328-roc-cc-u-boot.dtsi +1 -1
index 08806dfc0f..20a62134a0 100644
@@ -40,7 +40,7 @@
 	u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
 	u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-roc-cc.dts +1 -1
index 8d553c9218..8dc4c57fbb 100644
@@ -34,7 +34,7 @@
 		compatible = "regulator-fixed";
 		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
-		pinctrl-0 = <&sdmmc0m1_gpio>;
+		pinctrl-0 = <&sdmmc0m1_pin>;
 		regulator-boot-on;
 		regulator-name = "vcc_sd";
 		regulator-min-microvolt = <3300000>;
arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi +1 -1
index 4fc055eacb..0b1a42c49f 100644
@@ -37,7 +37,7 @@
 	u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
 	u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-rock-pi-e.dts +1 -1
index 4b9f9a8248..57e36ec609 100644
@@ -25,7 +25,7 @@
 	compatible = "regulator-fixed";
 	gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc0m1_gpio>;
+	pinctrl-0 = <&sdmmc0m1_pin>;
 	regulator-name = "vcc_sd";
 	regulator-always-on;
 	regulator-boot-on;
arch/arm/dts/rk3328-rock64-u-boot.dtsi +1 -1
index 2af32aea05..3c3b1370e3 100644
@@ -40,7 +40,7 @@
 	u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
 	u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-rock64.dts +1 -1
index ebf3eb222e..7a78255f52 100644
@@ -25,7 +25,7 @@
 		compatible = "regulator-fixed";
 		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
-		pinctrl-0 = <&sdmmc0m1_gpio>;
+		pinctrl-0 = <&sdmmc0m1_pin>;
 		regulator-name = "vcc_sd";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
arch/arm/dts/rk3328.dtsi +63 -46

262 lines not on this page · raw message

Signature · 7 lines
2.11.0


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

Re: [RFC PATCH v1 1/6] arm: dts: rockchip: update rk3328.dtsi

Quoted 8 lines · Johan Jonker

In the Linux DT the file rk3328.dtsi has recently had some updates. Update this for U-boot as well. The rk3328 usb3 port has now support in the Linux DT. Rename node names ending on 'gpio' to 'pin' or 'pins'.

---

This patch needs to squash 3/6 and adds a commit tag from Linux Sync.

#3 lore raw

RFC PATCH 2/6 arm: dts: rockchip: remove usb_host0_xhci node from rk3328-u-boot.dtsi

In reply to Johan Jonker

The rk3328.dtsi file was updated with a usbdrd3 node. Remove the usb_host0_xhci node from rk3328-u-boot.dtsi, because it's deprecated now the driver is removed. Add usbdrd3 as place holder in existing dtsi files.

---
 arch/arm/dts/rk3328-evb-u-boot.dtsi       |  2 +-
 arch/arm/dts/rk3328-roc-cc-u-boot.dtsi    |  2 +-
 arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi |  2 +-
 arch/arm/dts/rk3328-rock64-u-boot.dtsi    |  2 +-
 arch/arm/dts/rk3328-u-boot.dtsi           | 11 -----------
 5 files changed, 4 insertions(+), 15 deletions(-)
arch/arm/dts/rk3328-evb-u-boot.dtsi +1 -1
index 4bfa0c2330..bab0187f01 100644
@@ -45,7 +45,7 @@
 	status = "broken";
 };
 
-&usb_host0_xhci {
+&usbdrd3 {
 	vbus-supply = <&vcc5v0_host_xhci>;
 	status = "okay";
 };
arch/arm/dts/rk3328-roc-cc-u-boot.dtsi +1 -1
index 20a62134a0..4d59e35788 100644
@@ -48,7 +48,7 @@
 	u-boot,dm-spl;
 };
 
-&usb_host0_xhci {
+&usbdrd3 {
 	vbus-supply = <&vcc_host1_5v>;
 	status = "okay";
 };
arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi +1 -1
index 0b1a42c49f..028919d9b3 100644
@@ -45,7 +45,7 @@
 	u-boot,dm-spl;
 };
 
-&usb_host0_xhci {
+&usbdrd3 {
 	vbus-supply = <&vcc5v0_host_xhci>;
 	status = "okay";
 };
arch/arm/dts/rk3328-rock64-u-boot.dtsi +1 -1
index 3c3b1370e3..37ecc6a753 100644
@@ -48,7 +48,7 @@
 	u-boot,dm-spl;
 };
 
-&usb_host0_xhci {
+&usbdrd3 {
 	vbus-supply = <&vcc_host_5v>;
 	status = "okay";
 };
arch/arm/dts/rk3328-u-boot.dtsi +0 -11
index 1633558264..1d7bf19192 100644
@@ -24,17 +24,6 @@
 		       0x0 0xff720000 0x0 0x1000
 		       0x0 0xff798000 0x0 0x1000>;
 	};
-
-	usb_host0_xhci: usb@ff600000 {
-		compatible = "rockchip,rk3328-xhci";
-		reg = <0x0 0xff600000 0x0 0x100000>;
-		interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
-		snps,dis-enblslpm-quirk;
-		snps,phyif-utmi-bits = <16>;
-		snps,dis-u2-freeclk-exists-quirk;
-		snps,dis-u2-susphy-quirk;
-		status = "disabled";
-	};
 };
 
 &cru {
Signature · 7 lines
2.11.0


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

RFC PATCH 3/6 arm: dts: rockchip: move mmc aliases to board files

In reply to Johan Jonker

In the Linux DT the recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in environments where UUIDs are not practical.
The newly added mmc aliases should be board specific, so move them from the general dtsi to the individual boards. Sort aliases on reg order when available and without number gap.

---
 arch/arm/dts/rk3328-evb.dts        | 6 ++++++
 arch/arm/dts/rk3328-nanopi-r2s.dts | 4 ++++
 arch/arm/dts/rk3328-roc-cc.dts     | 5 +++++
 arch/arm/dts/rk3328-rock-pi-e.dts  | 5 +++++
 arch/arm/dts/rk3328-rock64.dts     | 5 +++++
 arch/arm/dts/rk3328-u-boot.dtsi    | 2 --
 6 files changed, 25 insertions(+), 2 deletions(-)
arch/arm/dts/rk3328-evb.dts +6 -0
index a0000d072c..832773d0fd 100644
@@ -10,6 +10,12 @@
 	model = "Rockchip RK3328 EVB";
 	compatible = "rockchip,rk3328-evb", "rockchip,rk3328";
 
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdio;
+		mmc2 = &emmc;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
arch/arm/dts/rk3328-nanopi-r2s.dts +4 -0
index b1e45c01a9..92bb282ed9 100644
@@ -13,6 +13,10 @@
 	model = "FriendlyElec NanoPi R2S";
 	compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328";
 
+	aliases {
+		mmc0 = &sdmmc;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
arch/arm/dts/rk3328-roc-cc.dts +5 -0
index 8dc4c57fbb..401be93364 100644
@@ -10,6 +10,11 @@
 	model = "Firefly roc-rk3328-cc";
 	compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328";
 
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &emmc;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
arch/arm/dts/rk3328-rock-pi-e.dts +5 -0
index 57e36ec609..63e73781f1 100644
@@ -10,6 +10,11 @@
 	model = "Radxa Rockpi E";
 	compatible = "radxa,rock-pi-e", "rockchip,rk3328";
 
+	aliases {
+	mmc0 = &sdmmc;
+	mmc1 = &emmc;
+	};
+
 	chosen {
 	stdout-path = "serial2:1500000n8";
 	};
arch/arm/dts/rk3328-rock64.dts +5 -0
index 7a78255f52..57a796e220 100644
@@ -10,6 +10,11 @@
 	model = "Pine64 Rock64";
 	compatible = "pine64,rock64", "rockchip,rk3328";
 
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &emmc;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
arch/arm/dts/rk3328-u-boot.dtsi +0 -2
index 1d7bf19192..e00e466d8d 100644
@@ -5,8 +5,6 @@
 
 / {
 	aliases {
-		mmc0 = &emmc;
-		mmc1 = &sdmmc;
 		spi0 = &spi0;
 	};
 
Signature · 7 lines
2.11.0


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

RFC PATCH 4/6 arm: dts: rockchip: move spi0 u-boot, dm-pre-reloc and alias to rk3328 board files

In reply to Johan Jonker

The spi0 node has a common u-boot,dm-pre-reloc property and an alias in rk3328-u-boot.dtsi, so all boards contain this as well in u-boot-tpl.dtb. Clean it up a bit and move it to only boards that use it.

---
 arch/arm/dts/rk3328-rock64-u-boot.dtsi | 6 ++++++
 arch/arm/dts/rk3328-u-boot.dtsi        | 8 --------
 2 files changed, 6 insertions(+), 8 deletions(-)
arch/arm/dts/rk3328-rock64-u-boot.dtsi +6 -0
index 37ecc6a753..dae79d6268 100644
@@ -6,6 +6,10 @@
 #include "rk3328-u-boot.dtsi"
 #include "rk3328-sdram-lpddr3-1600.dtsi"
 / {
+	aliases {
+		spi0 = &spi0;
+	};
+
 	chosen {
 		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
 	};
@@ -69,6 +73,8 @@
 };
 
 &spi0 {
+	u-boot,dm-pre-reloc;
+
 	spi_flash: spiflash@0 {
 		u-boot,dm-pre-reloc;
 	};
arch/arm/dts/rk3328-u-boot.dtsi +0 -8
index e00e466d8d..03e5f18f1a 100644
@@ -4,10 +4,6 @@
  */
 
 / {
-	aliases {
-		spi0 = &spi0;
-	};
-
 	chosen {
 		u-boot,spl-boot-order = &emmc, &sdmmc;
 	};
@@ -54,7 +50,3 @@
 &usb20_otg {
 	hnp-srp-disable;
 };
-
-&spi0 {
-	u-boot,dm-pre-reloc;
-};
Signature · 7 lines
2.11.0


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

RFC PATCH 5/6 rockchip: rk3318: add a95x-z2-rk3318_defconfig file

In reply to Johan Jonker

This commit adds the default configuration file and relevant description for A95X Z2 board

---
 board/rockchip/evb_rk3328/MAINTAINERS |   6 ++
 configs/a95x-z2-rk3318_defconfig      | 102 ++++++++++++++++++++++++++++++++++
 doc/board/rockchip/rockchip.rst       |   2 +
 3 files changed, 110 insertions(+)
 create mode 100644 configs/a95x-z2-rk3318_defconfig
board/rockchip/evb_rk3328/MAINTAINERS +6 -0
index 14fda46e8f..a4573c2ff9 100644
@@ -1,3 +1,9 @@
+A95X-Z2-RK3318
+M:      Johan Jonker <[email protected]>
+S:      Maintained
+F:      configs/a95x-z2-rk3318_defconfig
+F:      arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi
+
 EVB-RK3328
 M:      Kever Yang <[email protected]>
 S:      Maintained
configs/a95x-z2-rk3318_defconfig new file +102 -0

102 lines not on this page · raw message

doc/board/rockchip/rockchip.rst +2 -0
index fbb9983988..49a2dd2dd3 100644
@@ -44,6 +44,8 @@ List of mainline supported rockchip boards:
 * rk3308
      - Rockchip Evb-RK3308 (evb-rk3308)
      - Roc-cc-RK3308 (roc-cc-rk3308)
+* rk3318
+     - A95X Z2 (a95x-z2-rk3318)
 * rk3328
      - Rockchip Evb-RK3328 (evb-rk3328)
      - Pine64 Rock64 (rock64-rk3328)
Signature · 7 lines
2.11.0


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

Re: [RFC PATCH v1 5/6] rockchip: rk3318: add a95x-z2-rk3318_defconfig file

Quoted 44 lines · Johan Jonker

This commit adds the default configuration file and relevant description for A95X Z2 board

---
 board/rockchip/evb_rk3328/MAINTAINERS |   6 ++
 configs/a95x-z2-rk3318_defconfig      | 102 ++++++++++++++++++++++++++++++++++
 doc/board/rockchip/rockchip.rst       |   2 +
 3 files changed, 110 insertions(+)
 create mode 100644 configs/a95x-z2-rk3318_defconfig
board/rockchip/evb_rk3328/MAINTAINERS +6 -0
index 14fda46e8f..a4573c2ff9 100644
@@ -1,3 +1,9 @@
+A95X-Z2-RK3318
+M:      Johan Jonker <[email protected]>
+S:      Maintained
+F:      configs/a95x-z2-rk3318_defconfig
+F:      arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi
+
 EVB-RK3328
 M:      Kever Yang <[email protected]>
 S:      Maintained
configs/a95x-z2-rk3318_defconfig new file +12 -0
new file mode 100644
index 0000000000..cba0f6c659
@@ -0,0 +1,102 @@
+CONFIG_ARM=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SYS_TEXT_BASE=0x00200000
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_OFFSET=0x3F8000
+CONFIG_ROCKCHIP_RK3328=y
+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
+CONFIG_TPL_LIBCOMMON_SUPPORT=y
+CONFIG_TPL_LIBGENERIC_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_SPL_STACK_R_ADDR=0x600000

configs/a95x-z2-rk3318_defconfig line 22

Quoted 10 lines
configs/a95x-z2-rk3318_defconfig new file +10 -0
+CONFIG_DEBUG_UART_BASE=0xFF130000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_DEFAULT_DEVICE_TREE="rk3318-a95x-z2"
+CONFIG_DEBUG_UART=y
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
+# CONFIG_ANDROID_BOOT_IMAGE is not set
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3318-a95x-z2.dtb"

This would eventually break the build as the dts added in the next patch, squash both.

#8 lore raw

RFC PATCH 6/6 arm: dts: rockchip: add rk3318 A95X Z2 board

In reply to Johan Jonker

The rk3318 A95X Z2 boards are sold as TV box.
No further documentation is given, but from the dts files extracted it seems that the rk3318 processor is simulair to the rk3328. This dts file contains only the basic nodes that have support in the mainline kernel. Included extra dtsi file for U-boot specific properties.

Features:

CPU: RK3318 Quad-Core Cortex-A53
GPU: Mali-450
RAM: 2/4GB DDR3
ROM: EMMC 16/32/64GB
HDMI: HDMI 2.0a for 4k@60Hz
Ethernet: 10/100M standard RJ-45
WiFi: 2.4G+5G WIFI, 802.11 b/g/n
Bluetooth: 4.0
1 x USB 3.0
1 x USB 2.0
1 x Micro SD card slot
1 x SPDIF
1 x AV
1 x DC IN

---
 arch/arm/dts/Makefile                   |   1 +
 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi |  59 +++++
 arch/arm/dts/rk3318-a95x-z2.dts         | 384 ++++++++++++++++++++++++++++++++
 3 files changed, 444 insertions(+)
 create mode 100644 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3318-a95x-z2.dts
arch/arm/dts/Makefile +1 -0
index 9918e46633..3e1e2209b7 100644
@@ -107,6 +107,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \
 	rk3308-roc-cc.dtb
 
 dtb-$(CONFIG_ROCKCHIP_RK3328) += \
+	rk3318-a95x-z2.dtb \
 	rk3328-evb.dtb \
 	rk3328-nanopi-r2s.dtb \
 	rk3328-roc-cc.dtb \
arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi new file +59 -0

59 lines not on this page · raw message

arch/arm/dts/rk3318-a95x-z2.dts new file +384 -0

384 lines not on this page · raw message

Signature · 7 lines
2.11.0


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

RFC PATCH 6/6 arm: dts: rockchip: add rk3318 A95X Z2 board

The rk3318 A95X Z2 boards are sold as TV box.
No further documentation is given, but from the dts files extracted it seems that the rk3318 processor is simulair to the rk3328. This dts file contains only the basic nodes that have support in the mainline kernel. Included extra dtsi file for U-boot specific properties.

Features:

CPU: RK3318 Quad-Core Cortex-A53
GPU: Mali-450
RAM: 2/4GB DDR3
ROM: EMMC 16/32/64GB
HDMI: HDMI 2.0a for 4k@60Hz
Ethernet: 10/100M standard RJ-45
WiFi: 2.4G+5G WIFI, 802.11 b/g/n
Bluetooth: 4.0
1 x USB 3.0
1 x USB 2.0
1 x Micro SD card slot
1 x SPDIF
1 x AV
1 x DC IN

---

Changed V2:
remove ddc-i2c-scl-*

---
 arch/arm/dts/Makefile                   |   1 +
 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi |  59 +++++
 arch/arm/dts/rk3318-a95x-z2.dts         | 382 ++++++++++++++++++++++++++++++++
 3 files changed, 442 insertions(+)
 create mode 100644 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3318-a95x-z2.dts
arch/arm/dts/Makefile +1 -0
index 9918e46633..3e1e2209b7 100644
@@ -107,6 +107,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \
 	rk3308-roc-cc.dtb
 
 dtb-$(CONFIG_ROCKCHIP_RK3328) += \
+	rk3318-a95x-z2.dtb \
 	rk3328-evb.dtb \
 	rk3328-nanopi-r2s.dtb \
 	rk3328-roc-cc.dtb \
arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi new file +59 -0

59 lines not on this page · raw message

arch/arm/dts/rk3318-a95x-z2.dts new file +382 -0

382 lines not on this page · raw message

Signature · 1 line
2.11.0
#10 lore raw
In reply to Johan Jonker

Hi Johan,

Am 30.06.21 um 18:22 schrieb Johan Jonker:

Quoted 8 lines

With a new board from a recent Linux DT the U-boot rk3328.dtsi is in need for an update.

Please advise what to do with usb3 regulators, aliases and other stuff that has to change.

Also some of the U-boot board files could use some dtbs_check for bogus properties and restyling... ;)

While at bogus properties:
The ddc-i2c-scl-* properties you are defining in the hdmi node of
rk3318-a95x-z2.dts look like an leftover from vendor kernel: they do not exist for the upstream dw-hdmi driver in neither u-boot nor kernel. (Not sure this would pop up with dtbs_check currently)

Alex.

Quoted 101 lines

rk3328 USB2 and USB3 only roughly tested.

===

Howto use:

Compile bl31.elf:

git clone --depth 1 https://github.com/ARM-software/arm-trusted-firmware.git
cd arm-trusted-firmware
make realclean
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328

export BL31=/<path-to>/arm-trusted-firmware/build/rk3328/release/bl31/bl31.elf cd ..

Compile U-boot:

git clone --depth 1 https://github.com/u-boot/u-boot.git uboot cd uboot
make CROSS_COMPILE=aarch64-linux-gnu- a95x-z2-rk3318_defconfig all

===

Use U-boot to create a GPT on a SD card,
because of partition GUID and sizes.

mmc dev 0
mmc info
gpt write mmc 0 $partitions
mmc part

===

Write to SD card:

export DISK=/dev/mmcblk0
sudo dd if=./idbloader.img of=${DISK} seek=64
sudo dd if=./u-boot.itb of=${DISK} seek=16384
sync

===

Format boot partition with fat16.
Add /Image and /rk3318-a95x-z2.dtb
Add extlinux dir with extlinux.conf

label kernel

     kernel /Image
     fdt /rk3318-a95x-z2.dtb
     append root=/dev/mmcblk0p5 rw console=tty0 console=ttyS2,1500000n8 earlycon=uart8250,mmio32,0xff130000,keep $

===

Use fastboot:

Hit any key to stop autoboot:
usb start
usb dev 1
fastboot usb 1
=
sudo fastboot devices -l
sudo fastboot erase loader1
sudo fastboot erase loader2
sudo fastboot flash loader1 idbloader.img
sudo fastboot flash loader2 u-boot.itb
=
ctrl-c
reset

===

Johan Jonker (6):
arm: dts: rockchip: update rk3328.dtsi
arm: dts: rockchip: remove usb_host0_xhci node from rk3328-u-boot.dtsi
arm: dts: rockchip: move mmc aliases to board files
arm: dts: rockchip: move spi0 u-boot,dm-pre-reloc and alias to rk3328
board files
rockchip: rk3318: add a95x-z2-rk3318_defconfig file
arm: dts: rockchip: add rk3318 A95X Z2 board

  arch/arm/dts/Makefile                      |   1 +
  arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi    |  59 +++++
  arch/arm/dts/rk3318-a95x-z2.dts            | 384 +++++++++++++++++++++++++++++
  arch/arm/dts/rk3328-evb-u-boot.dtsi        |   2 +-
  arch/arm/dts/rk3328-evb.dts                |   8 +-
  arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi |   2 +-
  arch/arm/dts/rk3328-nanopi-r2s.dts         |   6 +-
  arch/arm/dts/rk3328-roc-cc-u-boot.dtsi     |   4 +-
  arch/arm/dts/rk3328-roc-cc.dts             |   7 +-
  arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi  |   4 +-
  arch/arm/dts/rk3328-rock-pi-e.dts          |   7 +-
  arch/arm/dts/rk3328-rock64-u-boot.dtsi     |  10 +-
  arch/arm/dts/rk3328-rock64.dts             |   7 +-
  arch/arm/dts/rk3328-u-boot.dtsi            |  21 --
  arch/arm/dts/rk3328.dtsi                   | 109 ++++----
  board/rockchip/evb_rk3328/MAINTAINERS      |   6 +
  configs/a95x-z2-rk3318_defconfig           | 102 ++++++++
  doc/board/rockchip/rockchip.rst            |   2 +
  18 files changed, 661 insertions(+), 80 deletions(-)
Quoted 4 lines

create mode 100644 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi create mode 100644 arch/arm/dts/rk3318-a95x-z2.dts create mode 100644 configs/a95x-z2-rk3318_defconfig

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

#11 lore raw

Hi Alex,

Thanks for reporting!
With rockchip,dw-hdmi.yaml all kind notifications rk3328/rk3399 but not for ddc-i2c-scl-*
Submitted by Laurent, but not reviewed/fixed nodes together with the Rockchip mail group. Someone has to look at/fix it...

dt-bindings: display: rockchip: dw-hdmi: Convert binding to YAML
https://patchwork.kernel.org/project/linux-renesas-soc/patch/[email protected]/

Will change that for A95X-Z2. Waiting for some more comments... ;)

Johan

Quoted 9 lines · Alex Bee

Hi Johan,

Am 30.06.21 um 18:22 schrieb Johan Jonker:

Quoted 6 lines

With a new board from a recent Linux DT the U-boot rk3328.dtsi is in need for an update.

Please advise what to do with usb3 regulators, aliases and other stuff that has to change.

Quoted 8 lines
Quoted 2 lines

Also some of the U-boot board files could use some dtbs_check for bogus properties and restyling... ;)

While at bogus properties:
The ddc-i2c-scl-* properties you are defining in the hdmi node of rk3318-a95x-z2.dts look like an leftover from vendor kernel: they do not exist for the upstream dw-hdmi driver in neither u-boot nor kernel. (Not sure this would pop up with dtbs_check currently)

make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml

/arch/arm64/boot/dts/rockchip/rk3318-a95x-z2.dt.yaml: hdmi@ff3c0000:
interrupts: [[0, 35, 4], [0, 71, 4]] is too long
From schema:
/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml /arch/arm64/boot/dts/rockchip/rk3318-a95x-z2.dt.yaml: hdmi@ff3c0000:
pinctrl-names: ['default'] is too short
From schema:
/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml /arch/arm64/boot/dts/rockchip/rk3318-a95x-z2.dt.yaml: hdmi@ff3c0000:
ports:port: 'endpoint@0' is a required property
From schema:
/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml /arch/arm64/boot/dts/rockchip/rk3318-a95x-z2.dt.yaml: hdmi@ff3c0000:
ports:port: 'endpoint@1' is a required property
From schema:
/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml

Quoted 112 lines

Alex.

Quoted 109 lines

rk3328 USB2 and USB3 only roughly tested.

===

Howto use:

Compile bl31.elf:

git clone --depth 1
https://github.com/ARM-software/arm-trusted-firmware.git
cd arm-trusted-firmware
make realclean
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328

export BL31=/<path-to>/arm-trusted-firmware/build/rk3328/release/bl31/bl31.elf cd ..

Compile U-boot:

git clone --depth 1 https://github.com/u-boot/u-boot.git uboot cd uboot
make CROSS_COMPILE=aarch64-linux-gnu- a95x-z2-rk3318_defconfig all

===

Use U-boot to create a GPT on a SD card,
because of partition GUID and sizes.

mmc dev 0
mmc info
gpt write mmc 0 $partitions
mmc part

===

Write to SD card:

export DISK=/dev/mmcblk0
sudo dd if=./idbloader.img of=${DISK} seek=64
sudo dd if=./u-boot.itb of=${DISK} seek=16384
sync

===

Format boot partition with fat16.
Add /Image and /rk3318-a95x-z2.dtb
Add extlinux dir with extlinux.conf

label kernel
     kernel /Image
     fdt /rk3318-a95x-z2.dtb
     append root=/dev/mmcblk0p5 rw console=tty0 console=ttyS2,1500000n8 earlycon=uart8250,mmio32,0xff130000,keep $

===

Use fastboot:

Hit any key to stop autoboot:
usb start
usb dev 1
fastboot usb 1
=
sudo fastboot devices -l
sudo fastboot erase loader1
sudo fastboot erase loader2
sudo fastboot flash loader1 idbloader.img
sudo fastboot flash loader2 u-boot.itb
=
ctrl-c
reset

===

Johan Jonker (6):
   arm: dts: rockchip: update rk3328.dtsi
   arm: dts: rockchip: remove usb_host0_xhci node from rk3328-u-boot.dtsi
   arm: dts: rockchip: move mmc aliases to board files
   arm: dts: rockchip: move spi0 u-boot,dm-pre-reloc and alias to rk3328 board files
   rockchip: rk3318: add a95x-z2-rk3318_defconfig file
   arm: dts: rockchip: add rk3318 A95X Z2 board

  arch/arm/dts/Makefile                      |   1 + arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi    |  59 +++++ arch/arm/dts/rk3318-a95x-z2.dts            | 384
+++++++++++++++++++++++++++++
  arch/arm/dts/rk3328-evb-u-boot.dtsi        |   2 +- arch/arm/dts/rk3328-evb.dts                |   8 +- arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi |   2 +- arch/arm/dts/rk3328-nanopi-r2s.dts         |   6 +- arch/arm/dts/rk3328-roc-cc-u-boot.dtsi     |   4 +- arch/arm/dts/rk3328-roc-cc.dts             |   7 +- arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi  |   4 +- arch/arm/dts/rk3328-rock-pi-e.dts          |   7 +- arch/arm/dts/rk3328-rock64-u-boot.dtsi     |  10 +- arch/arm/dts/rk3328-rock64.dts             |   7 +- arch/arm/dts/rk3328-u-boot.dtsi            |  21 -- arch/arm/dts/rk3328.dtsi                   | 109 ++++---- board/rockchip/evb_rk3328/MAINTAINERS      |   6 + configs/a95x-z2-rk3318_defconfig           | 102 ++++++++ doc/board/rockchip/rockchip.rst            |   2 +

  18 files changed, 661 insertions(+), 80 deletions(-)

  create mode 100644 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi create mode 100644 arch/arm/dts/rk3318-a95x-z2.dts create mode 100644 configs/a95x-z2-rk3318_defconfig

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

#12 lore raw
In reply to Johan Jonker

Hi,

Generally, I like idea of keeping rk3328.dtsi in sync with the Linux kernel source.

ср, 30 июн. 2021 г., 19:23 Johan Jonker <[email protected]>:

Quoted 121 lines

With a new board from a recent Linux DT the U-boot rk3328.dtsi is in need for an update.

Please advise what to do with usb3 regulators, aliases and other stuff that has to change.

Also some of the U-boot board files could use some dtbs_check for bogus properties and restyling... ;)

rk3328 USB2 and USB3 only roughly tested.

===

Howto use:

Compile bl31.elf:

git clone --depth 1
https://github.com/ARM-software/arm-trusted-firmware.git
cd arm-trusted-firmware
make realclean
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328

export BL31=/<path-to>/arm-trusted-firmware/build/rk3328/release/bl31/bl31.elf cd ..

Compile U-boot:

git clone --depth 1 https://github.com/u-boot/u-boot.git uboot cd uboot
make CROSS_COMPILE=aarch64-linux-gnu- a95x-z2-rk3318_defconfig all

===

Use U-boot to create a GPT on a SD card,
because of partition GUID and sizes.

mmc dev 0
mmc info
gpt write mmc 0 $partitions
mmc part

===

Write to SD card:

export DISK=/dev/mmcblk0
sudo dd if=./idbloader.img of=${DISK} seek=64
sudo dd if=./u-boot.itb of=${DISK} seek=16384
sync

===

Format boot partition with fat16.
Add /Image and /rk3318-a95x-z2.dtb
Add extlinux dir with extlinux.conf

label kernel

    kernel /Image
    fdt /rk3318-a95x-z2.dtb
    append root=/dev/mmcblk0p5 rw console=tty0 console=ttyS2,1500000n8

earlycon=uart8250,mmio32,0xff130000,keep $

===

Use fastboot:

Hit any key to stop autoboot:
usb start
usb dev 1
fastboot usb 1
=
sudo fastboot devices -l
sudo fastboot erase loader1
sudo fastboot erase loader2
sudo fastboot flash loader1 idbloader.img
sudo fastboot flash loader2 u-boot.itb
=
ctrl-c
reset

===

Johan Jonker (6):
arm: dts: rockchip: update rk3328.dtsi
arm: dts: rockchip: remove usb_host0_xhci node from rk3328-u-boot.dtsi
arm: dts: rockchip: move mmc aliases to board files
arm: dts: rockchip: move spi0 u-boot,dm-pre-reloc and alias to rk3328
board files
rockchip: rk3318: add a95x-z2-rk3318_defconfig file
arm: dts: rockchip: add rk3318 A95X Z2 board

 arch/arm/dts/Makefile                      |   1 +
 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi    |  59 +++++
 arch/arm/dts/rk3318-a95x-z2.dts            | 384
+++++++++++++++++++++++++++++
 arch/arm/dts/rk3328-evb-u-boot.dtsi        |   2 +-
 arch/arm/dts/rk3328-evb.dts                |   8 +-
 arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi |   2 +-
 arch/arm/dts/rk3328-nanopi-r2s.dts         |   6 +-
 arch/arm/dts/rk3328-roc-cc-u-boot.dtsi     |   4 +-
 arch/arm/dts/rk3328-roc-cc.dts             |   7 +-
 arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi  |   4 +-
 arch/arm/dts/rk3328-rock-pi-e.dts          |   7 +-
 arch/arm/dts/rk3328-rock64-u-boot.dtsi     |  10 +-
 arch/arm/dts/rk3328-rock64.dts             |   7 +-
 arch/arm/dts/rk3328-u-boot.dtsi            |  21 --
 arch/arm/dts/rk3328.dtsi                   | 109 ++++----
 board/rockchip/evb_rk3328/MAINTAINERS      |   6 +
 configs/a95x-z2-rk3318_defconfig           | 102 ++++++++
 doc/board/rockchip/rockchip.rst            |   2 +
 18 files changed, 661 insertions(+), 80 deletions(-)
 create mode 100644 arch/arm/dts/rk3318-a95x-z2-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3318-a95x-z2.dts
 create mode 100644 configs/a95x-z2-rk3318_defconfig

--
2.11.0