Skip to content

Commit

Permalink
rockchip: RK322x: add more device support
Browse files Browse the repository at this point in the history
- MXQ 4K Pro: RK3228A, DDR3, NAND
- Alfawise A8: RK3228B(?), DDR2, eMMC, SSV6051P Wifi
- Tanix TX2: RK3229, DDR3, eMMC, RTL8703 Wifi
  • Loading branch information
knaerzche committed Feb 29, 2020
1 parent 7928624 commit a42fc85
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/Rockchip/devices/RK322x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ This is a SoC device for RK322x
**Build**

* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3228 DDR_SPEED=600 ARCH=arm UBOOT_SYSTEM=rk3228a-h96mini make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3228 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3228a-mxq4kpro make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3228 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3228b-a8 make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3228 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3228b-mk809iv make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3228 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3228b-v88marsII make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3229 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3229-a95xr1 make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3229 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3229-d88 make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3229 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3229-hk1mini make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3229 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3229-ntn8 make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3229 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3229-tx2 make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3229 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3229-v884k make image`
* `PROJECT=Rockchip DEVICE=RK322x SOC=RK3229 DDR_SPEED=300 ARCH=arm UBOOT_SYSTEM=rk3229-v88mars make image`

Expand Down
3 changes: 3 additions & 0 deletions projects/Rockchip/devices/RK322x/options
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
KERNEL_MAKE_EXTRACMD+=" rk3228a-box-h96mini.dtb"
KERNEL_MAKE_EXTRACMD+=" rk3228b-box-v88mars-II.dtb"
KERNEL_MAKE_EXTRACMD+=" rk3228b-box-mkv809vii.dtb"
KERNEL_MAKE_EXTRACMD+=" rk3228a-box-mxq4kpro.dtb"
KERNEL_MAKE_EXTRACMD+=" rk3228b-box-a8.dtb"
KERNEL_MAKE_EXTRACMD+=" rk3229-box-tx2.dtb"

# Mali GPU family
MALI_FAMILY="400"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1725,3 +1725,199 @@ index 0000000000..550b7c5670
+&wifi {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/rk3228a-box-mxq4kpro.dts b/arch/arm/boot/dts/rk3228a-box-mxq4kpro.dts
new file mode 100644
index 0000000000..d9163f990d
--- /dev/null
+++ b/arch/arm/boot/dts/rk3228a-box-mxq4kpro.dts
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2020 knaerzche <knaerzche@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "rk3228a-box.dtsi"
+
+/ {
+ model = "RK3228a MXQ 4K Pro";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_blue {
+ gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_red {
+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ linux,default-trigger = "rc-feedback";
+ };
+ };
+
+};
+
+&dram_timing {
+ ddr3_drv = <DDR3_DS_34ohm>;
+ phy_ddr3_clk_drv = <PHY_DDR3_RON_RTT_22ohm>;
+ phy_ddr3_cmd_drv = <PHY_DDR3_RON_RTT_22ohm>;
+ phy_ddr3_dqs_drv = <PHY_DDR3_RON_RTT_22ohm>;
+};
+
+&dmc {
+ system-status-freq = <
+ /*system status freq(KHz)*/
+ SYS_STATUS_NORMAL 600000
+ SYS_STATUS_VIDEO_4K 700000
+ SYS_STATUS_VIDEO_4K_10B 700000
+ >;
+
+ status = "okay";
+};
+
+&dmc_opp_table {
+
+ opp-600000000 {
+ opp-microvolt = <1100000>;
+ opp-microvolt-L0 = <1100000>;
+ opp-microvolt-L1 = <1050000>;
+ };
+
+ /delete-node/ opp-666000000;
+
+ opp-700000000 {
+ opp-microvolt = <1175000>;
+ opp-microvolt-L0 = <1175000>;
+ opp-microvolt-L1 = <1125000>;
+ };
+
+ /delete-node/ opp-786000000;
+
+ opp-800000000 {
+ opp-microvolt = <1175000>;
+ opp-microvolt-L0 = <1175000>;
+ opp-microvolt-L1 = <1125000>;
+ };
+
+};
+
+
+&nandc {
+ status = "okay";
+};
+
+&wifi {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/rk3228b-box-a8.dts b/arch/arm/boot/dts/rk3228b-box-a8.dts
new file mode 100644
index 0000000000..886abc8894
--- /dev/null
+++ b/arch/arm/boot/dts/rk3228b-box-a8.dts
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2020 knaerzche <knaerzche@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "rk3228b-box.dtsi"
+
+/ {
+ model = "RK3228b Alfawise A8";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_blue {
+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ };
+
+};
+
+&emmc {
+ mmc-hs200-1_8v;
+ status = "okay";
+};
+
+&wifi {
+ wifi_chip_type = "ssv6051";
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/rk3229-box-tx2.dts b/arch/arm/boot/dts/rk3229-box-tx2.dts
new file mode 100644
index 0000000000..26da4aa561
--- /dev/null
+++ b/arch/arm/boot/dts/rk3229-box-tx2.dts
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2020 knaerzche <knaerzche@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "rk3229-box.dtsi"
+
+/ {
+ model = "RK3229 Tanix TX2";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_green {
+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ };
+};
+
+&bluetooth {
+ status = "okay";
+};
+
+&dmc {
+ system-status-freq = <
+ /*system status freq(KHz)*/
+ SYS_STATUS_NORMAL 786000
+ SYS_STATUS_VIDEO_4K 786000
+ SYS_STATUS_VIDEO_4K_10B 800000
+ >;
+
+ status = "okay";
+};
+
+&emmc {
+ mmc-hs200-1_8v;
+ status = "okay";
+};
+
+&gmac {
+ tx_delay = <0x26>;
+ rx_delay = <0x11>;
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&wifi {
+ status = "okay";
+};
3 changes: 3 additions & 0 deletions scripts/uboot_helper
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ devices = {
'TinkerBoard' : { 'rk3288' : { 'dtb' : 'rk3288-miniarm.dtb', 'config' : 'tinker-rk3288_config' }, },
'RK322x' : {
'rk3228a-h96mini' : {'dtb' : 'rk3228a-box-h96mini.dtb', 'config' : 'rk322x-linux-miniloader-emmc_defconfig' },
'rk3228a-mxq4kpro' : {'dtb' : 'rk3228a-box-mxq4kpro.dtb', 'config' : 'rk322x-linux-miniloader-nand_defconfig' },
'rk3228b-a8' : {'dtb': 'rk3228b-box-a8.dtb', 'config' : 'rk322x-linux-miniloader-emmc_defconfig'},
'rk3228b-mk809iv' : {'dtb': 'rk3228b-box-mkv809vii.dtb', 'config' : 'rk322x-linux-miniloader-emmc_defconfig'},
'rk3228b-v88marsII' : {'dtb' : 'rk3228b-box-v88mars-II.dtb', 'config' : 'rk322x-linux-miniloader-nand_defconfig' },
'rk3229-a95xr1': { 'dtb' : 'rk3229-box-a95xr1.dtb', 'config' : 'rk322x-linux-miniloader-emmc_defconfig' },
'rk3229-d88' : { 'dtb' : 'rk3229-box-d88.dtb', 'config' : 'rk322x-linux-miniloader-nand_defconfig' },
'rk3229-hk1mini': { 'dtb' : 'rk3229-box-hk1mini.dtb', 'config' : 'rk322x-linux-miniloader-nand_defconfig' },
'rk3229-ntn8' : {'dtb' : 'rk3229-box-ntn8.dtb', 'config': 'rk322x-linux-miniloader-emmc_defconfig' },
'rk3229-tx2' : {'dtb' : 'rk3229-box-tx2.dtb', 'config': 'rk322x-linux-miniloader-emmc_defconfig' },
'rk3229-v884k' : { 'dtb' : 'rk3229-box-v884k.dtb', 'config' : 'rk322x-linux-miniloader-nand_defconfig' },
'rk3229-v88mars' : { 'dtb' : 'rk3229-box-v88mars.dtb', 'config' : 'rk322x-linux-miniloader-nand_defconfig' },
},
Expand Down

0 comments on commit a42fc85

Please sign in to comment.