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 --- a/arch/arm/boot/dts/Makefile
22 +++ b/arch/arm/boot/dts/Makefile
23 @@ -638,6 +638,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
24 sun7i-a20-cubietruck.dtb \
25 sun7i-a20-hummingbird.dtb \
26 sun7i-a20-i12-tvbox.dtb \
27 + sun7i-a20-lamobo-r1.dtb \
29 sun7i-a20-mk808c.dtb \
30 sun7i-a20-olimex-som-evb.dtb \
32 +++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
35 + * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
37 + * This file is dual-licensed: you can use it either under the terms
38 + * of the GPL or the X11 license, at your option. Note that this dual
39 + * licensing only applies to this file, and not this project as a
42 + * a) This file is free software; you can redistribute it and/or
43 + * modify it under the terms of the GNU General Public License as
44 + * published by the Free Software Foundation; either version 2 of the
45 + * License, or (at your option) any later version.
47 + * This file is distributed in the hope that it will be useful,
48 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
49 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 + * GNU General Public License for more details.
52 + * Or, alternatively,
54 + * b) Permission is hereby granted, free of charge, to any person
55 + * obtaining a copy of this software and associated documentation
56 + * files (the "Software"), to deal in the Software without
57 + * restriction, including without limitation the rights to use,
58 + * copy, modify, merge, publish, distribute, sublicense, and/or
59 + * sell copies of the Software, and to permit persons to whom the
60 + * Software is furnished to do so, subject to the following
63 + * The above copyright notice and this permission notice shall be
64 + * included in all copies or substantial portions of the Software.
66 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
67 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
68 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
69 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
70 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
71 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
72 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
73 + * OTHER DEALINGS IN THE SOFTWARE.
77 +#include "sun7i-a20.dtsi"
78 +#include "sunxi-common-regulators.dtsi"
80 +#include <dt-bindings/gpio/gpio.h>
81 +#include <dt-bindings/interrupt-controller/irq.h>
82 +#include <dt-bindings/pinctrl/sun4i-a10.h>
85 + model = "Lamobo R1";
86 + compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
95 + stdout-path = "serial0:115200n8";
99 + compatible = "gpio-leds";
100 + pinctrl-names = "default";
101 + pinctrl-0 = <&led_pins_lamobo_r1>;
104 + label = "lamobo_r1:green:usr";
105 + gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
109 + reg_gmac_3v3: gmac-3v3 {
110 + compatible = "regulator-fixed";
111 + pinctrl-names = "default";
112 + pinctrl-0 = <&gmac_power_pin_lamobo_r1>;
113 + regulator-name = "gmac-3v3";
114 + regulator-min-microvolt = <3300000>;
115 + regulator-max-microvolt = <3300000>;
116 + startup-delay-us = <100000>;
117 + enable-active-high;
118 + gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
123 + allwinner,pins = "PB3";
127 + target-supply = <®_ahci_5v>;
132 + cpu-supply = <®_dcdc2>;
133 + operating-points = <
154 + pinctrl-names = "default";
155 + pinctrl-0 = <&gmac_pins_rgmii_a>;
157 + phy-mode = "rgmii";
158 + phy-supply = <®_gmac_3v3>;
161 + phy1: ethernet-phy@1 {
167 + pinctrl-names = "default";
168 + pinctrl-0 = <&i2c0_pins_a>;
173 + interrupt-parent = <&nmi_intc>;
174 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
179 + pinctrl-names = "default";
180 + pinctrl-0 = <&i2c2_pins_a>;
185 + pinctrl-names = "default";
186 + pinctrl-0 = <&ir0_rx_pins_a>;
191 + pinctrl-names = "default";
192 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_lamobo_r1>;
193 + vmmc-supply = <®_vcc3v3>;
195 + cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
213 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
214 + allwinner,pins = "PH4";
215 + allwinner,function = "gpio_in";
216 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
217 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
220 + mmc0_cd_pin_lamobo_r1: mmc0_cd_pin@0 {
221 + allwinner,pins = "PH10";
222 + allwinner,function = "gpio_in";
223 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
224 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
227 + gmac_power_pin_lamobo_r1: gmac_power_pin@0 {
228 + allwinner,pins = "PH23";
229 + allwinner,function = "gpio_out";
230 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
231 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
234 + led_pins_lamobo_r1: led_pins@0 {
235 + allwinner,pins = "PH24";
236 + allwinner,function = "gpio_out";
237 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
238 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
242 +#include "axp209.dtsi"
245 + gpio = <&pio 1 3 0>; /* PB3 */
250 + regulator-always-on;
251 + regulator-min-microvolt = <1000000>;
252 + regulator-max-microvolt = <1400000>;
253 + regulator-name = "vdd-cpu";
257 + regulator-always-on;
258 + regulator-min-microvolt = <1000000>;
259 + regulator-max-microvolt = <1400000>;
260 + regulator-name = "vdd-int-dll";
264 + regulator-name = "vdd-rtc";
268 + regulator-always-on;
269 + regulator-min-microvolt = <3000000>;
270 + regulator-max-microvolt = <3000000>;
271 + regulator-name = "avcc";
287 + pinctrl-names = "default";
288 + pinctrl-0 = <&spi0_pins_a>,
289 + <&spi0_cs0_pins_a>,
290 + <&spi0_cs1_pins_a>;
295 + pinctrl-names = "default";
296 + pinctrl-0 = <&uart0_pins_a>;
301 + pinctrl-names = "default";
302 + pinctrl-0 = <&uart3_pins_b>;
307 + pinctrl-names = "default";
308 + pinctrl-0 = <&uart7_pins_a>;
322 + pinctrl-names = "default";
323 + pinctrl-0 = <&usb0_id_detect_pin>;
324 + usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
325 + usb0_vbus_power-supply = <&usb_power_supply>;
326 + usb0_vbus-supply = <®_usb0_vbus>;
327 + usb1_vbus-supply = <®_usb1_vbus>;
328 + usb2_vbus-supply = <®_usb2_vbus>;