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