Merge tag 'batadv-next-for-davem-20190213' of git://git.open-mesh.org/linux-merge
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sun5i-a13-olinuxino.dts
1 /*
2  * Copyright 2012 Maxime Ripard
3  *
4  * Maxime Ripard <maxime.ripard@free-electrons.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  *
11  *  a) This file is free software; you can redistribute it and/or
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  *
16  *     This file is distributed in the hope that it will be useful,
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  * Or, alternatively,
22  *
23  *  b) Permission is hereby granted, free of charge, to any person
24  *     obtaining a copy of this software and associated documentation
25  *     files (the "Software"), to deal in the Software without
26  *     restriction, including without limitation the rights to use,
27  *     copy, modify, merge, publish, distribute, sublicense, and/or
28  *     sell copies of the Software, and to permit persons to whom the
29  *     Software is furnished to do so, subject to the following
30  *     conditions:
31  *
32  *     The above copyright notice and this permission notice shall be
33  *     included in all copies or substantial portions of the Software.
34  *
35  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42  *     OTHER DEALINGS IN THE SOFTWARE.
43  */
44
45 /dts-v1/;
46 #include "sun5i-a13.dtsi"
47 #include "sunxi-common-regulators.dtsi"
48
49 #include <dt-bindings/gpio/gpio.h>
50 #include <dt-bindings/input/input.h>
51
52 / {
53         model = "Olimex A13-Olinuxino";
54         compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
55
56         aliases {
57                 serial0 = &uart1;
58         };
59
60         chosen {
61                 stdout-path = "serial0:115200n8";
62         };
63
64         leds {
65                 compatible = "gpio-leds";
66                 pinctrl-names = "default";
67                 pinctrl-0 = <&led_pins_olinuxino>;
68
69                 power {
70                         gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>;
71                         default-state = "on";
72                 };
73         };
74
75         bridge {
76                 compatible = "dumb-vga-dac";
77                 #address-cells = <1>;
78                 #size-cells = <0>;
79
80                 ports {
81                         #address-cells = <1>;
82                         #size-cells = <0>;
83
84                         port@0 {
85                                 reg = <0>;
86
87                                 vga_bridge_in: endpoint {
88                                         remote-endpoint = <&tcon0_out_vga>;
89                                 };
90                         };
91
92                         port@1 {
93                                 reg = <1>;
94
95                                 vga_bridge_out: endpoint {
96                                         remote-endpoint = <&vga_con_in>;
97                                 };
98                         };
99                 };
100         };
101
102         vga {
103                 compatible = "vga-connector";
104
105                 port {
106                         vga_con_in: endpoint {
107                                 remote-endpoint = <&vga_bridge_out>;
108                         };
109                 };
110         };
111 };
112
113 &be0 {
114         status = "okay";
115 };
116
117 &codec {
118         status = "okay";
119 };
120
121 &ehci0 {
122         status = "okay";
123 };
124
125 &i2c0 {
126         status = "okay";
127
128         axp209: pmic@34 {
129                 compatible = "x-powers,axp209";
130                 reg = <0x34>;
131                 interrupts = <0>;
132
133                 interrupt-controller;
134                 #interrupt-cells = <1>;
135         };
136 };
137
138 &i2c1 {
139         status = "okay";
140 };
141
142 &i2c2 {
143         status = "okay";
144 };
145
146 &lradc {
147         vref-supply = <&reg_vcc3v0>;
148         status = "okay";
149
150         button-191 {
151                 label = "Volume Up";
152                 linux,code = <KEY_VOLUMEUP>;
153                 channel = <0>;
154                 voltage = <191274>;
155         };
156
157         button-392 {
158                 label = "Volume Down";
159                 linux,code = <KEY_VOLUMEDOWN>;
160                 channel = <0>;
161                 voltage = <392644>;
162         };
163
164         button-601 {
165                 label = "Menu";
166                 linux,code = <KEY_MENU>;
167                 channel = <0>;
168                 voltage = <601151>;
169         };
170
171         button-795 {
172                 label = "Enter";
173                 linux,code = <KEY_ENTER>;
174                 channel = <0>;
175                 voltage = <795090>;
176         };
177
178         button-987 {
179                 label = "Home";
180                 linux,code = <KEY_HOMEPAGE>;
181                 channel = <0>;
182                 voltage = <987387>;
183         };
184 };
185
186 &mmc0 {
187         vmmc-supply = <&reg_vcc3v3>;
188         bus-width = <4>;
189         cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
190         status = "okay";
191 };
192
193 &ohci0 {
194         status = "okay";
195 };
196
197 &otg_sram {
198         status = "okay";
199 };
200
201 &pio {
202         led_pins_olinuxino: led-pin {
203                 pins = "PG9";
204                 function = "gpio_out";
205                 drive-strength = <20>;
206         };
207
208         usb0_id_detect_pin: usb0-id-detect-pin {
209                 pins = "PG2";
210                 function = "gpio_in";
211                 bias-pull-up;
212         };
213
214         usb0_vbus_detect_pin: usb0-vbus-detect-pin {
215                 pins = "PG1";
216                 function = "gpio_in";
217                 bias-pull-down;
218         };
219 };
220
221 &reg_usb0_vbus {
222         status = "okay";
223         gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
224 };
225
226 &reg_usb1_vbus {
227         gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
228         status = "okay";
229 };
230
231 &tcon0 {
232         pinctrl-names = "default";
233         pinctrl-0 = <&lcd_rgb666_pins>;
234         status = "okay";
235 };
236
237 &tcon0_out {
238         tcon0_out_vga: endpoint@0 {
239                 reg = <0>;
240                 remote-endpoint = <&vga_bridge_in>;
241         };
242 };
243
244 &uart1 {
245         pinctrl-names = "default";
246         pinctrl-0 = <&uart1_pg_pins>;
247         status = "okay";
248 };
249
250 &usb_otg {
251         dr_mode = "otg";
252         status = "okay";
253 };
254
255 &usbphy {
256         pinctrl-names = "default";
257         pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
258         usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
259         usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
260         usb0_vbus-supply = <&reg_usb0_vbus>;
261         usb1_vbus-supply = <&reg_usb1_vbus>;
262         status = "okay";
263 };