xref: /freebsd/sys/contrib/device-tree/src/arm/samsung/exynos5420-galaxy-tab-common.dtsi (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Base DT for Samsung's family of tablets based on Exynos5420.
4 *
5 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
6 *		http://www.samsung.com
7 * Copyright (c) 2022 Henrik Grimler
8 */
9
10/dts-v1/;
11#include "exynos5420.dtsi"
12#include "exynos5420-cpus.dtsi"
13#include <dt-bindings/input/input.h>
14#include <dt-bindings/gpio/gpio.h>
15#include <dt-bindings/clock/samsung,s2mps11.h>
16
17/ {
18	chassis-type = "tablet";
19
20	/*
21	 * To successfully boot the mainline kernel with the stock
22	 * bootloader (SBOOT), the tlb needs to be flushed after the
23	 * page table pointer has been updated in __common_mmu_cache_on.
24	 * The same hack is also needed to boot exynos4412-i9300 with
25	 * stock bootloader, and probably other Samsung devices of
26	 * similar age.  See
27	 * https://lore.kernel.org/all/1355276466-18295-1-git-send-email-arve@android.com
28	 * for more details.
29	 */
30
31	aliases {
32		mmc0 = &mmc_0;
33		mmc2 = &mmc_2;
34	};
35
36	chosen {
37		stdout-path = "serial2:115200n8";
38	};
39
40	memory@20000000 {
41		device_type = "memory";
42		reg = <0x20000000 0xc0000000>;
43	};
44
45	firmware@2073000 {
46		compatible = "samsung,secure-firmware";
47		reg = <0x02073000 0x1000>;
48	};
49
50	fixed-rate-clocks {
51		oscclk {
52			compatible = "samsung,exynos5420-oscclk";
53			clock-frequency = <24000000>;
54		};
55	};
56
57	gpio-keys {
58		compatible = "gpio-keys";
59
60		key-power {
61			debounce-interval = <10>;
62			gpios = <&gpx2 2 GPIO_ACTIVE_LOW>;
63			label = "Power";
64			linux,code = <KEY_POWER>;
65			wakeup-source;
66		};
67
68		key-home {
69			debounce-interval = <10>;
70			gpios = <&gpx0 5 GPIO_ACTIVE_LOW>;
71			label = "Home";
72			linux,code = <KEY_HOME>;
73			wakeup-source;
74		};
75
76		key-volume-up {
77			debounce-interval = <10>;
78			gpios = <&gpx0 2 GPIO_ACTIVE_LOW>;
79			label = "Volume Up";
80			linux,code = <KEY_VOLUMEUP>;
81		};
82
83		key-volume-down {
84			debounce-interval = <10>;
85			gpios = <&gpx0 3 GPIO_ACTIVE_LOW>;
86			label = "Volume Down";
87			linux,code = <KEY_VOLUMEDOWN>;
88		};
89	};
90};
91
92&cci {
93	/* CCI is disabled in hardware */
94	status = "disabled";
95};
96
97&cpu0 {
98	cpu-supply = <&buck2_reg>;
99};
100
101&cpu4 {
102	cpu-supply = <&buck6_reg>;
103};
104
105&gpu {
106	status = "okay";
107	mali-supply = <&buck4_reg>;
108};
109
110&hsi2c_7 {
111	status = "okay";
112
113	pmic@66 {
114		compatible = "samsung,s2mps11-pmic";
115		reg = <0x66>;
116
117		interrupt-parent = <&gpx3>;
118		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
119		pinctrl-names = "default";
120		pinctrl-0 = <&s2mps11_irq>;
121
122		s2mps11_osc: clocks {
123			compatible = "samsung,s2mps11-clk";
124			#clock-cells = <1>;
125			clock-output-names = "s2mps11_ap", "s2mps11_cp",
126					     "s2mps11_bt";
127		};
128
129		regulators {
130			buck1_reg: BUCK1 {
131				regulator-name = "VDD_MIF_1V1";
132				regulator-min-microvolt = <700000>;
133				regulator-max-microvolt = <1300000>;
134				regulator-always-on;
135				regulator-boot-on;
136
137				regulator-state-mem {
138					regulator-off-in-suspend;
139				};
140			};
141
142			buck2_reg: BUCK2 {
143				regulator-name = "VDD_ARM_1V0";
144				regulator-min-microvolt = <800000>;
145				regulator-max-microvolt = <1500000>;
146				regulator-always-on;
147				regulator-boot-on;
148
149				regulator-state-mem {
150					regulator-off-in-suspend;
151				};
152			};
153
154			buck3_reg: BUCK3 {
155				regulator-name = "VDD_INT_1V0";
156				regulator-min-microvolt = <800000>;
157				regulator-max-microvolt = <1400000>;
158				regulator-always-on;
159				regulator-boot-on;
160
161				regulator-state-mem {
162					regulator-off-in-suspend;
163				};
164			};
165
166			buck4_reg: BUCK4 {
167				regulator-name = "VDD_G3D_1V0";
168				regulator-min-microvolt = <700000>;
169				regulator-max-microvolt = <1400000>;
170				regulator-always-on;
171				regulator-boot-on;
172
173				regulator-state-mem {
174					regulator-off-in-suspend;
175				};
176			};
177
178			buck5_reg: BUCK5 {
179				regulator-name = "VDD_MEM_1V2";
180				regulator-min-microvolt = <1200000>;
181				regulator-max-microvolt = <1200000>;
182				regulator-always-on;
183				regulator-boot-on;
184
185				regulator-state-mem {
186					regulator-off-in-suspend;
187				};
188
189			};
190
191			buck6_reg: BUCK6 {
192				regulator-name = "VDD_KFC_1V0";
193				regulator-min-microvolt = <800000>;
194				regulator-max-microvolt = <1500000>;
195				regulator-always-on;
196				regulator-boot-on;
197
198				regulator-state-mem {
199					regulator-off-in-suspend;
200				};
201			};
202
203			buck7_reg: BUCK7 {
204				regulator-name = "VIN_LLDO_1V4";
205				regulator-min-microvolt = <1200000>;
206				regulator-max-microvolt = <1500000>;
207				regulator-always-on;
208			};
209
210			buck8_reg: BUCK8 {
211				regulator-name = "VIN_MLDO_2V0";
212				regulator-min-microvolt = <1800000>;
213				regulator-max-microvolt = <2100000>;
214				regulator-always-on;
215			};
216
217			buck9_reg: BUCK9 {
218				regulator-name = "VIN_HLDO_3V5";
219				regulator-min-microvolt = <3000000>;
220				regulator-max-microvolt = <3500000>;
221				regulator-always-on;
222			};
223
224			buck10_reg: BUCK10 {
225				regulator-name = "VDD_CAM_ISP_1V0";
226				regulator-min-microvolt = <750000>;
227				regulator-max-microvolt = <3550000>;
228			};
229
230			ldo1_reg: LDO1 {
231				regulator-name = "VDD_ALIVE_1.0V";
232				regulator-min-microvolt = <1000000>;
233				regulator-max-microvolt = <1000000>;
234				regulator-always-on;
235			};
236
237			ldo2_reg: LDO2 {
238				regulator-name = "VDD_APIO_1V8";
239				regulator-min-microvolt = <1800000>;
240				regulator-max-microvolt = <1800000>;
241				regulator-always-on;
242				regulator-boot-on;
243
244				regulator-state-mem {
245					regulator-on-in-suspend;
246				};
247			};
248
249			ldo3_reg: LDO3 {
250				regulator-name = "VDD_APIO_MMC01_1V8";
251				regulator-min-microvolt = <1800000>;
252				regulator-max-microvolt = <1800000>;
253				regulator-always-on;
254
255				regulator-state-mem {
256					regulator-off-in-suspend;
257				};
258			};
259
260			ldo4_reg: LDO4 {
261				regulator-name = "VDD_ADC_1V8";
262				regulator-min-microvolt = <1800000>;
263				regulator-max-microvolt = <1800000>;
264				regulator-always-on;
265				regulator-boot-on;
266
267				regulator-state-mem {
268					regulator-on-in-suspend;
269				};
270			};
271
272			ldo5_reg: LDO5 {
273				/* Unused */
274				regulator-name = "VDD_LDO5";
275				regulator-min-microvolt = <1800000>;
276				regulator-max-microvolt = <1800000>;
277			};
278
279			ldo6_reg: LDO6 {
280				regulator-name = "VDD_MIPI_1V0";
281				regulator-min-microvolt = <1000000>;
282				regulator-max-microvolt = <1000000>;
283				regulator-always-on;
284				regulator-boot-on;
285
286				regulator-state-mem {
287					regulator-off-in-suspend;
288				};
289			};
290
291			ldo7_reg: LDO7 {
292				regulator-name = "VDD_MIPI_PLL_ABB1_18V";
293				regulator-min-microvolt = <1800000>;
294				regulator-max-microvolt = <1800000>;
295				regulator-always-on;
296				regulator-boot-on;
297
298				regulator-state-mem {
299					regulator-off-in-suspend;
300				};
301			};
302
303			ldo8_reg: LDO8 {
304				/* Unused */
305				regulator-name = "VDD_LDO8";
306				regulator-min-microvolt = <1800000>;
307				regulator-max-microvolt = <1800000>;
308			};
309
310			ldo9_reg: LDO9 {
311				regulator-name = "VDD_UOTG_3V0";
312				regulator-min-microvolt = <3000000>;
313				regulator-max-microvolt = <3000000>;
314				regulator-always-on;
315				regulator-boot-on;
316
317				regulator-state-mem {
318					regulator-on-in-suspend;
319				};
320			};
321
322			ldo10_reg: LDO10 {
323				regulator-name = "VDDQ_PRE_1V8";
324				regulator-min-microvolt = <1800000>;
325				regulator-max-microvolt = <1800000>;
326				regulator-always-on;
327				regulator-boot-on;
328
329				regulator-state-mem {
330					regulator-on-in-suspend;
331				};
332			};
333
334			ldo11_reg: LDO11 {
335				regulator-name = "VDD_HSIC_1V0";
336				regulator-min-microvolt = <1000000>;
337				regulator-max-microvolt = <1000000>;
338				regulator-always-on;
339				regulator-boot-on;
340
341				regulator-state-mem {
342					regulator-on-in-suspend;
343				};
344			};
345
346			ldo12_reg: LDO12 {
347				regulator-name = "VDD_HSIC_1V8";
348				regulator-min-microvolt = <1800000>;
349				regulator-max-microvolt = <1800000>;
350				regulator-always-on;
351				regulator-boot-on;
352
353				regulator-state-mem {
354					regulator-on-in-suspend;
355				};
356			};
357
358			ldo13_reg: LDO13 {
359				regulator-name = "VDD_APIO_MMC2_2V8";
360				regulator-min-microvolt = <1800000>;
361				regulator-max-microvolt = <2800000>;
362				regulator-boot-on;
363
364				regulator-state-mem {
365					regulator-off-in-suspend;
366				};
367			};
368
369			ldo14_reg: LDO14 {
370				regulator-name = "VDD_MOTOR_3V0";
371				regulator-min-microvolt = <3000000>;
372				regulator-max-microvolt = <3000000>;
373
374				regulator-state-mem {
375					regulator-off-in-suspend;
376				};
377			};
378
379			ldo15_reg: LDO15 {
380				regulator-name = "VDD_LDO15";
381				/*
382				 * LDO15 varies between devices and is
383				 * specified in the device dts
384				 */
385			};
386
387			ldo16_reg: LDO16 {
388				regulator-name = "VDD_AP_2V8";
389				regulator-min-microvolt = <2800000>;
390				regulator-max-microvolt = <2800000>;
391				regulator-always-on;
392				regulator-boot-on;
393
394				regulator-state-mem {
395					regulator-on-in-suspend;
396				};
397			};
398
399			ldo17_reg: LDO17 {
400				regulator-name = "VDD_LDO17";
401				/*
402				 * LDO17 varies between devices and is
403				 * specified in the device dts
404				 */
405			};
406
407			ldo18_reg: LDO18 {
408				/* Unused */
409				regulator-name = "VDD_LDO18";
410				regulator-min-microvolt = <1800000>;
411				regulator-max-microvolt = <1800000>;
412			};
413
414			ldo19_reg: LDO19 {
415				regulator-name = "VDD_VTF_2V8";
416				regulator-min-microvolt = <2800000>;
417				regulator-max-microvolt = <2800000>;
418
419				regulator-state-mem {
420					regulator-off-in-suspend;
421				};
422			};
423
424			ldo20_reg: LDO20 {
425				regulator-name = "VDD_CAM1_CAM_1V8";
426				regulator-min-microvolt = <1800000>;
427				regulator-max-microvolt = <1800000>;
428
429				regulator-state-mem {
430					regulator-off-in-suspend;
431				};
432			};
433
434			ldo21_reg: LDO21 {
435				regulator-name = "VDD_CAM_IO_1V8";
436				regulator-min-microvolt = <1800000>;
437				regulator-max-microvolt = <1800000>;
438
439				regulator-state-mem {
440					regulator-off-in-suspend;
441				};
442			};
443
444			ldo22_reg: LDO22 {
445				regulator-name = "VDD_CAM0_S_CORE_1V1";
446				regulator-min-microvolt = <1050000>;
447				regulator-max-microvolt = <1200000>;
448
449				regulator-state-mem {
450					regulator-off-in-suspend;
451				};
452			};
453
454			ldo23_reg: LDO23 {
455				regulator-name = "VDD_MIFS_1V1";
456				regulator-min-microvolt = <800000>;
457				regulator-max-microvolt = <1100000>;
458				regulator-always-on;
459
460				regulator-state-mem {
461					regulator-on-in-suspend;
462				};
463			};
464
465			ldo24_reg: LDO24 {
466				regulator-name = "VDD_TSP_3V3";
467				regulator-min-microvolt = <3300000>;
468				regulator-max-microvolt = <3300000>;
469
470				regulator-state-mem {
471					regulator-off-in-suspend;
472				};
473			};
474
475			ldo25_reg: LDO25 {
476				/* Unused */
477				regulator-name = "VDD_LDO25";
478				regulator-min-microvolt = <800000>;
479				regulator-max-microvolt = <3950000>;
480			};
481
482			ldo26_reg: LDO26 {
483				regulator-name = "VDD_CAM0_AF_2V8";
484				regulator-min-microvolt = <2800000>;
485				regulator-max-microvolt = <2800000>;
486
487				regulator-state-mem {
488					regulator-off-in-suspend;
489				};
490			};
491
492			ldo27_reg: LDO27 {
493				regulator-name = "VDD_G3DS_1V0";
494				regulator-min-microvolt = <800000>;
495				regulator-max-microvolt = <1000000>;
496				regulator-always-on;
497
498				regulator-state-mem {
499					regulator-on-in-suspend;
500				};
501			};
502
503			ldo28_reg: LDO28 {
504				regulator-name = "VDD_LDO28";
505				/*
506				 * LDO28 varies between devices and is
507				 * specified in the device dts
508				 */
509			};
510
511			ldo29_reg: LDO29 {
512				regulator-name = "VDD_LDO29";
513				/*
514				 * LDO29 varies between devices and is
515				 * specified in the device dts
516				 */
517			};
518
519			ldo30_reg: LDO30 {
520				regulator-name = "VDD_TOUCH_1V8";
521				regulator-min-microvolt = <1900000>;
522				regulator-max-microvolt = <1900000>;
523
524				regulator-state-mem {
525					regulator-off-in-suspend;
526				};
527			};
528
529			ldo31_reg: LDO31 {
530				regulator-name = "VDD_LDO31";
531				/*
532				 * LDO31 varies between devices and is
533				 * specified in the device dts
534				 */
535			};
536
537			ldo32_reg: LDO32 {
538				regulator-name = "VDD_LDO32";
539				/*
540				 * LDO32 varies between devices and is
541				 * specified in the device dts
542				 */
543			};
544
545			ldo33_reg: LDO33 {
546				regulator-name = "VDD_MHL_1V8";
547				regulator-min-microvolt = <1800000>;
548				regulator-max-microvolt = <1800000>;
549
550				regulator-state-mem {
551					regulator-off-in-suspend;
552				};
553			};
554
555			ldo34_reg: LDO34 {
556				regulator-name = "VDD_MHL_3V3";
557				regulator-min-microvolt = <3300000>;
558				regulator-max-microvolt = <3300000>;
559
560				regulator-state-mem {
561					regulator-off-in-suspend;
562				};
563			};
564
565			ldo35_reg: LDO35 {
566				regulator-name = "VDD_SIL_1V2";
567				regulator-min-microvolt = <1200000>;
568				regulator-max-microvolt = <1200000>;
569
570				regulator-state-mem {
571					regulator-off-in-suspend;
572				};
573			};
574
575			ldo36_reg: LDO36 {
576				/* Unused */
577				regulator-name = "VDD_LDO36";
578				regulator-min-microvolt = <800000>;
579				regulator-max-microvolt = <3950000>;
580			};
581
582			ldo37_reg: LDO37 {
583				/* Unused */
584				regulator-name = "VDD_LDO37";
585				regulator-min-microvolt = <800000>;
586				regulator-max-microvolt = <3950000>;
587			};
588
589			ldo38_reg: LDO38 {
590				regulator-name = "VDD_KEY_LED_3V3";
591				regulator-min-microvolt = <2500000>;
592				regulator-max-microvolt = <3300000>;
593
594				regulator-state-mem {
595					regulator-off-in-suspend;
596				};
597			};
598		};
599	};
600};
601
602&mixer {
603	status = "okay";
604};
605
606/* Internal storage */
607&mmc_0 {
608	status = "okay";
609	bus-width = <8>;
610	cap-mmc-highspeed;
611	card-detect-delay = <200>;
612	mmc-ddr-1_8v;
613	mmc-hs200-1_8v;
614	non-removable;
615	pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8>;
616	pinctrl-names = "default";
617	samsung,dw-mshc-ciu-div = <3>;
618	samsung,dw-mshc-ddr-timing = <0 2>;
619	samsung,dw-mshc-sdr-timing = <0 4>;
620	vqmmc-supply = <&ldo3_reg>;
621};
622
623/* External sdcard */
624&mmc_2 {
625	status = "okay";
626	bus-width = <4>;
627	cap-sd-highspeed;
628	card-detect-delay = <200>;
629	cd-gpios = <&gpx2 4 GPIO_ACTIVE_LOW>;
630	pinctrl-0 = <&sd2_clk &sd2_cmd &mmc2_cd &sd2_bus1 &sd2_bus4>;
631	pinctrl-names = "default";
632	samsung,dw-mshc-ciu-div = <3>;
633	samsung,dw-mshc-ddr-timing = <0 2>;
634	samsung,dw-mshc-sdr-timing = <0 4>;
635	sd-uhs-sdr50;
636	vmmc-supply = <&ldo19_reg>;
637	vqmmc-supply = <&ldo13_reg>;
638};
639
640&pinctrl_0 {
641	mmc2_cd: mmc2-cd-pins {
642		samsung,pins = "gpx2-4";
643		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
644	};
645
646	s2mps11_irq: s2mps11-irq-pins {
647		samsung,pins = "gpx3-0";
648		samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
649		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
650		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
651	};
652};
653
654&rtc {
655	status = "okay";
656	clocks = <&clock CLK_RTC>, <&s2mps11_osc S2MPS11_CLK_AP>;
657	clock-names = "rtc", "rtc_src";
658};
659
660&tmu_cpu0 {
661	vtmu-supply = <&ldo10_reg>;
662};
663
664&tmu_cpu1 {
665	vtmu-supply = <&ldo10_reg>;
666};
667
668&tmu_cpu2 {
669	vtmu-supply = <&ldo10_reg>;
670};
671
672&tmu_cpu3 {
673	vtmu-supply = <&ldo10_reg>;
674};
675
676&tmu_gpu {
677	vtmu-supply = <&ldo10_reg>;
678};
679
680&usbdrd_dwc3_0 {
681	dr_mode = "peripheral";
682};
683
684&usbdrd_dwc3_1 {
685	dr_mode = "peripheral";
686};
687
688&usbdrd3_0 {
689	vdd33-supply = <&ldo9_reg>;
690	vdd10-supply = <&ldo11_reg>;
691};
692
693&usbdrd3_1 {
694	vdd33-supply = <&ldo9_reg>;
695	vdd10-supply = <&ldo11_reg>;
696};
697