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