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