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