GNU Linux-libre 4.19.264-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         vdd-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         no-1-8-v;
458 };
459
460 &mmc2 {
461         status = "okay";
462
463         pinctrl-names = "default";
464         pinctrl-0 = <&mmc2_pins_default>;
465
466         vmmc-supply = <&vdd_3v3>;
467         vqmmc-supply = <&vdd_3v3>;
468         bus-width = <8>;
469         non-removable;
470         no-1-8-v;
471 };
472
473 &sata {
474         status = "okay";
475 };
476
477 &usb2_phy1 {
478         phy-supply = <&ldousb_reg>;
479 };
480
481 &usb2_phy2 {
482         phy-supply = <&ldousb_reg>;
483 };
484
485 &usb1 {
486         dr_mode = "host";
487 };
488
489 &omap_dwc3_2 {
490         extcon = <&extcon_usb2>;
491 };
492
493 &usb2 {
494         /*
495          * Stand alone usage is peripheral only.
496          * However, with some resistor modifications
497          * this port can be used via expansion connectors
498          * as "host" or "dual-role". If so, provide
499          * the necessary dr_mode override in the expansion
500          * board's DT.
501          */
502         dr_mode = "peripheral";
503 };
504
505 &cpu_trips {
506         cpu_alert1: cpu_alert1 {
507                 temperature = <50000>; /* millicelsius */
508                 hysteresis = <2000>; /* millicelsius */
509                 type = "active";
510         };
511 };
512
513 &cpu_cooling_maps {
514         map1 {
515                 trip = <&cpu_alert1>;
516                 cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
517         };
518 };
519
520 &thermal_zones {
521         board_thermal: board_thermal {
522                 polling-delay-passive = <1250>; /* milliseconds */
523                 polling-delay = <1500>; /* milliseconds */
524
525                                 /* sensor       ID */
526                 thermal-sensors = <&tmp102     0>;
527
528                 board_trips: trips {
529                         board_alert0: board_alert {
530                                 temperature = <40000>; /* millicelsius */
531                                 hysteresis = <2000>; /* millicelsius */
532                                 type = "active";
533                         };
534
535                         board_crit: board_crit {
536                                 temperature = <105000>; /* millicelsius */
537                                 hysteresis = <0>; /* millicelsius */
538                                 type = "critical";
539                         };
540                 };
541
542                 board_cooling_maps: cooling-maps {
543                         map0 {
544                                 trip = <&board_alert0>;
545                                 cooling-device =
546                                   <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
547                         };
548                 };
549        };
550 };
551
552 &dss {
553         status = "ok";
554
555         vdda_video-supply = <&ldoln_reg>;
556 };
557
558 &hdmi {
559         status = "ok";
560         vdda-supply = <&ldo4_reg>;
561
562         port {
563                 hdmi_out: endpoint {
564                         remote-endpoint = <&tpd12s015_in>;
565                 };
566         };
567 };
568
569 &pcie1_rc {
570         status = "ok";
571         gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
572 };
573
574 &mcasp3 {
575         #sound-dai-cells = <0>;
576         assigned-clocks = <&l4per_clkctrl DRA7_MCASP3_CLKCTRL 24>;
577         assigned-clock-parents = <&sys_clkin2>;
578         status = "okay";
579
580         op-mode = <0>;  /* MCASP_IIS_MODE */
581         tdm-slots = <2>;
582         /* 4 serializers */
583         serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
584                 1 2 0 0
585         >;
586         tx-num-evt = <32>;
587         rx-num-evt = <32>;
588 };
589
590 &mailbox5 {
591         status = "okay";
592         mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
593                 status = "okay";
594         };
595         mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
596                 status = "okay";
597         };
598 };
599
600 &mailbox6 {
601         status = "okay";
602         mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
603                 status = "okay";
604         };
605         mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
606                 status = "okay";
607         };
608 };