Linux-libre 5.3.12-gnu
[librecmc/linux-libre.git] / arch / arm / boot / dts / exynos4210-universal_c210.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Samsung's Exynos4210 based Universal C210 board device tree source
4  *
5  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
6  *              http://www.samsung.com
7  *
8  * Device tree source file for Samsung's Universal C210 board which is based on
9  * Samsung's Exynos4210 rev0 SoC.
10  */
11
12 /dts-v1/;
13 #include "exynos4210.dtsi"
14 #include <dt-bindings/gpio/gpio.h>
15
16 / {
17         model = "Samsung Universal C210 based on Exynos4210 rev0";
18         compatible = "samsung,universal_c210", "samsung,exynos4210", "samsung,exynos4";
19
20         memory@40000000 {
21                 device_type = "memory";
22                 reg =  <0x40000000 0x10000000
23                         0x50000000 0x10000000>;
24         };
25
26         chosen {
27                 bootargs = "root=/dev/mmcblk0p5 rw rootwait earlyprintk panic=5 maxcpus=1";
28                 stdout-path = "serial2:115200n8";
29         };
30
31
32         fixed-rate-clocks {
33                 xxti {
34                         compatible = "samsung,clock-xxti";
35                         clock-frequency = <0>;
36                 };
37
38                 xusbxti {
39                         compatible = "samsung,clock-xusbxti";
40                         clock-frequency = <24000000>;
41                 };
42         };
43
44         vemmc_reg: voltage-regulator {
45                 compatible = "regulator-fixed";
46                 regulator-name = "VMEM_VDD_2_8V";
47                 regulator-min-microvolt = <2800000>;
48                 regulator-max-microvolt = <2800000>;
49                 gpio = <&gpe1 3 GPIO_ACTIVE_HIGH>;
50                 enable-active-high;
51         };
52
53         gpio-keys {
54                 compatible = "gpio-keys";
55
56                 vol-up-key {
57                         gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
58                         linux,code = <115>;
59                         label = "volume up";
60                         debounce-interval = <1>;
61                 };
62
63                 vol-down-key {
64                         gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
65                         linux,code = <114>;
66                         label = "volume down";
67                         debounce-interval = <1>;
68                 };
69
70                 config-key {
71                         gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
72                         linux,code = <171>;
73                         label = "config";
74                         debounce-interval = <1>;
75                         wakeup-source;
76                 };
77
78                 camera-key {
79                         gpios = <&gpx2 3 GPIO_ACTIVE_LOW>;
80                         linux,code = <212>;
81                         label = "camera";
82                         debounce-interval = <1>;
83                 };
84
85                 power-key {
86                         gpios = <&gpx2 7 GPIO_ACTIVE_LOW>;
87                         linux,code = <116>;
88                         label = "power";
89                         debounce-interval = <1>;
90                         wakeup-source;
91                 };
92
93                 ok-key {
94                         gpios = <&gpx3 5 GPIO_ACTIVE_LOW>;
95                         linux,code = <352>;
96                         label = "ok";
97                         debounce-interval = <1>;
98                 };
99         };
100
101         tsp_reg: voltage-regulator {
102                 compatible = "regulator-fixed";
103                 regulator-name = "TSP_2_8V";
104                 regulator-min-microvolt = <2800000>;
105                 regulator-max-microvolt = <2800000>;
106                 gpio = <&gpe2 3 GPIO_ACTIVE_HIGH>;
107                 enable-active-high;
108         };
109
110         spi-lcd {
111                 compatible = "spi-gpio";
112                 #address-cells = <1>;
113                 #size-cells = <0>;
114
115                 gpio-sck = <&gpy3 1 GPIO_ACTIVE_HIGH>;
116                 gpio-mosi = <&gpy3 3 GPIO_ACTIVE_HIGH>;
117                 num-chipselects = <1>;
118                 cs-gpios = <&gpy4 3 GPIO_ACTIVE_HIGH>;
119
120                 lcd@0 {
121                         compatible = "samsung,ld9040";
122                         reg = <0>;
123                         vdd3-supply = <&ldo7_reg>;
124                         vci-supply = <&ldo17_reg>;
125                         reset-gpios = <&gpy4 5 GPIO_ACTIVE_HIGH>;
126                         spi-max-frequency = <1200000>;
127                         spi-cpol;
128                         spi-cpha;
129                         power-on-delay = <10>;
130                         reset-delay = <10>;
131                         panel-width-mm = <90>;
132                         panel-height-mm = <154>;
133                         display-timings {
134                                 timing {
135                                         clock-frequency = <23492370>;
136                                         hactive = <480>;
137                                         vactive = <800>;
138                                         hback-porch = <16>;
139                                         hfront-porch = <16>;
140                                         vback-porch = <2>;
141                                         vfront-porch = <28>;
142                                         hsync-len = <2>;
143                                         vsync-len = <1>;
144                                         hsync-active = <0>;
145                                         vsync-active = <0>;
146                                         de-active = <0>;
147                                         pixelclk-active = <0>;
148                                 };
149                         };
150                         port {
151                                 lcd_ep: endpoint {
152                                         remote-endpoint = <&fimd_dpi_ep>;
153                                 };
154                         };
155                 };
156         };
157
158         hdmi_en: voltage-regulator-hdmi-5v {
159                 compatible = "regulator-fixed";
160                 regulator-name = "HDMI_5V";
161                 regulator-min-microvolt = <5000000>;
162                 regulator-max-microvolt = <5000000>;
163                 gpio = <&gpe0 1 GPIO_ACTIVE_HIGH>;
164                 enable-active-high;
165         };
166
167         hdmi_ddc: i2c-ddc {
168                 compatible = "i2c-gpio";
169                 gpios = <&gpe4 2 GPIO_ACTIVE_HIGH &gpe4 3 GPIO_ACTIVE_HIGH>;
170                 i2c-gpio,delay-us = <100>;
171                 #address-cells = <1>;
172                 #size-cells = <0>;
173
174                 pinctrl-0 = <&i2c_ddc_bus>;
175                 pinctrl-names = "default";
176                 status = "okay";
177         };
178 };
179
180 &amba {
181         mdma0: mdma@12840000 {
182                 compatible = "arm,pl330", "arm,primecell";
183                 reg = <0x12840000 0x1000>;
184                 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
185                 clocks = <&clock CLK_MDMA>;
186                 clock-names = "apb_pclk";
187                 #dma-cells = <1>;
188                 #dma-channels = <8>;
189                 #dma-requests = <1>;
190                 power-domains = <&pd_lcd0>;
191         };
192 };
193
194 &camera {
195         status = "okay";
196
197         pinctrl-names = "default";
198         pinctrl-0 = <>;
199 };
200
201 &cpu0 {
202         cpu0-supply = <&vdd_arm_reg>;
203 };
204
205 &ehci {
206         status = "okay";
207         port@0 {
208                 status = "okay";
209         };
210 };
211
212 &exynos_usbphy {
213         status = "okay";
214         vbus-supply = <&safeout1_reg>;
215 };
216
217 &fimc_0 {
218         status = "okay";
219         assigned-clocks = <&clock CLK_MOUT_FIMC0>,
220                           <&clock CLK_SCLK_FIMC0>;
221         assigned-clock-parents = <&clock CLK_SCLK_MPLL>;
222         assigned-clock-rates = <0>, <160000000>;
223 };
224
225 &fimc_1 {
226         status = "okay";
227         assigned-clocks = <&clock CLK_MOUT_FIMC1>,
228                           <&clock CLK_SCLK_FIMC1>;
229         assigned-clock-parents = <&clock CLK_SCLK_MPLL>;
230         assigned-clock-rates = <0>, <160000000>;
231 };
232
233 &fimc_2 {
234         status = "okay";
235         assigned-clocks = <&clock CLK_MOUT_FIMC2>,
236                           <&clock CLK_SCLK_FIMC2>;
237         assigned-clock-parents = <&clock CLK_SCLK_MPLL>;
238         assigned-clock-rates = <0>, <160000000>;
239 };
240
241 &fimc_3 {
242         status = "okay";
243         assigned-clocks = <&clock CLK_MOUT_FIMC3>,
244                           <&clock CLK_SCLK_FIMC3>;
245         assigned-clock-parents = <&clock CLK_SCLK_MPLL>;
246         assigned-clock-rates = <0>, <160000000>;
247 };
248
249 &fimd {
250         pinctrl-0 = <&lcd_clk>, <&lcd_data24>;
251         pinctrl-names = "default";
252         status = "okay";
253         samsung,invert-vden;
254         samsung,invert-vclk;
255         #address-cells = <1>;
256         #size-cells = <0>;
257         port@3 {
258                 reg = <3>;
259                 fimd_dpi_ep: endpoint {
260                         remote-endpoint = <&lcd_ep>;
261                 };
262         };
263 };
264
265 &gpu {
266         mali-supply = <&buck2_reg>;
267         status = "okay";
268 };
269
270 &hdmi {
271         hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
272         pinctrl-names = "default";
273         pinctrl-0 = <&hdmi_hpd>;
274         hdmi-en-supply = <&hdmi_en>;
275         vdd-supply = <&ldo3_reg>;
276         vdd_osc-supply = <&ldo4_reg>;
277         vdd_pll-supply = <&ldo3_reg>;
278         ddc = <&hdmi_ddc>;
279         status = "okay";
280 };
281
282 &hsotg {
283         vusb_d-supply = <&ldo3_reg>;
284         vusb_a-supply = <&ldo8_reg>;
285         dr_mode = "peripheral";
286         status = "okay";
287 };
288
289 &i2c_3 {
290         samsung,i2c-sda-delay = <100>;
291         samsung,i2c-slave-addr = <0x10>;
292         samsung,i2c-max-bus-freq = <100000>;
293         pinctrl-0 = <&i2c3_bus>;
294         pinctrl-names = "default";
295         status = "okay";
296
297         tsp@4a {
298                 /* TBD: Atmel maXtouch touchscreen */
299                 reg = <0x4a>;
300         };
301 };
302
303 &i2c_5 {
304         samsung,i2c-sda-delay = <100>;
305         samsung,i2c-slave-addr = <0x10>;
306         samsung,i2c-max-bus-freq = <100000>;
307         pinctrl-0 = <&i2c5_bus>;
308         pinctrl-names = "default";
309         status = "okay";
310
311         vdd_arm_reg: pmic@60 {
312                 compatible = "maxim,max8952";
313                 reg = <0x60>;
314
315                 max8952,vid-gpios = <&gpx0 3 GPIO_ACTIVE_HIGH>,
316                                     <&gpx0 4 GPIO_ACTIVE_HIGH>;
317                 max8952,default-mode = <0>;
318                 max8952,dvs-mode-microvolt = <1250000>, <1200000>,
319                                                 <1050000>, <950000>;
320                 max8952,sync-freq = <0>;
321                 max8952,ramp-speed = <0>;
322
323                 regulator-name = "vdd_arm";
324                 regulator-min-microvolt = <770000>;
325                 regulator-max-microvolt = <1400000>;
326                 regulator-always-on;
327                 regulator-boot-on;
328         };
329
330         pmic@66 {
331                 compatible = "national,lp3974";
332                 interrupts-extended = <&gpx0 7 0>, <&gpx2 7 0>;
333                 pinctrl-names = "default";
334                 pinctrl-0 = <&lp3974_irq>;
335                 reg = <0x66>;
336
337                 max8998,pmic-buck1-default-dvs-idx = <0>;
338                 max8998,pmic-buck1-dvs-gpios = <&gpx0 5 GPIO_ACTIVE_HIGH>,
339                                                 <&gpx0 6 GPIO_ACTIVE_HIGH>;
340                 max8998,pmic-buck1-dvs-voltage = <1100000>, <1000000>,
341                                                 <1100000>, <1000000>;
342
343                 max8998,pmic-buck2-default-dvs-idx = <0>;
344                 max8998,pmic-buck2-dvs-gpio = <&gpe2 0 GPIO_ACTIVE_HIGH>;
345                 max8998,pmic-buck2-dvs-voltage = <1200000>, <1100000>;
346
347                 regulators {
348                         ldo2_reg: LDO2 {
349                                 regulator-name = "VALIVE_1.2V";
350                                 regulator-min-microvolt = <1200000>;
351                                 regulator-max-microvolt = <1200000>;
352                                 regulator-always-on;
353                         };
354
355                         ldo3_reg: LDO3 {
356                                 regulator-name = "VUSB+MIPI_1.1V";
357                                 regulator-min-microvolt = <1100000>;
358                                 regulator-max-microvolt = <1100000>;
359                                 regulator-always-on;
360                         };
361
362                         ldo4_reg: LDO4 {
363                                 regulator-name = "VADC_3.3V";
364                                 regulator-min-microvolt = <3300000>;
365                                 regulator-max-microvolt = <3300000>;
366                         };
367
368                         ldo5_reg: LDO5 {
369                                 regulator-name = "VTF_2.8V";
370                                 regulator-min-microvolt = <2800000>;
371                                 regulator-max-microvolt = <2800000>;
372                         };
373
374                         ldo6_reg: LDO6 {
375                                 regulator-name = "LDO6";
376                                 regulator-min-microvolt = <2000000>;
377                                 regulator-max-microvolt = <2000000>;
378                         };
379
380                         ldo7_reg: LDO7 {
381                                 regulator-name = "VLCD+VMIPI_1.8V";
382                                 regulator-min-microvolt = <1800000>;
383                                 regulator-max-microvolt = <1800000>;
384                         };
385
386                         ldo8_reg: LDO8 {
387                                 regulator-name = "VUSB+VDAC_3.3V";
388                                 regulator-min-microvolt = <3300000>;
389                                 regulator-max-microvolt = <3300000>;
390                                 regulator-always-on;
391                         };
392
393                         ldo9_reg: LDO9 {
394                                 regulator-name = "VCC_2.8V";
395                                 regulator-min-microvolt = <2800000>;
396                                 regulator-max-microvolt = <2800000>;
397                                 regulator-always-on;
398                         };
399
400                         ldo10_reg: LDO10 {
401                                 regulator-name = "VPLL_1.1V";
402                                 regulator-min-microvolt = <1100000>;
403                                 regulator-max-microvolt = <1100000>;
404                                 regulator-boot-on;
405                                 regulator-always-on;
406                         };
407
408                         ldo11_reg: LDO11 {
409                                 regulator-name = "CAM_AF_3.3V";
410                                 regulator-min-microvolt = <3300000>;
411                                 regulator-max-microvolt = <3300000>;
412                         };
413
414                         ldo12_reg: LDO12 {
415                                 regulator-name = "PS_2.8V";
416                                 regulator-min-microvolt = <2800000>;
417                                 regulator-max-microvolt = <2800000>;
418                         };
419
420                         ldo13_reg: LDO13 {
421                                 regulator-name = "VHIC_1.2V";
422                                 regulator-min-microvolt = <1200000>;
423                                 regulator-max-microvolt = <1200000>;
424                         };
425
426                         ldo14_reg: LDO14 {
427                                 regulator-name = "CAM_I_HOST_1.8V";
428                                 regulator-min-microvolt = <1800000>;
429                                 regulator-max-microvolt = <1800000>;
430                         };
431
432                         ldo15_reg: LDO15 {
433                                 regulator-name = "CAM_S_DIG+FM33_CORE_1.2V";
434                                 regulator-min-microvolt = <1200000>;
435                                 regulator-max-microvolt = <1200000>;
436                         };
437
438                         ldo16_reg: LDO16 {
439                                 regulator-name = "CAM_S_ANA_2.8V";
440                                 regulator-min-microvolt = <2800000>;
441                                 regulator-max-microvolt = <2800000>;
442                         };
443
444                         ldo17_reg: LDO17 {
445                                 regulator-name = "VCC_3.0V_LCD";
446                                 regulator-min-microvolt = <3000000>;
447                                 regulator-max-microvolt = <3000000>;
448                         };
449
450                         buck1_reg: BUCK1 {
451                                 regulator-name = "VINT_1.1V";
452                                 regulator-min-microvolt = <750000>;
453                                 regulator-max-microvolt = <1500000>;
454                                 regulator-boot-on;
455                                 regulator-always-on;
456                         };
457
458                         buck2_reg: BUCK2 {
459                                 regulator-name = "VG3D_1.1V";
460                                 regulator-min-microvolt = <750000>;
461                                 regulator-max-microvolt = <1500000>;
462                                 regulator-boot-on;
463                         };
464
465                         buck3_reg: BUCK3 {
466                                 regulator-name = "VCC_1.8V";
467                                 regulator-min-microvolt = <1800000>;
468                                 regulator-max-microvolt = <1800000>;
469                                 regulator-always-on;
470                         };
471
472                         buck4_reg: BUCK4 {
473                                 regulator-name = "VMEM_1.2V";
474                                 regulator-min-microvolt = <1200000>;
475                                 regulator-max-microvolt = <1200000>;
476                                 regulator-always-on;
477                         };
478
479                         ap32khz_reg: EN32KHz-AP {
480                                 regulator-name = "32KHz AP";
481                                 regulator-always-on;
482                         };
483
484                         cp32khz_reg: EN32KHz-CP {
485                                 regulator-name = "32KHz CP";
486                         };
487
488                         vichg_reg: ENVICHG {
489                                 regulator-name = "VICHG";
490                         };
491
492                         safeout1_reg: ESAFEOUT1 {
493                                 regulator-name = "SAFEOUT1";
494                         };
495
496                         safeout2_reg: ESAFEOUT2 {
497                                 regulator-name = "SAFEOUT2";
498                                 regulator-boot-on;
499                         };
500                 };
501         };
502 };
503
504 &i2c_8 {
505         status = "okay";
506 };
507
508 &mct {
509         compatible = "none";
510 };
511
512 &mdma1 {
513         /* Use the secure mdma0 */
514         status = "disabled";
515 };
516
517 &mixer {
518         status = "okay";
519 };
520
521 &ohci {
522         status = "okay";
523         port@0 {
524                 status = "okay";
525         };
526 };
527
528 &pinctrl_1 {
529         lp3974_irq: lp3974-irq {
530                 samsung,pins = "gpx0-7", "gpx2-7";
531                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
532         };
533
534         hdmi_hpd: hdmi-hpd {
535                 samsung,pins = "gpx3-7";
536                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
537         };
538 };
539
540 &pinctrl_0 {
541         i2c_ddc_bus: i2c-ddc-bus {
542                 samsung,pins = "gpe4-2", "gpe4-3";
543                 samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
544                 samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
545                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
546         };
547 };
548
549 &pwm {
550         compatible = "samsung,s5p6440-pwm";
551         status = "okay";
552 };
553
554 &sdhci_0 {
555         bus-width = <8>;
556         non-removable;
557         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus8>;
558         pinctrl-names = "default";
559         vmmc-supply = <&vemmc_reg>;
560         status = "okay";
561 };
562
563 &sdhci_2 {
564         bus-width = <4>;
565         pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
566         pinctrl-names = "default";
567         vmmc-supply = <&ldo5_reg>;
568         cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
569         status = "okay";
570 };
571
572 &serial_0 {
573         status = "okay";
574         /delete-property/dmas;
575         /delete-property/dma-names;
576 };
577
578 &serial_1 {
579         status = "okay";
580         /delete-property/dmas;
581         /delete-property/dma-names;
582 };
583
584 &serial_2 {
585         status = "okay";
586         /delete-property/dmas;
587         /delete-property/dma-names;
588 };
589
590 &serial_3 {
591         status = "okay";
592         /delete-property/dmas;
593         /delete-property/dma-names;
594 };
595
596 &sysram {
597         smp-sysram@0 {
598                 status = "disabled";
599         };
600
601         smp-sysram@5000 {
602                 compatible = "samsung,exynos4210-sysram";
603                 reg = <0x5000 0x1000>;
604         };
605
606         smp-sysram@1f000 {
607                 status = "disabled";
608         };
609 };