ARM: sun7i: bananapi: Convert to DT label based syntax
[deliverable/linux.git] / arch / arm / boot / dts / sun7i-a20-bananapi.dts
CommitLineData
8a5b272f
HG
1/*
2 * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
3 *
4 * Hans de Goede <hdegoede@redhat.com>
5 *
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
10 *
136d18a8 11 * a) This file is free software; you can redistribute it and/or
8a5b272f
HG
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
136d18a8 16 * This file is distributed in the hope that it will be useful,
8a5b272f
HG
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
136d18a8 22 * License along with this file; if not, write to the Free
8a5b272f
HG
23 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
24 * MA 02110-1301 USA
25 *
26 * Or, alternatively,
27 *
28 * b) Permission is hereby granted, free of charge, to any person
29 * obtaining a copy of this software and associated documentation
30 * files (the "Software"), to deal in the Software without
31 * restriction, including without limitation the rights to use,
32 * copy, modify, merge, publish, distribute, sublicense, and/or
33 * sell copies of the Software, and to permit persons to whom the
34 * Software is furnished to do so, subject to the following
35 * conditions:
36 *
37 * The above copyright notice and this permission notice shall be
38 * included in all copies or substantial portions of the Software.
39 *
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE.
48 */
49
50/dts-v1/;
71455701
MR
51#include "sun7i-a20.dtsi"
52#include "sunxi-common-regulators.dtsi"
8a5b272f 53
bca12924 54#include <dt-bindings/gpio/gpio.h>
a6bac9eb 55#include <dt-bindings/interrupt-controller/irq.h>
092a0c3b 56#include <dt-bindings/pinctrl/sun4i-a10.h>
8a5b272f
HG
57
58/ {
59 model = "LeMaker Banana Pi";
60 compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
61
117a2cc3
MR
62 aliases {
63 serial0 = &uart0;
64 serial1 = &uart3;
65 serial2 = &uart7;
66 };
67
d540b7cc
MR
68 leds {
69 compatible = "gpio-leds";
70 pinctrl-names = "default";
71 pinctrl-0 = <&led_pins_bananapi>;
8a5b272f 72
d540b7cc
MR
73 green {
74 label = "bananapi:green:usr";
75 gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
8a5b272f 76 };
d540b7cc 77 };
8a5b272f 78
d540b7cc
MR
79 reg_gmac_3v3: gmac-3v3 {
80 compatible = "regulator-fixed";
81 pinctrl-names = "default";
82 pinctrl-0 = <&gmac_power_pin_bananapi>;
83 regulator-name = "gmac-3v3";
84 regulator-min-microvolt = <3300000>;
85 regulator-max-microvolt = <3300000>;
86 startup-delay-us = <100000>;
87 enable-active-high;
88 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
89 };
90};
8a5b272f 91
d540b7cc
MR
92&ahci {
93 status = "okay";
94};
8a5b272f 95
d540b7cc
MR
96&ehci0 {
97 status = "okay";
98};
8a5b272f 99
d540b7cc
MR
100&ehci1 {
101 status = "okay";
102};
8a5b272f 103
d540b7cc
MR
104&gmac {
105 pinctrl-names = "default";
106 pinctrl-0 = <&gmac_pins_rgmii_a>;
107 phy = <&phy1>;
108 phy-mode = "rgmii";
109 phy-supply = <&reg_gmac_3v3>;
110 status = "okay";
8a5b272f 111
d540b7cc
MR
112 phy1: ethernet-phy@1 {
113 reg = <1>;
114 };
115};
8a5b272f 116
d540b7cc
MR
117&i2c0 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&i2c0_pins_a>;
120 status = "okay";
8a5b272f 121
d540b7cc
MR
122 axp209: pmic@34 {
123 compatible = "x-powers,axp209";
124 reg = <0x34>;
125 interrupt-parent = <&nmi_intc>;
126 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
8a5b272f 127
d540b7cc
MR
128 interrupt-controller;
129 #interrupt-cells = <1>;
130 };
131};
8a5b272f 132
d540b7cc
MR
133&i2c2 {
134 pinctrl-names = "default";
135 pinctrl-0 = <&i2c2_pins_a>;
136 status = "okay";
137};
8a5b272f 138
d540b7cc
MR
139&ir0 {
140 pinctrl-names = "default";
141 pinctrl-0 = <&ir0_pins_a>;
142 status = "okay";
143};
8a5b272f 144
d540b7cc
MR
145&mmc0 {
146 pinctrl-names = "default";
147 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
148 vmmc-supply = <&reg_vcc3v3>;
149 bus-width = <4>;
150 cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
151 cd-inverted;
152 status = "okay";
153};
8a5b272f 154
d540b7cc
MR
155&ohci0 {
156 status = "okay";
157};
8a5b272f 158
d540b7cc
MR
159&ohci1 {
160 status = "okay";
161};
8a5b272f 162
d540b7cc
MR
163&pio {
164 mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
165 allwinner,pins = "PH10";
166 allwinner,function = "gpio_in";
167 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
168 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
8a5b272f
HG
169 };
170
d540b7cc
MR
171 gmac_power_pin_bananapi: gmac_power_pin@0 {
172 allwinner,pins = "PH23";
173 allwinner,function = "gpio_out";
174 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
175 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
8a5b272f
HG
176 };
177
d540b7cc
MR
178 led_pins_bananapi: led_pins@0 {
179 allwinner,pins = "PH24";
180 allwinner,function = "gpio_out";
181 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
182 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
8a5b272f 183 };
d540b7cc 184};
8a5b272f 185
d540b7cc
MR
186&reg_usb1_vbus {
187 status = "okay";
188};
8a5b272f 189
d540b7cc
MR
190&reg_usb2_vbus {
191 status = "okay";
192};
193
194&spi0 {
195 pinctrl-names = "default";
196 pinctrl-0 = <&spi0_pins_a>;
197 status = "okay";
198};
199
200&uart0 {
201 pinctrl-names = "default";
202 pinctrl-0 = <&uart0_pins_a>;
203 status = "okay";
204};
205
206&uart3 {
207 pinctrl-names = "default";
208 pinctrl-0 = <&uart3_pins_b>;
209 status = "okay";
210};
211
212&uart7 {
213 pinctrl-names = "default";
214 pinctrl-0 = <&uart7_pins_a>;
215 status = "okay";
216};
217
218&usbphy {
219 usb1_vbus-supply = <&reg_usb1_vbus>;
220 usb2_vbus-supply = <&reg_usb2_vbus>;
221 status = "okay";
8a5b272f 222};
This page took 0.070985 seconds and 5 git commands to generate.