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