Merge remote-tracking branch 'iommu/next'
[deliverable/linux.git] / arch / arm / boot / dts / ntc-gr8-evb.dts
1 /*
2 * Copyright 2016 Free Electrons
3 * Copyright 2016 NextThing Co
4 *
5 * Mylène Josserand <mylene.josserand@free-electrons.com>
6 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
12 * a) This file is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
16 *
17 * This file is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * Or, alternatively,
23 *
24 * b) Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use,
28 * copy, modify, merge, publish, distribute, sublicense, and/or
29 * sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
31 * conditions:
32 *
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
44 */
45
46 /dts-v1/;
47 #include "ntc-gr8.dtsi"
48 #include "sunxi-common-regulators.dtsi"
49
50 #include <dt-bindings/gpio/gpio.h>
51 #include <dt-bindings/input/input.h>
52 #include <dt-bindings/interrupt-controller/irq.h>
53
54 / {
55 model = "NextThing GR8-EVB";
56 compatible = "nextthing,gr8-evb", "nextthing,gr8";
57
58 aliases {
59 i2c0 = &i2c0;
60 i2c1 = &i2c1;
61 i2c2 = &i2c2;
62 serial0 = &uart1;
63 serial1 = &uart2;
64 };
65
66 chosen {
67 stdout-path = "serial0:115200n8";
68 };
69
70 backlight: backlight {
71 compatible = "pwm-backlight";
72 pwms = <&pwm 0 10000 0>;
73 enable-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>;
74
75 brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
76 default-brightness-level = <8>;
77 };
78 };
79
80 &be0 {
81 status = "okay";
82 };
83
84 &codec {
85 status = "okay";
86 };
87
88 &ehci0 {
89 status = "okay";
90 };
91
92 &i2c0 {
93 pinctrl-names = "default";
94 pinctrl-0 = <&i2c0_pins_a>;
95 status = "okay";
96
97 axp209: pmic@34 {
98 reg = <0x34>;
99
100 /*
101 * The interrupt is routed through the "External Fast
102 * Interrupt Request" pin (ball G13 of the module)
103 * directly to the main interrupt controller, without
104 * any other controller interfering.
105 */
106 interrupts = <0>;
107 };
108 };
109
110 #include "axp209.dtsi"
111
112 &i2c1 {
113 pinctrl-names = "default";
114 pinctrl-0 = <&i2c1_pins_a>;
115 status = "okay";
116
117 wm8978: codec@1a {
118 #sound-dai-cells = <0>;
119 compatible = "wlf,wm8978";
120 reg = <0x1a>;
121 };
122
123 pcf8563: rtc@51 {
124 compatible = "phg,pcf8563";
125 reg = <0x51>;
126 };
127 };
128
129 &i2c2 {
130 pinctrl-names = "default";
131 pinctrl-0 = <&i2c2_pins_a>;
132 status = "okay";
133 };
134
135 &i2s0 {
136 pinctrl-names = "default";
137 pinctrl-0 = <&i2s0_mclk_pins_a>, <&i2s0_data_pins_a>;
138 status = "okay";
139 };
140
141 &ir0 {
142 pinctrl-names = "default";
143 pinctrl-0 = <&ir0_rx_pins_a>;
144 status = "okay";
145 };
146
147 &lradc {
148 vref-supply = <&reg_ldo2>;
149 status = "okay";
150
151 button@190 {
152 label = "Volume Up";
153 linux,code = <KEY_VOLUMEUP>;
154 channel = <0>;
155 voltage = <190000>;
156 };
157
158 button@390 {
159 label = "Volume Down";
160 linux,code = <KEY_VOLUMEDOWN>;
161 channel = <0>;
162 voltage = <390000>;
163 };
164
165 button@600 {
166 label = "Menu";
167 linux,code = <KEY_MENU>;
168 channel = <0>;
169 voltage = <600000>;
170 };
171
172 button@800 {
173 label = "Search";
174 linux,code = <KEY_SEARCH>;
175 channel = <0>;
176 voltage = <800000>;
177 };
178
179 button@980 {
180 label = "Home";
181 linux,code = <KEY_HOMEPAGE>;
182 channel = <0>;
183 voltage = <980000>;
184 };
185
186 button@1180 {
187 label = "Esc";
188 linux,code = <KEY_ESC>;
189 channel = <0>;
190 voltage = <1180000>;
191 };
192
193 button@1400 {
194 label = "Enter";
195 linux,code = <KEY_ENTER>;
196 channel = <0>;
197 voltage = <1400000>;
198 };
199 };
200
201 &mmc0 {
202 pinctrl-names = "default";
203 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gr8_evb>;
204 vmmc-supply = <&reg_vcc3v3>;
205 bus-width = <4>;
206 cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
207 cd-inverted;
208 status = "okay";
209 };
210
211 &nfc {
212 pinctrl-names = "default";
213 pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>;
214
215 /* MLC Support sucks for now */
216 status = "disabled";
217 };
218
219 &ohci0 {
220 status = "okay";
221 };
222
223 &otg_sram {
224 status = "okay";
225 };
226
227 &pio {
228 mmc0_cd_pin_gr8_evb: mmc0-cd-pin@0 {
229 allwinner,pins = "PG0";
230 allwinner,function = "gpio_in";
231 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
232 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
233 };
234
235 usb0_id_pin_gr8_evb: usb0-id-pin@0 {
236 allwinner,pins = "PG2";
237 allwinner,function = "gpio_in";
238 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
239 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
240 };
241
242 usb0_vbus_det_pin_gr8_evb: usb0-vbus-det-pin@0 {
243 allwinner,pins = "PG1";
244 allwinner,function = "gpio_in";
245 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
246 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
247 };
248
249 usb1_vbus_pin_gr8_evb: usb1-vbus-pin@0 {
250 allwinner,pins = "PG13";
251 allwinner,function = "gpio_out";
252 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
253 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
254 };
255 };
256
257 &pwm {
258 pinctrl-names = "default";
259 pinctrl-0 = <&pwm0_pins_a>;
260 status = "okay";
261 };
262
263 &reg_dcdc2 {
264 regulator-min-microvolt = <1000000>;
265 regulator-max-microvolt = <1400000>;
266 regulator-name = "vdd-cpu";
267 regulator-always-on;
268 };
269
270 &reg_dcdc3 {
271 regulator-min-microvolt = <1000000>;
272 regulator-max-microvolt = <1300000>;
273 regulator-name = "vdd-sys";
274 regulator-always-on;
275 };
276
277 &reg_ldo1 {
278 regulator-name = "vdd-rtc";
279 };
280
281 &reg_ldo2 {
282 regulator-min-microvolt = <2700000>;
283 regulator-max-microvolt = <3300000>;
284 regulator-name = "avcc";
285 regulator-always-on;
286 };
287
288 &reg_usb1_vbus {
289 pinctrl-0 = <&usb1_vbus_pin_gr8_evb>;
290 gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
291 status = "okay";
292 };
293
294 &rtp {
295 allwinner,ts-attached;
296 };
297
298 &spdif {
299 pinctrl-names = "default";
300 pinctrl-0 = <&spdif_tx_pins_a>;
301 status = "okay";
302 };
303
304 &tve0 {
305 status = "okay";
306 };
307
308 &uart1 {
309 pinctrl-names = "default";
310 pinctrl-0 = <&uart1_pins_a>, <&uart1_cts_rts_pins_a>;
311 status = "okay";
312 };
313
314 &usb_otg {
315 /*
316 * The GR8-EVB has a somewhat interesting design. There's a
317 * pin supposed to control VBUS, an ID pin, a VBUS detect pin,
318 * so everything should work just fine.
319 *
320 * Except that the pin supposed to control VBUS is not
321 * connected to any controllable output, neither to the SoC
322 * through a GPIO or to the PMIC, and it is pulled down,
323 * meaning that we will never be able to enable VBUS on this
324 * board.
325 */
326 dr_mode = "otg";
327 status = "okay";
328 };
329
330 &usb_power_supply {
331 status = "okay";
332 };
333
334 &usbphy {
335 pinctrl-names = "default";
336 pinctrl-0 = <&usb0_id_pin_gr8_evb>, <&usb0_vbus_det_pin_gr8_evb>;
337 usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
338 usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
339 usb0_vbus_power-supply = <&usb_power_supply>;
340 usb1_vbus-supply = <&reg_usb1_vbus>;
341 status = "okay";
342 };
This page took 0.038957 seconds and 5 git commands to generate.