1 From 46662c86b453d7098ff22d6112d0481f07d523a1 Mon Sep 17 00:00:00 2001
2 From: Jelle de Jong <jelledejong@powercraft.nl>
3 Date: Sun, 18 Oct 2015 16:34:39 +0200
4 Subject: [PATCH] ARM: dts: sun7i: Add dts file for the lamobo-r1 board
6 The lamobo-r1 board, sometimes called the BPI-R1 but not labelled as such
7 on the PCB, is meant as a A20 based router board. As such the board comes
8 with a built-in switch chip giving it 5 gigabit ethernet boards, and it
9 has a large empty area on the pcb with mounting holes which will fit a
10 2.5 inch harddisk. To complete its networking features it has a
11 Realtek RTL8192CU for WiFi 802.11 b/g/n.
13 Signed-off-by: Jelle de Jong <jelledejong@powercraft.nl>
14 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
16 arch/arm/boot/dts/Makefile | 1 +
17 arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 297 ++++++++++++++++++++++++++++++
18 2 files changed, 298 insertions(+)
19 create mode 100644 arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
21 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
22 index cc7309b..6f8deac 100644
23 --- a/arch/arm/boot/dts/Makefile
24 +++ b/arch/arm/boot/dts/Makefile
25 @@ -639,6 +639,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
26 sun7i-a20-cubietruck.dtb \
27 sun7i-a20-hummingbird.dtb \
28 sun7i-a20-i12-tvbox.dtb \
29 + sun7i-a20-lamobo-r1.dtb \
31 sun7i-a20-mk808c.dtb \
32 sun7i-a20-olimex-som-evb.dtb \
33 diff --git a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
35 index 0000000..975b0b2
37 +++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
40 + * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
42 + * This file is dual-licensed: you can use it either under the terms
43 + * of the GPL or the X11 license, at your option. Note that this dual
44 + * licensing only applies to this file, and not this project as a
47 + * a) This file is free software; you can redistribute it and/or
48 + * modify it under the terms of the GNU General Public License as
49 + * published by the Free Software Foundation; either version 2 of the
50 + * License, or (at your option) any later version.
52 + * This file is distributed in the hope that it will be useful,
53 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
54 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55 + * GNU General Public License for more details.
57 + * Or, alternatively,
59 + * b) Permission is hereby granted, free of charge, to any person
60 + * obtaining a copy of this software and associated documentation
61 + * files (the "Software"), to deal in the Software without
62 + * restriction, including without limitation the rights to use,
63 + * copy, modify, merge, publish, distribute, sublicense, and/or
64 + * sell copies of the Software, and to permit persons to whom the
65 + * Software is furnished to do so, subject to the following
68 + * The above copyright notice and this permission notice shall be
69 + * included in all copies or substantial portions of the Software.
71 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
72 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
73 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
74 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
75 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
76 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
77 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78 + * OTHER DEALINGS IN THE SOFTWARE.
82 +#include "sun7i-a20.dtsi"
83 +#include "sunxi-common-regulators.dtsi"
85 +#include <dt-bindings/gpio/gpio.h>
86 +#include <dt-bindings/interrupt-controller/irq.h>
87 +#include <dt-bindings/pinctrl/sun4i-a10.h>
90 + model = "Lamobo R1";
91 + compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
100 + stdout-path = "serial0:115200n8";
104 + compatible = "gpio-leds";
105 + pinctrl-names = "default";
106 + pinctrl-0 = <&led_pins_lamobo_r1>;
109 + label = "lamobo_r1:green:usr";
110 + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
114 + reg_gmac_3v3: gmac-3v3 {
115 + compatible = "regulator-fixed";
116 + pinctrl-names = "default";
117 + pinctrl-0 = <&gmac_power_pin_lamobo_r1>;
118 + regulator-name = "gmac-3v3";
119 + regulator-min-microvolt = <3300000>;
120 + regulator-max-microvolt = <3300000>;
121 + startup-delay-us = <100000>;
122 + enable-active-high;
123 + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
128 + allwinner,pins = "PB3";
132 + target-supply = <®_ahci_5v>;
137 + cpu-supply = <®_dcdc2>;
138 + operating-points = <
159 + pinctrl-names = "default";
160 + pinctrl-0 = <&gmac_pins_rgmii_a>;
162 + phy-mode = "rgmii";
163 + phy-supply = <®_gmac_3v3>;
166 + phy1: ethernet-phy@1 {
172 + pinctrl-names = "default";
173 + pinctrl-0 = <&i2c0_pins_a>;
178 + interrupt-parent = <&nmi_intc>;
179 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
184 + pinctrl-names = "default";
185 + pinctrl-0 = <&i2c2_pins_a>;
190 + pinctrl-names = "default";
191 + pinctrl-0 = <&ir0_rx_pins_a>;
196 + pinctrl-names = "default";
197 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_lamobo_r1>;
198 + vmmc-supply = <®_vcc3v3>;
200 + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
218 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
219 + allwinner,pins = "PH4";
220 + allwinner,function = "gpio_in";
221 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
222 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
225 + mmc0_cd_pin_lamobo_r1: mmc0_cd_pin@0 {
226 + allwinner,pins = "PH10";
227 + allwinner,function = "gpio_in";
228 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
229 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
232 + gmac_power_pin_lamobo_r1: gmac_power_pin@0 {
233 + allwinner,pins = "PH23";
234 + allwinner,function = "gpio_out";
235 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
236 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
239 + led_pins_lamobo_r1: led_pins@0 {
240 + allwinner,pins = "PH24";
241 + allwinner,function = "gpio_out";
242 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
243 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
247 +#include "axp209.dtsi"
250 + gpio = <&pio 1 3 0>; /* PB3 */
255 + regulator-always-on;
256 + regulator-min-microvolt = <1000000>;
257 + regulator-max-microvolt = <1400000>;
258 + regulator-name = "vdd-cpu";
262 + regulator-always-on;
263 + regulator-min-microvolt = <1000000>;
264 + regulator-max-microvolt = <1400000>;
265 + regulator-name = "vdd-int-dll";
269 + regulator-name = "vdd-rtc";
273 + regulator-always-on;
274 + regulator-min-microvolt = <3000000>;
275 + regulator-max-microvolt = <3000000>;
276 + regulator-name = "avcc";
292 + pinctrl-names = "default";
293 + pinctrl-0 = <&spi0_pins_a>,
294 + <&spi0_cs0_pins_a>,
295 + <&spi0_cs1_pins_a>;
300 + pinctrl-names = "default";
301 + pinctrl-0 = <&uart0_pins_a>;
306 + pinctrl-names = "default";
307 + pinctrl-0 = <&uart3_pins_b>;
312 + pinctrl-names = "default";
313 + pinctrl-0 = <&uart7_pins_a>;
327 + pinctrl-names = "default";
328 + pinctrl-0 = <&usb0_id_detect_pin>;
329 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
330 + usb0_vbus_power-supply = <&usb_power_supply>;
331 + usb0_vbus-supply = <®_usb0_vbus>;
332 + usb1_vbus-supply = <®_usb1_vbus>;
333 + usb2_vbus-supply = <®_usb2_vbus>;