Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / exynos5410-odroidxu.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Hardkernel Odroid XU board device tree source
4  *
5  * Copyright (c) 2013 Samsung Electronics Co., Ltd.
6  *              http://www.samsung.com
7  * Copyright (c) 2016 Krzysztof Kozlowski
8  */
9
10 /dts-v1/;
11 #include "exynos5410.dtsi"
12 #include <dt-bindings/clock/maxim,max77802.h>
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/interrupt-controller/irq.h>
15 #include <dt-bindings/sound/samsung-i2s.h>
16 #include "exynos54xx-odroidxu-leds.dtsi"
17
18 / {
19         model = "Hardkernel Odroid XU";
20         compatible = "hardkernel,odroid-xu", "samsung,exynos5410", "samsung,exynos5";
21
22         memory@40000000 {
23                 device_type = "memory";
24                 reg = <0x40000000 0x7ea00000>;
25         };
26
27         chosen {
28                 stdout-path = "serial2:115200n8";
29         };
30
31         emmc_pwrseq: pwrseq {
32                 pinctrl-0 = <&emmc_nrst_pin>;
33                 pinctrl-names = "default";
34                 compatible = "mmc-pwrseq-emmc";
35                 reset-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>;
36         };
37
38         fan0: pwm-fan {
39                 compatible = "pwm-fan";
40                 pwms = <&pwm 0 20972 0>;
41                 cooling-min-state = <0>;
42                 cooling-max-state = <3>;
43                 #cooling-cells = <2>;
44                 cooling-levels = <0 130 170 230>;
45         };
46
47         fin_pll: xxti {
48                 compatible = "fixed-clock";
49                 clock-frequency = <24000000>;
50                 clock-output-names = "fin_pll";
51                 #clock-cells = <0>;
52         };
53
54         firmware@2073000 {
55                 compatible = "samsung,secure-firmware";
56                 reg = <0x02073000 0x1000>;
57         };
58
59         sound: sound {
60                 compatible = "simple-audio-card";
61
62                 simple-audio-card,name = "Odroid-XU";
63                 simple-audio-card,widgets =
64                         "Headphone", "Headphone Jack",
65                         "Speakers", "Speakers";
66                 simple-audio-card,routing =
67                         "Headphone Jack", "HPL",
68                         "Headphone Jack", "HPR",
69                         "Headphone Jack", "MICBIAS",
70                         "IN1", "Headphone Jack",
71                         "Speakers", "SPKL",
72                         "Speakers", "SPKR";
73
74                 simple-audio-card,format = "i2s";
75                 simple-audio-card,bitclock-master = <&link0_codec>;
76                 simple-audio-card,frame-master = <&link0_codec>;
77
78                 simple-audio-card,cpu {
79                         sound-dai = <&audi2s0 0>;
80                         system-clock-frequency = <19200000>;
81                 };
82
83                 link0_codec: simple-audio-card,codec {
84                         sound-dai = <&max98090>;
85                         clocks = <&audi2s0 CLK_I2S_CDCLK>;
86                 };
87         };
88 };
89
90 &audi2s0 {
91         status = "okay";
92 };
93
94 &clock {
95         clocks = <&fin_pll>;
96         assigned-clocks = <&clock CLK_FOUT_EPLL>;
97         assigned-clock-rates = <192000000>;
98 };
99
100 &clock_audss {
101         assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
102                         <&clock_audss EXYNOS_MOUT_I2S>,
103                         <&clock_audss EXYNOS_DOUT_SRP>,
104                         <&clock_audss EXYNOS_DOUT_AUD_BUS>;
105
106         assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
107                         <&clock_audss EXYNOS_MOUT_AUDSS>;
108
109         assigned-clock-rates =  <0>,
110                                 <0>,
111                                 <96000000>,
112                                 <19200000>;
113 };
114
115 &cpu0_thermal {
116         thermal-sensors = <&tmu_cpu0 0>;
117         polling-delay-passive = <0>;
118         polling-delay = <0>;
119
120         trips {
121                 cpu_alert0: cpu-alert-0 {
122                         temperature = <50000>; /* millicelsius */
123                         hysteresis = <5000>; /* millicelsius */
124                         type = "active";
125                 };
126                 cpu_alert1: cpu-alert-1 {
127                         temperature = <60000>; /* millicelsius */
128                         hysteresis = <5000>; /* millicelsius */
129                         type = "active";
130                 };
131                 cpu_alert2: cpu-alert-2 {
132                         temperature = <70000>; /* millicelsius */
133                         hysteresis = <5000>; /* millicelsius */
134                         type = "active";
135                 };
136                 cpu_crit0: cpu-crit-0 {
137                         temperature = <120000>; /* millicelsius */
138                         hysteresis = <0>; /* millicelsius */
139                         type = "critical";
140                 };
141         };
142
143         cooling-maps {
144                 map0 {
145                         trip = <&cpu_alert0>;
146                         cooling-device = <&fan0 0 1>;
147                 };
148                 map1 {
149                         trip = <&cpu_alert1>;
150                         cooling-device = <&fan0 1 2>;
151                 };
152                 map2 {
153                         trip = <&cpu_alert2>;
154                         cooling-device = <&fan0 2 3>;
155                 };
156         };
157 };
158
159 &hsi2c_4 {
160         samsung,i2c-sda-delay = <100>;
161         samsung,i2c-max-bus-freq = <400000>;
162         status = "okay";
163
164         usb3503: usb-hub@8 {
165                 compatible = "smsc,usb3503";
166                 reg = <0x08>;
167
168                 intn-gpios = <&gpx0 7 GPIO_ACTIVE_HIGH>;
169                 connect-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>;
170                 reset-gpios = <&gpx1 4 GPIO_ACTIVE_HIGH>;
171                 initial-mode = <1>;
172
173                 clock-names = "refclk";
174                 clocks = <&pmu_system_controller 0>;
175                 refclk-frequency = <24000000>;
176         };
177
178         max77802: pmic@9 {
179                 compatible = "maxim,max77802";
180                 reg = <0x9>;
181                 interrupt-parent = <&gpx0>;
182                 interrupts = <4 IRQ_TYPE_NONE>;
183                 pinctrl-names = "default";
184                 pinctrl-0 = <&max77802_irq>, <&pmic_dvs_1>, <&pmic_dvs_2>,
185                             <&pmic_dvs_3>;
186                 #clock-cells = <1>;
187
188                 inl1-supply = <&buck5_reg>;
189                 inl2-supply = <&buck7_reg>;
190                 inl3-supply = <&buck9_reg>;
191                 inl4-supply = <&buck9_reg>;
192                 inl5-supply = <&buck9_reg>;
193                 inl6-supply = <&buck10_reg>;
194                 inl7-supply = <&buck9_reg>;
195                 /* inl9 supply is BOOST, not configured here */
196                 inl10-supply = <&buck7_reg>;
197
198                 regulators {
199                         buck1_reg: BUCK1 {
200                                 regulator-name = "vdd_mif";
201                                 regulator-min-microvolt = <800000>;
202                                 regulator-max-microvolt = <1300000>;
203                                 regulator-always-on;
204                                 regulator-boot-on;
205                         };
206
207                         buck2_reg: BUCK2 {
208                                 regulator-name = "vdd_arm";
209                                 regulator-min-microvolt = <800000>;
210                                 regulator-max-microvolt = <1500000>;
211                                 regulator-always-on;
212                                 regulator-boot-on;
213                         };
214
215                         buck3_reg: BUCK3 {
216                                 regulator-name = "vdd_int";
217                                 regulator-min-microvolt = <800000>;
218                                 regulator-max-microvolt = <1400000>;
219                                 regulator-always-on;
220                                 regulator-boot-on;
221                         };
222
223                         buck4_reg: BUCK4 {
224                                 regulator-name = "vdd_g3d";
225                                 regulator-min-microvolt = <800000>;
226                                 regulator-max-microvolt = <1400000>;
227                                 regulator-always-on;
228                                 regulator-boot-on;
229                         };
230
231                         buck5_reg: BUCK5 {
232                                 regulator-name = "vdd_mem";
233                                 regulator-min-microvolt = <800000>;
234                                 regulator-max-microvolt = <1500000>;
235                                 regulator-always-on;
236                                 regulator-boot-on;
237                         };
238
239                         buck6_reg: BUCK6 {
240                                 regulator-name = "vdd_kfc";
241                                 regulator-min-microvolt = <800000>;
242                                 regulator-max-microvolt = <1500000>;
243                                 regulator-always-on;
244                                 regulator-boot-on;
245                         };
246
247                         buck7_reg: BUCK7 {
248                                 regulator-name = "buck7";
249                                 regulator-min-microvolt = <1300000>;
250                                 regulator-max-microvolt = <1300000>;
251                                 regulator-always-on;
252                                 regulator-boot-on;
253                         };
254
255                         buck8_reg: BUCK8 {
256                                 /* vdd_mmc0 */
257                                 regulator-name = "vddf_2v85";
258                                 regulator-min-microvolt = <2850000>;
259                                 regulator-max-microvolt = <2850000>;
260                                 regulator-always-on;
261                                 regulator-boot-on;
262                         };
263
264                         buck9_reg: BUCK9 {
265                                 regulator-name = "buck9";
266                                 regulator-min-microvolt = <3000000>;
267                                 regulator-max-microvolt = <3000000>;
268                                 regulator-always-on;
269                                 regulator-boot-on;
270                         };
271
272                         buck10_reg: BUCK10 {
273                                 regulator-name = "buck10";
274                                 regulator-min-microvolt = <2950000>;
275                                 regulator-max-microvolt = <2950000>;
276                                 regulator-always-on;
277                                 regulator-boot-on;
278                         };
279
280                         ldo1_reg: LDO1 {
281                                 regulator-name = "vdd_alive";
282                                 regulator-min-microvolt = <1000000>;
283                                 regulator-max-microvolt = <1000000>;
284                                 regulator-always-on;
285                         };
286
287                         ldo2_reg: LDO2 {
288                                 regulator-name = "vddq_m1_m2";
289                                 regulator-min-microvolt = <1200000>;
290                                 regulator-max-microvolt = <1200000>;
291                                 regulator-always-on;
292                         };
293
294                         ldo3_reg: LDO3 {
295                                 regulator-name = "vddq_gpio";
296                                 regulator-min-microvolt = <1800000>;
297                                 regulator-max-microvolt = <1800000>;
298                                 regulator-always-on;
299                         };
300
301                         ldo4_reg: LDO4 {
302                                 regulator-name = "vddq_mmc2";
303                                 regulator-min-microvolt = <1800000>;
304                                 regulator-max-microvolt = <3000000>;
305                                 /* Having it off prevents reboot */
306                                 regulator-always-on;
307                         };
308
309                         ldo5_reg: LDO5 {
310                                 regulator-name = "vdd18_hsic";
311                                 regulator-min-microvolt = <1800000>;
312                                 regulator-max-microvolt = <1800000>;
313                                 regulator-always-on;
314                         };
315
316                         ldo6_reg: LDO6 {
317                                 regulator-name = "vdd18_bpll";
318                                 regulator-min-microvolt = <1800000>;
319                                 regulator-max-microvolt = <1800000>;
320                                 regulator-always-on;
321                         };
322
323                         ldo7_reg: LDO7 {
324                                 regulator-name = "vddq_lcd";
325                                 regulator-min-microvolt = <1800000>;
326                                 regulator-max-microvolt = <1800000>;
327                         };
328
329                         ldo8_reg: LDO8 {
330                                 regulator-name = "vdd10_hdmi";
331                                 regulator-min-microvolt = <1000000>;
332                                 regulator-max-microvolt = <1000000>;
333                                 regulator-always-on;
334                         };
335
336                         ldo9_reg: LDO9 {
337                                 regulator-name = "ldo9";
338                         };
339
340                         ldo10_reg: LDO10 {
341                                 regulator-name = "vdd18_mipi";
342                                 regulator-min-microvolt = <1800000>;
343                                 regulator-max-microvolt = <1800000>;
344                                 regulator-always-on;
345                         };
346
347                         ldo11_reg: LDO11 {
348                                 regulator-name = "vddq_mmc01";
349                                 regulator-min-microvolt = <1800000>;
350                                 regulator-max-microvolt = <1800000>;
351                                 /*
352                                  * Having it off prevents accessing MMC after
353                                  * reboot with error:
354                                  * MMC Device 1: Clock OFF has been failed.
355                                  */
356                                 regulator-always-on;
357                         };
358
359                         ldo12_reg: LDO12 {
360                                 regulator-name = "vdd33_usb3";
361                                 regulator-min-microvolt = <3300000>;
362                                 regulator-max-microvolt = <3300000>;
363                                 regulator-always-on;
364                         };
365
366                         ldo13_reg: LDO13 {
367                                 regulator-name = "vddq_abbg0";
368                                 regulator-min-microvolt = <1800000>;
369                                 regulator-max-microvolt = <1800000>;
370                                 regulator-always-on;
371                         };
372
373                         ldo14_reg: LDO14 {
374                                 regulator-name = "vddq_abbg1";
375                                 regulator-min-microvolt = <1800000>;
376                                 regulator-max-microvolt = <1800000>;
377                                 regulator-always-on;
378                         };
379
380                         ldo15_reg: LDO15 {
381                                 regulator-name = "vdd10_usb3";
382                                 regulator-min-microvolt = <1000000>;
383                                 regulator-max-microvolt = <1000000>;
384                                 regulator-always-on;
385                         };
386
387                         ldo16_reg: LDO16 {
388                                 regulator-name = "ldo16";
389                         };
390
391                         ldo17_reg: LDO17 {
392                                 regulator-name = "cam_sensor_core";
393                                 regulator-min-microvolt = <1200000>;
394                                 regulator-max-microvolt = <1200000>;
395                         };
396
397                         ldo18_reg: LDO18 {
398                                 regulator-name = "ldo18";
399                                 regulator-min-microvolt = <1800000>;
400                                 regulator-max-microvolt = <1800000>;
401                         };
402
403                         ldo19_reg: LDO19 {
404                                 regulator-name = "ldo19";
405                         };
406
407                         ldo20_reg: LDO20 {
408                                 regulator-name = "vdd_mmc0";
409                                 regulator-min-microvolt = <1800000>;
410                                 regulator-max-microvolt = <1800000>;
411                         };
412
413                         ldo21_reg: LDO21 {
414                                 /* vdd_mmc2 */
415                                 regulator-name = "vddf_2v8";
416                                 regulator-min-microvolt = <2850000>;
417                                 regulator-max-microvolt = <2850000>;
418                         };
419
420                         ldo22_reg: LDO22 {
421                                 regulator-name = "ldo22";
422                         };
423
424                         ldo23_reg: LDO23 {
425                                 regulator-name = "dp_p3v3";
426                                 regulator-min-microvolt = <3300000>;
427                                 regulator-max-microvolt = <3300000>;
428                                 regulator-always-on;
429                         };
430
431                         ldo24_reg: LDO24 {
432                                 regulator-name = "cam_af";
433                                 regulator-min-microvolt = <2800000>;
434                                 regulator-max-microvolt = <2800000>;
435                         };
436
437                         ldo25_reg: LDO25 {
438                                 regulator-name = "eth_p3v3";
439                                 regulator-min-microvolt = <3300000>;
440                                 regulator-max-microvolt = <3300000>;
441                                 regulator-always-on;
442                         };
443
444                         ldo26_reg: LDO26 {
445                                 regulator-name = "usb30_extclk";
446                                 regulator-min-microvolt = <3300000>;
447                                 regulator-max-microvolt = <3300000>;
448                                 regulator-always-on;
449                         };
450
451                         ldo27_reg: LDO27 {
452                                 regulator-name = "ldo27";
453                         };
454
455                         ldo28_reg: LDO28 {
456                                 regulator-name = "ldo28";
457                         };
458
459                         ldo29_reg: LDO29 {
460                                 regulator-name = "ldo29";
461                         };
462
463                         ldo30_reg: LDO30 {
464                                 regulator-name = "vddq_e1_e2";
465                                 regulator-min-microvolt = <1200000>;
466                                 regulator-max-microvolt = <1200000>;
467                                 regulator-always-on;
468                         };
469
470                         ldo31_reg: LDO31 {
471                                 regulator-name = "ldo31";
472                         };
473
474                         /* On revisions with ti,ina231 this is sensor VS */
475                         ldo32_reg: LDO32 {
476                                 regulator-name = "vs_power_meter";
477                                 regulator-min-microvolt = <3300000>;
478                                 regulator-max-microvolt = <3300000>;
479                         };
480
481                         ldo33_reg: LDO33 {
482                                 regulator-name = "ldo33";
483                         };
484
485                         ldo34_reg: LDO34 {
486                                 regulator-name = "ldo34";
487                         };
488
489                         ldo35_reg: LDO35 {
490                                 regulator-name = "ldo35";
491                         };
492                 };
493         };
494 };
495
496 &i2c_1 {
497         status = "okay";
498         max98090: max98090@10 {
499                 compatible = "maxim,max98090";
500                 reg = <0x10>;
501                 interrupt-parent = <&gpj3>;
502                 interrupts = <0 IRQ_TYPE_NONE>;
503                 clocks = <&audi2s0 CLK_I2S_CDCLK>;
504                 clock-names = "mclk";
505                 #sound-dai-cells = <0>;
506         };
507 };
508
509 &mmc_0 {
510         status = "okay";
511         mmc-pwrseq = <&emmc_pwrseq>;
512         cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
513         card-detect-delay = <200>;
514         samsung,dw-mshc-ciu-div = <3>;
515         samsung,dw-mshc-sdr-timing = <0 4>;
516         samsung,dw-mshc-ddr-timing = <0 2>;
517         pinctrl-names = "default";
518         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd>;
519         bus-width = <8>;
520         cap-mmc-highspeed;
521         mmc-hs200-1_8v;
522         vmmc-supply = <&ldo20_reg>;
523         vqmmc-supply = <&ldo11_reg>;
524 };
525
526 &mmc_2 {
527         status = "okay";
528         card-detect-delay = <200>;
529         samsung,dw-mshc-ciu-div = <3>;
530         samsung,dw-mshc-sdr-timing = <0 4>;
531         samsung,dw-mshc-ddr-timing = <0 2>;
532         pinctrl-names = "default";
533         pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4 &sd2_wp>;
534         bus-width = <4>;
535         cap-sd-highspeed;
536         vmmc-supply = <&ldo21_reg>;
537         vqmmc-supply = <&ldo4_reg>;
538 };
539
540 &pinctrl_0 {
541         emmc_nrst_pin: emmc-nrst {
542                 samsung,pins = "gpd1-0";
543                 samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
544                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
545                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
546         };
547
548         sd2_wp: sd2-wp {
549                 samsung,pins = "gpm5-0";
550                 samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
551                 /* Pin is floating so be sure to disable write-protect */
552                 samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
553                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV4>;
554         };
555
556         pmic_dvs_3: pmic-dvs-3 {
557                 samsung,pins = "gpx0-0";
558                 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
559                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
560                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
561         };
562
563         pmic_dvs_2: pmic-dvs-2 {
564                 samsung,pins = "gpx0-1";
565                 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
566                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
567                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
568         };
569
570         pmic_dvs_1: pmic-dvs-1 {
571                 samsung,pins = "gpx0-2";
572                 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
573                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
574                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
575                 samsung,pin-val = <1>;
576         };
577
578         max77802_irq: max77802-irq {
579                 samsung,pins = "gpx0-4";
580                 samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
581                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
582                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
583         };
584 };
585
586 &pwm {
587         /*
588          * PWM 0 -- fan
589          * PWM 1 -- Green LED
590          * PWM 2 -- Blue LED
591          * PWM 3 -- on MIPI connector for backlight
592          */
593         pinctrl-0 = <&pwm0_out &pwm1_out &pwm2_out &pwm3_out>;
594         pinctrl-names = "default";
595         status = "okay";
596 };
597
598 &rtc {
599         status = "okay";
600         clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>;
601         clock-names = "rtc", "rtc_src";
602 };
603
604 &serial_0 {
605         status = "okay";
606 };
607
608 &serial_1 {
609         status = "okay";
610 };
611
612 &serial_2 {
613         status = "okay";
614 };
615
616 &serial_3 {
617         status = "okay";
618 };
619
620 &tmu_cpu0 {
621         vtmu-supply = <&ldo10_reg>;
622 };
623
624 &tmu_cpu1 {
625         vtmu-supply = <&ldo10_reg>;
626 };
627
628 &tmu_cpu2 {
629         vtmu-supply = <&ldo10_reg>;
630 };
631
632 &tmu_cpu3 {
633         vtmu-supply = <&ldo10_reg>;
634 };
635
636 &usbdrd_dwc3_0 {
637         dr_mode = "host";
638 };
639
640 &usbdrd_dwc3_1 {
641         dr_mode = "peripheral";
642 };
643
644 &usbdrd3_0 {
645         vdd33-supply = <&ldo12_reg>;
646         vdd10-supply = <&ldo15_reg>;
647 };
648
649 &usbdrd3_1 {
650         vdd33-supply = <&ldo12_reg>;
651         vdd10-supply = <&ldo15_reg>;
652 };