* [PATCH v1 0/3] Add support for Sakura Pi RK3308B
@ 2025-05-13 16:35 Hsun Lai
2025-05-13 16:35 ` [PATCH v1 2/3] dt-bindings: arm: rockchip: Add " Hsun Lai
2025-05-13 16:35 ` [PATCH v1 3/3] arm64: dts: rockchip: add DTs for " Hsun Lai
0 siblings, 2 replies; 5+ messages in thread
From: Hsun Lai @ 2025-05-13 16:35 UTC (permalink / raw)
To: Fred Bloggs
Cc: Hsun Lai, Conor Dooley, Heiko Stuebner, Krzysztof Kozlowski,
Rob Herring, Stephen Rothwell, devicetree, linux-arm-kernel,
linux-kernel, linux-rockchip
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
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/3] dt-bindings: arm: rockchip: Add Sakura Pi RK3308B
2025-05-13 16:35 [PATCH v1 0/3] Add support for Sakura Pi RK3308B Hsun Lai
@ 2025-05-13 16:35 ` Hsun Lai
2025-05-14 15:59 ` Conor Dooley
2025-05-13 16:35 ` [PATCH v1 3/3] arm64: dts: rockchip: add DTs for " Hsun Lai
1 sibling, 1 reply; 5+ messages in thread
From: Hsun Lai @ 2025-05-13 16:35 UTC (permalink / raw)
To: Fred Bloggs
Cc: Hsun Lai, Conor Dooley, Heiko Stuebner, Krzysztof Kozlowski,
Rob Herring, Stephen Rothwell, devicetree, linux-arm-kernel,
linux-kernel, linux-rockchip
This patch adds device tree binding support for
Sakura Pi RK3308B, with compatibility for the
Rockchip RK3308 SoC.
Link: https://docs.sakurapi.org/article/sakurapi-rk3308b/introduce
Signed-off-by: Hsun Lai <i@chainsx.cn>
---
Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 115c3ca43..c64adc0d0 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 3/3] arm64: dts: rockchip: add DTs for Sakura Pi RK3308B
2025-05-13 16:35 [PATCH v1 0/3] Add support for Sakura Pi RK3308B Hsun Lai
2025-05-13 16:35 ` [PATCH v1 2/3] dt-bindings: arm: rockchip: Add " Hsun Lai
@ 2025-05-13 16:35 ` Hsun Lai
2025-05-13 18:43 ` Heiko Stuebner
1 sibling, 1 reply; 5+ messages in thread
From: Hsun Lai @ 2025-05-13 16:35 UTC (permalink / raw)
To: Fred Bloggs
Cc: Hsun Lai, Conor Dooley, Heiko Stuebner, Krzysztof Kozlowski,
Rob Herring, Stephen Rothwell, devicetree, linux-arm-kernel,
linux-kernel, linux-rockchip
The Sakura Pi RK3308B is a SBC based on the Rockchip RK3308 SoC.
Link: https://github.com/Sakura-Pi
Link: https://docs.sakurapi.org/article/sakurapi-rk3308b/introduce
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
Signed-off-by: Hsun Lai <i@chainsx.cn>
---
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
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index e63c3f5eb..c9017bdc3 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -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
diff --git a/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts b/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts
new file mode 100644
index 000000000..91d8535fc
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3308-sakurapi-rk3308b.dts
@@ -0,0 +1,295 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Akash Gajjar <akash@openedev.com>
+ * Copyright (c) 2019 Jagan Teki <jagan@openedev.com>
+ * Copyright (C) 2024 TheSnowfield <thesnowfield@sakurapi.org>
+ */
+
+/dts-v1/;
+#include "rk3308.dtsi"
+#include <dt-bindings/leds/common.h>
+
+/ {
+ model = "Sakura Pi RK3308B";
+ compatible = "sakurapi,rk3308-sakurapi-rk3308b", "rockchip,rk3308";
+
+ aliases {
+ mmc0 = &emmc;
+ mmc1 = &sdmmc;
+ mmc2 = &sdio;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ pinctrl-0 = <&wifi_enable_h>;
+ pinctrl-names = "default";
+ /*
+ * On the module itself this is one of these (depending
+ * on the actual card populated):
+ * - SDIO_RESET_L_WL_REG_ON
+ * - PDN (power down when low)
+ */
+ reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys {
+ 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>;
+ enable-active-high;
+ pinctrl-names = "default";
+ pinctrl-0 = <&otg_vbus_drv>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_core>;
+};
+
+&emmc {
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ non-removable;
+ status = "okay";
+};
+
+&i2c1 {
+ status = "okay";
+};
+
+&sdmmc {
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ disable-wp;
+ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
+ card-detect-delay = <800>;
+ status = "okay";
+};
+
+&sdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ keep-power-in-suspend;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ non-removable;
+ no-mmc;
+ no-sd;
+ status = "okay";
+
+ brcmf: wifi@1 {
+ compatible = "brcm,bcm43455-fmac";
+ reg = <1>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
+ interrupt-names = "host-wake";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_host_wake>;
+ };
+};
+
+&dmac0 {
+ status = "okay";
+};
+
+/* SPI0 for external gpio pin */
+&spi0 {
+ status = "okay";
+
+ spi_dev@0 {
+ compatible = "spidev";
+ reg = <0>;
+ spi-max-frequency = <0x2faf080>;
+ };
+};
+
+/* SPI1 for ws2812*/
+&spi1 {
+ status = "okay";
+
+ spi_dev@0 {
+ compatible = "spidev";
+ reg = <0>;
+ spi-max-frequency = <0x2faf080>;
+ };
+};
+
+&pinctrl {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rtc_32k>;
+
+ usb {
+ 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>;
+ };
+
+ host_wake_bt: host-wake-bt {
+ rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pwm0 {
+ status = "okay";
+ pinctrl-0 = <&pwm0_pin_pull_down>;
+};
+
+&saradc {
+ vref-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&pwm3 {
+ status = "okay";
+};
+
+&i2c1 {
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
+
+&uart4 {
+ pinctrl-names = "default";
+ uart-has-rtscts;
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm4345c5";
+ clocks = <&cru SCLK_RTC32K>;
+ clock-names = "lpo";
+ pinctrl-names = "default";
+ pinctrl-0 = <&host_wake_bt &bt_wake_host &bt_reg_on>;
+ device-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
+ shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
+ max-speed = <1500000>;
+ };
+};
+
+&usb20_otg {
+ status = "okay";
+};
+
+&u2phy {
+ status = "okay";
+};
+
+&u2phy_otg {
+ status = "okay";
+};
+
+&u2phy_host {
+ state = "okay";
+};
+
+&usb_host_ehci {
+ status = "okay";
+};
+
+&usb_host_ohci{
+ status = "okay";
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 3/3] arm64: dts: rockchip: add DTs for Sakura Pi RK3308B
2025-05-13 16:35 ` [PATCH v1 3/3] arm64: dts: rockchip: add DTs for " Hsun Lai
@ 2025-05-13 18:43 ` Heiko Stuebner
0 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2025-05-13 18:43 UTC (permalink / raw)
To: Fred Bloggs, Hsun Lai
Cc: Hsun Lai, Conor Dooley, Krzysztof Kozlowski, Rob Herring,
Stephen Rothwell, devicetree, linux-arm-kernel, linux-kernel,
linux-rockchip
Hi,
Am Dienstag, 13. Mai 2025, 18:35:14 Mitteleuropäische Sommerzeit schrieb Hsun Lai:
> + 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.
> + 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>;
> + 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.
> +/* 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.
> + reg = <0>;
> + spi-max-frequency = <0x2faf080>;
> + };
> +};
> +
> +/* SPI1 for ws2812*/
> +&spi1 {
> + status = "okay";
> +
> + spi_dev@0 {
> + compatible = "spidev";
same as above, please no generic spidev
> + reg = <0>;
> + spi-max-frequency = <0x2faf080>;
> + };
> +};
> +
> +&pinctrl {
> + pinctrl-names = "default";
> + pinctrl-0 = <&rtc_32k>;
> +
> + usb {
please sort these nodes alphabetically
> + 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>;
> + };
> +
> + host_wake_bt: host-wake-bt {
> + rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> + };
> +};
> +
> +&pwm0 {
> + status = "okay";
status as last property
> + pinctrl-0 = <&pwm0_pin_pull_down>;
> +};
> +
> +&saradc {
> + vref-supply = <&vcc_1v8>;
> + status = "okay";
> +};
> +
> +&pwm3 {
please sort phandles alphabetically
> + status = "okay";
> +};
> +
> +&i2c1 {
same
> + status = "okay";
> +};
Thanks
Heiko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/3] dt-bindings: arm: rockchip: Add Sakura Pi RK3308B
2025-05-13 16:35 ` [PATCH v1 2/3] dt-bindings: arm: rockchip: Add " Hsun Lai
@ 2025-05-14 15:59 ` Conor Dooley
0 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2025-05-14 15:59 UTC (permalink / raw)
To: Hsun Lai
Cc: Fred Bloggs, Conor Dooley, Heiko Stuebner, Krzysztof Kozlowski,
Rob Herring, Stephen Rothwell, devicetree, linux-arm-kernel,
linux-kernel, linux-rockchip
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
On Wed, May 14, 2025 at 12:35:13AM +0800, Hsun Lai wrote:
> This patch adds device tree binding support for
> Sakura Pi RK3308B, with compatibility for the
> Rockchip RK3308 SoC.
>
> Link: https://docs.sakurapi.org/article/sakurapi-rk3308b/introduce
>
> Signed-off-by: Hsun Lai <i@chainsx.cn>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-14 16:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 16:35 [PATCH v1 0/3] Add support for Sakura Pi RK3308B Hsun Lai
2025-05-13 16:35 ` [PATCH v1 2/3] dt-bindings: arm: rockchip: Add " Hsun Lai
2025-05-14 15:59 ` Conor Dooley
2025-05-13 16:35 ` [PATCH v1 3/3] arm64: dts: rockchip: add DTs for " Hsun Lai
2025-05-13 18:43 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).