1// SPDX-License-Identifier: GPL-2.0
2/*
3 * TOPEET's Exynos4412 based itop board device tree source
4 *
5 * Copyright (c) 2016 SUMOMO Computer Association
6 *			https://www.sumomo.mobi
7 *			Randy Li <ayaka@soulik.info>
8 *
9 * Device tree source file for TOPEET iTop Exynos 4412 SCP package core
10 * board which is based on Samsung's Exynos4412 SoC.
11 */
12
13#include <dt-bindings/clock/samsung,s2mps11.h>
14#include <dt-bindings/gpio/gpio.h>
15#include <dt-bindings/input/input.h>
16#include "exynos4412.dtsi"
17#include "exynos4412-ppmu-common.dtsi"
18#include "exynos-mfc-reserved-memory.dtsi"
19
20/ {
21	memory@40000000 {
22		device_type = "memory";
23		reg = <0x40000000 0x40000000>;
24	};
25
26	aliases {
27		mmc0 = &mshc_0;
28	};
29
30	firmware@203f000 {
31		compatible = "samsung,secure-firmware";
32		reg = <0x0203f000 0x1000>;
33	};
34
35	fixed-rate-clocks {
36		xxti {
37			compatible = "samsung,clock-xxti";
38			clock-frequency = <0>;
39		};
40
41		xusbxti {
42			compatible = "samsung,clock-xusbxti";
43			clock-frequency = <24000000>;
44		};
45	};
46
47	thermal-zones {
48		cpu_thermal: cpu-thermal {
49			cooling-maps {
50				map0 {
51				     /* Corresponds to 800MHz at freq_table */
52				     cooling-device = <&cpu0 7 7>, <&cpu1 7 7>,
53						      <&cpu2 7 7>, <&cpu3 7 7>;
54				};
55				map1 {
56				     /* Corresponds to 200MHz at freq_table */
57				     cooling-device = <&cpu0 13 13>,
58						      <&cpu1 13 13>,
59						      <&cpu2 13 13>,
60						      <&cpu3 13 13>;
61			       };
62		       };
63		};
64	};
65
66	usb-hub {
67		compatible = "smsc,usb3503a";
68		reset-gpios = <&gpm2 4 GPIO_ACTIVE_LOW>;
69		connect-gpios = <&gpm3 3 GPIO_ACTIVE_HIGH>;
70		intn-gpios = <&gpx2 3 GPIO_ACTIVE_HIGH>;
71		pinctrl-names = "default";
72		pinctrl-0 = <&hsic_reset>;
73	};
74};
75
76&bus_dmc {
77	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
78	vdd-supply = <&buck1_reg>;
79	status = "okay";
80};
81
82&bus_acp {
83	devfreq = <&bus_dmc>;
84	status = "okay";
85};
86
87&bus_c2c {
88	devfreq = <&bus_dmc>;
89	status = "okay";
90};
91
92&bus_leftbus {
93	devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
94	vdd-supply = <&buck3_reg>;
95	status = "okay";
96};
97
98&bus_rightbus {
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&cpu0 {
119	cpu0-supply = <&buck2_reg>;
120};
121
122&gpu {
123	mali-supply = <&buck4_reg>;
124	status = "okay";
125};
126
127&hsotg {
128	vusb_d-supply = <&ldo15_reg>;
129	vusb_a-supply = <&ldo12_reg>;
130};
131
132&i2c_1 {
133	#address-cells = <1>;
134	#size-cells = <0>;
135	samsung,i2c-sda-delay = <100>;
136	samsung,i2c-max-bus-freq = <400000>;
137	pinctrl-0 = <&i2c1_bus>;
138	pinctrl-names = "default";
139	status = "okay";
140
141	s5m8767: pmic@66 {
142		compatible = "samsung,s5m8767-pmic";
143		reg = <0x66>;
144
145		s5m8767,pmic-buck-default-dvs-idx = <3>;
146
147		s5m8767,pmic-buck-dvs-gpios = <&gpb 5 GPIO_ACTIVE_HIGH>,
148						 <&gpb 6 GPIO_ACTIVE_HIGH>,
149						 <&gpb 7 GPIO_ACTIVE_HIGH>;
150
151		s5m8767,pmic-buck-ds-gpios = <&gpm3 5 GPIO_ACTIVE_HIGH>,
152						<&gpm3 6 GPIO_ACTIVE_HIGH>,
153						<&gpm3 7 GPIO_ACTIVE_HIGH>;
154
155		/* VDD_ARM */
156		s5m8767,pmic-buck2-dvs-voltage = <1356250>, <1300000>,
157						 <1243750>, <1118750>,
158						 <1068750>, <1012500>,
159						 <956250>, <900000>;
160		/* VDD_INT */
161		s5m8767,pmic-buck3-dvs-voltage = <1000000>, <1000000>,
162						 <925000>, <925000>,
163						 <887500>, <887500>,
164						 <850000>, <850000>;
165		/* VDD_G3D */
166		s5m8767,pmic-buck4-dvs-voltage = <1081250>, <1081250>,
167						 <1025000>, <950000>,
168						 <918750>, <900000>,
169						 <875000>, <831250>;
170		wakeup-source;
171
172		regulators {
173			ldo1_reg: LDO1 {
174				regulator-name = "VDD_ALIVE";
175				regulator-min-microvolt = <1100000>;
176				regulator-max-microvolt = <1100000>;
177				regulator-always-on;
178				regulator-boot-on;
179				op_mode = <1>; /* Normal Mode */
180			};
181
182			/* SCP uses 1.5v, POP uses 1.2v */
183			ldo2_reg: LDO2 {
184				regulator-name = "VDDQ_M12";
185				regulator-min-microvolt = <1500000>;
186				regulator-max-microvolt = <1500000>;
187				regulator-always-on;
188				regulator-boot-on;
189				op_mode = <1>; /* Normal Mode */
190			};
191
192			ldo3_reg: LDO3 {
193				regulator-name = "VDDIOAP_18";
194				regulator-min-microvolt = <1800000>;
195				regulator-max-microvolt = <1800000>;
196				regulator-always-on;
197				op_mode = <1>; /* Normal Mode */
198			};
199
200			ldo4_reg: LDO4 {
201				regulator-name = "VDDQ_PRE";
202				regulator-min-microvolt = <1800000>;
203				regulator-max-microvolt = <1800000>;
204				regulator-always-on;
205				op_mode = <1>; /* Normal Mode */
206			};
207
208			ldo5_reg: LDO5 {
209				regulator-name = "VDD_LDO5";
210				op_mode = <0>; /* Always off Mode */
211			};
212
213			ldo6_reg: LDO6 {
214				regulator-name = "VDD10_MPLL";
215				regulator-min-microvolt = <1000000>;
216				regulator-max-microvolt = <1000000>;
217				regulator-always-on;
218				op_mode = <1>; /* Normal Mode */
219			};
220
221			ldo7_reg: LDO7 {
222				regulator-name = "VDD10_XPLL";
223				regulator-min-microvolt = <1000000>;
224				regulator-max-microvolt = <1000000>;
225				regulator-always-on;
226				op_mode = <1>; /* Normal Mode */
227			};
228
229			ldo8_reg: LDO8 {
230				regulator-name = "VDD10_MIPI";
231				regulator-min-microvolt = <1000000>;
232				regulator-max-microvolt = <1000000>;
233				op_mode = <1>; /* Normal Mode */
234			};
235
236			ldo9_reg: LDO9 {
237				regulator-name = "VDD33_LCD";
238				regulator-min-microvolt = <3300000>;
239				regulator-max-microvolt = <3300000>;
240				op_mode = <1>; /* Normal Mode */
241			};
242
243			ldo10_reg: LDO10 {
244				regulator-name = "VDD18_MIPI";
245				regulator-min-microvolt = <1800000>;
246				regulator-max-microvolt = <1800000>;
247				op_mode = <1>; /* Normal Mode */
248			};
249
250			ldo11_reg: LDO11 {
251				regulator-name = "VDD18_ABB1";
252				regulator-min-microvolt = <1800000>;
253				regulator-max-microvolt = <1800000>;
254				regulator-always-on;
255				op_mode = <1>; /* Normal Mode */
256			};
257
258			ldo12_reg: LDO12 {
259				regulator-name = "VDD33_UOTG";
260				regulator-min-microvolt = <3300000>;
261				regulator-max-microvolt = <3300000>;
262				regulator-always-on;
263				op_mode = <1>; /* Normal Mode */
264			};
265
266			ldo13_reg: LDO13 {
267				regulator-name = "VDDIOPERI_18";
268				regulator-min-microvolt = <1800000>;
269				regulator-max-microvolt = <1800000>;
270				regulator-always-on;
271				op_mode = <1>; /* Normal Mode */
272			};
273
274			ldo14_reg: LDO14 {
275				regulator-name = "VDD18_ABB02";
276				regulator-min-microvolt = <1800000>;
277				regulator-max-microvolt = <1800000>;
278				regulator-always-on;
279				op_mode = <1>; /* Normal Mode */
280			};
281
282			ldo15_reg: LDO15 {
283				regulator-name = "VDD10_USH";
284				regulator-min-microvolt = <1000000>;
285				regulator-max-microvolt = <1000000>;
286				regulator-always-on;
287				op_mode = <1>; /* Normal Mode */
288			};
289
290			ldo16_reg: LDO16 {
291				regulator-name = "VDD18_HSIC";
292				regulator-min-microvolt = <1800000>;
293				regulator-max-microvolt = <1800000>;
294				regulator-always-on;
295				op_mode = <1>; /* Normal Mode */
296			};
297
298			ldo17_reg: LDO17 {
299				regulator-name = "VDDIOAP_MMC012_28";
300				regulator-min-microvolt = <2800000>;
301				regulator-max-microvolt = <2800000>;
302				op_mode = <1>; /* Normal Mode */
303			};
304
305			/* Used by HSIC */
306			ldo18_reg: LDO18 {
307				regulator-name = "VDDIOPERI_28";
308				regulator-min-microvolt = <3300000>;
309				regulator-max-microvolt = <3300000>;
310				regulator-always-on;
311				op_mode = <1>; /* Normal Mode */
312			};
313
314			ldo19_reg: LDO19 {
315				regulator-name = "VDD_LDO19";
316				op_mode = <0>; /* Always off Mode */
317			};
318
319			ldo20_reg: LDO20 {
320				regulator-name = "VDD28_CAM";
321				regulator-min-microvolt = <1800000>;
322				regulator-max-microvolt = <2800000>;
323				op_mode = <1>; /* Normal Mode */
324			};
325
326			ldo21_reg: LDO21 {
327				regulator-name = "VDD28_AF";
328				regulator-min-microvolt = <1800000>;
329				regulator-max-microvolt = <2800000>;
330				op_mode = <1>; /* Normal Mode */
331			};
332
333			ldo22_reg: LDO22 {
334				regulator-name = "VDDA28_2M";
335				regulator-min-microvolt = <2800000>;
336				regulator-max-microvolt = <2800000>;
337				op_mode = <1>; /* Normal Mode */
338			};
339
340			ldo23_reg: LDO23 {
341				regulator-name = "VDD28_TF";
342				regulator-min-microvolt = <2800000>;
343				regulator-max-microvolt = <2800000>;
344				op_mode = <1>; /* Normal Mode */
345			};
346
347			ldo24_reg: LDO24 {
348				regulator-name = "VDD33_A31";
349				regulator-min-microvolt = <3300000>;
350				regulator-max-microvolt = <3300000>;
351				op_mode = <1>; /* Normal Mode */
352			};
353
354			ldo25_reg: LDO25 {
355				regulator-name = "VDD18_CAM";
356				regulator-min-microvolt = <1800000>;
357				regulator-max-microvolt = <1800000>;
358				op_mode = <1>; /* Normal Mode */
359			};
360
361			ldo26_reg: LDO26 {
362				regulator-name = "VDD18_A31";
363				regulator-min-microvolt = <1800000>;
364				regulator-max-microvolt = <1800000>;
365				op_mode = <1>; /* Normal Mode */
366			};
367
368			ldo27_reg: LDO27 {
369				regulator-name = "GPS_1V8";
370				regulator-min-microvolt = <1800000>;
371				regulator-max-microvolt = <1800000>;
372				op_mode = <1>; /* Normal Mode */
373			};
374
375			ldo28_reg: LDO28 {
376				regulator-name = "DVDD12";
377				regulator-min-microvolt = <1200000>;
378				regulator-max-microvolt = <1200000>;
379				op_mode = <1>; /* Normal Mode */
380			};
381
382			buck1_reg: BUCK1 {
383				regulator-name = "vdd_mif";
384				regulator-min-microvolt = <850000>;
385				regulator-max-microvolt = <1100000>;
386				regulator-always-on;
387				regulator-boot-on;
388				op_mode = <1>; /* Normal Mode */
389			};
390
391			buck2_reg: BUCK2 {
392				regulator-name = "vdd_arm";
393				regulator-min-microvolt = <850000>;
394				regulator-max-microvolt = <1456250>;
395				regulator-always-on;
396				regulator-boot-on;
397				op_mode = <1>; /* Normal Mode */
398			};
399
400			buck3_reg: BUCK3 {
401				regulator-name = "vdd_int";
402				regulator-min-microvolt = <875000>;
403				regulator-max-microvolt = <1200000>;
404				regulator-always-on;
405				regulator-boot-on;
406				op_mode = <1>; /* Normal Mode */
407			};
408
409			buck4_reg: BUCK4 {
410				regulator-name = "vdd_g3d";
411				regulator-min-microvolt = <750000>;
412				regulator-max-microvolt = <1500000>;
413				regulator-always-on;
414				regulator-boot-on;
415				op_mode = <1>; /* Normal Mode */
416			};
417
418			buck5_reg: BUCK5 {
419				regulator-name = "vdd_m12";
420				regulator-min-microvolt = <750000>;
421				regulator-max-microvolt = <1500000>;
422				regulator-always-on;
423				regulator-boot-on;
424				op_mode = <1>; /* Normal Mode */
425			};
426
427			buck6_reg: BUCK6 {
428				regulator-name = "vdd12_5m";
429				regulator-min-microvolt = <750000>;
430				regulator-max-microvolt = <1500000>;
431				regulator-always-on;
432				regulator-boot-on;
433				op_mode = <1>; /* Normal Mode */
434			};
435
436			buck7_reg: BUCK7 {
437				regulator-name = "pvdd_buck7";
438				regulator-min-microvolt = <750000>;
439				regulator-max-microvolt = <2000000>;
440				regulator-boot-on;
441				regulator-always-on;
442				op_mode = <1>; /* Normal Mode */
443			};
444
445			buck8_reg: BUCK8 {
446				regulator-name = "pvdd_buck8";
447				regulator-min-microvolt = <750000>;
448				regulator-max-microvolt = <1500000>;
449				regulator-boot-on;
450				regulator-always-on;
451				op_mode = <1>; /* Normal Mode */
452			};
453
454			buck9_reg: BUCK9 {
455				regulator-name = "vddf28_emmc";
456				regulator-min-microvolt = <750000>;
457				regulator-max-microvolt = <3000000>;
458				op_mode = <1>; /* Normal Mode */
459			};
460		};
461
462		s5m8767_osc: clocks {
463			compatible = "samsung,s5m8767-clk";
464			#clock-cells = <1>;
465			clock-output-names = "s5m8767_ap",
466					"s5m8767_cp", "s5m8767_bt";
467		};
468
469	};
470};
471
472&mfc {
473	status = "okay";
474};
475
476&mshc_0 {
477	pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
478	pinctrl-names = "default";
479	status = "okay";
480	vmmc-supply = <&buck9_reg>;
481	broken-cd;
482	card-detect-delay = <200>;
483	mmc-ddr-1_8v;
484	samsung,dw-mshc-ciu-div = <3>;
485	samsung,dw-mshc-sdr-timing = <2 3>;
486	samsung,dw-mshc-ddr-timing = <1 2>;
487	bus-width = <8>;
488	cap-mmc-highspeed;
489};
490
491&pinctrl_1 {
492	hsic_reset: hsic-reset-pins {
493		samsung,pins = "gpm2-4";
494		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
495		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
496		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV4>;
497	};
498};
499
500&rtc {
501	status = "okay";
502	clocks = <&clock CLK_RTC>, <&s5m8767_osc S2MPS11_CLK_AP>;
503	clock-names = "rtc", "rtc_src";
504};
505
506&tmu {
507	vtmu-supply = <&ldo16_reg>;
508	status = "okay";
509};
510