Merge tag 'platform-drivers-x86-v4.11-2' of git://git.infradead.org/linux-platform...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / am57xx-idk-common.dtsi
1 /*
2  * Copyright (C) 2015-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 #include "am57xx-industrial-grade.dtsi"
10
11 / {
12         aliases {
13                 rtc0 = &tps659038_rtc;
14                 rtc1 = &rtc;
15         };
16
17         chosen {
18                 stdout-path = &uart3;
19         };
20
21         vmain: fixedregulator-vmain {
22                 compatible = "regulator-fixed";
23                 regulator-name = "VMAIN";
24                 regulator-min-microvolt = <5000000>;
25                 regulator-max-microvolt = <5000000>;
26                 regulator-always-on;
27                 regulator-boot-on;
28         };
29
30         v3_3d: fixedregulator-v3_3d {
31                 compatible = "regulator-fixed";
32                 regulator-name = "V3_3D";
33                 vin-supply = <&smps9_reg>;
34                 regulator-min-microvolt = <3300000>;
35                 regulator-max-microvolt = <3300000>;
36                 regulator-always-on;
37                 regulator-boot-on;
38         };
39
40         vtt_fixed: fixedregulator-vtt {
41                 /* TPS51200 */
42                 compatible = "regulator-fixed";
43                 regulator-name = "vtt_fixed";
44                 vin-supply = <&v3_3d>;
45                 regulator-min-microvolt = <3300000>;
46                 regulator-max-microvolt = <3300000>;
47                 regulator-always-on;
48                 regulator-boot-on;
49         };
50
51         leds-iio {
52                 status = "disabled";
53                 compatible = "gpio-leds";
54                 led-out0 {
55                         label = "out0";
56                         gpios = <&tpic2810 0 GPIO_ACTIVE_HIGH>;
57                         default-state = "off";
58                 };
59
60                 led-out1 {
61                         label = "out1";
62                         gpios = <&tpic2810 1 GPIO_ACTIVE_HIGH>;
63                         default-state = "off";
64                 };
65
66                 led-out2 {
67                         label = "out2";
68                         gpios = <&tpic2810 2 GPIO_ACTIVE_HIGH>;
69                         default-state = "off";
70                 };
71
72                 led-out3 {
73                         label = "out3";
74                         gpios = <&tpic2810 3 GPIO_ACTIVE_HIGH>;
75                         default-state = "off";
76                 };
77
78                 led-out4 {
79                         label = "out4";
80                         gpios = <&tpic2810 4 GPIO_ACTIVE_HIGH>;
81                         default-state = "off";
82                 };
83
84                 led-out5 {
85                         label = "out5";
86                         gpios = <&tpic2810 5 GPIO_ACTIVE_HIGH>;
87                         default-state = "off";
88                 };
89
90                 led-out6 {
91                         label = "out6";
92                         gpios = <&tpic2810 6 GPIO_ACTIVE_HIGH>;
93                         default-state = "off";
94                 };
95
96                 led-out7 {
97                         label = "out7";
98                         gpios = <&tpic2810 7 GPIO_ACTIVE_HIGH>;
99                         default-state = "off";
100                 };
101         };
102 };
103
104 &i2c1 {
105         status = "okay";
106         clock-frequency = <400000>;
107
108         tps659038: tps659038@58 {
109                 compatible = "ti,tps659038";
110                 reg = <0x58>;
111                 interrupts-extended = <&gpio6 16 IRQ_TYPE_LEVEL_HIGH
112                                &dra7_pmx_core 0x418>;
113                 #interrupt-cells = <2>;
114                 interrupt-controller;
115                 ti,system-power-controller;
116                 ti,palmas-override-powerhold;
117
118                 tps659038_pmic {
119                         compatible = "ti,tps659038-pmic";
120
121                         smps12-in-supply = <&vmain>;
122                         smps3-in-supply = <&vmain>;
123                         smps45-in-supply = <&vmain>;
124                         smps6-in-supply = <&vmain>;
125                         smps7-in-supply = <&vmain>;
126                         smps8-in-supply = <&vmain>;
127                         smps9-in-supply = <&vmain>;
128                         ldo1-in-supply = <&vmain>;
129                         ldo2-in-supply = <&vmain>;
130                         ldo3-in-supply = <&vmain>;
131                         ldo4-in-supply = <&vmain>;
132                         ldo9-in-supply = <&vmain>;
133                         ldoln-in-supply = <&vmain>;
134                         ldousb-in-supply = <&vmain>;
135                         ldortc-in-supply = <&vmain>;
136
137                         regulators {
138                                 smps12_reg: smps12 {
139                                         /* VDD_MPU */
140                                         regulator-name = "smps12";
141                                         regulator-min-microvolt = <850000>;
142                                         regulator-max-microvolt = <1250000>;
143                                         regulator-always-on;
144                                         regulator-boot-on;
145                                 };
146
147                                 smps3_reg: smps3 {
148                                         /* VDD_DDR EMIF1 EMIF2 */
149                                         regulator-name = "smps3";
150                                         regulator-min-microvolt = <1350000>;
151                                         regulator-max-microvolt = <1350000>;
152                                         regulator-always-on;
153                                         regulator-boot-on;
154                                 };
155
156                                 smps45_reg: smps45 {
157                                         /* VDD_DSPEVE on AM572 */
158                                         /* VDD_IVA + VDD_DSP on AM571 */
159                                         regulator-name = "smps45";
160                                         regulator-min-microvolt = <850000>;
161                                         regulator-max-microvolt = <1250000>;
162                                         regulator-always-on;
163                                         regulator-boot-on;
164                                 };
165
166                                 smps6_reg: smps6 {
167                                         /* VDD_GPU */
168                                         regulator-name = "smps6";
169                                         regulator-min-microvolt = <850000>;
170                                         regulator-max-microvolt = <1250000>;
171                                         regulator-always-on;
172                                         regulator-boot-on;
173                                 };
174
175                                 smps7_reg: smps7 {
176                                         /* VDD_CORE */
177                                         regulator-name = "smps7";
178                                         regulator-min-microvolt = <850000>;
179                                         regulator-max-microvolt = <1150000>;
180                                         regulator-always-on;
181                                         regulator-boot-on;
182                                 };
183
184                                 smps8_reg: smps8 {
185                                         /* 5728 - VDD_IVAHD */
186                                         /* 5718 - N.C. test point */
187                                         regulator-name = "smps8";
188                                 };
189
190                                 smps9_reg: smps9 {
191                                         /* VDD_3_3D */
192                                         regulator-name = "smps9";
193                                         regulator-min-microvolt = <3300000>;
194                                         regulator-max-microvolt = <3300000>;
195                                         regulator-always-on;
196                                         regulator-boot-on;
197                                 };
198
199                                 ldo1_reg: ldo1 {
200                                         /* VDDSHV8 - VSDMMC  */
201                                         /* NOTE: on rev 1.3a, data supply */
202                                         regulator-name = "ldo1";
203                                         regulator-min-microvolt = <1800000>;
204                                         regulator-max-microvolt = <3300000>;
205                                         regulator-boot-on;
206                                         regulator-always-on;
207                                 };
208
209                                 ldo2_reg: ldo2 {
210                                         /* VDDSH18V */
211                                         regulator-name = "ldo2";
212                                         regulator-min-microvolt = <1800000>;
213                                         regulator-max-microvolt = <1800000>;
214                                         regulator-always-on;
215                                         regulator-boot-on;
216                                 };
217
218                                 ldo3_reg: ldo3 {
219                                         /* R1.3a 572x V1_8PHY_LDO3: USB, SATA */
220                                         regulator-name = "ldo3";
221                                         regulator-min-microvolt = <1800000>;
222                                         regulator-max-microvolt = <1800000>;
223                                         regulator-always-on;
224                                         regulator-boot-on;
225                                 };
226
227                                 ldo4_reg: ldo4 {
228                                         /* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/
229                                         regulator-name = "ldo4";
230                                         regulator-min-microvolt = <1800000>;
231                                         regulator-max-microvolt = <1800000>;
232                                         regulator-always-on;
233                                         regulator-boot-on;
234                                 };
235
236                                 /* LDO5-8 unused */
237
238                                 ldo9_reg: ldo9 {
239                                         /* VDD_RTC  */
240                                         regulator-name = "ldo9";
241                                         regulator-min-microvolt = <840000>;
242                                         regulator-max-microvolt = <1160000>;
243                                         regulator-always-on;
244                                         regulator-boot-on;
245                                 };
246
247                                 ldoln_reg: ldoln {
248                                         /* VDDA_1V8_PLL */
249                                         regulator-name = "ldoln";
250                                         regulator-min-microvolt = <1800000>;
251                                         regulator-max-microvolt = <1800000>;
252                                         regulator-always-on;
253                                         regulator-boot-on;
254                                 };
255
256                                 ldousb_reg: ldousb {
257                                         /* VDDA_3V_USB: VDDA_USBHS33 */
258                                         regulator-name = "ldousb";
259                                         regulator-min-microvolt = <3300000>;
260                                         regulator-max-microvolt = <3300000>;
261                                         regulator-always-on;
262                                         regulator-boot-on;
263                                 };
264
265                                 ldortc_reg: ldortc {
266                                         /* VDDA_RTC  */
267                                         regulator-name = "ldortc";
268                                         regulator-min-microvolt = <1800000>;
269                                         regulator-max-microvolt = <1800000>;
270                                         regulator-always-on;
271                                         regulator-boot-on;
272                                 };
273
274                                 regen1: regen1 {
275                                         /* VDD_3V3_ON */
276                                         regulator-name = "regen1";
277                                         regulator-boot-on;
278                                         regulator-always-on;
279                                 };
280
281                                 regen2: regen2 {
282                                         /* Needed for PMIC internal resource */
283                                         regulator-name = "regen2";
284                                         regulator-boot-on;
285                                         regulator-always-on;
286                                 };
287                         };
288                 };
289
290                 tps659038_rtc: tps659038_rtc {
291                         compatible = "ti,palmas-rtc";
292                         interrupt-parent = <&tps659038>;
293                         interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
294                         wakeup-source;
295                 };
296
297                 tps659038_pwr_button: tps659038_pwr_button {
298                         compatible = "ti,palmas-pwrbutton";
299                         interrupt-parent = <&tps659038>;
300                         interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
301                         wakeup-source;
302                         ti,palmas-long-press-seconds = <12>;
303                 };
304
305                 tps659038_gpio: tps659038_gpio {
306                         compatible = "ti,palmas-gpio";
307                         gpio-controller;
308                         #gpio-cells = <2>;
309                 };
310
311                 extcon_usb2: tps659038_usb {
312                         compatible = "ti,palmas-usb-vid";
313                         ti,enable-vbus-detection;
314                         ti,enable-id-detection;
315                         /* ID & VBUS GPIOs provided in board dts */
316                 };
317         };
318 };
319
320 &mcspi3 {
321         status = "okay";
322         ti,pindir-d0-out-d1-in;
323
324         sn65hvs882: sn65hvs882@0 {
325                 compatible = "pisosr-gpio";
326                 gpio-controller;
327                 #gpio-cells = <2>;
328
329                 reg = <0>;
330                 spi-max-frequency = <1000000>;
331                 spi-cpol;
332         };
333
334         tpic2810: tpic2810@60 {
335                 compatible = "ti,tpic2810";
336                 reg = <0x60>;
337                 gpio-controller;
338                 #gpio-cells = <2>;
339         };
340 };
341
342 &uart3 {
343         status = "okay";
344         interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH
345                                &dra7_pmx_core 0x248>;
346 };
347
348 &rtc {
349         status = "okay";
350         ext-clk-src;
351 };
352
353 &mac {
354         status = "okay";
355         dual_emac;
356 };
357
358 &cpsw_emac0 {
359         phy_id = <&davinci_mdio>, <0>;
360         phy-mode = "rgmii";
361         dual_emac_res_vlan = <1>;
362 };
363
364 &cpsw_emac1 {
365         phy_id = <&davinci_mdio>, <1>;
366         phy-mode = "rgmii";
367         dual_emac_res_vlan = <2>;
368 };
369
370 &usb2_phy1 {
371         phy-supply = <&ldousb_reg>;
372 };
373
374 &usb2_phy2 {
375         phy-supply = <&ldousb_reg>;
376 };
377
378 &usb1 {
379         dr_mode = "host";
380 };
381
382 &usb2 {
383         dr_mode = "peripheral";
384 };
385
386 &mmc2 {
387         status = "okay";
388         vmmc-supply = <&v3_3d>;
389         bus-width = <8>;
390         ti,non-removable;
391         max-frequency = <96000000>;
392 };
393
394 &qspi {
395         status = "okay";
396
397         spi-max-frequency = <76800000>;
398         m25p80@0 {
399                 compatible = "s25fl256s1", "jedec,spi-nor";
400                 spi-max-frequency = <76800000>;
401                 reg = <0>;
402                 spi-tx-bus-width = <1>;
403                 spi-rx-bus-width = <4>;
404                 #address-cells = <1>;
405                 #size-cells = <1>;
406
407                 /* MTD partition table.
408                  * The ROM checks the first four physical blocks
409                  * for a valid file to boot and the flash here is
410                  * 64KiB block size.
411                  */
412                 partition@0 {
413                         label = "QSPI.SPL";
414                         reg = <0x00000000 0x000040000>;
415                 };
416                 partition@1 {
417                         label = "QSPI.u-boot";
418                         reg = <0x00040000 0x00100000>;
419                 };
420                 partition@2 {
421                         label = "QSPI.u-boot-spl-os";
422                         reg = <0x00140000 0x00080000>;
423                 };
424                 partition@3 {
425                         label = "QSPI.u-boot-env";
426                         reg = <0x001c0000 0x00010000>;
427                 };
428                 partition@4 {
429                         label = "QSPI.u-boot-env.backup1";
430                         reg = <0x001d0000 0x0010000>;
431                 };
432                 partition@5 {
433                         label = "QSPI.kernel";
434                         reg = <0x001e0000 0x0800000>;
435                 };
436                 partition@6 {
437                         label = "QSPI.file-system";
438                         reg = <0x009e0000 0x01620000>;
439                 };
440         };
441 };