Merge commit '949bdcc8a97c' into omap-for-v4.19/dt
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / am57xx-beagle-x15-common.dtsi
1 /*
2  * Copyright (C) 2014-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 /dts-v1/;
9
10 #include "dra74x.dtsi"
11 #include "am57xx-commercial-grade.dtsi"
12 #include "dra74x-mmc-iodelay.dtsi"
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/interrupt-controller/irq.h>
15
16 / {
17         compatible = "ti,am572x-beagle-x15", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";
18
19         aliases {
20                 rtc0 = &mcp_rtc;
21                 rtc1 = &tps659038_rtc;
22                 rtc2 = &rtc;
23                 display0 = &hdmi0;
24         };
25
26         chosen {
27                 stdout-path = &uart3;
28         };
29
30         memory@0 {
31                 device_type = "memory";
32                 reg = <0x0 0x80000000 0x0 0x80000000>;
33         };
34
35         vdd_3v3: fixedregulator-vdd_3v3 {
36                 compatible = "regulator-fixed";
37                 regulator-name = "vdd_3v3";
38                 vin-supply = <&regen1>;
39                 regulator-min-microvolt = <3300000>;
40                 regulator-max-microvolt = <3300000>;
41         };
42
43         aic_dvdd: fixedregulator-aic_dvdd {
44                 compatible = "regulator-fixed";
45                 regulator-name = "aic_dvdd_fixed";
46                 vin-supply = <&vdd_3v3>;
47                 regulator-min-microvolt = <1800000>;
48                 regulator-max-microvolt = <1800000>;
49         };
50
51         vtt_fixed: fixedregulator-vtt {
52                 /* TPS51200 */
53                 compatible = "regulator-fixed";
54                 regulator-name = "vtt_fixed";
55                 vin-supply = <&smps3_reg>;
56                 regulator-min-microvolt = <3300000>;
57                 regulator-max-microvolt = <3300000>;
58                 regulator-always-on;
59                 regulator-boot-on;
60                 enable-active-high;
61                 gpio = <&gpio7 11 GPIO_ACTIVE_HIGH>;
62         };
63
64         leds {
65                 compatible = "gpio-leds";
66
67                 led0 {
68                         label = "beagle-x15:usr0";
69                         gpios = <&gpio7 9 GPIO_ACTIVE_HIGH>;
70                         linux,default-trigger = "heartbeat";
71                         default-state = "off";
72                 };
73
74                 led1 {
75                         label = "beagle-x15:usr1";
76                         gpios = <&gpio7 8 GPIO_ACTIVE_HIGH>;
77                         linux,default-trigger = "cpu0";
78                         default-state = "off";
79                 };
80
81                 led2 {
82                         label = "beagle-x15:usr2";
83                         gpios = <&gpio7 14 GPIO_ACTIVE_HIGH>;
84                         linux,default-trigger = "mmc0";
85                         default-state = "off";
86                 };
87
88                 led3 {
89                         label = "beagle-x15:usr3";
90                         gpios = <&gpio7 15 GPIO_ACTIVE_HIGH>;
91                         linux,default-trigger = "disk-activity";
92                         default-state = "off";
93                 };
94         };
95
96         gpio_fan: gpio_fan {
97                 /* Based on 5v 500mA AFB02505HHB */
98                 compatible = "gpio-fan";
99                 gpios =  <&tps659038_gpio 2 GPIO_ACTIVE_HIGH>;
100                 gpio-fan,speed-map = <0     0>,
101                                      <13000 1>;
102                 #cooling-cells = <2>;
103         };
104
105         hdmi0: connector {
106                 compatible = "hdmi-connector";
107                 label = "hdmi";
108
109                 type = "a";
110
111                 port {
112                         hdmi_connector_in: endpoint {
113                                 remote-endpoint = <&tpd12s015_out>;
114                         };
115                 };
116         };
117
118         tpd12s015: encoder {
119                 compatible = "ti,tpd12s015";
120
121                 ports {
122                         #address-cells = <1>;
123                         #size-cells = <0>;
124
125                         port@0 {
126                                 reg = <0>;
127
128                                 tpd12s015_in: endpoint {
129                                         remote-endpoint = <&hdmi_out>;
130                                 };
131                         };
132
133                         port@1 {
134                                 reg = <1>;
135
136                                 tpd12s015_out: endpoint {
137                                         remote-endpoint = <&hdmi_connector_in>;
138                                 };
139                         };
140                 };
141         };
142
143         sound0: sound0 {
144                 compatible = "simple-audio-card";
145                 simple-audio-card,name = "BeagleBoard-X15";
146                 simple-audio-card,widgets =
147                         "Line", "Line Out",
148                         "Line", "Line In";
149                 simple-audio-card,routing =
150                         "Line Out",     "LLOUT",
151                         "Line Out",     "RLOUT",
152                         "MIC2L",        "Line In",
153                         "MIC2R",        "Line In";
154                 simple-audio-card,format = "dsp_b";
155                 simple-audio-card,bitclock-master = <&sound0_master>;
156                 simple-audio-card,frame-master = <&sound0_master>;
157                 simple-audio-card,bitclock-inversion;
158
159                 simple-audio-card,cpu {
160                         sound-dai = <&mcasp3>;
161                 };
162
163                 sound0_master: simple-audio-card,codec {
164                         sound-dai = <&tlv320aic3104>;
165                         clocks = <&clkout2_clk>;
166                 };
167         };
168 };
169
170 &i2c1 {
171         status = "okay";
172         clock-frequency = <400000>;
173
174         tps659038: tps659038@58 {
175                 compatible = "ti,tps659038";
176                 reg = <0x58>;
177                 interrupt-parent = <&gpio1>;
178                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
179
180                 #interrupt-cells = <2>;
181                 interrupt-controller;
182
183                 ti,system-power-controller;
184                 ti,palmas-override-powerhold;
185
186                 tps659038_pmic {
187                         compatible = "ti,tps659038-pmic";
188
189                         regulators {
190                                 smps12_reg: smps12 {
191                                         /* VDD_MPU */
192                                         regulator-name = "smps12";
193                                         regulator-min-microvolt = < 850000>;
194                                         regulator-max-microvolt = <1250000>;
195                                         regulator-always-on;
196                                         regulator-boot-on;
197                                 };
198
199                                 smps3_reg: smps3 {
200                                         /* VDD_DDR */
201                                         regulator-name = "smps3";
202                                         regulator-min-microvolt = <1350000>;
203                                         regulator-max-microvolt = <1350000>;
204                                         regulator-always-on;
205                                         regulator-boot-on;
206                                 };
207
208                                 smps45_reg: smps45 {
209                                         /* VDD_DSPEVE, VDD_IVA, VDD_GPU */
210                                         regulator-name = "smps45";
211                                         regulator-min-microvolt = < 850000>;
212                                         regulator-max-microvolt = <1250000>;
213                                         regulator-always-on;
214                                         regulator-boot-on;
215                                 };
216
217                                 smps6_reg: smps6 {
218                                         /* VDD_CORE */
219                                         regulator-name = "smps6";
220                                         regulator-min-microvolt = <850000>;
221                                         regulator-max-microvolt = <1150000>;
222                                         regulator-always-on;
223                                         regulator-boot-on;
224                                 };
225
226                                 /* SMPS7 unused */
227
228                                 smps8_reg: smps8 {
229                                         /* VDD_1V8 */
230                                         regulator-name = "smps8";
231                                         regulator-min-microvolt = <1800000>;
232                                         regulator-max-microvolt = <1800000>;
233                                         regulator-always-on;
234                                         regulator-boot-on;
235                                 };
236
237                                 /* SMPS9 unused */
238
239                                 ldo1_reg: ldo1 {
240                                         /* VDD_SD / VDDSHV8  */
241                                         regulator-name = "ldo1";
242                                         regulator-min-microvolt = <1800000>;
243                                         regulator-max-microvolt = <3300000>;
244                                         regulator-boot-on;
245                                         regulator-always-on;
246                                 };
247
248                                 ldo2_reg: ldo2 {
249                                         /* VDD_SHV5 */
250                                         regulator-name = "ldo2";
251                                         regulator-min-microvolt = <3300000>;
252                                         regulator-max-microvolt = <3300000>;
253                                         regulator-always-on;
254                                         regulator-boot-on;
255                                 };
256
257                                 ldo3_reg: ldo3 {
258                                         /* VDDA_1V8_PHYA */
259                                         regulator-name = "ldo3";
260                                         regulator-min-microvolt = <1800000>;
261                                         regulator-max-microvolt = <1800000>;
262                                         regulator-always-on;
263                                         regulator-boot-on;
264                                 };
265
266                                 ldo4_reg: ldo4 {
267                                         /* VDDA_1V8_PHYB */
268                                         regulator-name = "ldo4";
269                                         regulator-min-microvolt = <1800000>;
270                                         regulator-max-microvolt = <1800000>;
271                                         regulator-always-on;
272                                         regulator-boot-on;
273                                 };
274
275                                 ldo9_reg: ldo9 {
276                                         /* VDD_RTC */
277                                         regulator-name = "ldo9";
278                                         regulator-min-microvolt = <1050000>;
279                                         regulator-max-microvolt = <1050000>;
280                                         regulator-always-on;
281                                         regulator-boot-on;
282                                 };
283
284                                 ldoln_reg: ldoln {
285                                         /* VDDA_1V8_PLL */
286                                         regulator-name = "ldoln";
287                                         regulator-min-microvolt = <1800000>;
288                                         regulator-max-microvolt = <1800000>;
289                                         regulator-always-on;
290                                         regulator-boot-on;
291                                 };
292
293                                 ldousb_reg: ldousb {
294                                         /* VDDA_3V_USB: VDDA_USBHS33 */
295                                         regulator-name = "ldousb";
296                                         regulator-min-microvolt = <3300000>;
297                                         regulator-max-microvolt = <3300000>;
298                                         regulator-boot-on;
299                                 };
300
301                                 regen1: regen1 {
302                                         /* VDD_3V3_ON */
303                                         regulator-name = "regen1";
304                                         regulator-boot-on;
305                                         regulator-always-on;
306                                 };
307                         };
308                 };
309
310                 tps659038_rtc: tps659038_rtc {
311                         compatible = "ti,palmas-rtc";
312                         interrupt-parent = <&tps659038>;
313                         interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
314                         wakeup-source;
315                 };
316
317                 tps659038_pwr_button: tps659038_pwr_button {
318                         compatible = "ti,palmas-pwrbutton";
319                         interrupt-parent = <&tps659038>;
320                         interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
321                         wakeup-source;
322                         ti,palmas-long-press-seconds = <12>;
323                 };
324
325                 tps659038_gpio: tps659038_gpio {
326                         compatible = "ti,palmas-gpio";
327                         gpio-controller;
328                         #gpio-cells = <2>;
329                 };
330
331                 extcon_usb2: tps659038_usb {
332                         compatible = "ti,palmas-usb-vid";
333                         ti,enable-vbus-detection;
334                         vbus-gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
335                 };
336
337         };
338
339         tmp102: tmp102@48 {
340                 compatible = "ti,tmp102";
341                 reg = <0x48>;
342                 interrupt-parent = <&gpio7>;
343                 interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
344                 #thermal-sensor-cells = <1>;
345         };
346
347         tlv320aic3104: tlv320aic3104@18 {
348                 #sound-dai-cells = <0>;
349                 compatible = "ti,tlv320aic3104";
350                 reg = <0x18>;
351                 assigned-clocks = <&clkoutmux2_clk_mux>;
352                 assigned-clock-parents = <&sys_clk2_dclk_div>;
353
354                 status = "okay";
355                 adc-settle-ms = <40>;
356
357                 AVDD-supply = <&vdd_3v3>;
358                 IOVDD-supply = <&vdd_3v3>;
359                 DRVDD-supply = <&vdd_3v3>;
360                 DVDD-supply = <&aic_dvdd>;
361         };
362
363         eeprom: eeprom@50 {
364                 compatible = "atmel,24c32";
365                 reg = <0x50>;
366         };
367 };
368
369 &i2c3 {
370         status = "okay";
371         clock-frequency = <400000>;
372
373         mcp_rtc: rtc@6f {
374                 compatible = "microchip,mcp7941x";
375                 reg = <0x6f>;
376                 interrupts-extended = <&crossbar_mpu GIC_SPI 2 IRQ_TYPE_EDGE_RISING>,
377                                       <&dra7_pmx_core 0x424>;
378                 interrupt-names = "irq", "wakeup";
379
380                 vcc-supply = <&vdd_3v3>;
381                 wakeup-source;
382         };
383 };
384
385 &gpio7 {
386         ti,no-reset-on-init;
387         ti,no-idle-on-init;
388 };
389
390 &cpu0 {
391         vdd-supply = <&smps12_reg>;
392         voltage-tolerance = <1>;
393 };
394
395 &uart3 {
396         status = "okay";
397         interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
398                               <&dra7_pmx_core 0x3f8>;
399 };
400
401 &davinci_mdio {
402         phy0: ethernet-phy@1 {
403                 reg = <1>;
404         };
405
406         phy1: ethernet-phy@2 {
407                 reg = <2>;
408         };
409 };
410
411 &mac {
412         status = "okay";
413         dual_emac;
414 };
415
416 &cpsw_emac0 {
417         phy-handle = <&phy0>;
418         phy-mode = "rgmii";
419         dual_emac_res_vlan = <1>;
420 };
421
422 &cpsw_emac1 {
423         phy-handle = <&phy1>;
424         phy-mode = "rgmii";
425         dual_emac_res_vlan = <2>;
426 };
427
428 &mmc1 {
429         status = "okay";
430
431         pinctrl-names = "default";
432         pinctrl-0 = <&mmc1_pins_default>;
433
434         bus-width = <4>;
435         cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
436 };
437
438 &mmc2 {
439         status = "okay";
440
441         pinctrl-names = "default";
442         pinctrl-0 = <&mmc2_pins_default>;
443
444         vmmc-supply = <&vdd_3v3>;
445         vqmmc-supply = <&vdd_3v3>;
446         bus-width = <8>;
447         non-removable;
448         no-1-8-v;
449 };
450
451 &sata {
452         status = "okay";
453 };
454
455 &usb2_phy1 {
456         phy-supply = <&ldousb_reg>;
457 };
458
459 &usb2_phy2 {
460         phy-supply = <&ldousb_reg>;
461 };
462
463 &usb1 {
464         dr_mode = "host";
465 };
466
467 &omap_dwc3_2 {
468         extcon = <&extcon_usb2>;
469 };
470
471 &usb2 {
472         /*
473          * Stand alone usage is peripheral only.
474          * However, with some resistor modifications
475          * this port can be used via expansion connectors
476          * as "host" or "dual-role". If so, provide
477          * the necessary dr_mode override in the expansion
478          * board's DT.
479          */
480         dr_mode = "peripheral";
481 };
482
483 &cpu_trips {
484         cpu_alert1: cpu_alert1 {
485                 temperature = <50000>; /* millicelsius */
486                 hysteresis = <2000>; /* millicelsius */
487                 type = "active";
488         };
489 };
490
491 &cpu_cooling_maps {
492         map1 {
493                 trip = <&cpu_alert1>;
494                 cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
495         };
496 };
497
498 &thermal_zones {
499         board_thermal: board_thermal {
500                 polling-delay-passive = <1250>; /* milliseconds */
501                 polling-delay = <1500>; /* milliseconds */
502
503                                 /* sensor       ID */
504                 thermal-sensors = <&tmp102     0>;
505
506                 board_trips: trips {
507                         board_alert0: board_alert {
508                                 temperature = <40000>; /* millicelsius */
509                                 hysteresis = <2000>; /* millicelsius */
510                                 type = "active";
511                         };
512
513                         board_crit: board_crit {
514                                 temperature = <105000>; /* millicelsius */
515                                 hysteresis = <0>; /* millicelsius */
516                                 type = "critical";
517                         };
518                 };
519
520                 board_cooling_maps: cooling-maps {
521                         map0 {
522                                 trip = <&board_alert0>;
523                                 cooling-device =
524                                   <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
525                         };
526                 };
527        };
528 };
529
530 &dss {
531         status = "ok";
532
533         vdda_video-supply = <&ldoln_reg>;
534 };
535
536 &hdmi {
537         status = "ok";
538         vdda-supply = <&ldo4_reg>;
539
540         port {
541                 hdmi_out: endpoint {
542                         remote-endpoint = <&tpd12s015_in>;
543                 };
544         };
545 };
546
547 &pcie1_rc {
548         status = "ok";
549         gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
550 };
551
552 &pcie1_ep {
553         gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
554 };
555
556 &mcasp3 {
557         #sound-dai-cells = <0>;
558         assigned-clocks = <&l4per_clkctrl DRA7_MCASP3_CLKCTRL 24>;
559         assigned-clock-parents = <&sys_clkin2>;
560         status = "okay";
561
562         op-mode = <0>;  /* MCASP_IIS_MODE */
563         tdm-slots = <2>;
564         /* 4 serializers */
565         serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
566                 1 2 0 0
567         >;
568         tx-num-evt = <32>;
569         rx-num-evt = <32>;
570 };
571
572 &mailbox5 {
573         status = "okay";
574         mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
575                 status = "okay";
576         };
577         mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
578                 status = "okay";
579         };
580 };
581
582 &mailbox6 {
583         status = "okay";
584         mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
585                 status = "okay";
586         };
587         mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
588                 status = "okay";
589         };
590 };