aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-01-27 23:46:50 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2018-02-17 01:15:25 +0100
commit6be73c07dbd69d49493d69bbd7978ec3d89bef56 (patch)
tree889f97cfdefe1b6e99d8b7cfcfbc3c671492ba3e
parent718e5cd1cf08d7e31e3b93a03c92b90643ccc905 (diff)
downloadupstream-6be73c07dbd69d49493d69bbd7978ec3d89bef56.tar.gz
upstream-6be73c07dbd69d49493d69bbd7978ec3d89bef56.tar.bz2
upstream-6be73c07dbd69d49493d69bbd7978ec3d89bef56.zip
sunxi: Add Xunlong Orange Pi Zero Plus
This is based on a patch from armbian: https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/sunxi-add-orangepi-zero-plus.patch Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/sunxi/image/cortex-a53.mk11
-rw-r--r--target/linux/sunxi/patches-4.14/220-ARM-dts-orange-pi-zero-plus.patch193
2 files changed, 204 insertions, 0 deletions
diff --git a/target/linux/sunxi/image/cortex-a53.mk b/target/linux/sunxi/image/cortex-a53.mk
index eb31aa8d4c..cd103d47d0 100644
--- a/target/linux/sunxi/image/cortex-a53.mk
+++ b/target/linux/sunxi/image/cortex-a53.mk
@@ -27,4 +27,15 @@ endef
TARGET_DEVICES += sun50i-a64-pine64-plus
+
+define Device/sun50i-h5-orangepi-zero-plus
+ DEVICE_TITLE:=Xunlong Orange Pi Zero Plus
+ SUPPORTED_DEVICES:=xunlong,orangepi-zero-plus
+ SUNXI_DTS:=allwinner/sun50i-h5-orangepi-zero-plus
+ KERNEL_NAME := Image
+ KERNEL := kernel-bin
+endef
+
+TARGET_DEVICES += sun50i-h5-orangepi-zero-plus
+
endif
diff --git a/target/linux/sunxi/patches-4.14/220-ARM-dts-orange-pi-zero-plus.patch b/target/linux/sunxi/patches-4.14/220-ARM-dts-orange-pi-zero-plus.patch
new file mode 100644
index 0000000000..d4f987eb65
--- /dev/null
+++ b/target/linux/sunxi/patches-4.14/220-ARM-dts-orange-pi-zero-plus.patch
@@ -0,0 +1,193 @@
+--- a/arch/arm64/boot/dts/allwinner/Makefile
++++ b/arch/arm64/boot/dts/allwinner/Makefile
+@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-s
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
++dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
+
+--- /dev/null
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
+@@ -0,0 +1,180 @@
++/*
++ * Copyright (C) 2016 ARM Ltd.
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ * a) This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ * b) Permission is hereby granted, free of charge, to any person
++ * obtaining a copy of this software and associated documentation
++ * files (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use,
++ * copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following
++ * conditions:
++ *
++ * The above copyright notice and this permission notice shall be
++ * included in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ * OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include "sun50i-h5.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/pinctrl/sun4i-a10.h>
++
++/ {
++ model = "Xunlong Orange Pi Zero Plus";
++ compatible = "xunlong,orangepi-pc2", "allwinner,sun50i-h5";
++
++ reg_vcc3v3: vcc3v3 {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc3v3";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ };
++
++ aliases {
++ ethernet0 = &emac;
++ ethernet1 = &rtl8189ftv;
++ serial0 = &uart0;
++ };
++
++ chosen {
++ stdout-path = "serial0:115200n8";
++ };
++
++ leds {
++ compatible = "gpio-leds";
++
++ pwr {
++ label = "orangepi:green:pwr";
++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
++ default-state = "on";
++ };
++
++ status {
++ label = "orangepi:red:status";
++ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>;
++ };
++ };
++
++ reg_gmac_3v3: gmac-3v3 {
++ compatible = "regulator-fixed";
++ regulator-name = "gmac-3v3";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ startup-delay-us = <100000>;
++ enable-active-high;
++ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
++ };
++
++ reg_usb0_vbus: usb0-vbus {
++ compatible = "regulator-fixed";
++ regulator-name = "usb0-vbus";
++ regulator-min-microvolt = <5000000>;
++ regulator-max-microvolt = <5000000>;
++ enable-active-high;
++ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
++ status = "okay";
++ };
++};
++
++&ehci0 {
++ status = "okay";
++};
++
++&ehci1 {
++ status = "okay";
++};
++
++&emac {
++ pinctrl-names = "default";
++ pinctrl-0 = <&emac_rgmii_pins>;
++ phy-supply = <&reg_gmac_3v3>;
++ phy-handle = <&ext_rgmii_phy>;
++ phy-mode = "rgmii";
++ status = "okay";
++};
++
++&external_mdio {
++ ext_rgmii_phy: ethernet-phy@1 {
++ compatible = "ethernet-phy-ieee802.3-c22";
++ reg = <1>;
++ };
++};
++
++&mmc0 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
++ vmmc-supply = <&reg_vcc3v3>;
++ bus-width = <4>;
++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
++ status = "okay";
++};
++
++&mmc1 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&mmc1_pins_a>;
++ vmmc-supply = <&reg_vcc3v3>;
++ bus-width = <4>;
++ non-removable;
++ status = "okay";
++
++ /*
++ * Explicitly define the sdio device, so that we can add an ethernet
++ * alias for it (which e.g. makes u-boot set a mac-address).
++ */
++ rtl8189ftv: sdio_wifi@1 {
++ reg = <1>;
++ };
++};
++
++&ohci0 {
++ status = "okay";
++};
++
++&ohci1 {
++ status = "okay";
++};
++
++&uart0 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&uart0_pins_a>;
++ status = "okay";
++};
++
++&usb_otg {
++ dr_mode = "peripheral";
++ status = "okay";
++};
++
++&usbphy {
++ /* USB Type-A ports' VBUS is always on */
++ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
++ status = "okay";
++};