1 From 2ed2388bc0c5b7d04c7b079d673ce61a0333c818 Mon Sep 17 00:00:00 2001
2 From: Jagan Teki <jagan@amarulasolutions.com>
3 Date: Tue, 30 May 2017 17:42:50 +0000
4 Subject: ARM: dts: sun8i: h3: Add initial NanoPi M1 Plus support
6 Backported support from kernel 4.13 with the following changes:
11 Original commit message:
12 NanoPi M1 Plus is designed and developed by FriendlyElec
13 for professionals, enterprise users, makers and hobbyists
14 using the Allwinner H3 SOC.
16 NanoPi M1 Plus key features
17 - Allwinner H3, Quad-core Cortex-A7@1.2GHz
21 - 10/100/1000M Ethernet
23 - 5V 2A DC power-supply
25 Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
26 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
27 --- a/arch/arm/boot/dts/Makefile
28 +++ b/arch/arm/boot/dts/Makefile
29 @@ -821,6 +821,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
30 sun8i-a83t-cubietruck-plus.dtb \
31 sun8i-h2-plus-orangepi-r1.dtb \
32 sun8i-h3-bananapi-m2-plus.dtb \
33 + sun8i-h3-nanopi-m1-plus.dtb \
34 sun8i-h3-nanopi-neo.dtb \
35 sun8i-h3-orangepi-2.dtb \
36 sun8i-h3-orangepi-lite.dtb \
38 +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
41 + * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
43 + * This file is dual-licensed: you can use it either under the terms
44 + * of the GPL or the X11 license, at your option. Note that this dual
45 + * licensing only applies to this file, and not this project as a
48 + * a) This file is free software; you can redistribute it and/or
49 + * modify it under the terms of the GNU General Public License as
50 + * published by the Free Software Foundation; either version 2 of the
51 + * License, or (at your option) any later version.
53 + * This file is distributed in the hope that it will be useful,
54 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
55 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56 + * GNU General Public License for more details.
58 + * Or, alternatively,
60 + * b) Permission is hereby granted, free of charge, to any person
61 + * obtaining a copy of this software and associated documentation
62 + * files (the "Software"), to deal in the Software without
63 + * restriction, including without limitation the rights to use,
64 + * copy, modify, merge, publish, distribute, sublicense, and/or
65 + * sell copies of the Software, and to permit persons to whom the
66 + * Software is furnished to do so, subject to the following
69 + * The above copyright notice and this permission notice shall be
70 + * included in all copies or substantial portions of the Software.
72 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
73 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
74 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
75 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
76 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
77 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
78 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
79 + * OTHER DEALINGS IN THE SOFTWARE.
82 +#include "sun8i-h3-nanopi.dtsi"
85 + model = "FriendlyArm NanoPi M1 Plus";
86 + compatible = "friendlyarm,nanopi-m1-plus", "allwinner,sun8i-h3";
92 + pwrseq_wifi: pwrseq0 {
93 + compatible = "mmc-pwrseq-simple";
94 + pinctrl-names = "default";
95 + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
98 + reg_gmac_3v3: gmac-3v3 {
99 + compatible = "regulator-fixed";
100 + regulator-name = "gmac-3v3";
101 + regulator-min-microvolt = <3300000>;
102 + regulator-max-microvolt = <3300000>;
103 + startup-delay-us = <100000>;
104 + enable-active-high;
105 + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
118 + pinctrl-names = "default";
119 + pinctrl-0 = <&emac_rgmii_pins>;
120 + phy-supply = <®_gmac_3v3>;
121 + phy-handle = <&ext_rgmii_phy>;
122 + phy-mode = "rgmii";
127 + ext_rgmii_phy: ethernet-phy@7 {
128 + compatible = "ethernet-phy-ieee802.3-c22";
134 + pinctrl-names = "default";
135 + pinctrl-0 = <&mmc1_pins_a>;
136 + vmmc-supply = <®_vcc3v3>;
137 + vqmmc-supply = <®_vcc3v3>;
138 + mmc-pwrseq = <&pwrseq_wifi>;
145 + compatible = "brcm,bcm4329-fmac";
146 + interrupt-parent = <&pio>;
147 + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
148 + interrupt-names = "host-wake";
153 + pinctrl-names = "default";
154 + pinctrl-0 = <&mmc2_8bit_pins>;
155 + vmmc-supply = <®_vcc3v3>;
156 + vqmmc-supply = <®_vcc3v3>;