Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / am335x-icev2.dts
1 /*
2  * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8
9 /*
10  * AM335x ICE V2 board
11  * http://www.ti.com/tool/tmdsice3359
12  */
13
14 /dts-v1/;
15
16 #include "am33xx.dtsi"
17
18 / {
19         model = "TI AM3359 ICE-V2";
20         compatible = "ti,am3359-icev2", "ti,am33xx";
21
22         memory@80000000 {
23                 device_type = "memory";
24                 reg = <0x80000000 0x10000000>; /* 256 MB */
25         };
26
27         chosen {
28                 stdout-path = &uart3;
29         };
30
31         vbat: fixedregulator0 {
32                 compatible = "regulator-fixed";
33                 regulator-name = "vbat";
34                 regulator-min-microvolt = <5000000>;
35                 regulator-max-microvolt = <5000000>;
36                 regulator-boot-on;
37         };
38
39         vtt_fixed: fixedregulator1 {
40                 compatible = "regulator-fixed";
41                 regulator-name = "vtt";
42                 regulator-min-microvolt = <1500000>;
43                 regulator-max-microvolt = <1500000>;
44                 gpio = <&gpio0 18 GPIO_ACTIVE_HIGH>;
45                 regulator-always-on;
46                 regulator-boot-on;
47                 enable-active-high;
48         };
49
50         leds-iio {
51                 status = "disabled";
52                 compatible = "gpio-leds";
53                 led-out0 {
54                         label = "out0";
55                         gpios = <&tpic2810 0 GPIO_ACTIVE_HIGH>;
56                         default-state = "off";
57                 };
58
59                 led-out1 {
60                         label = "out1";
61                         gpios = <&tpic2810 1 GPIO_ACTIVE_HIGH>;
62                         default-state = "off";
63                 };
64
65                 led-out2 {
66                         label = "out2";
67                         gpios = <&tpic2810 2 GPIO_ACTIVE_HIGH>;
68                         default-state = "off";
69                 };
70
71                 led-out3 {
72                         label = "out3";
73                         gpios = <&tpic2810 3 GPIO_ACTIVE_HIGH>;
74                         default-state = "off";
75                 };
76
77                 led-out4 {
78                         label = "out4";
79                         gpios = <&tpic2810 4 GPIO_ACTIVE_HIGH>;
80                         default-state = "off";
81                 };
82
83                 led-out5 {
84                         label = "out5";
85                         gpios = <&tpic2810 5 GPIO_ACTIVE_HIGH>;
86                         default-state = "off";
87                 };
88
89                 led-out6 {
90                         label = "out6";
91                         gpios = <&tpic2810 6 GPIO_ACTIVE_HIGH>;
92                         default-state = "off";
93                 };
94
95                 led-out7 {
96                         label = "out7";
97                         gpios = <&tpic2810 7 GPIO_ACTIVE_HIGH>;
98                         default-state = "off";
99                 };
100         };
101
102         /* Tricolor status LEDs */
103         leds1 {
104                 compatible = "gpio-leds";
105                 pinctrl-names = "default";
106                 pinctrl-0 = <&user_leds>;
107
108                 led0 {
109                         label = "status0:red:cpu0";
110                         gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
111                         default-state = "off";
112                         linux,default-trigger = "cpu0";
113                 };
114
115                 led1 {
116                         label = "status0:green:usr";
117                         gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
118                         default-state = "off";
119                 };
120
121                 led2 {
122                         label = "status0:yellow:usr";
123                         gpios = <&gpio3 9 GPIO_ACTIVE_HIGH>;
124                         default-state = "off";
125                 };
126
127                 led3 {
128                         label = "status1:red:mmc0";
129                         gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
130                         default-state = "off";
131                         linux,default-trigger = "mmc0";
132                 };
133
134                 led4 {
135                         label = "status1:green:usr";
136                         gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
137                         default-state = "off";
138                 };
139
140                 led5 {
141                         label = "status1:yellow:usr";
142                         gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
143                         default-state = "off";
144                 };
145         };
146         gpio-decoder {
147                 compatible = "gpio-decoder";
148                 gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
149                         <&pca9536 2 GPIO_ACTIVE_HIGH>,
150                         <&pca9536 1 GPIO_ACTIVE_HIGH>,
151                         <&pca9536 0 GPIO_ACTIVE_HIGH>;
152                 linux,axis = <0>; /* ABS_X */
153                 decoder-max-value = <9>;
154         };
155 };
156
157 &am33xx_pinmux {
158         user_leds: user_leds {
159                 pinctrl-single,pins = <
160                         AM33XX_IOPAD(0x91c, PIN_OUTPUT | MUX_MODE7) /* (J18) gmii1_txd3.gpio0[16] */
161                         AM33XX_IOPAD(0x920, PIN_OUTPUT | MUX_MODE7) /* (K15) gmii1_txd2.gpio0[17] */
162                         AM33XX_IOPAD(0x9b0, PIN_OUTPUT | MUX_MODE7) /* (A15) xdma_event_intr0.gpio0[19] */
163                         AM33XX_IOPAD(0x9b4, PIN_OUTPUT | MUX_MODE7) /* (D14) xdma_event_intr1.gpio0[20] */
164                         AM33XX_IOPAD(0x880, PIN_OUTPUT | MUX_MODE7) /* (U9) gpmc_csn1.gpio1[30] */
165                         AM33XX_IOPAD(0x92c, PIN_OUTPUT | MUX_MODE7) /* (K18) gmii1_txclk.gpio3[9] */
166                 >;
167         };
168
169         mmc0_pins_default: mmc0_pins_default {
170                 pinctrl-single,pins = <
171                         AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* (F17) mmc0_dat3.mmc0_dat3 */
172                         AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* (F18) mmc0_dat2.mmc0_dat2 */
173                         AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* (G15) mmc0_dat1.mmc0_dat1 */
174                         AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* (G16) mmc0_dat0.mmc0_dat0 */
175                         AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* (G17) mmc0_clk.mmc0_clk */
176                         AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* (G18) mmc0_cmd.mmc0_cmd */
177                 >;
178         };
179
180         i2c0_pins_default: i2c0_pins_default {
181                 pinctrl-single,pins = <
182                         AM33XX_IOPAD(0x988, PIN_INPUT | MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */
183                         AM33XX_IOPAD(0x98c, PIN_INPUT | MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */
184                 >;
185         };
186
187         spi0_pins_default: spi0_pins_default {
188                 pinctrl-single,pins = <
189                         AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* (A17) spi0_sclk.spi0_sclk */
190                         AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* (B17) spi0_d0.spi0_d0 */
191                         AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0) /* (B16) spi0_d1.spi0_d1 */
192                         AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0) /* (A16) spi0_cs0.spi0_cs0 */
193                         AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE0) /* (C15) spi0_cs1.spi0_cs1 */
194                         AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7) /* (B12) mcasp0_aclkr.gpio3[18] */
195                 >;
196         };
197
198         uart3_pins_default: uart3_pins_default {
199                 pinctrl-single,pins = <
200                         AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1) /* (L17) gmii1_rxd3.uart3_rxd */
201                         AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLUP | MUX_MODE1) /* (L16) gmii1_rxd2.uart3_txd */
202                 >;
203         };
204 };
205
206 &i2c0 {
207         pinctrl-names = "default";
208         pinctrl-0 = <&i2c0_pins_default>;
209
210         status = "okay";
211         clock-frequency = <400000>;
212
213         tps: power-controller@2d {
214                 reg = <0x2d>;
215         };
216
217         tpic2810: gpio@60 {
218                 compatible = "ti,tpic2810";
219                 reg = <0x60>;
220                 gpio-controller;
221                 #gpio-cells = <2>;
222         };
223
224         pca9536: gpio@41 {
225                 compatible = "ti,pca9536";
226                 reg = <0x41>;
227                 gpio-controller;
228                 #gpio-cells = <2>;
229         };
230 };
231
232 &spi0 {
233         status = "okay";
234         pinctrl-names = "default";
235         pinctrl-0 = <&spi0_pins_default>;
236
237         sn65hvs882@1 {
238                 compatible = "pisosr-gpio";
239                 gpio-controller;
240                 #gpio-cells = <2>;
241
242                 load-gpios = <&gpio3 18 GPIO_ACTIVE_LOW>;
243
244                 reg = <1>;
245                 spi-max-frequency = <1000000>;
246                 spi-cpol;
247         };
248 };
249
250 &tscadc {
251         status = "okay";
252         adc {
253                 ti,adc-channels = <1 2 3 4 5 6 7>;
254         };
255 };
256
257 #include "tps65910.dtsi"
258
259 &tps {
260         vcc1-supply = <&vbat>;
261         vcc2-supply = <&vbat>;
262         vcc3-supply = <&vbat>;
263         vcc4-supply = <&vbat>;
264         vcc5-supply = <&vbat>;
265         vcc6-supply = <&vbat>;
266         vcc7-supply = <&vbat>;
267         vccio-supply = <&vbat>;
268
269         regulators {
270                 vrtc_reg: regulator@0 {
271                         regulator-always-on;
272                 };
273
274                 vio_reg: regulator@1 {
275                         regulator-always-on;
276                 };
277
278                 vdd1_reg: regulator@2 {
279                         regulator-name = "vdd_mpu";
280                         regulator-min-microvolt = <912500>;
281                         regulator-max-microvolt = <1326000>;
282                         regulator-boot-on;
283                         regulator-always-on;
284                 };
285
286                 vdd2_reg: regulator@3 {
287                         regulator-name = "vdd_core";
288                         regulator-min-microvolt = <912500>;
289                         regulator-max-microvolt = <1144000>;
290                         regulator-boot-on;
291                         regulator-always-on;
292                 };
293
294                 vdd3_reg: regulator@4 {
295                         regulator-always-on;
296                 };
297
298                 vdig1_reg: regulator@5 {
299                         regulator-always-on;
300                 };
301
302                 vdig2_reg: regulator@6 {
303                         regulator-always-on;
304                 };
305
306                 vpll_reg: regulator@7 {
307                         regulator-always-on;
308                 };
309
310                 vdac_reg: regulator@8 {
311                         regulator-always-on;
312                 };
313
314                 vaux1_reg: regulator@9 {
315                         regulator-always-on;
316                 };
317
318                 vaux2_reg: regulator@10 {
319                         regulator-always-on;
320                 };
321
322                 vaux33_reg: regulator@11 {
323                         regulator-always-on;
324                 };
325
326                 vmmc_reg: regulator@12 {
327                         regulator-min-microvolt = <1800000>;
328                         regulator-max-microvolt = <3300000>;
329                         regulator-always-on;
330                 };
331         };
332 };
333
334 &mmc1 {
335         status = "okay";
336         vmmc-supply = <&vmmc_reg>;
337         bus-width = <4>;
338         pinctrl-names = "default";
339         pinctrl-0 = <&mmc0_pins_default>;
340 };
341
342 &gpio0 {
343         /* Do not idle the GPIO used for holding the VTT regulator */
344         ti,no-reset-on-init;
345         ti,no-idle-on-init;
346 };
347
348 &uart3 {
349         pinctrl-names = "default";
350         pinctrl-0 = <&uart3_pins_default>;
351         status = "okay";
352 };