Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sun7i-a20-bananapro.dts
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  * Or, alternatively,
20  *
21  *  b) Permission is hereby granted, free of charge, to any person
22  *     obtaining a copy of this software and associated documentation
23  *     files (the "Software"), to deal in the Software without
24  *     restriction, including without limitation the rights to use,
25  *     copy, modify, merge, publish, distribute, sublicense, and/or
26  *     sell copies of the Software, and to permit persons to whom the
27  *     Software is furnished to do so, subject to the following
28  *     conditions:
29  *
30  *     The above copyright notice and this permission notice shall be
31  *     included in all copies or substantial portions of the Software.
32  *
33  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40  *     OTHER DEALINGS IN THE SOFTWARE.
41  */
42
43 /dts-v1/;
44 #include "sun7i-a20.dtsi"
45 #include "sunxi-common-regulators.dtsi"
46 #include <dt-bindings/gpio/gpio.h>
47 #include <dt-bindings/interrupt-controller/arm-gic.h>
48
49 / {
50         model = "LeMaker Banana Pro";
51         compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
52
53         aliases {
54                 serial0 = &uart0;
55                 serial1 = &uart4;
56                 serial2 = &uart7;
57         };
58
59         chosen {
60                 stdout-path = "serial0:115200n8";
61         };
62
63         leds {
64                 compatible = "gpio-leds";
65
66                 blue {
67                         label = "bananapro:blue:usr";
68                         gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>;
69                 };
70
71                 green {
72                         label = "bananapro:green:usr";
73                         gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
74                 };
75         };
76
77         wifi_pwrseq: wifi-pwrseq {
78                 compatible = "mmc-pwrseq-simple";
79                 reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>;
80         };
81
82         reg_gmac_3v3: gmac-3v3 {
83                 compatible = "regulator-fixed";
84                 regulator-name = "gmac-3v3";
85                 regulator-min-microvolt = <3300000>;
86                 regulator-max-microvolt = <3300000>;
87                 startup-delay-us = <100000>;
88                 enable-active-high;
89                 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
90         };
91 };
92
93 &ahci {
94         status = "okay";
95 };
96
97 &codec {
98         status = "okay";
99 };
100
101 &ehci0 {
102         status = "okay";
103 };
104
105 &ehci1 {
106         status = "okay";
107 };
108
109 &gmac {
110         pinctrl-names = "default";
111         pinctrl-0 = <&gmac_rgmii_pins>;
112         phy-handle = <&phy1>;
113         phy-mode = "rgmii";
114         phy-supply = <&reg_gmac_3v3>;
115         status = "okay";
116 };
117
118 &i2c0 {
119         status = "okay";
120
121         axp209: pmic@34 {
122                 compatible = "x-powers,axp209";
123                 reg = <0x34>;
124                 interrupt-parent = <&nmi_intc>;
125                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
126
127                 interrupt-controller;
128                 #interrupt-cells = <1>;
129         };
130 };
131
132 &i2c2 {
133         status = "okay";
134 };
135
136 &ir0 {
137         pinctrl-names = "default";
138         pinctrl-0 = <&ir0_rx_pin>;
139         status = "okay";
140 };
141
142 &gmac_mdio {
143         phy1: ethernet-phy@1 {
144                 reg = <1>;
145         };
146 };
147
148 &mmc0 {
149         vmmc-supply = <&reg_vcc3v3>;
150         bus-width = <4>;
151         cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
152         status = "okay";
153 };
154
155 &mmc3 {
156         vmmc-supply = <&reg_vcc3v3>;
157         mmc-pwrseq = <&wifi_pwrseq>;
158         bus-width = <4>;
159         non-removable;
160         status = "okay";
161
162         brcmf: wifi@1 {
163                 reg = <1>;
164                 compatible = "brcm,bcm4329-fmac";
165                 interrupt-parent = <&pio>;
166                 interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
167                 interrupt-names = "host-wake";
168         };
169 };
170
171 &ohci0 {
172         status = "okay";
173 };
174
175 &ohci1 {
176         status = "okay";
177 };
178
179 &reg_usb1_vbus {
180         gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
181         status = "okay";
182 };
183
184 &reg_usb2_vbus {
185         gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
186         status = "okay";
187 };
188
189 &spi0 {
190         pinctrl-names = "default";
191         pinctrl-0 = <&spi0_pi_pins>,
192                     <&spi0_cs0_pi_pin>,
193                     <&spi0_cs1_pi_pin>;
194         status = "okay";
195 };
196
197 &uart0 {
198         pinctrl-names = "default";
199         pinctrl-0 = <&uart0_pb_pins>;
200         status = "okay";
201 };
202
203 &uart4 {
204         pinctrl-names = "default";
205         pinctrl-0 = <&uart4_ph_pins>;
206         status = "okay";
207 };
208
209 &uart7 {
210         pinctrl-names = "default";
211         pinctrl-0 = <&uart7_pi_pins>;
212         status = "okay";
213 };
214
215 &usbphy {
216         usb1_vbus-supply = <&reg_usb1_vbus>;
217         usb2_vbus-supply = <&reg_usb2_vbus>;
218         status = "okay";
219 };