Merge tag 'drm-next-2020-12-24' of git://anongit.freedesktop.org/drm/drm
[linux-2.6-microblaze.git] / arch / arm / boot / dts / exynos4412-odroid-common.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Common definition for Hardkernel's Exynos4412 based ODROID-X/X2/U2/U3 boards
4  * device tree source
5 */
6
7 #include <dt-bindings/sound/samsung-i2s.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/clock/maxim,max77686.h>
10 #include "exynos4412.dtsi"
11 #include "exynos4412-ppmu-common.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
13 #include "exynos-mfc-reserved-memory.dtsi"
14
15 / {
16         chosen {
17                 stdout-path = &serial_1;
18         };
19
20         firmware@204f000 {
21                 compatible = "samsung,secure-firmware";
22                 reg = <0x0204F000 0x1000>;
23         };
24
25         gpio_keys: gpio-keys {
26                 compatible = "gpio-keys";
27                 pinctrl-names = "default";
28                 pinctrl-0 = <&gpio_power_key>;
29
30                 power-key {
31                         gpios = <&gpx1 3 GPIO_ACTIVE_LOW>;
32                         linux,code = <KEY_POWER>;
33                         label = "power key";
34                         debounce-interval = <10>;
35                         wakeup-source;
36                 };
37         };
38
39         sound: sound {
40                 compatible = "hardkernel,odroid-xu4-audio";
41
42                 cpu {
43                         sound-dai = <&i2s0 0>;
44                 };
45
46                 codec {
47                         sound-dai = <&hdmi>, <&max98090>;
48                 };
49         };
50
51         emmc_pwrseq: pwrseq {
52                 pinctrl-0 = <&emmc_rstn>;
53                 pinctrl-names = "default";
54                 compatible = "mmc-pwrseq-emmc";
55                 reset-gpios = <&gpk1 2 GPIO_ACTIVE_LOW>;
56         };
57
58         fixed-rate-clocks {
59                 xxti {
60                         compatible = "samsung,clock-xxti";
61                         clock-frequency = <0>;
62                 };
63
64                 xusbxti {
65                         compatible = "samsung,clock-xusbxti";
66                         clock-frequency = <24000000>;
67                 };
68         };
69 };
70
71 &bus_dmc {
72         devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
73         vdd-supply = <&buck1_reg>;
74         status = "okay";
75 };
76
77 &bus_acp {
78         devfreq = <&bus_dmc>;
79         status = "okay";
80 };
81
82 &bus_c2c {
83         devfreq = <&bus_dmc>;
84         status = "okay";
85 };
86
87 &bus_leftbus {
88         devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
89         vdd-supply = <&buck3_reg>;
90         status = "okay";
91 };
92
93 &bus_rightbus {
94         devfreq = <&bus_leftbus>;
95         status = "okay";
96 };
97
98 &bus_display {
99         devfreq = <&bus_leftbus>;
100         status = "okay";
101 };
102
103 &bus_fsys {
104         devfreq = <&bus_leftbus>;
105         status = "okay";
106 };
107
108 &bus_peri {
109         devfreq = <&bus_leftbus>;
110         status = "okay";
111 };
112
113 &bus_mfc {
114         devfreq = <&bus_leftbus>;
115         status = "okay";
116 };
117
118 &camera {
119         status = "okay";
120         pinctrl-names = "default";
121         pinctrl-0 = <>;
122 };
123
124 &clock {
125         assigned-clocks = <&clock CLK_FOUT_EPLL>;
126         assigned-clock-rates = <45158401>;
127 };
128
129 &clock_audss {
130         assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
131                         <&clock_audss EXYNOS_MOUT_I2S>,
132                         <&clock_audss EXYNOS_DOUT_SRP>,
133                         <&clock_audss EXYNOS_DOUT_AUD_BUS>,
134                         <&clock_audss EXYNOS_DOUT_I2S>;
135
136         assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
137                           <&clock_audss EXYNOS_MOUT_AUDSS>;
138
139         assigned-clock-rates = <0>, <0>,
140                         <196608001>,
141                         <(196608001 / 2)>,
142                         <(196608001 / 8)>;
143 };
144
145 &cpu0 {
146         cpu0-supply = <&buck2_reg>;
147 };
148
149 &cpu0_opp_table {
150         opp-1000000000 {
151                 opp-suspend;
152         };
153         opp-800000000 {
154                 /delete-property/opp-suspend;
155         };
156 };
157
158 &cpu_thermal {
159         cooling-maps {
160                 cooling_map0: map0 {
161                         /* Corresponds to 800MHz at freq_table */
162                         cooling-device = <&cpu0 7 7>, <&cpu1 7 7>,
163                                          <&cpu2 7 7>, <&cpu3 7 7>;
164                 };
165                 cooling_map1: map1 {
166                         /* Corresponds to 200MHz at freq_table */
167                         cooling-device = <&cpu0 13 13>, <&cpu1 13 13>,
168                                          <&cpu2 13 13>, <&cpu3 13 13>;
169                 };
170         };
171 };
172
173 &pinctrl_1 {
174         gpio_power_key: power-key {
175                 samsung,pins = "gpx1-3";
176                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
177         };
178
179         max77686_irq: max77686-irq {
180                 samsung,pins = "gpx3-2";
181                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
182                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
183                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
184         };
185
186         hdmi_hpd: hdmi-hpd {
187                 samsung,pins = "gpx3-7";
188                 samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
189         };
190
191         emmc_rstn: emmc-rstn {
192                 samsung,pins = "gpk1-2";
193                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
194         };
195 };
196
197 &ehci {
198         status = "okay";
199 };
200
201 &exynos_usbphy {
202         status = "okay";
203 };
204
205 &fimc_0 {
206         status = "okay";
207         assigned-clocks = <&clock CLK_MOUT_FIMC0>,
208                         <&clock CLK_SCLK_FIMC0>;
209         assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
210         assigned-clock-rates = <0>, <176000000>;
211 };
212
213 &fimc_1 {
214         status = "okay";
215         assigned-clocks = <&clock CLK_MOUT_FIMC1>,
216                         <&clock CLK_SCLK_FIMC1>;
217         assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
218         assigned-clock-rates = <0>, <176000000>;
219 };
220
221 &fimc_2 {
222         status = "okay";
223         assigned-clocks = <&clock CLK_MOUT_FIMC2>,
224                         <&clock CLK_SCLK_FIMC2>;
225         assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
226         assigned-clock-rates = <0>, <176000000>;
227 };
228
229 &fimc_3 {
230         status = "okay";
231         assigned-clocks = <&clock CLK_MOUT_FIMC3>,
232                         <&clock CLK_SCLK_FIMC3>;
233         assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
234         assigned-clock-rates = <0>, <176000000>;
235 };
236
237 &gpu {
238         mali-supply = <&buck4_reg>;
239         status = "okay";
240 };
241
242 &hdmi {
243         hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
244         pinctrl-names = "default";
245         pinctrl-0 = <&hdmi_hpd>;
246         vdd-supply = <&ldo8_reg>;
247         vdd_osc-supply = <&ldo10_reg>;
248         vdd_pll-supply = <&ldo8_reg>;
249         ddc = <&i2c_2>;
250         status = "okay";
251 };
252
253 &hdmicec {
254         status = "okay";
255 };
256
257 &hsotg {
258         status = "okay";
259         vusb_d-supply = <&ldo15_reg>;
260         vusb_a-supply = <&ldo12_reg>;
261 };
262
263 &i2c_0 {
264         samsung,i2c-sda-delay = <100>;
265         samsung,i2c-max-bus-freq = <400000>;
266         status = "okay";
267
268         usb3503: usb-hub@8 {
269                 compatible = "smsc,usb3503";
270                 reg = <0x08>;
271
272                 intn-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>;
273                 connect-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
274                 reset-gpios = <&gpx3 5 GPIO_ACTIVE_LOW>;
275                 initial-mode = <1>;
276         };
277
278         max77686: pmic@9 {
279                 compatible = "maxim,max77686";
280                 interrupt-parent = <&gpx3>;
281                 interrupts = <2 IRQ_TYPE_NONE>;
282                 pinctrl-names = "default";
283                 pinctrl-0 = <&max77686_irq>;
284                 reg = <0x09>;
285                 #clock-cells = <1>;
286
287                 voltage-regulators {
288                         ldo1_reg: LDO1 {
289                                 regulator-name = "VDD_ALIVE_1.0V";
290                                 regulator-min-microvolt = <1000000>;
291                                 regulator-max-microvolt = <1000000>;
292                                 regulator-always-on;
293                         };
294
295                         ldo2_reg: LDO2 {
296                                 regulator-name = "VDDQ_M1_2_1.8V";
297                                 regulator-min-microvolt = <1800000>;
298                                 regulator-max-microvolt = <1800000>;
299                                 regulator-always-on;
300                         };
301
302                         ldo3_reg: LDO3 {
303                                 regulator-name = "VDDQ_EXT_1.8V";
304                                 regulator-min-microvolt = <1800000>;
305                                 regulator-max-microvolt = <1800000>;
306                                 regulator-always-on;
307                         };
308
309                         ldo4_reg: LDO4 {
310                                 regulator-name = "VDDQ_MMC2_2.8V";
311                                 regulator-min-microvolt = <2800000>;
312                                 regulator-max-microvolt = <2800000>;
313                                 regulator-boot-on;
314                         };
315
316                         ldo5_reg: LDO5 {
317                                 regulator-name = "VDDQ_MMC1_3_1.8V";
318                                 regulator-min-microvolt = <1800000>;
319                                 regulator-max-microvolt = <1800000>;
320                                 regulator-always-on;
321                                 regulator-boot-on;
322                         };
323
324                         ldo6_reg: LDO6 {
325                                 regulator-name = "VDD10_MPLL_1.0V";
326                                 regulator-min-microvolt = <1000000>;
327                                 regulator-max-microvolt = <1000000>;
328                                 regulator-always-on;
329                         };
330
331                         ldo7_reg: LDO7 {
332                                 regulator-name = "VDD10_XPLL_1.0V";
333                                 regulator-min-microvolt = <1000000>;
334                                 regulator-max-microvolt = <1000000>;
335                                 regulator-always-on;
336                         };
337
338                         ldo8_reg: LDO8 {
339                                 regulator-name = "VDD10_HDMI_1.0V";
340                                 regulator-min-microvolt = <1000000>;
341                                 regulator-max-microvolt = <1000000>;
342                         };
343
344                         ldo10_reg: LDO10 {
345                                 regulator-name = "VDDQ_MIPIHSI_1.8V";
346                                 regulator-min-microvolt = <1800000>;
347                                 regulator-max-microvolt = <1800000>;
348                         };
349
350                         ldo11_reg: LDO11 {
351                                 regulator-name = "VDD18_ABB1_1.8V";
352                                 regulator-min-microvolt = <1800000>;
353                                 regulator-max-microvolt = <1800000>;
354                                 regulator-always-on;
355                         };
356
357                         ldo12_reg: LDO12 {
358                                 regulator-name = "VDD33_USB_3.3V";
359                                 regulator-min-microvolt = <3300000>;
360                                 regulator-max-microvolt = <3300000>;
361                                 regulator-always-on;
362                                 regulator-boot-on;
363                         };
364
365                         ldo13_reg: LDO13 {
366                                 regulator-name = "VDDQ_C2C_W_1.8V";
367                                 regulator-min-microvolt = <1800000>;
368                                 regulator-max-microvolt = <1800000>;
369                                 regulator-always-on;
370                                 regulator-boot-on;
371                         };
372
373                         ldo14_reg: LDO14 {
374                                 regulator-name = "VDD18_ABB0_2_1.8V";
375                                 regulator-min-microvolt = <1800000>;
376                                 regulator-max-microvolt = <1800000>;
377                                 regulator-always-on;
378                                 regulator-boot-on;
379                         };
380
381                         ldo15_reg: LDO15 {
382                                 regulator-name = "VDD10_HSIC_1.0V";
383                                 regulator-min-microvolt = <1000000>;
384                                 regulator-max-microvolt = <1000000>;
385                                 regulator-always-on;
386                                 regulator-boot-on;
387                         };
388
389                         ldo16_reg: LDO16 {
390                                 regulator-name = "VDD18_HSIC_1.8V";
391                                 regulator-min-microvolt = <1800000>;
392                                 regulator-max-microvolt = <1800000>;
393                                 regulator-always-on;
394                                 regulator-boot-on;
395                         };
396
397                         ldo20_reg: LDO20 {
398                                 regulator-name = "LDO20_1.8V";
399                                 regulator-min-microvolt = <1800000>;
400                                 regulator-max-microvolt = <1800000>;
401                         };
402
403                         ldo21_reg: LDO21 {
404                                 regulator-name = "TFLASH_2.8V";
405                                 regulator-min-microvolt = <2800000>;
406                                 regulator-max-microvolt = <2800000>;
407                                 regulator-boot-on;
408                         };
409
410                         ldo22_reg: LDO22 {
411                                 /*
412                                  * Only U3 uses it, so let it define the
413                                  * constraints
414                                  */
415                                 regulator-name = "LDO22";
416                                 regulator-boot-on;
417                         };
418
419                         ldo25_reg: LDO25 {
420                                 regulator-name = "VDDQ_LCD_1.8V";
421                                 regulator-min-microvolt = <1800000>;
422                                 regulator-max-microvolt = <1800000>;
423                                 regulator-always-on;
424                                 regulator-boot-on;
425                         };
426
427                         buck1_reg: BUCK1 {
428                                 regulator-name = "VDD_MIF";
429                                 regulator-min-microvolt = <900000>;
430                                 regulator-max-microvolt = <1100000>;
431                                 regulator-always-on;
432                                 regulator-boot-on;
433                         };
434
435                         buck2_reg: BUCK2 {
436                                 regulator-name = "VDD_ARM";
437                                 regulator-min-microvolt = <900000>;
438                                 regulator-max-microvolt = <1350000>;
439                                 regulator-always-on;
440                                 regulator-boot-on;
441                         };
442
443                         buck3_reg: BUCK3 {
444                                 regulator-name = "VDD_INT";
445                                 regulator-min-microvolt = <900000>;
446                                 regulator-max-microvolt = <1050000>;
447                                 regulator-always-on;
448                                 regulator-boot-on;
449                         };
450
451                         buck4_reg: BUCK4 {
452                                 regulator-name = "VDD_G3D";
453                                 regulator-min-microvolt = <900000>;
454                                 regulator-max-microvolt = <1100000>;
455                                 regulator-microvolt-offset = <50000>;
456                         };
457
458                         buck5_reg: BUCK5 {
459                                 regulator-name = "VDDQ_CKEM1_2_1.2V";
460                                 regulator-min-microvolt = <1200000>;
461                                 regulator-max-microvolt = <1200000>;
462                                 regulator-always-on;
463                                 regulator-boot-on;
464                         };
465
466                         buck6_reg: BUCK6 {
467                                 regulator-name = "BUCK6_1.35V";
468                                 regulator-min-microvolt = <1350000>;
469                                 regulator-max-microvolt = <1350000>;
470                                 regulator-always-on;
471                                 regulator-boot-on;
472                         };
473
474                         buck7_reg: BUCK7 {
475                                 regulator-name = "BUCK7_2.0V";
476                                 regulator-min-microvolt = <2000000>;
477                                 regulator-max-microvolt = <2000000>;
478                                 regulator-always-on;
479                         };
480
481                         buck8_reg: BUCK8 {
482                                 /*
483                                  * Constraints set by specific board: X,
484                                  * X2 and U3.
485                                  */
486                                 regulator-name = "BUCK8_2.8V";
487                         };
488                 };
489         };
490 };
491
492 &i2c_1 {
493         status = "okay";
494         max98090: audio-codec@10 {
495                 compatible = "maxim,max98090";
496                 reg = <0x10>;
497                 interrupt-parent = <&gpx0>;
498                 interrupts = <0 IRQ_TYPE_NONE>;
499                 clocks = <&i2s0 CLK_I2S_CDCLK>;
500                 clock-names = "mclk";
501                 #sound-dai-cells = <0>;
502         };
503 };
504
505 &i2c_2 {
506         status = "okay";
507 };
508
509 &i2c_8 {
510         status = "okay";
511 };
512
513 &i2s0 {
514         pinctrl-0 = <&i2s0_bus>;
515         pinctrl-names = "default";
516         status = "okay";
517         assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>;
518         assigned-clock-parents = <&clock_audss EXYNOS_SCLK_I2S>;
519 };
520
521 &mixer {
522         status = "okay";
523 };
524
525 &mshc_0 {
526         pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
527         pinctrl-names = "default";
528         vmmc-supply = <&ldo20_reg>;
529         mmc-pwrseq = <&emmc_pwrseq>;
530         status = "okay";
531
532         broken-cd;
533         card-detect-delay = <200>;
534         samsung,dw-mshc-ciu-div = <3>;
535         samsung,dw-mshc-sdr-timing = <2 3>;
536         samsung,dw-mshc-ddr-timing = <1 2>;
537         bus-width = <8>;
538         cap-mmc-highspeed;
539 };
540
541 &rtc {
542         status = "okay";
543         clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>;
544         clock-names = "rtc", "rtc_src";
545 };
546
547 &sdhci_2 {
548         bus-width = <4>;
549         pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
550         pinctrl-names = "default";
551         vmmc-supply = <&ldo21_reg>;
552         vqmmc-supply = <&ldo4_reg>;
553         cd-gpios = <&gpk2 2 GPIO_ACTIVE_LOW>;
554         status = "okay";
555 };
556
557 &serial_0 {
558         status = "okay";
559 };
560
561 &serial_1 {
562         status = "okay";
563 };
564
565 &tmu {
566         vtmu-supply = <&ldo10_reg>;
567         status = "okay";
568 };