From 558bca0037ebbc3f92ec1691851e971466f93a11 Mon Sep 17 00:00:00 2001 From: knaerzche Date: Fri, 10 Jan 2020 13:58:37 +0100 Subject: [PATCH] Add support for v88 mars II RK3228B device / fix error in README --- projects/Rockchip/devices/RK322x/README.md | 3 +- projects/Rockchip/devices/RK322x/options | 1 + .../rockchip-4.4/linux-1002-rk322x-dts.patch | 80 +++++++++++++++++++ scripts/uboot_helper | 1 + 4 files changed, 84 insertions(+), 1 deletion(-) diff --git a/projects/Rockchip/devices/RK322x/README.md b/projects/Rockchip/devices/RK322x/README.md index d2415e1111d..12c6bb9b452 100644 --- a/projects/Rockchip/devices/RK322x/README.md +++ b/projects/Rockchip/devices/RK322x/README.md @@ -9,8 +9,9 @@ This is a SoC device for RK322x * `PROJECT=Rockchip DEVICE=RK322x ARCH=arm UBOOT_SYSTEM=rk3229-d88 make image` * `PROJECT=Rockchip DEVICE=RK322x ARCH=arm UBOOT_SYSTEM=rk3229-v884k make image` * `PROJECT=Rockchip DEVICE=RK322x ARCH=arm UBOOT_SYSTEM=rk3229-v88mars make image` -* `PROJECT=Rockchip DEVICE=RK322x ARCH=arm UBOOT_SYSTEM=rk3229-box-ntn8 make image` +* `PROJECT=Rockchip DEVICE=RK322x ARCH=arm UBOOT_SYSTEM=rk3229-ntn8 make image` * `PROJECT=Rockchip DEVICE=RK322x ARCH=arm UBOOT_SYSTEM=rk3228a-h96mini SOC=RK3228 DDR_SPEED=600 make image` +* `PROJECT=Rockchip DEVICE=RK322x ARCH=arm UBOOT_SYSTEM=rk3228b-v88marsII SOC=RK3228 make image` **How to use on an Android device** - Flash image to a sd-card diff --git a/projects/Rockchip/devices/RK322x/options b/projects/Rockchip/devices/RK322x/options index 557ed9535a3..f1e8f064496 100644 --- a/projects/Rockchip/devices/RK322x/options +++ b/projects/Rockchip/devices/RK322x/options @@ -26,6 +26,7 @@ KERNEL_MAKE_EXTRACMD+=" rk3229-box-v88mars.dtb" KERNEL_MAKE_EXTRACMD+=" rk3229-box-ntn8.dtb" KERNEL_MAKE_EXTRACMD+=" rk3228a-box-h96mini.dtb" + KERNEL_MAKE_EXTRACMD+=" rk3228b-box-v88mars-II.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 47bd2a782f9..e546eadb885 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 @@ -1582,3 +1582,83 @@ index 0000000..98b01e5 + }; + }; +}; +diff --git a/arch/arm/boot/dts/rk3228b-box-v88mars-II.dts b/arch/arm/boot/dts/rk3228b-box-v88mars-II.dts +new file mode 100644 +index 0000000..a0d29bd +--- /dev/null ++++ b/arch/arm/boot/dts/rk3228b-box-v88mars-II.dts +@@ -0,0 +1,74 @@ ++/* ++ * 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 V88 Mars II"; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led_blue { ++ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ ++ led_red { ++ gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; ++ default-state = "off"; ++ linux,default-trigger = "rc-feedback"; ++ }; ++ }; ++ ++ ++ wireless-wlan { ++ compatible = "wlan-platdata"; ++ rockchip,grf = <&grf>; ++ sdio_vref = <3300>; ++ WIFI,host_wake_irq = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; ++ status = "okay"; ++ }; ++ ++ ++ sdio_pwrseq: sdio-pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wifi_enable_h>; ++ reset-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; /* GPIO2_D2 */ ++ }; ++}; ++ ++ ++&nandc { ++ status = "okay"; ++}; ++ ++&sdmmc { ++ clock-frequency = <37500000>; ++ max-frequency = <37500000>; ++ status = "okay"; ++}; ++ ++&sdio { ++ clock-frequency = <37500000>; ++ max-frequency = <37500000>; ++ mmc-pwrseq = <&sdio_pwrseq>; ++ status = "okay"; ++}; ++ ++ ++&usb_otg { ++ dr_mode = "host"; ++}; ++ ++&ir_receiver { ++ status = "okay"; ++}; diff --git a/scripts/uboot_helper b/scripts/uboot_helper index 0c15bff2ab6..0dbfe8b1592 100755 --- a/scripts/uboot_helper +++ b/scripts/uboot_helper @@ -58,6 +58,7 @@ devices = { 'rk3229-v88mars' : { 'dtb' : 'rk3229-box-v88mars.dtb', 'config' : 'rk322x-linux-miniloader-nand_defconfig' }, 'rk3229-ntn8' : {'dtb' : 'rk3229-box-ntn8.dtb', 'config': 'rk322x-linux-miniloader-emmc_defconfig' }, 'rk3228a-h96mini' : {'dtb' : 'rk3228a-box-h96mini.dtb', 'config' : 'rk322x-linux-miniloader-emmc-boot_defconfig' }, + 'rk3228b-v88marsII' : {'dtb' : 'rk3228b-box-v88mars-II.dtb', 'config' : 'rk322x-linux-miniloader-nand_defconfig' }, }, },