3a9eb1e91c45b0e320657487c2b4363eddfb8dd6
[linux-2.6-block.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 {
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 = <&sd1_cd>;
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         thermal-zones {
71                 cpu_thermal: cpu-thermal {
72                         cooling-maps {
73                                 cooling_map0: map0 {
74                                      /* Corresponds to 800MHz at freq_table */
75                                      cooling-device = <&cpu0 7 7>, <&cpu1 7 7>,
76                                                       <&cpu2 7 7>, <&cpu3 7 7>;
77                                 };
78                                 cooling_map1: map1 {
79                                      /* Corresponds to 200MHz at freq_table */
80                                      cooling-device = <&cpu0 13 13>,
81                                                       <&cpu1 13 13>,
82                                                       <&cpu2 13 13>,
83                                                       <&cpu3 13 13>;
84                                };
85                        };
86                 };
87         };
88 };
89
90 &bus_dmc {
91         devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
92         vdd-supply = <&buck1_reg>;
93         status = "okay";
94 };
95
96 &bus_acp {
97         devfreq = <&bus_dmc>;
98         status = "okay";
99 };
100
101 &bus_c2c {
102         devfreq = <&bus_dmc>;
103         status = "okay";
104 };
105
106 &bus_leftbus {
107         devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
108         vdd-supply = <&buck3_reg>;
109         status = "okay";
110 };
111
112 &bus_rightbus {
113         devfreq = <&bus_leftbus>;
114         status = "okay";
115 };
116
117 &bus_display {
118         devfreq = <&bus_leftbus>;
119         status = "okay";
120 };
121
122 &bus_fsys {
123         devfreq = <&bus_leftbus>;
124         status = "okay";
125 };
126
127 &bus_peri {
128         devfreq = <&bus_leftbus>;
129         status = "okay";
130 };
131
132 &bus_mfc {
133         devfreq = <&bus_leftbus>;
134         status = "okay";
135 };
136
137 &camera {
138         status = "okay";
139         pinctrl-names = "default";
140         pinctrl-0 = <>;
141 };
142
143 &clock {
144         assigned-clocks = <&clock CLK_FOUT_EPLL>;
145         assigned-clock-rates = <45158401>;
146 };
147
148 &clock_audss {
149         assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
150                         <&clock_audss EXYNOS_MOUT_I2S>,
151                         <&clock_audss EXYNOS_DOUT_SRP>,
152                         <&clock_audss EXYNOS_DOUT_AUD_BUS>,
153                         <&clock_audss EXYNOS_DOUT_I2S>;
154
155         assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
156                           <&clock_audss EXYNOS_MOUT_AUDSS>;
157
158         assigned-clock-rates = <0>, <0>,
159                         <196608001>,
160                         <(196608001 / 2)>,
161                         <(196608001 / 8)>;
162 };
163
164 &cpu0 {
165         cpu0-supply = <&buck2_reg>;
166 };
167
168 /* RSTN signal for eMMC */
169 &sd1_cd {
170         samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
171         samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
172 };
173
174 &pinctrl_1 {
175         gpio_power_key: power_key {
176                 samsung,pins = "gpx1-3";
177                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
178         };
179
180         max77686_irq: max77686-irq {
181                 samsung,pins = "gpx3-2";
182                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
183                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
184                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
185         };
186
187         hdmi_hpd: hdmi-hpd {
188                 samsung,pins = "gpx3-7";
189                 samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
190         };
191 };
192
193 &ehci {
194         status = "okay";
195 };
196
197 &exynos_usbphy {
198         status = "okay";
199 };
200
201 &fimc_0 {
202         status = "okay";
203         assigned-clocks = <&clock CLK_MOUT_FIMC0>,
204                         <&clock CLK_SCLK_FIMC0>;
205         assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
206         assigned-clock-rates = <0>, <176000000>;
207 };
208
209 &fimc_1 {
210         status = "okay";
211         assigned-clocks = <&clock CLK_MOUT_FIMC1>,
212                         <&clock CLK_SCLK_FIMC1>;
213         assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
214         assigned-clock-rates = <0>, <176000000>;
215 };
216
217 &fimc_2 {
218         status = "okay";
219         assigned-clocks = <&clock CLK_MOUT_FIMC2>,
220                         <&clock CLK_SCLK_FIMC2>;
221         assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
222         assigned-clock-rates = <0>, <176000000>;
223 };
224
225 &fimc_3 {
226         status = "okay";
227         assigned-clocks = <&clock CLK_MOUT_FIMC3>,
228                         <&clock CLK_SCLK_FIMC3>;
229         assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
230         assigned-clock-rates = <0>, <176000000>;
231 };
232
233 &hdmi {
234         hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
235         pinctrl-names = "default";
236         pinctrl-0 = <&hdmi_hpd>;
237         vdd-supply = <&ldo8_reg>;
238         vdd_osc-supply = <&ldo10_reg>;
239         vdd_pll-supply = <&ldo8_reg>;
240         ddc = <&i2c_2>;
241         status = "okay";
242 };
243
244 &hdmicec {
245         status = "okay";
246 };
247
248 &hsotg {
249         dr_mode = "peripheral";
250         status = "okay";
251         vusb_d-supply = <&ldo15_reg>;
252         vusb_a-supply = <&ldo12_reg>;
253 };
254
255 &i2c_0 {
256         samsung,i2c-sda-delay = <100>;
257         samsung,i2c-max-bus-freq = <400000>;
258         status = "okay";
259
260         usb3503: usb3503@8 {
261                 compatible = "smsc,usb3503";
262                 reg = <0x08>;
263
264                 intn-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>;
265                 connect-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
266                 reset-gpios = <&gpx3 5 GPIO_ACTIVE_HIGH>;
267                 initial-mode = <1>;
268         };
269
270         max77686: pmic@9 {
271                 compatible = "maxim,max77686";
272                 interrupt-parent = <&gpx3>;
273                 interrupts = <2 IRQ_TYPE_NONE>;
274                 pinctrl-names = "default";
275                 pinctrl-0 = <&max77686_irq>;
276                 reg = <0x09>;
277                 #clock-cells = <1>;
278
279                 voltage-regulators {
280                         ldo1_reg: LDO1 {
281                                 regulator-name = "VDD_ALIVE_1.0V";
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_2_1.8V";
289                                 regulator-min-microvolt = <1800000>;
290                                 regulator-max-microvolt = <1800000>;
291                                 regulator-always-on;
292                         };
293
294                         ldo3_reg: LDO3 {
295                                 regulator-name = "VDDQ_EXT_1.8V";
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_2.8V";
303                                 regulator-min-microvolt = <2800000>;
304                                 regulator-max-microvolt = <2800000>;
305                                 regulator-boot-on;
306                         };
307
308                         ldo5_reg: LDO5 {
309                                 regulator-name = "VDDQ_MMC1_3_1.8V";
310                                 regulator-min-microvolt = <1800000>;
311                                 regulator-max-microvolt = <1800000>;
312                                 regulator-always-on;
313                                 regulator-boot-on;
314                         };
315
316                         ldo6_reg: LDO6 {
317                                 regulator-name = "VDD10_MPLL_1.0V";
318                                 regulator-min-microvolt = <1000000>;
319                                 regulator-max-microvolt = <1000000>;
320                                 regulator-always-on;
321                         };
322
323                         ldo7_reg: LDO7 {
324                                 regulator-name = "VDD10_XPLL_1.0V";
325                                 regulator-min-microvolt = <1000000>;
326                                 regulator-max-microvolt = <1000000>;
327                                 regulator-always-on;
328                         };
329
330                         ldo8_reg: LDO8 {
331                                 regulator-name = "VDD10_HDMI_1.0V";
332                                 regulator-min-microvolt = <1000000>;
333                                 regulator-max-microvolt = <1000000>;
334                         };
335
336                         ldo10_reg: LDO10 {
337                                 regulator-name = "VDDQ_MIPIHSI_1.8V";
338                                 regulator-min-microvolt = <1800000>;
339                                 regulator-max-microvolt = <1800000>;
340                         };
341
342                         ldo11_reg: LDO11 {
343                                 regulator-name = "VDD18_ABB1_1.8V";
344                                 regulator-min-microvolt = <1800000>;
345                                 regulator-max-microvolt = <1800000>;
346                                 regulator-always-on;
347                         };
348
349                         ldo12_reg: LDO12 {
350                                 regulator-name = "VDD33_USB_3.3V";
351                                 regulator-min-microvolt = <3300000>;
352                                 regulator-max-microvolt = <3300000>;
353                                 regulator-always-on;
354                                 regulator-boot-on;
355                         };
356
357                         ldo13_reg: LDO13 {
358                                 regulator-name = "VDDQ_C2C_W_1.8V";
359                                 regulator-min-microvolt = <1800000>;
360                                 regulator-max-microvolt = <1800000>;
361                                 regulator-always-on;
362                                 regulator-boot-on;
363                         };
364
365                         ldo14_reg: LDO14 {
366                                 regulator-name = "VDD18_ABB0_2_1.8V";
367                                 regulator-min-microvolt = <1800000>;
368                                 regulator-max-microvolt = <1800000>;
369                                 regulator-always-on;
370                                 regulator-boot-on;
371                         };
372
373                         ldo15_reg: LDO15 {
374                                 regulator-name = "VDD10_HSIC_1.0V";
375                                 regulator-min-microvolt = <1000000>;
376                                 regulator-max-microvolt = <1000000>;
377                                 regulator-always-on;
378                                 regulator-boot-on;
379                         };
380
381                         ldo16_reg: LDO16 {
382                                 regulator-name = "VDD18_HSIC_1.8V";
383                                 regulator-min-microvolt = <1800000>;
384                                 regulator-max-microvolt = <1800000>;
385                                 regulator-always-on;
386                                 regulator-boot-on;
387                         };
388
389                         ldo20_reg: LDO20 {
390                                 regulator-name = "LDO20_1.8V";
391                                 regulator-min-microvolt = <1800000>;
392                                 regulator-max-microvolt = <1800000>;
393                                 regulator-boot-on;
394                         };
395
396                         ldo21_reg: LDO21 {
397                                 regulator-name = "TFLASH_2.8V";
398                                 regulator-min-microvolt = <2800000>;
399                                 regulator-max-microvolt = <2800000>;
400                                 regulator-boot-on;
401                         };
402
403                         ldo22_reg: LDO22 {
404                                 /*
405                                  * Only U3 uses it, so let it define the
406                                  * constraints
407                                  */
408                                 regulator-name = "LDO22";
409                                 regulator-boot-on;
410                         };
411
412                         ldo25_reg: LDO25 {
413                                 regulator-name = "VDDQ_LCD_1.8V";
414                                 regulator-min-microvolt = <1800000>;
415                                 regulator-max-microvolt = <1800000>;
416                                 regulator-always-on;
417                                 regulator-boot-on;
418                         };
419
420                         buck1_reg: BUCK1 {
421                                 regulator-name = "vdd_mif";
422                                 regulator-min-microvolt = <900000>;
423                                 regulator-max-microvolt = <1100000>;
424                                 regulator-always-on;
425                                 regulator-boot-on;
426                         };
427
428                         buck2_reg: BUCK2 {
429                                 regulator-name = "vdd_arm";
430                                 regulator-min-microvolt = <900000>;
431                                 regulator-max-microvolt = <1350000>;
432                                 regulator-always-on;
433                                 regulator-boot-on;
434                         };
435
436                         buck3_reg: BUCK3 {
437                                 regulator-name = "vdd_int";
438                                 regulator-min-microvolt = <900000>;
439                                 regulator-max-microvolt = <1050000>;
440                                 regulator-always-on;
441                                 regulator-boot-on;
442                         };
443
444                         buck4_reg: BUCK4 {
445                                 regulator-name = "vdd_g3d";
446                                 regulator-min-microvolt = <900000>;
447                                 regulator-max-microvolt = <1100000>;
448                                 regulator-microvolt-offset = <50000>;
449                         };
450
451                         buck5_reg: BUCK5 {
452                                 regulator-name = "VDDQ_CKEM1_2_1.2V";
453                                 regulator-min-microvolt = <1200000>;
454                                 regulator-max-microvolt = <1200000>;
455                                 regulator-always-on;
456                                 regulator-boot-on;
457                         };
458
459                         buck6_reg: BUCK6 {
460                                 regulator-name = "BUCK6_1.35V";
461                                 regulator-min-microvolt = <1350000>;
462                                 regulator-max-microvolt = <1350000>;
463                                 regulator-always-on;
464                                 regulator-boot-on;
465                         };
466
467                         buck7_reg: BUCK7 {
468                                 regulator-name = "BUCK7_2.0V";
469                                 regulator-min-microvolt = <2000000>;
470                                 regulator-max-microvolt = <2000000>;
471                                 regulator-always-on;
472                         };
473
474                         buck8_reg: BUCK8 {
475                                 /*
476                                  * Constraints set by specific board: X,
477                                  * X2 and U3.
478                                  */
479                                 regulator-name = "BUCK8_2.8V";
480                         };
481                 };
482         };
483 };
484
485 &i2c_1 {
486         status = "okay";
487         max98090: max98090@10 {
488                 compatible = "maxim,max98090";
489                 reg = <0x10>;
490                 interrupt-parent = <&gpx0>;
491                 interrupts = <0 IRQ_TYPE_NONE>;
492                 clocks = <&i2s0 CLK_I2S_CDCLK>;
493                 clock-names = "mclk";
494                 #sound-dai-cells = <0>;
495         };
496 };
497
498 &i2c_2 {
499         status = "okay";
500 };
501
502 &i2c_8 {
503         status = "okay";
504 };
505
506 &i2s0 {
507         pinctrl-0 = <&i2s0_bus>;
508         pinctrl-names = "default";
509         status = "okay";
510         assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>;
511         assigned-clock-parents = <&clock_audss EXYNOS_SCLK_I2S>;
512 };
513
514 &mixer {
515         status = "okay";
516 };
517
518 &mshc_0 {
519         pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
520         pinctrl-names = "default";
521         vmmc-supply = <&ldo20_reg>;
522         mmc-pwrseq = <&emmc_pwrseq>;
523         status = "okay";
524
525         broken-cd;
526         card-detect-delay = <200>;
527         samsung,dw-mshc-ciu-div = <3>;
528         samsung,dw-mshc-sdr-timing = <2 3>;
529         samsung,dw-mshc-ddr-timing = <1 2>;
530         bus-width = <8>;
531         cap-mmc-highspeed;
532 };
533
534 &rtc {
535         status = "okay";
536         clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>;
537         clock-names = "rtc", "rtc_src";
538 };
539
540 &sdhci_2 {
541         bus-width = <4>;
542         pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
543         pinctrl-names = "default";
544         vmmc-supply = <&ldo21_reg>;
545         vqmmc-supply = <&ldo4_reg>;
546         cd-gpios = <&gpk2 2 GPIO_ACTIVE_LOW>;
547         status = "okay";
548 };
549
550 &serial_0 {
551         status = "okay";
552 };
553
554 &serial_1 {
555         status = "okay";
556 };
557
558 &tmu {
559         vtmu-supply = <&ldo10_reg>;
560         status = "okay";
561 };