]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm64: dts: rockchip: Add ROCKPi 4A/4B support
authorJagan Teki <jagan@amarulasolutions.com>
Mon, 20 Jul 2020 18:55:48 +0000 (00:25 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 22 Jul 2020 12:55:13 +0000 (20:55 +0800)
Rock PI 4 has 3 variants of hardware platforms called
RockPI 4A, 4B, and 4C.

- Rock PI 4A has no Wif/BT.
- Rock PI 4B has AP6256 Wifi/BT, PoE.
- Rock PI 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enable
  GPIO pin change compared to 4B, 4C

So move common nodes, properties into dtsi file and include
on respective variant dts files.

Use 4B dts into default rock-pi-4 defconfig until we find any
solution for dynamic detection of these variants.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/dts/Makefile
arch/arm/dts/rk3399-rock-pi-4.dtsi [moved from arch/arm/dts/rk3399-rock-pi-4.dts with 95% similarity]
arch/arm/dts/rk3399-rock-pi-4a.dts [new file with mode: 0644]
arch/arm/dts/rk3399-rock-pi-4b-u-boot.dtsi [new file with mode: 0644]
arch/arm/dts/rk3399-rock-pi-4b.dts [new file with mode: 0644]
configs/rock-pi-4-rk3399_defconfig

index 82e9b18cb8786c33f23e57862eb2cfe485abaad5..bcd89af6a5debd6af8afa5ccfe154b2eb9fed032 100644 (file)
@@ -136,7 +136,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
        rk3399-puma-haikou.dtb \
        rk3399-roc-pc.dtb \
        rk3399-roc-pc-mezzanine.dtb \
-       rk3399-rock-pi-4.dtb \
+       rk3399-rock-pi-4a.dtb \
+       rk3399-rock-pi-4b.dtb \
        rk3399-rock960.dtb \
        rk3399-rockpro64.dtb \
        rk3399pro-rock-pi-n10.dtb
similarity index 95%
rename from arch/arm/dts/rk3399-rock-pi-4.dts
rename to arch/arm/dts/rk3399-rock-pi-4.dtsi
index 3923ec01ef66f3ba7172354c418aa5cf12651801..1c55a4645b59ec6cdd8af291644c5c5c398314c0 100644 (file)
@@ -11,9 +11,6 @@
 #include "rk3399-opp.dtsi"
 
 / {
-       model = "Radxa ROCK Pi 4";
-       compatible = "radxa,rockpi4", "rockchip,rk3399";
-
        chosen {
                stdout-path = "serial2:1500000n8";
        };
        pinctrl-names = "default";
        pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
        sd-uhs-sdr104;
-       status = "okay";
-
-       brcmf: wifi@1 {
-               compatible = "brcm,bcm4329-fmac";
-               reg = <1>;
-               interrupt-parent = <&gpio0>;
-               interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
-               interrupt-names = "host-wake";
-               pinctrl-names = "default";
-               pinctrl-0 = <&wifi_host_wake_l>;
-       };
 };
 
 &sdmmc {
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
-       status = "okay";
-
-       bluetooth {
-               compatible = "brcm,bcm43438-bt";
-               clocks = <&rk808 1>;
-               clock-names = "ext_clock";
-               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>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
-       };
 };
 
 &uart2 {
diff --git a/arch/arm/dts/rk3399-rock-pi-4a.dts b/arch/arm/dts/rk3399-rock-pi-4a.dts
new file mode 100644 (file)
index 0000000..d96dd3e
--- /dev/null
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Akash Gajjar <Akash_Gajjar@mentor.com>
+ * Copyright (c) 2019 Pragnesh Patel <Pragnesh_Patel@mentor.com>
+ */
+
+/dts-v1/;
+#include "rk3399-rock-pi-4.dtsi"
+
+/ {
+       model = "Radxa ROCK Pi 4A";
+       compatible = "radxa,rockpi4", "rockchip,rk3399";
+};
diff --git a/arch/arm/dts/rk3399-rock-pi-4b-u-boot.dtsi b/arch/arm/dts/rk3399-rock-pi-4b-u-boot.dtsi
new file mode 100644 (file)
index 0000000..85ee577
--- /dev/null
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com>
+ */
+
+#include "rk3399-rock-pi-4-u-boot.dtsi"
diff --git a/arch/arm/dts/rk3399-rock-pi-4b.dts b/arch/arm/dts/rk3399-rock-pi-4b.dts
new file mode 100644 (file)
index 0000000..4ca970a
--- /dev/null
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Akash Gajjar <Akash_Gajjar@mentor.com>
+ * Copyright (c) 2019 Pragnesh Patel <Pragnesh_Patel@mentor.com>
+ */
+
+/dts-v1/;
+#include "rk3399-rock-pi-4.dtsi"
+
+/ {
+       model = "Radxa ROCK Pi 4B";
+       compatible = "radxa,rockpi4", "rockchip,rk3399";
+};
+
+&sdio0 {
+       status = "okay";
+
+       brcmf: wifi@1 {
+               compatible = "brcm,bcm4329-fmac";
+               reg = <1>;
+               interrupt-parent = <&gpio0>;
+               interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
+               interrupt-names = "host-wake";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_host_wake_l>;
+       };
+};
+
+&uart0 {
+       status = "okay";
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               clocks = <&rk808 1>;
+               clock-names = "ext_clock";
+               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>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
+       };
+};
index 98f71a50a5b62f6edc5f15af410fd9d791003191..1d34476825a94987641976af2d3bd2e840c4731c 100644 (file)
@@ -9,7 +9,7 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
-CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4.dtb"
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4b.dtb"
 CONFIG_MISC_INIT_R=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
@@ -24,7 +24,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4"
+CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4b"
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y