Skip to contentSkip to conversation

board: rockchip: Add Radxa ROCK 4D

PATCH Superseded Jonas Karlman 1 participant 11 messages Aug 31, 2025

Subsystems (4)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover board: rockchip: Add Radxa ROCK 4D

This series add initial support for the Raxda ROCK 4D board, running from SPI flash, booting OS from SD-card and using Ethernet has been tested.

It also adds a helper function to read and translate the new bootsource ids reported by the BootROM of RK3576 to help support booting from SPI flash.

Kconfig options for PCIe, NVMe and USB has been enabled and is now working with the picked DT commits from the v6.17-rc1-dts tag.

Changes in v3:
- Implement read_brom_bootsource_id() for RK3528
- Add a short code comment about the re-mapping of bootsource id
- Add fspi1m1 pinctrl bootph- props to SoC u-boot.dtsi
- Drop the incomplete support for FSPI1_M0
- Pick related DT changes that now have landed in v6.17-rc1-dts tag
- Drop the now unneeded reset-gpios prop rename workaround
- Rebase on top of u-boot-rockchip-20250831 tag

Change in v2:
- Add comment about the reset-gpios prop rename in board u-boot.dtsi

Detlev Casanova (1):
arm64: dts: rockchip: Add UFS support on the ROCK 4D

Jon Lin (1):
spi: rockchip_sfc: Support sclk_x2 version

Jonas Karlman (4):
rockchip: spl: Add a read_brom_bootsource_id() helper
rockchip: rk3528: Implement read_brom_bootsource_id()
rockchip: rk3576: Add SPI Flash boot support
board: rockchip: Add Radxa ROCK 4D

Nicolas Frattaroli (3):
arm64: dts: rockchip: enable PCIe on ROCK 4D
arm64: dts: rockchip: adjust dcin regulator on ROCK 4D
arm64: dts: rockchip: complete USB nodes on ROCK 4D

Sebastian Reichel (1):
arm64: dts: rockchip: fix PHY handling for ROCK 4D

 arch/arm/dts/rk3576-rock-4d-u-boot.dtsi       | 10 +++
 arch/arm/dts/rk3576-u-boot.dtsi               | 46 +++++++++++
 arch/arm/include/asm/arch-rockchip/bootrom.h  |  2 +
 arch/arm/mach-rockchip/rk3528/rk3528.c        | 15 ++++
 arch/arm/mach-rockchip/rk3576/MAINTAINERS     |  6 ++
 arch/arm/mach-rockchip/rk3576/rk3576.c        | 25 ++++++
 arch/arm/mach-rockchip/spl.c                  |  7 +-
 configs/rock-4d-rk3576_defconfig              | 68 ++++++++++++++++
 doc/board/rockchip/rockchip.rst               |  1 +
 drivers/spi/rockchip_sfc.c                    | 13 +++-
 .../src/arm64/rockchip/rk3576-rock-4d.dts     | 78 ++++++++++++++++---
 11 files changed, 259 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/dts/rk3576-rock-4d-u-boot.dtsi
 create mode 100644 configs/rock-4d-rk3576_defconfig
Signature · 1 line
2.51.0
#1 lore raw

PATCH v3 1/10 spi: rockchip_sfc: Support sclk_x2 version

From: Jon Lin <[email protected]>

SFC after version 8 supports dtr mode, so the IO is the binary output of the controller clock.

---
v3: No change
v2: No change

---
 drivers/spi/rockchip_sfc.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/spi/rockchip_sfc.c +12 -1
index 73738ab26d33..60e74117057a 100644
@@ -108,6 +108,7 @@
 #define  SFC_VER_3			0x3
 #define  SFC_VER_4			0x4
 #define  SFC_VER_5			0x5
+#define  SFC_VER_8			0x8
 
 /* Delay line controller resiter */
 #define SFC_DLL_CTRL0			0x3C
@@ -589,6 +590,16 @@ static int rockchip_sfc_adjust_op_size(struct spi_slave *mem, struct spi_mem_op
 	return 0;
 }
 
