Skip to contentSkip to conversation

Add support for Sakura Pi RK3308B

PATCH Superseded Hsun Lai 3 participants 7 messages May 13, 2025 – May 14, 2025

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Hsun Lai

author
#0 lore raw

cover Add support for Sakura Pi RK3308B

This series add support for Sakura Pi RK3308B.

Info of device can be found at:
https://docs.sakurapi.org/article/sakurapi-rk3308b/introduce

Changes in v1:
- Add support for Sakura Pi RK3308B

Hsun Lai (3):
dt-bindings: vendor-prefixes: Add SakuraPi prefix
dt-bindings: arm: rockchip: Add Sakura Pi RK3308B
arm64: dts: rockchip: add DTs for Sakura Pi RK3308B

 .../devicetree/bindings/arm/rockchip.yaml     |   5 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../dts/rockchip/rk3308-sakurapi-rk3308b.dts  | 295 ++++++++++++++++++
 4 files changed, 303 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts
Signature · 1 line
2.34.1
author
#5 lore raw

PATCH 3/3 arm64: dts: rockchip: add DTs for Sakura Pi RK3308B

The Sakura Pi RK3308B is a SBC based on the Rockchip RK3308 SoC.

The device contains the following hardware that is tested/working:
- 4 or 8GB eMMC
- SDMMC card slot
- Realtek SDIO WiFi 5/BT
- 256 or 512MB of RAM
- USB 2.0 port
- OTG port
- HDMI port

---

Changes in v1:
- Add support for Sakura Pi RK3308B

 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../dts/rockchip/rk3308-sakurapi-rk3308b.dts  | 295 ++++++++++++++++++
 2 files changed, 296 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index e63c3f5eb..c9017bdc3 100644
@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-s0.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-sakurapi-rk3308b.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351v.dtb
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +295 -0

295 lines not on this page · raw message

Signature · 1 line
2.34.1
author
#3 lore raw

PATCH 2/3 dt-bindings: arm: rockchip: Add Sakura Pi RK3308B

In reply to Hsun Lai

This patch adds device tree binding support for
Sakura Pi RK3308B, with compatibility for the
Rockchip RK3308 SoC.

---

 Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +5 -0
index 115c3ca43..c64adc0d0 100644
@@ -1109,6 +1109,11 @@ properties:
           - const: rockchip,rk3588-toybrick-x0
           - const: rockchip,rk3588
 
+      - description: Sakura Pi RK3308B
+        items:
+          - const: sakurapi,rk3308-sakurapi-rk3308b
+          - const: rockchip,rk3308
+
       - description: Sinovoip RK3308 Banana Pi P2 Pro
         items:
           - const: sinovoip,rk3308-bpi-p2pro
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/3 dt-bindings: vendor-prefixes: Add SakuraPi prefix

In reply to Hsun Lai

Add vendor prefix for SakuraPi.org, which produces development boards like the SakuraPi-RK3308B.

---

 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 3e7450c3f..744d01a76 100644
@@ -1299,6 +1299,8 @@ patternProperties:
   "^rve,.*":
     description: Recharge Véhicule Électrique (RVE) inc.
   "^saef,.*":
+    description: SakuraPi.org
+  "^sakurapi,.*":
     description: Saef Technology Limited
   "^samsung,.*":
     description: Samsung Semiconductor
Signature · 1 line
2.34.1
maintainer
#6 lore raw

Re: [PATCH v1 3/3] arm64: dts: rockchip: add DTs for Sakura Pi RK3308B

In reply to Hsun Lai

Hi,

Am Dienstag, 13. Mai 2025, 18:35:14 Mitteleuropäische Sommerzeit schrieb Hsun Lai:

arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts line 39

Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +1 -0
+	vcc5v0_sys: vcc5v0-sys {

preferred node-names for regulators is regulator-foo, so here please regulator-vcc5v0-sys (phandle can stay as it is).

Same for all the other fixed-/pwm- regulators below.

Quoted 73 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +73 -0
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+	};
+
+	vdd_core: vdd-core {
+		compatible = "pwm-regulator";
+		pwms = <&pwm0 0 5000 1>;
+		regulator-name = "vdd_core";
+		regulator-min-microvolt = <827000>;
+		regulator-max-microvolt = <1340000>;
+		regulator-init-microvolt = <1015000>;
+		regulator-settling-time-up-us = <250>;
+		regulator-always-on;
+		regulator-boot-on;
+		pwm-supply = <&vcc5v0_sys>;
+	};
+
+	vdd_log: vdd-log {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_log";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1050000>;
+		regulator-max-microvolt = <1050000>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	vcc_ddr: vcc-ddr {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_ddr";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1500000>;
+		regulator-max-microvolt = <1500000>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	vcc_1v8: vcc-1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_1v8";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vcc_io>;
+	};
+
+	vcc_io: vcc-io {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_io";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	vcc_phy: vcc-phy-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc_phy";
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	vcc5v0_otg: vcc5v0-otg {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_otg";
+		regulator-always-on;
+		gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;

arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts line 132

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +8 -0
+		enable-active-high;
+		pinctrl-names = "default";
+		pinctrl-0 = <&otg_vbus_drv>;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+};
 
 
+&i2c1 {

empty i2c controller? I guess it is routed to the external pins? If so, could use a comment explaining that.

arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts line 177

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +6 -0
+/* SPI0 for external gpio pin */
+&spi0 {
+	status = "okay";
+
+	spi_dev@0 {
+		compatible = "spidev";

having a generic spidev is not allowed. If there is an actual device connected there, it should have a real compatible. If that isn't a real device, this could be handled in an overlay.

arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts line 188

Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +11 -0
+		reg = <0>;
+		spi-max-frequency = <0x2faf080>;
+	};
+};
+
+/* SPI1 for ws2812*/
+&spi1 {
+	status = "okay";
+
+	spi_dev@0 {
+		compatible = "spidev";

same as above, please no generic spidev

arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts line 198

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +10 -0
+		reg = <0>;
+		spi-max-frequency = <0x2faf080>;
+	};
+};
+
+&pinctrl {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rtc_32k>;
+
+	usb {

please sort these nodes alphabetically

Quoted 24 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +24 -0
+		otg_vbus_drv: otg-vbus-drv {
+			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	sdio-pwrseq {
+		wifi_enable_h: wifi-enable-h {
+			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	wifi {
+		wifi_host_wake: wifi-host-wake {
+			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+	};
+
+	bluetooth {
+		bt_reg_on: bt-reg-on {
+			rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		bt_wake_host: bt-wake-host {
+			rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;

arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts line 232

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +10 -0
+		};
+
+		host_wake_bt: host-wake-bt {
+			rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
+&pwm0 {
+	status = "okay";

status as last property

arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts line 241

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +9 -0
+	pinctrl-0 = <&pwm0_pin_pull_down>;
+};
+
+&saradc {
+	vref-supply = <&vcc_1v8>;
+	status = "okay";
+};
+
+&pwm3 {

please sort phandles alphabetically

arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts line 132

Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts new file +4 -0
+	status = "okay";
+};
+
+&i2c1 {

same

Review

Quoted 2 lines
(quoted diff) +2 -0
+	status = "okay";
+};

Thanks
Heiko

#2 lore raw

Re: [PATCH v1 1/3] dt-bindings: vendor-prefixes: Add SakuraPi prefix

In reply to Hsun Lai
Quoted 1 line · Hsun Lai

Add vendor prefix for SakuraPi.org, which produces

This website does not exist? Think you should mention that
https://docs.sakurapi.org/en/ is the site (in a Link: tag).

Quoted 13 lines

development boards like the SakuraPi-RK3308B.

---

 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +0 -0
index 3e7450c3f..744d01a76 100644

Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 1305

Quoted 7 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -1299,6 +1299,8 @@ patternProperties:
   "^rve,.*":
     description: Recharge Véhicule Électrique (RVE) inc.
 
   "^saef,.*":
+    description: SakuraPi.org
+  "^sakurapi,.*":
     description: Saef Technology Limited

You've added your entry in the middle of the Saef one.

Quoted 5 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +0 -0
   "^samsung,.*":

description: Samsung Semiconductor

Signature · 1 line
2.34.1