1 From daf75255fb67bf44db178e4c95a803b7972ed670 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Tue, 26 Sep 2017 22:29:06 +0200
4 Subject: ARM: dts: sunxi: add support for Orange Pi R1 board
6 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 arch/arm/boot/dts/Makefile | 1 +
9 arch/arm/boot/dts/sun8i-h2-plus-orangepi-r1.dts | 171 ++++++++++++++++++++++++
10 2 files changed, 172 insertions(+)
11 create mode 100644 arch/arm/boot/dts/sun8i-h2-plus-orangepi-r1.dts
13 --- a/arch/arm/boot/dts/Makefile
14 +++ b/arch/arm/boot/dts/Makefile
15 @@ -917,6 +917,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
16 sun8i-a83t-bananapi-m3.dtb \
17 sun8i-a83t-cubietruck-plus.dtb \
18 sun8i-h2-plus-orangepi-zero.dtb \
19 + sun8i-h2-plus-orangepi-r1.dtb \
20 sun8i-h3-bananapi-m2-plus.dtb \
21 sun8i-h3-beelink-x2.dtb \
22 sun8i-h3-nanopi-m1.dtb \
24 +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-r1.dts
27 + * Copyright (C) 2017 Hauke Mehrtens <hauke@hauke-m.de>
29 + * Based on sun8i-h2-plus-orangepi-zero.dts, which is:
30 + * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
32 + * Based on sun8i-h3-orangepi-one.dts, which is:
33 + * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
35 + * This file is dual-licensed: you can use it either under the terms
36 + * of the GPL or the X11 license, at your option. Note that this dual
37 + * licensing only applies to this file, and not this project as a
40 + * a) This file is free software; you can redistribute it and/or
41 + * modify it under the terms of the GNU General Public License as
42 + * published by the Free Software Foundation; either version 2 of the
43 + * License, or (at your option) any later version.
45 + * This file is distributed in the hope that it will be useful,
46 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
47 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 + * GNU General Public License for more details.
50 + * Or, alternatively,
52 + * b) Permission is hereby granted, free of charge, to any person
53 + * obtaining a copy of this software and associated documentation
54 + * files (the "Software"), to deal in the Software without
55 + * restriction, including without limitation the rights to use,
56 + * copy, modify, merge, publish, distribute, sublicense, and/or
57 + * sell copies of the Software, and to permit persons to whom the
58 + * Software is furnished to do so, subject to the following
61 + * The above copyright notice and this permission notice shall be
62 + * included in all copies or substantial portions of the Software.
64 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
65 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
66 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
67 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
68 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
69 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
70 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
71 + * OTHER DEALINGS IN THE SOFTWARE.
75 +#include "sun8i-h3.dtsi"
76 +#include "sunxi-common-regulators.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 = "Xunlong Orange Pi R1";
84 + compatible = "xunlong,orangepi-r1", "allwinner,sun8i-h2-plus";
88 + /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
94 + stdout-path = "serial0:115200n8";
98 + compatible = "gpio-leds";
101 + label = "orangepi:green:pwr";
102 + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
103 + default-state = "on";
107 + label = "orangepi:red:status";
108 + gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>;
112 + reg_vcc_wifi: reg_vcc_wifi {
113 + compatible = "regulator-fixed";
114 + regulator-min-microvolt = <3300000>;
115 + regulator-max-microvolt = <3300000>;
116 + regulator-name = "vcc-wifi";
117 + enable-active-high;
118 + gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>;
121 + wifi_pwrseq: wifi_pwrseq {
122 + compatible = "mmc-pwrseq-simple";
123 + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>;
124 + post-power-on-delay-ms = <200>;
133 + phy-handle = <&int_mii_phy>;
135 + allwinner,leds-active-low;
140 + pinctrl-names = "default";
141 + pinctrl-0 = <&mmc0_pins_a>;
142 + vmmc-supply = <®_vcc3v3>;
144 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
150 + pinctrl-names = "default";
151 + pinctrl-0 = <&mmc1_pins_a>;
152 + vmmc-supply = <®_vcc_wifi>;
153 + mmc-pwrseq = <&wifi_pwrseq>;
159 + * Explicitly define the sdio device, so that we can add an ethernet
160 + * alias for it (which e.g. makes u-boot set a mac-address).
162 + xr819: sdio_wifi@1 {
176 + pinctrl-names = "default";
177 + pinctrl-0 = <&uart0_pins_a>;
182 + pinctrl-names = "default";
183 + pinctrl-0 = <&uart1_pins>;
184 + status = "disabled";
188 + pinctrl-names = "default";
189 + pinctrl-0 = <&uart2_pins>;
190 + status = "disabled";
194 + /* USB VBUS is always on */