1 From 0e2da1a792a21e3933e17727920ed3c35a3ba57a Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Sun, 11 Mar 2018 15:13:30 +0100
4 Subject: [PATCH] arm64: allwinner: H5: Add Xunlong Orange Pi Zero Plus
6 The Xunlong Orange Pi Zero Plus is single board computer.
7 - H5 Quad-core 64-bit Cortex-A53
11 - 1000M/100M/10M Ethernet RJ45
14 - One USB 2.0 HOST, One USB 2.0 OTG
16 This is based on a patch from armbian:
17 https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/sunxi-add-orangepi-zero-plus.patch
19 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 arch/arm64/boot/dts/allwinner/Makefile | 1 +
22 .../dts/allwinner/sun50i-h5-orangepi-zero-plus.dts | 147 +++++++++++++++++++++
23 2 files changed, 148 insertions(+)
24 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
26 --- a/arch/arm64/boot/dts/allwinner/Makefile
27 +++ b/arch/arm64/boot/dts/allwinner/Makefile
28 @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-p
29 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
30 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
31 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
32 +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
33 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
34 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
35 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
37 +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts
40 + * Copyright (C) 2016 ARM Ltd.
41 + * Copyright (C) 2018 Hauke Mehrtens <hauke@hauke-m.de>
43 + * SPDX-License-Identifier: (GPL-2.0+ OR X11)
47 +#include "sun50i-h5.dtsi"
49 +#include <dt-bindings/gpio/gpio.h>
50 +#include <dt-bindings/input/input.h>
51 +#include <dt-bindings/pinctrl/sun4i-a10.h>
54 + model = "Xunlong Orange Pi Zero Plus";
55 + compatible = "xunlong,orangepi-zero-plus", "allwinner,sun50i-h5";
57 + reg_vcc3v3: vcc3v3 {
58 + compatible = "regulator-fixed";
59 + regulator-name = "vcc3v3";
60 + regulator-min-microvolt = <3300000>;
61 + regulator-max-microvolt = <3300000>;
66 + ethernet1 = &rtl8189ftv;
71 + stdout-path = "serial0:115200n8";
75 + compatible = "gpio-leds";
78 + label = "orangepi:green:pwr";
79 + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
80 + default-state = "on";
84 + label = "orangepi:red:status";
85 + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
89 + reg_gmac_3v3: gmac-3v3 {
90 + compatible = "regulator-fixed";
91 + regulator-name = "gmac-3v3";
92 + regulator-min-microvolt = <3300000>;
93 + regulator-max-microvolt = <3300000>;
94 + startup-delay-us = <100000>;
96 + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
109 + pinctrl-names = "default";
110 + pinctrl-0 = <&emac_rgmii_pins>;
111 + phy-supply = <®_gmac_3v3>;
112 + phy-handle = <&ext_rgmii_phy>;
113 + phy-mode = "rgmii";
118 + ext_rgmii_phy: ethernet-phy@1 {
119 + compatible = "ethernet-phy-ieee802.3-c22";
125 + pinctrl-names = "default";
126 + pinctrl-0 = <&mmc0_pins_a>;
127 + vmmc-supply = <®_vcc3v3>;
129 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
134 + pinctrl-names = "default";
135 + pinctrl-0 = <&mmc1_pins_a>;
136 + vmmc-supply = <®_vcc3v3>;
142 + * Explicitly define the sdio device, so that we can add an ethernet
143 + * alias for it (which e.g. makes u-boot set a mac-address).
145 + rtl8189ftv: sdio_wifi@1 {
154 + #address-cells = <1>;
156 + compatible = "mxicy,mx25l1606e", "winbond,w25q128";
158 + spi-max-frequency = <40000000>;
171 + pinctrl-names = "default";
172 + pinctrl-0 = <&uart0_pins_a>;
177 + dr_mode = "peripheral";
182 + /* USB Type-A ports' VBUS is always on */
183 + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */