From a42fc855d019b01b8c31819daa0ce7c0263f1987 Mon Sep 17 00:00:00 2001 From: Alex Bee Date: Sat, 29 Feb 2020 15:36:05 +0100 Subject: [PATCH] rockchip: RK322x: add more device support - MXQ 4K Pro: RK3228A, DDR3, NAND - Alfawise A8: RK3228B(?), DDR2, eMMC, SSV6051P Wifi - Tanix TX2: RK3229, DDR3, eMMC, RTL8703 Wifi --- projects/Rockchip/devices/RK322x/README.md | 3 + projects/Rockchip/devices/RK322x/options | 3 + .../rockchip-4.4/linux-1002-rk322x-dts.patch | 196 ++++++++++++++++++ scripts/uboot_helper | 3 + 4 files changed, 205 insertions(+) diff --git a/projects/Rockchip/devices/RK322x/README.md b/projects/Rockchip/devices/RK322x/README.md index ef309fadd28..b4728473964 100644 --- a/projects/Rockchip/devices/RK322x/README.md +++ b/projects/Rockchip/devices/RK322x/README.md @@ -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` diff --git a/projects/Rockchip/devices/RK322x/options b/projects/Rockchip/devices/RK322x/options index 83ef7104de4..e47ab0d7d94 100644 --- a/projects/Rockchip/devices/RK322x/options +++ b/projects/Rockchip/devices/RK322x/options @@ -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" diff --git a/projects/Rockchip/patches/linux/rockchip-4.4/linux-1002-rk322x-dts.patch b/projects/Rockchip/patches/linux/rockchip-4.4/linux-1002-rk322x-dts.patch index 705b69d3211..ca31f7f1174 100644 --- a/projects/Rockchip/patches/linux/rockchip-4.4/linux-1002-rk322x-dts.patch +++ b/projects/Rockchip/patches/linux/rockchip-4.4/linux-1002-rk322x-dts.patch @@ -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 ++ * ++ * 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 = ; ++ phy_ddr3_clk_drv = ; ++ phy_ddr3_cmd_drv = ; ++ phy_ddr3_dqs_drv = ; ++}; ++ ++&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 ++ * ++ * 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 ++ * ++ * 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"; ++}; diff --git a/scripts/uboot_helper b/scripts/uboot_helper index 9b6d2c4b656..ebf56dccee3 100755 --- a/scripts/uboot_helper +++ b/scripts/uboot_helper @@ -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' }, },