1 From d7341305863bcc054ee168bd77864100e0c3b144 Mon Sep 17 00:00:00 2001
2 From: Antony Antony <antony@phenome.org>
3 Date: Thu, 7 Sep 2017 18:42:22 +0200
4 Subject: [PATCH] arm64: allwinner: h5: add NanoPi NEO Plus2 DT support
6 Add initial DT for NanoPi NEO Plus2 by FriendlyARM
7 - Allwinner quad core H5 Cortex A53 with an ARM Mali-450MP GPU
9 - 8GB eMMC flash (Samsung KLM8G1WEPD-B031)
11 - Gigabit Ethernet (external RTL8211E-VB-CG chip)
12 - 802.11 b/g/n WiFi, Bluetooth 4.0 (Ampak AP6212A module)
13 - 2x USB 2.0 host ports & 2x USB via headers
15 Kernel 4.15 commit d7341305863b
17 Signed-off-by: Antony Antony <antony@phenome.org>
19 --- a/arch/arm64/boot/dts/allwinner/Makefile
20 +++ b/arch/arm64/boot/dts/allwinner/Makefile
21 @@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-or
22 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
23 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
24 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
25 +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
28 subdir-y := $(dts-dirs)
30 +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts
33 + * Copyright (C) 2017 Antony Antony <antony@phenome.org>
34 + * Copyright (C) 2016 ARM Ltd.
36 + * This file is dual-licensed: you can use it either under the terms
37 + * of the GPL or the X11 license, at your option. Note that this dual
38 + * licensing only applies to this file, and not this project as a
41 + * a) This file is free software; you can redistribute it and/or
42 + * modify it under the terms of the GNU General Public License as
43 + * published by the Free Software Foundation; either version 2 of the
44 + * License, or (at your option) any later version.
46 + * This file is distributed in the hope that it will be useful,
47 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
48 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 + * GNU General Public License for more details.
51 + * Or, alternatively,
53 + * b) Permission is hereby granted, free of charge, to any person
54 + * obtaining a copy of this software and associated documentation
55 + * files (the "Software"), to deal in the Software without
56 + * restriction, including without limitation the rights to use,
57 + * copy, modify, merge, publish, distribute, sublicense, and/or
58 + * sell copies of the Software, and to permit persons to whom the
59 + * Software is furnished to do so, subject to the following
62 + * The above copyright notice and this permission notice shall be
63 + * included in all copies or substantial portions of the Software.
65 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
66 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
67 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
68 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
69 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
70 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
71 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
72 + * OTHER DEALINGS IN THE SOFTWARE.
76 +#include "sun50i-h5.dtsi"
78 +#include <dt-bindings/gpio/gpio.h>
79 +#include <dt-bindings/input/input.h>
80 +#include <dt-bindings/pinctrl/sun4i-a10.h>
83 + model = "FriendlyARM NanoPi NEO Plus2";
84 + compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5";
91 + stdout-path = "serial0:115200n8";
95 + compatible = "gpio-leds";
98 + label = "nanopi:green:pwr";
99 + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
100 + default-state = "on";
104 + label = "nanopi:red:status";
105 + gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
109 + reg_gmac_3v3: gmac-3v3 {
110 + compatible = "regulator-fixed";
111 + pinctrl-names = "default";
112 + regulator-name = "gmac-3v3";
113 + regulator-min-microvolt = <3300000>;
114 + regulator-max-microvolt = <3300000>;
115 + startup-delay-us = <100000>;
116 + enable-active-high;
117 + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
120 + reg_vcc3v3: vcc3v3 {
121 + compatible = "regulator-fixed";
122 + regulator-name = "vcc3v3";
123 + regulator-min-microvolt = <3300000>;
124 + regulator-max-microvolt = <3300000>;
127 + vdd_cpux: gpio-regulator {
128 + compatible = "regulator-gpio";
129 + pinctrl-names = "default";
130 + regulator-name = "vdd-cpux";
131 + regulator-type = "voltage";
133 + regulator-always-on;
134 + regulator-min-microvolt = <1100000>;
135 + regulator-max-microvolt = <1300000>;
136 + regulator-ramp-delay = <50>; /* 4ms */
137 + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
138 + gpios-states = <0x1>;
139 + states = <1100000 0x0
143 + wifi_pwrseq: wifi_pwrseq {
144 + compatible = "mmc-pwrseq-simple";
145 + pinctrl-names = "default";
146 + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
147 + post-power-on-delay-ms = <200>;
152 + allwinner,audio-routing =
153 + "Line Out", "LINEOUT",
168 + pinctrl-names = "default";
169 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
170 + vmmc-supply = <®_vcc3v3>;
172 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
177 + pinctrl-names = "default";
178 + pinctrl-0 = <&mmc1_pins_a>;
179 + vmmc-supply = <®_vcc3v3>;
180 + vqmmc-supply = <®_vcc3v3>;
181 + mmc-pwrseq = <&wifi_pwrseq>;
188 + compatible = "brcm,bcm4329-fmac";
193 + pinctrl-names = "default";
194 + pinctrl-0 = <&mmc2_8bit_pins>;
195 + vmmc-supply = <®_vcc3v3>;
211 + pinctrl-names = "default";
212 + pinctrl-0 = <&uart0_pins_a>;
222 + /* USB Type-A ports' VBUS is always on */