+#if CONFIG_IS_ENABLED(CLK)
+static int rockchip_sfc_clk_set_rate(struct rockchip_sfc *sfc, uint speed)
+{
+	if (sfc->version >= SFC_VER_8)
+		return clk_set_rate(&sfc->clk, speed * 2);
+	else
+		return clk_set_rate(&sfc->clk, speed);
+}
+#endif
+
 static int rockchip_sfc_set_speed(struct udevice *bus, uint speed)
 {
 	struct rockchip_sfc *sfc = dev_get_plat(bus);
@@ -600,7 +611,7 @@ static int rockchip_sfc_set_speed(struct udevice *bus, uint speed)
 		return 0;
 
 #if CONFIG_IS_ENABLED(CLK)
-	int ret = clk_set_rate(&sfc->clk, speed);
+	int ret = rockchip_sfc_clk_set_rate(sfc, speed);
 
 	if (ret < 0) {
 		dev_err(sfc->dev, "set_freq=%dHz fail, check if it's the cru support level\n",
Signature · 1 line
2.51.0
#2 lore raw

PATCH v3 2/10 rockchip: spl: Add a read_brom_bootsource_id() helper

In reply to Jonas Karlman

The bootsource ids reported by BootROM of RK3528 and RK3576 for e.g. SPI NOR and USB differs slightly compared to prior SoCs:

- Booting from sfc0 (ROCK 4D) report the normal bootsource id 0x3.
- Booting from sfc1 M1 (NanoPi M5) report a new bootsource id 0x23.
- Booting from sfc1 M0 has not been tested (no board using this config).
- Booting from USB report a new bootsource id 0x81 on RK3528 and RK3576.

Add a helper function to read the bootsource id. This helper function will be used to translate the new values to the common BROM_BOOTSOURCE enum values on RK3528 and RK3576.

---
v3: Mention RK3528 in commit message
v2: No change

---
 arch/arm/include/asm/arch-rockchip/bootrom.h | 2 ++
 arch/arm/mach-rockchip/spl.c                 | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-rockchip/bootrom.h +2 -0
index e736772fda75..b15938c021d6 100644
@@ -64,4 +64,6 @@ extern const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1];
  */
 #define BROM_BOOTSOURCE_ID_ADDR   (CFG_IRAM_BASE + 0x10)
 
+u32 read_brom_bootsource_id(void);
+
 #endif
arch/arm/mach-rockchip/spl.c +6 -1
index f4d29bbdd17e..1ce3a3b05547 100644
@@ -31,6 +31,11 @@ int board_return_to_bootrom(struct spl_image_info *spl_image,
 __weak const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
 };
 
+__weak u32 read_brom_bootsource_id(void)
+{
+	return readl(BROM_BOOTSOURCE_ID_ADDR);
+}
+
 const char *board_spl_was_booted_from(void)
 {
 	static u32 brom_bootsource_id_cache = BROM_BOOTSOURCE_UNKNOWN;
@@ -40,7 +45,7 @@ const char *board_spl_was_booted_from(void)
 	if (brom_bootsource_id_cache != BROM_BOOTSOURCE_UNKNOWN)
 		bootdevice_brom_id = brom_bootsource_id_cache;
 	else
-		bootdevice_brom_id = readl(BROM_BOOTSOURCE_ID_ADDR);
+		bootdevice_brom_id = read_brom_bootsource_id();
 
 	if (bootdevice_brom_id < ARRAY_SIZE(boot_devices))
 		bootdevice_ofpath = boot_devices[bootdevice_brom_id];
Signature · 1 line
2.51.0
#3 lore raw

PATCH v3 3/10 rockchip: rk3528: Implement read_brom_bootsource_id()

In reply to Jonas Karlman

The bootsource ids reported by BootROM of RK3528 for e.g. USB differs compared to prior SoCs:

- Booting from USB report a new bootsource id 0x81.

Add a RK3528 specific read_brom_bootsource_id() function to help decode this new bootsource id value to help support booting from USB on RK3528.

---
v3: New patch to map USB bootsource id on RK3528

---
 arch/arm/mach-rockchip/rk3528/rk3528.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/mach-rockchip/rk3528/rk3528.c +15 -0
index f9bfc445b857..57ead0006f1f 100644
@@ -49,6 +49,21 @@ void board_debug_uart_init(void)
 {
 }
 
+u32 read_brom_bootsource_id(void)
+{
+	u32 bootsource_id = readl(BROM_BOOTSOURCE_ID_ADDR);
+
+	/* Re-map the raw value read from reg to an existing BROM_BOOTSOURCE
+	 * enum value to avoid having to create a larger boot_devices table.
+	 */
+	if (bootsource_id == 0x81)
+		return BROM_BOOTSOURCE_USB;
+	else if (bootsource_id > BROM_LAST_BOOTSOURCE)
+		log_debug("Unknown bootsource %x\n", bootsource_id);
+
+	return bootsource_id;
+}
+
 int arch_cpu_init(void)
 {
 	u32 val;
Signature · 1 line
2.51.0
#4 lore raw

PATCH v3 4/10 rockchip: rk3576: Add SPI Flash boot support

In reply to Jonas Karlman

The bootsource ids reported by BootROM of RK3576 for SPI NOR and USB differs slightly compared to prior SoCs:

- Booting from sfc0 (ROCK 4D) report the normal bootsource id 0x3.
- Booting from sfc1 M1 (NanoPi M5) report a new bootsource id 0x23.
- Booting from sfc1 M0 has not been tested (no board using this config).
- Booting from USB report a new bootsource id 0x81.

Add a RK3576 specific read_brom_bootsource_id() function to help decode the new bootsource id values and the required boot_devices mapping of sfc0 and sfc1 to help support booting from SPI flash on RK3576.

---
Changes in v3:
- Add fspi1m1 pinctrl bootph- props to SoC u-boot.dtsi
- Drop the incomplete support for FSPI1_M0
- Add a short code comment about the re-mapping of bootsource id

v2: No change

---
 arch/arm/dts/rk3576-u-boot.dtsi        | 46 ++++++++++++++++++++++++++
 arch/arm/mach-rockchip/rk3576/rk3576.c | 25 ++++++++++++++
 2 files changed, 71 insertions(+)
arch/arm/dts/rk3576-u-boot.dtsi +46 -0
index fb5a107f47d9..dc3771b556a3 100644
@@ -6,6 +6,11 @@
 #include "rockchip-u-boot.dtsi"
 
 / {
+	aliases {
+		spi5 = &sfc0;
+		spi6 = &sfc1;
+	};
+
 	chosen {
 		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
 	};
@@ -16,6 +21,17 @@
 	};
 };
 
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+	simple-bin-spi {
+		mkimage {
+			args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
+			offset = <0x8000>;
+		};
+	};
+};
+#endif
+
 &cru {
 	bootph-all;
 };
@@ -45,6 +61,26 @@
 	bootph-some-ram;
 };
 
+&fspi0_csn0 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&fspi0_pins {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&fspi1m1_csn0 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&fspi1m1_pins {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
 &ioc_grf {
 	bootph-all;
 };
@@ -116,6 +152,16 @@
 	bootph-some-ram;
 };
 
+&sfc0 {
+	bootph-some-ram;
+	u-boot,spl-sfc-no-dma;
+};
+
+&sfc1 {
+	bootph-some-ram;
+	u-boot,spl-sfc-no-dma;
+};
+
 &sys_grf {
 	bootph-all;
 };
arch/arm/mach-rockchip/rk3576/rk3576.c +25 -0
index a6c2fbdc4840..a1e8a7572fa4 100644
@@ -36,8 +36,15 @@
 #define USB_GRF_BASE		0x2601E000
 #define USB3OTG0_CON1		0x0030
 
+enum {
+	BROM_BOOTSOURCE_FSPI0 = 3,
+	BROM_BOOTSOURCE_FSPI1_M1 = 6,
+};
+
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
 	[BROM_BOOTSOURCE_EMMC] = "/soc/mmc@2a330000",
+	[BROM_BOOTSOURCE_FSPI0] = "/soc/spi@2a340000/flash@0",
+	[BROM_BOOTSOURCE_FSPI1_M1] = "/soc/spi@2a300000/flash@0",
 	[BROM_BOOTSOURCE_SD] = "/soc/mmc@2a310000",
 };
 
@@ -85,6 +92,24 @@ void board_debug_uart_init(void)
 {
 }
 
+u32 read_brom_bootsource_id(void)
+{
+	u32 bootsource_id = readl(BROM_BOOTSOURCE_ID_ADDR);
+
+	/* Re-map the raw value read from reg to a redefined or existing
+	 * BROM_BOOTSOURCE enum value to avoid having to create a larger
+	 * boot_devices table.
+	 */
+	if (bootsource_id == 0x23)
+		return BROM_BOOTSOURCE_FSPI1_M1;
+	else if (bootsource_id == 0x81)
+		return BROM_BOOTSOURCE_USB;
+	else if (bootsource_id > BROM_LAST_BOOTSOURCE)
+		log_debug("Unknown bootsource %x\n", bootsource_id);
+
+	return bootsource_id;
+}
+
 #define HP_TIMER_BASE			CONFIG_ROCKCHIP_STIMER_BASE
 #define HP_CTRL_REG			0x04
 #define TIMER_EN			BIT(0)
Signature · 1 line
2.51.0
#5 lore raw

PATCH v3 5/10 arm64: dts: rockchip: enable PCIe on ROCK 4D

In reply to Jonas Karlman

From: Nicolas Frattaroli <[email protected]>

The RADXA ROCK 4D board has a PCIe controller connected to a flat flex connector, compatible with the one the RPi5 uses.

Enable the associated combphy and pcie controller node, as well as add the remaining pinctrl definition for the reset.

[ upstream commit: 29ff4bbff793334d6aff2238fdc3ccf3859d60da ]

(cherry picked from commit 2c6901d159a6586975f2e5edf8faabd015e9e03d)

---
v3: New patch

---
 .../src/arm64/rockchip/rk3576-rock-4d.dts         | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
dts/upstream/src/arm64/rockchip/rk3576-rock-4d.dts +15 -0
index 6756403111e7..0388d72076bf 100644
@@ -194,6 +194,10 @@
 	};
 };
 
+&combphy0_ps {
+	status = "okay";
+};
+
 &combphy1_psu {
 	status = "okay";
 };
@@ -652,6 +656,14 @@
 	};
 };
 
+&pcie0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_reset>;
+	reset-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc_3v3_pcie>;
+	status = "okay";
+};
+
 &pinctrl {
 	hym8563 {
 		hym8563_int: hym8563-int {
@@ -678,6 +690,9 @@
 		pcie_pwren: pcie-pwren {
 			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
+		pcie_reset: pcie-reset {
+			rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
 	};
 
 	usb {
Signature · 1 line
2.51.0
#6 lore raw

PATCH v3 6/10 arm64: dts: rockchip: Add UFS support on the ROCK 4D

In reply to Jonas Karlman

From: Detlev Casanova <[email protected]>

This device supports removable UFS chips, add support for it.

[ upstream commit: 00abee2b18342d6c2f6f37225682fa7ca0d33142 ]

(cherry picked from commit cf9888548489f76f0d6416782ca4bd9e8bca3c87)

---
v3: New patch

---
 dts/upstream/src/arm64/rockchip/rk3576-rock-4d.dts | 4 ++++
 1 file changed, 4 insertions(+)
dts/upstream/src/arm64/rockchip/rk3576-rock-4d.dts +4 -0
index 0388d72076bf..22ffa15abc9e 100644
@@ -745,6 +745,10 @@
 	status = "okay";
 };
 
+&ufshc {
+	status = "okay";
+};
+
 &usb_drd1_dwc3 {
 	dr_mode = "host";
 	status = "okay";
Signature · 1 line
2.51.0
#7 lore raw

PATCH v3 7/10 arm64: dts: rockchip: fix PHY handling for ROCK 4D

In reply to Jonas Karlman

From: Sebastian Reichel <[email protected]>

Old revisions of the ROCK 4D board have a dedicated crystal to supply the RTL8211F PHY's 25MHz clock input. At least some newer revisions instead use REFCLKO25M_GMAC0_OUT. The DT already has this half-prepared, but there are some issues:

1. The DT relies on auto-selecting the right PHY driver, which requires that it works good enough to read the ID registers. This does not work without the clock, which is handled by the PHY driver. By updating the compatible to contain the RTL8211F IDs, so that the operating system can choose the right PHY driver without relying on a pre-powered PHY.

2. Despite the name REFCLKO25M_GMAC0_OUT could also provide a different frequency, so ensure it is explicitly set to 25 MHz as expected by the PHY.

3. While at it switch from deprecated "enable-gpio" to standard "enable-gpios".

[ upstream commit: cd803da7c033e376a66793a43ee98e136bc6cc25 ]

(cherry picked from commit d54023e2d503599c8e4b954322eabe411ef398f7)

---
v3: New patch

---
 dts/upstream/src/arm64/rockchip/rk3576-rock-4d.dts | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
dts/upstream/src/arm64/rockchip/rk3576-rock-4d.dts +4 -2
index 22ffa15abc9e..62712c90c83d 100644
@@ -645,14 +645,16 @@
 
 &mdio0 {
 	rgmii_phy0: ethernet-phy@1 {
-		compatible = "ethernet-phy-ieee802.3-c22";
+		compatible = "ethernet-phy-id001c.c916";
 		reg = <0x1>;
 		clocks = <&cru REFCLKO25M_GMAC0_OUT>;
+		assigned-clocks = <&cru REFCLKO25M_GMAC0_OUT>;
+		assigned-clock-rates = <25000000>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&rtl8211f_rst>;
 		reset-assert-us = <20000>;
 		reset-deassert-us = <100000>;
-		reset-gpio = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
+		reset-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
 	};
 };
 
Signature · 1 line
2.51.0
#8 lore raw

PATCH v3 8/10 arm64: dts: rockchip: adjust dcin regulator on ROCK 4D

In reply to Jonas Karlman

From: Nicolas Frattaroli <[email protected]>

The ROCK 4D's actual DC input is 5V, and the schematic names it as being 5V as well.

Rename the regulator, and change the voltage it claims to be at. Furthermore, fix vcc_1v1_nldo_s3's vin-supply as coming from vcc_5v0_sys, and not the DCIN, as per the schematic. This makes no functional change; both regulators are always on, and one feeds into the other.

[ upstream commit: 9a625a284bfdb902f27f2949063731d189adda3c ]

(cherry picked from commit ac5675c9dfaebe141256577306a0a455e481048a)

---
v3: New patch

---
 dts/upstream/src/arm64/rockchip/rk3576-rock-4d.dts | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
dts/upstream/src/arm64/rockchip/rk3576-rock-4d.dts +6 -6
index 62712c90c83d..ee0822cd4f35 100644
@@ -57,13 +57,13 @@
 		};
 	};
 
-	vcc_12v0_dcin: regulator-vcc-12v0-dcin {
+	vcc_5v0_dcin: regulator-vcc-5v0-dcin {
 		compatible = "regulator-fixed";
 		regulator-always-on;
 		regulator-boot-on;
-		regulator-min-microvolt = <12000000>;
-		regulator-max-microvolt = <12000000>;
-		regulator-name = "vcc_12v0_dcin";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-name = "vcc_5v0_dcin";
 	};
 
 	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
@@ -166,7 +166,7 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-name = "vcc_5v0_device";
-		vin-supply = <&vcc_12v0_dcin>;
+		vin-supply = <&vcc_5v0_sys>;
 	};
 
 	vcc_5v0_host: regulator-vcc-5v0-host {
@@ -190,7 +190,7 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-name = "vcc_5v0_sys";
-		vin-supply = <&vcc_12v0_dcin>;
+		vin-supply = <&vcc_5v0_dcin>;
 	};
 };
 
Signature · 1 line
2.51.0
#9 lore raw

PATCH v3 9/10 arm64: dts: rockchip: complete USB nodes on ROCK 4D

In reply to Jonas Karlman

From: Nicolas Frattaroli <[email protected]>

The ROCK 4D uses both USB controllers, and both of which in host mode. However, it still names one of the supplies for them "OTG" in the schematic.

Fix the "host" supply's input, and add the "otg" supply. Enable the remaining USB PHY nodes, and the first controller node as well.

[ upstream commit: 787595b423d855bfcbf724822fd1e663ad368d08 ]

(cherry picked from commit 7200ec33cb5697124c76de28535354f0eef6a28a)

---
v3: New patch

---
 .../src/arm64/rockchip/rk3576-rock-4d.dts     | 41 ++++++++++++++++++-
 1 file changed, 39 insertions(+), 2 deletions(-)
dts/upstream/src/arm64/rockchip/rk3576-rock-4d.dts +39 -2
index ee0822cd4f35..87bc9004fca1 100644
@@ -180,7 +180,21 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-name = "vcc5v0_host";
-		vin-supply = <&vcc_5v0_device>;
+		vin-supply = <&vcc_5v0_sys>;
+	};
+
+	vcc_5v0_otg: regulator-vcc-5v0-otg {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&usb_otg_pwren>;
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-name = "vcc5v0_otg";
+		vin-supply = <&vcc_5v0_sys>;
 	};
 
 	vcc_5v0_sys: regulator-vcc-5v0-sys {
@@ -699,7 +713,11 @@
 
 	usb {
 		usb_host_pwren: usb-host-pwren {
-			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+		usb_otg_pwren: usb-otg-pwren {
+			rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_down>;
+
 		};
 	};
 };
@@ -738,10 +756,20 @@
 	status = "okay";
 };
 
+&u2phy0_otg {
+	phy-supply = <&vcc_5v0_otg>;
+	status = "okay";
+};
+
 &u2phy1 {
 	status = "okay";
 };
 
+&u2phy1_otg {
+	phy-supply = <&vcc_5v0_host>;
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-0 = <&uart0m0_xfer>;
 	status = "okay";
@@ -751,6 +779,15 @@
 	status = "okay";
 };
 
+&usbdp_phy {
+	status = "okay";
+};
+
+&usb_drd0_dwc3 {
+	dr_mode = "host";
+	status = "okay";
+};
+
 &usb_drd1_dwc3 {
 	dr_mode = "host";
 	status = "okay";
Signature · 1 line
2.51.0
#10 lore raw

PATCH v3 10/10 board: rockchip: Add Radxa ROCK 4D

In reply to Jonas Karlman

The Radxa ROCK 4D is a compact single-board computer (SBC) featuring numerous top-tier functions, features, and expansion options.

Equipped with the Rockchip RK3576 or RK3576J SoC, the ROCK 4D boasts an octa-core CPU (4x Cortex-A72 + 4x Cortex-A53), Mali-G52 GPU, and a powerful 6 TOPS NPU, making it ideal for AI and multimedia tasks.

Features tested on a Radxa ROCK 4D v1.112:
- SPI Flash boot
- Ethernet
- PCIe/NVMe
- USB host

ROCK 4D boards with SPI Flash is configured to boot from FSPI0->UFS->USB, or directly from USB when the MASKROM button is pressed, booting directly from SD-card is not possible on these boards.

---
v3: Drop the reset-gpios prop rename
v2: Add comment about the reset-gpios prop rename

---
 arch/arm/dts/rk3576-rock-4d-u-boot.dtsi   | 10 ++++
 arch/arm/mach-rockchip/rk3576/MAINTAINERS |  6 ++
 configs/rock-4d-rk3576_defconfig          | 68 +++++++++++++++++++++++
 doc/board/rockchip/rockchip.rst           |  1 +
 4 files changed, 85 insertions(+)
 create mode 100644 arch/arm/dts/rk3576-rock-4d-u-boot.dtsi
 create mode 100644 configs/rock-4d-rk3576_defconfig
arch/arm/dts/rk3576-rock-4d-u-boot.dtsi new file +10 -0
new file mode 100644
index 000000000000..db46553b66a4
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include "rk3576-u-boot.dtsi"
+
+&sfc0 {
+	flash@0 {
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+};
arch/arm/mach-rockchip/rk3576/MAINTAINERS +6 -0
index 94ef74d429f9..54c75f451f0f 100644
@@ -4,6 +4,12 @@ S:	Maintained
 F:	arch/arm/dts/rk3576-generic*
 F:	configs/generic-rk3576_defconfig
 
+ROCK-4D-RK3576
+M:	Jonas Karlman <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/rk3576-rock-4d*
+F:	configs/rock-4d-rk3576_defconfig
+
 SIGE5-RK3576
 M:	Jonas Karlman <[email protected]>
 S:	Maintained
configs/rock-4d-rk3576_defconfig new file +68 -0

68 lines not on this page · raw message

doc/board/rockchip/rockchip.rst +1 -0
index de3aa79cb5c9..0ec56c8d068a 100644
@@ -137,6 +137,7 @@ List of mainline supported Rockchip boards:
      - ArmSoM Sige5 (sige5-rk3576)
      - Firefly ROC-RK3576-PC (roc-pc-rk3576)
      - Generic RK3576 (generic-rk3576)
+     - Radxa ROCK 4D (rock-4d-rk3576)
 
 * rk3588
      - ArmSoM Sige7 (sige7-rk3588)
Signature · 1 line
2.51.0