GNU Linux-libre 4.19.264-gnu1
[releases.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                                 /* Supplies also GPK and GPJ */
328                                 regulator-always-on;
329                         };
330
331                         ldo8_reg: LDO8 {
332                                 regulator-name = "vdd10_hdmi";
333                                 regulator-min-microvolt = <1000000>;
334                                 regulator-max-microvolt = <1000000>;
335                                 regulator-always-on;
336                         };
337
338                         ldo9_reg: LDO9 {
339                                 regulator-name = "ldo9";
340                         };
341
342                         ldo10_reg: LDO10 {
343                                 regulator-name = "vdd18_mipi";
344                                 regulator-min-microvolt = <1800000>;
345                                 regulator-max-microvolt = <1800000>;
346                                 regulator-always-on;
347                         };
348
349                         ldo11_reg: LDO11 {
350                                 regulator-name = "vddq_mmc01";
351                                 regulator-min-microvolt = <1800000>;
352                                 regulator-max-microvolt = <1800000>;
353                                 /*
354                                  * Having it off prevents accessing MMC after
355                                  * reboot with error:
356                                  * MMC Device 1: Clock OFF has been failed.
357                                  */
358                                 regulator-always-on;
359                         };
360
361                         ldo12_reg: LDO12 {
362                                 regulator-name = "vdd33_usb3";
363                                 regulator-min-microvolt = <3300000>;
364                                 regulator-max-microvolt = <3300000>;
365                                 regulator-always-on;
366                         };
367
368                         ldo13_reg: LDO13 {
369                                 regulator-name = "vddq_abbg0";
370                                 regulator-min-microvolt = <1800000>;
371                                 regulator-max-microvolt = <1800000>;
372                                 regulator-always-on;
373                         };
374
375                         ldo14_reg: LDO14 {
376                                 regulator-name = "vddq_abbg1";
377                                 regulator-min-microvolt = <1800000>;
378                                 regulator-max-microvolt = <1800000>;
379                                 regulator-always-on;
380                         };
381
382                         ldo15_reg: LDO15 {
383                                 regulator-name = "vdd10_usb3";
384                                 regulator-min-microvolt = <1000000>;
385                                 regulator-max-microvolt = <1000000>;
386                                 regulator-always-on;
387                         };
388
389                         ldo16_reg: LDO16 {
390                                 regulator-name = "ldo16";
391                         };
392
393                         ldo17_reg: LDO17 {
394                                 regulator-name = "cam_sensor_core";
395                                 regulator-min-microvolt = <1200000>;
396                                 regulator-max-microvolt = <1200000>;
397                         };
398
399                         ldo18_reg: LDO18 {
400                                 regulator-name = "ldo18";
401                                 regulator-min-microvolt = <1800000>;
402                                 regulator-max-microvolt = <1800000>;
403                         };
404
405                         ldo19_reg: LDO19 {
406                                 regulator-name = "ldo19";
407                         };
408
409                         ldo20_reg: LDO20 {
410                                 regulator-name = "vdd_mmc0";
411                                 regulator-min-microvolt = <1800000>;
412                                 regulator-max-microvolt = <1800000>;
413                         };
414
415                         ldo21_reg: LDO21 {
416                                 /* vdd_mmc2 */
417                                 regulator-name = "vddf_2v8";
418                                 regulator-min-microvolt = <2850000>;
419                                 regulator-max-microvolt = <2850000>;
420                         };
421
422                         ldo22_reg: LDO22 {
423                                 regulator-name = "ldo22";
424                         };
425
426                         ldo23_reg: LDO23 {
427                                 regulator-name = "dp_p3v3";
428                                 regulator-min-microvolt = <3300000>;
429                                 regulator-max-microvolt = <3300000>;
430                                 regulator-always-on;
431                         };
432
433                         ldo24_reg: LDO24 {
434                                 regulator-name = "cam_af";
435                                 regulator-min-microvolt = <2800000>;
436                                 regulator-max-microvolt = <2800000>;
437                         };
438
439                         ldo25_reg: LDO25 {
440                                 regulator-name = "eth_p3v3";
441                                 regulator-min-microvolt = <3300000>;
442                                 regulator-max-microvolt = <3300000>;
443                                 regulator-always-on;
444                         };
445
446                         ldo26_reg: LDO26 {
447                                 regulator-name = "usb30_extclk";
448                                 regulator-min-microvolt = <3300000>;
449                                 regulator-max-microvolt = <3300000>;
450                                 regulator-always-on;
451                         };
452
453                         ldo27_reg: LDO27 {
454                                 regulator-name = "ldo27";
455                         };
456
457                         ldo28_reg: LDO28 {
458                                 regulator-name = "ldo28";
459                         };
460
461                         ldo29_reg: LDO29 {
462                                 regulator-name = "ldo29";
463                         };
464
465                         ldo30_reg: LDO30 {
466                                 regulator-name = "vddq_e1_e2";
467                                 regulator-min-microvolt = <1200000>;
468                                 regulator-max-microvolt = <1200000>;
469                                 regulator-always-on;
470                         };
471
472                         ldo31_reg: LDO31 {
473                                 regulator-name = "ldo31";
474                         };
475
476                         /* On revisions with ti,ina231 this is sensor VS */
477                         ldo32_reg: LDO32 {
478                                 regulator-name = "vs_power_meter";
479                                 regulator-min-microvolt = <3300000>;
480                                 regulator-max-microvolt = <3300000>;
481                         };
482
483                         ldo33_reg: LDO33 {
484                                 regulator-name = "ldo33";
485                         };
486
487                         ldo34_reg: LDO34 {
488                                 regulator-name = "ldo34";
489                         };
490
491                         ldo35_reg: LDO35 {
492                                 regulator-name = "ldo35";
493                         };
494                 };
495         };
496 };
497
498 &i2c_1 {
499         status = "okay";
500         max98090: max98090@10 {
501                 compatible = "maxim,max98090";
502                 reg = <0x10>;
503                 interrupt-parent = <&gpj3>;
504                 interrupts = <0 IRQ_TYPE_NONE>;
505                 clocks = <&audi2s0 CLK_I2S_CDCLK>;
506                 clock-names = "mclk";
507                 #sound-dai-cells = <0>;
508         };
509 };
510
511 &mmc_0 {
512         status = "okay";
513         mmc-pwrseq = <&emmc_pwrseq>;
514         cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
515         card-detect-delay = <200>;
516         samsung,dw-mshc-ciu-div = <3>;
517         samsung,dw-mshc-sdr-timing = <0 4>;
518         samsung,dw-mshc-ddr-timing = <0 2>;
519         pinctrl-names = "default";
520         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd>;
521         bus-width = <8>;
522         cap-mmc-highspeed;
523         mmc-hs200-1_8v;
524         vmmc-supply = <&ldo20_reg>;
525         vqmmc-supply = <&ldo11_reg>;
526 };
527
528 &mmc_2 {
529         status = "okay";
530         card-detect-delay = <200>;
531         samsung,dw-mshc-ciu-div = <3>;
532         samsung,dw-mshc-sdr-timing = <0 4>;
533         samsung,dw-mshc-ddr-timing = <0 2>;
534         pinctrl-names = "default";
535         pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
536         bus-width = <4>;
537         cap-sd-highspeed;
538         vmmc-supply = <&ldo21_reg>;
539         vqmmc-supply = <&ldo4_reg>;
540 };
541
542 &pinctrl_0 {
543         emmc_nrst_pin: emmc-nrst {
544                 samsung,pins = "gpd1-0";
545                 samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
546                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
547                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
548         };
549
550         pmic_dvs_3: pmic-dvs-3 {
551                 samsung,pins = "gpx0-0";
552                 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
553                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
554                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
555         };
556
557         pmic_dvs_2: pmic-dvs-2 {
558                 samsung,pins = "gpx0-1";
559                 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
560                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
561                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
562         };
563
564         pmic_dvs_1: pmic-dvs-1 {
565                 samsung,pins = "gpx0-2";
566                 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
567                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
568                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
569                 samsung,pin-val = <1>;
570         };
571
572         max77802_irq: max77802-irq {
573                 samsung,pins = "gpx0-4";
574                 samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
575                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
576                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
577         };
578 };
579
580 &pwm {
581         /*
582          * PWM 0 -- fan
583          * PWM 1 -- Green LED
584          * PWM 2 -- Blue LED
585          * PWM 3 -- on MIPI connector for backlight
586          */
587         pinctrl-0 = <&pwm0_out &pwm1_out &pwm2_out &pwm3_out>;
588         pinctrl-names = "default";
589         status = "okay";
590 };
591
592 &rtc {
593         status = "okay";
594         clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>;
595         clock-names = "rtc", "rtc_src";
596 };
597
598 &serial_0 {
599         status = "okay";
600 };
601
602 &serial_1 {
603         status = "okay";
604 };
605
606 &serial_2 {
607         status = "okay";
608 };
609
610 &serial_3 {
611         status = "okay";
612 };
613
614 &tmu_cpu0 {
615         vtmu-supply = <&ldo10_reg>;
616 };
617
618 &tmu_cpu1 {
619         vtmu-supply = <&ldo10_reg>;
620 };
621
622 &tmu_cpu2 {
623         vtmu-supply = <&ldo10_reg>;
624 };
625
626 &tmu_cpu3 {
627         vtmu-supply = <&ldo10_reg>;
628 };
629
630 &usbdrd_dwc3_0 {
631         dr_mode = "peripheral";
632 };
633
634 &usbdrd_dwc3_1 {
635         dr_mode = "host";
636 };
637
638 &usbdrd3_0 {
639         vdd33-supply = <&ldo12_reg>;
640         vdd10-supply = <&ldo15_reg>;
641 };
642
643 &usbdrd3_1 {
644         vdd33-supply = <&ldo12_reg>;
645         vdd10-supply = <&ldo15_reg>;
646 };