2023-07-10 12:05:18

by Christopher Obbard

[permalink] [raw]
Subject: [PATCH v2 0/3] Add support for Radxa ROCK 4SE

Add support for the RK3399T-based Radxa ROCK 4SE board. This board offers
similar peripherals and form-factor to the ROCK Pi 4B but uses the
cost-optimised RK3399T processor (which has different a OPP table but
otherwise minimal changes) and some other minor hardware changes between
the Rock Pi 4B (described in the devicetree).

The first patch moves the RK3399 OPP table from the generic Radxa ROCK
Pi 4 dtsi into board-specific devicetree files, in preparation for the
ROCK 4SE devicetree file (in later patches).

The second patch adds the devicetree binding documentation for the Radxa
ROCK 4SE.

The third patch adds the board-specific devicetree file for the Radxa ROCK
4SE.

Changes in v2:
- Add Krzysztof Kozlowski's Acked-by tag.
- Set proper interrupt type for brcmf.

Christopher Obbard (3):
arm64: dts: rockchip: Move OPP table from ROCK Pi 4 dtsi
dt-bindings: arm: rockchip: Add Radxa ROCK 4SE
arm64: dts: rockchip: Add Radxa ROCK 4SE

.../devicetree/bindings/arm/rockchip.yaml | 5 ++
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3399-rock-4se.dts | 65 +++++++++++++++++++
.../boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 1 -
.../boot/dts/rockchip/rk3399-rock-pi-4a.dts | 1 +
.../boot/dts/rockchip/rk3399-rock-pi-4b.dts | 1 +
.../boot/dts/rockchip/rk3399-rock-pi-4c.dts | 1 +
7 files changed, 74 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock-4se.dts

--
2.40.1



2023-07-10 12:18:09

by Christopher Obbard

[permalink] [raw]
Subject: [PATCH v2 3/3] arm64: dts: rockchip: Add Radxa ROCK 4SE

Add board-specific devicetree file for the RK3399T-based Radxa ROCK 4SE
board. This board offers similar peripherals in a similar form-factor to
the existing ROCK Pi 4B but uses the cost-optimised RK3399T processor
(which has different OPP table than the RK3399) and other minimal hardware
changes.

Signed-off-by: Christopher Obbard <[email protected]>
---

Changes in v2:
- Set proper interrupt type for brcmf.

arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3399-rock-4se.dts | 65 +++++++++++++++++++
2 files changed, 66 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock-4se.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index b7fb908eb92d..7ab29cbe71c4 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -58,6 +58,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-plus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4c-plus.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4se.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4a.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4a-plus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-4se.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-4se.dts
new file mode 100644
index 000000000000..7cfc198bbae7
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-4se.dts
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Akash Gajjar <[email protected]>
+ * Copyright (c) 2019 Pragnesh Patel <[email protected]>
+ */
+
+/dts-v1/;
+#include "rk3399-rock-pi-4.dtsi"
+#include "rk3399-t-opp.dtsi"
+
+/ {
+ model = "Radxa ROCK 4SE";
+ compatible = "radxa,rock-4se", "rockchip,rk3399";
+
+ aliases {
+ mmc2 = &sdio0;
+ };
+};
+
+&pinctrl {
+ usb2 {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&sdio0 {
+ status = "okay";
+
+ brcmf: wifi@1 {
+ compatible = "brcm,bcm4329-fmac";
+ reg = <1>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "host-wake";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_host_wake_l>;
+ };
+};
+
+&uart0 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm4345c5";
+ clocks = <&rk808 1>;
+ clock-names = "lpo";
+ device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
+ shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
+ max-speed = <1500000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
+ vbat-supply = <&vcc3v3_sys>;
+ vddio-supply = <&vcc_1v8>;
+ };
+};
+
+&vcc5v0_host {
+ enable-active-high;
+ gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+};
--
2.40.1


2023-07-10 12:20:20

by Christopher Obbard

[permalink] [raw]
Subject: [PATCH v2 1/3] arm64: dts: rockchip: Move OPP table from ROCK Pi 4 dtsi

The ROCK 4SE uses the RK3399-T variant of the RK3399 SoC, which has some
changes to the OPP tables. Prepare for the bringup of this SoC by moving
the inclusion of existing OPP tables from the common devicetree into
each board-specific devicetree.

Signed-off-by: Christopher Obbard <[email protected]>
---

(no changes since v1)

arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 1 -
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts | 1 +
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts | 1 +
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts | 1 +
4 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
index 907071d4fe80..ec307ee20c66 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
@@ -9,7 +9,6 @@
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pwm/pwm.h>
#include "rk3399.dtsi"
-#include "rk3399-opp.dtsi"

/ {
aliases {
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts
index 89f2af5e111d..931334aa3d62 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4a.dts
@@ -6,6 +6,7 @@

/dts-v1/;
#include "rk3399-rock-pi-4.dtsi"
+#include "rk3399-opp.dtsi"

/ {
model = "Radxa ROCK Pi 4A";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
index 0806545922f5..e98a182f8572 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
@@ -6,6 +6,7 @@

/dts-v1/;
#include "rk3399-rock-pi-4.dtsi"
+#include "rk3399-opp.dtsi"

/ {
model = "Radxa ROCK Pi 4B";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts
index 4053ba72618c..d32efab74e94 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4c.dts
@@ -7,6 +7,7 @@

/dts-v1/;
#include "rk3399-rock-pi-4.dtsi"
+#include "rk3399-opp.dtsi"

/ {
model = "Radxa ROCK Pi 4C";
--
2.40.1


2023-07-11 14:52:15

by Heiko Stübner

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] Add support for Radxa ROCK 4SE

On Mon, 10 Jul 2023 12:50:22 +0100, Christopher Obbard wrote:
> Add support for the RK3399T-based Radxa ROCK 4SE board. This board offers
> similar peripherals and form-factor to the ROCK Pi 4B but uses the
> cost-optimised RK3399T processor (which has different a OPP table but
> otherwise minimal changes) and some other minor hardware changes between
> the Rock Pi 4B (described in the devicetree).
>
> The first patch moves the RK3399 OPP table from the generic Radxa ROCK
> Pi 4 dtsi into board-specific devicetree files, in preparation for the
> ROCK 4SE devicetree file (in later patches).
>
> [...]

Applied, thanks!

[1/3] arm64: dts: rockchip: Move OPP table from ROCK Pi 4 dtsi
commit: fd2762a626461ca4d9d829431a8a7f9f8e6c3395
[2/3] dt-bindings: arm: rockchip: Add Radxa ROCK 4SE
commit: e7afb99e8f52f24514267f5482cd2f274220b360
[3/3] arm64: dts: rockchip: Add Radxa ROCK 4SE
commit: 86a0e14a82ea723c7b7381799f060612dc65cdf3

Best regards,
--
Heiko Stuebner <[email protected]>