1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Samsung's S5PV210 SoC device tree source
4 *
5 * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd.
6 *
7 * Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
8 * Tomasz Figa <t.figa@samsung.com>
9 *
10 * Board device tree source for Samsung Aquila board.
11 */
12
13/dts-v1/;
14#include <dt-bindings/gpio/gpio.h>
15#include <dt-bindings/input/input.h>
16#include "s5pv210.dtsi"
17
18/ {
19	model = "Samsung Aquila based on S5PC110";
20	compatible = "samsung,aquila", "samsung,s5pv210";
21
22	aliases {
23		i2c3 = &i2c_pmic;
24	};
25
26	chosen {
27		bootargs = "console=ttySAC2,115200n8 root=/dev/mmcblk1p5 rw rootwait ignore_loglevel earlyprintk";
28	};
29
30	memory@30000000 {
31		device_type = "memory";
32		reg = <0x30000000 0x05000000
33			0x40000000 0x18000000>;
34	};
35
36	pmic_ap_clk: clock-0 {
37		/* Workaround for missing clock on PMIC */
38		compatible = "fixed-clock";
39		#clock-cells = <0>;
40		clock-frequency = <32768>;
41	};
42
43	vtf_reg: regulator-0 {
44		compatible = "regulator-fixed";
45		regulator-name = "V_TF_2.8V";
46		regulator-min-microvolt = <2800000>;
47		regulator-max-microvolt = <2800000>;
48		gpio = <&mp05 4 GPIO_ACTIVE_HIGH>;
49		enable-active-high;
50	};
51
52	pda_reg: regulator-1 {
53		compatible = "regulator-fixed";
54		regulator-name = "VCC_1.8V_PDA";
55		regulator-min-microvolt = <1800000>;
56		regulator-max-microvolt = <1800000>;
57	};
58
59	bat_reg: regulator-2 {
60		compatible = "regulator-fixed";
61		regulator-name = "V_BAT";
62		regulator-min-microvolt = <3700000>;
63		regulator-max-microvolt = <3700000>;
64	};
65
66	i2c_pmic: i2c-pmic {
67		compatible = "i2c-gpio";
68		sda-gpios = <&gpj4 0 GPIO_ACTIVE_HIGH>;
69		scl-gpios = <&gpj4 3 GPIO_ACTIVE_HIGH>;
70		i2c-gpio,delay-us = <2>;        /* ~100 kHz */
71		#address-cells = <1>;
72		#size-cells = <0>;
73
74		pmic@66 {
75			compatible = "national,lp3974";
76			reg = <0x66>;
77
78			max8998,pmic-buck1-default-dvs-idx = <0>;
79			max8998,pmic-buck1-dvs-gpios = <&gph0 3 GPIO_ACTIVE_HIGH>,
80							<&gph0 4 GPIO_ACTIVE_HIGH>;
81			max8998,pmic-buck1-dvs-voltage = <1200000>, <1200000>,
82							<1200000>, <1200000>;
83
84			max8998,pmic-buck2-default-dvs-idx = <0>;
85			max8998,pmic-buck2-dvs-gpio = <&gph0 5 GPIO_ACTIVE_HIGH>;
86			max8998,pmic-buck2-dvs-voltage = <1200000>, <1200000>;
87
88			regulators {
89				ldo2_reg: LDO2 {
90					regulator-name = "VALIVE_1.1V";
91					regulator-min-microvolt = <1100000>;
92					regulator-max-microvolt = <1100000>;
93					regulator-always-on;
94				};
95
96				ldo3_reg: LDO3 {
97					regulator-name = "VUSB+MIPI_1.1V";
98					regulator-min-microvolt = <1100000>;
99					regulator-max-microvolt = <1100000>;
100					regulator-always-on;
101				};
102
103				ldo4_reg: LDO4 {
104					regulator-name = "VADC_3.3V";
105					regulator-min-microvolt = <3300000>;
106					regulator-max-microvolt = <3300000>;
107				};
108
109				ldo5_reg: LDO5 {
110					regulator-name = "VTF_2.8V";
111					regulator-min-microvolt = <2800000>;
112					regulator-max-microvolt = <2800000>;
113					regulator-always-on;
114				};
115
116				ldo6_reg: LDO6 {
117					regulator-name = "VCC_3.3V";
118					regulator-min-microvolt = <3300000>;
119					regulator-max-microvolt = <3300000>;
120					regulator-always-on;
121				};
122
123				ldo7_reg: LDO7 {
124					regulator-name = "VCC_3.0V";
125					regulator-min-microvolt = <3000000>;
126					regulator-max-microvolt = <3000000>;
127					regulator-always-on;
128					regulator-boot-on;
129				};
130
131				ldo8_reg: LDO8 {
132					regulator-name = "VUSB+VDAC_3.3V";
133					regulator-min-microvolt = <3300000>;
134					regulator-max-microvolt = <3300000>;
135					regulator-always-on;
136				};
137
138				ldo9_reg: LDO9 {
139					regulator-name = "VCC+VCAM_2.8V";
140					regulator-min-microvolt = <2800000>;
141					regulator-max-microvolt = <2800000>;
142					regulator-always-on;
143				};
144
145				ldo10_reg: LDO10 {
146					regulator-name = "VPLL_1.1V";
147					regulator-min-microvolt = <1100000>;
148					regulator-max-microvolt = <1100000>;
149					regulator-always-on;
150					regulator-boot-on;
151				};
152
153				ldo11_reg: LDO11 {
154					regulator-name = "CAM_IO_2.8V";
155					regulator-min-microvolt = <2800000>;
156					regulator-max-microvolt = <2800000>;
157					regulator-always-on;
158				};
159
160				ldo12_reg: LDO12 {
161					regulator-name = "CAM_ISP_1.2V";
162					regulator-min-microvolt = <1200000>;
163					regulator-max-microvolt = <1200000>;
164					regulator-always-on;
165				};
166
167				ldo13_reg: LDO13 {
168					regulator-name = "CAM_A_2.8V";
169					regulator-min-microvolt = <2800000>;
170					regulator-max-microvolt = <2800000>;
171					regulator-always-on;
172				};
173
174				ldo14_reg: LDO14 {
175					regulator-name = "CAM_CIF_1.8V";
176					regulator-min-microvolt = <1800000>;
177					regulator-max-microvolt = <1800000>;
178					regulator-always-on;
179				};
180
181				ldo15_reg: LDO15 {
182					regulator-name = "CAM_AF_3.3V";
183					regulator-min-microvolt = <3300000>;
184					regulator-max-microvolt = <3300000>;
185					regulator-always-on;
186				};
187
188				ldo16_reg: LDO16 {
189					regulator-name = "VMIPI_1.8V";
190					regulator-min-microvolt = <1800000>;
191					regulator-max-microvolt = <1800000>;
192					regulator-always-on;
193				};
194
195				ldo17_reg: LDO17 {
196					regulator-name = "CAM_8M_1.8V";
197					regulator-min-microvolt = <1800000>;
198					regulator-max-microvolt = <1800000>;
199					regulator-always-on;
200				};
201
202				buck1_reg: BUCK1 {
203					regulator-name = "VARM_1.2V";
204					regulator-min-microvolt = <1200000>;
205					regulator-max-microvolt = <1200000>;
206					regulator-always-on;
207				};
208
209				buck2_reg: BUCK2 {
210					regulator-name = "VINT_1.2V";
211					regulator-min-microvolt = <1200000>;
212					regulator-max-microvolt = <1200000>;
213					regulator-always-on;
214				};
215
216				buck3_reg: BUCK3 {
217					regulator-name = "VCC_1.8V";
218					regulator-min-microvolt = <1800000>;
219					regulator-max-microvolt = <1800000>;
220					regulator-always-on;
221				};
222
223				buck4_reg: BUCK4 {
224					regulator-name = "CAM_CORE_1.2V";
225					regulator-min-microvolt = <1200000>;
226					regulator-max-microvolt = <1200000>;
227					regulator-always-on;
228				};
229
230				ap32khz_reg: EN32KHz-AP {
231					regulator-name = "32KHz AP";
232					regulator-always-on;
233				};
234
235				vichg_reg: ENVICHG {
236					regulator-name = "VICHG";
237				};
238
239				safeout1_reg: ESAFEOUT1 {
240					regulator-name = "SAFEOUT1";
241					regulator-always-on;
242				};
243
244				safeout2_reg: ESAFEOUT2 {
245					regulator-name = "SAFEOUT2";
246					regulator-boot-on;
247				};
248			};
249		};
250
251	};
252
253	gpio-keys {
254		compatible = "gpio-keys";
255
256		power-key {
257			gpios = <&gph2 6 1>;
258			linux,code = <KEY_POWER>;
259			label = "power";
260			debounce-interval = <1>;
261			wakeup-source;
262		};
263	};
264};
265
266&xusbxti {
267	clock-frequency = <24000000>;
268};
269
270&keypad {
271	linux,input-no-autorepeat;
272	wakeup-source;
273	samsung,keypad-num-rows = <3>;
274	samsung,keypad-num-columns = <3>;
275	pinctrl-names = "default";
276	pinctrl-0 = <&keypad_row0>, <&keypad_row1>, <&keypad_row2>,
277			<&keypad_col0>, <&keypad_col1>, <&keypad_col2>;
278	status = "okay";
279
280	key-1 {
281		keypad,row = <0>;
282		keypad,column = <1>;
283		linux,code = <KEY_CONNECT>;
284	};
285
286	key-2 {
287		keypad,row = <0>;
288		keypad,column = <2>;
289		linux,code = <KEY_BACK>;
290	};
291
292	key-3 {
293		keypad,row = <1>;
294		keypad,column = <1>;
295		linux,code = <KEY_CAMERA_FOCUS>;
296	};
297
298	key-4 {
299		keypad,row = <1>;
300		keypad,column = <2>;
301		linux,code = <KEY_VOLUMEUP>;
302	};
303
304	key-5 {
305		keypad,row = <2>;
306		keypad,column = <1>;
307		linux,code = <KEY_CAMERA>;
308	};
309
310	key-6 {
311		keypad,row = <2>;
312		keypad,column = <2>;
313		linux,code = <KEY_VOLUMEDOWN>;
314	};
315};
316
317&uart0 {
318	status = "okay";
319};
320
321&uart1 {
322	status = "okay";
323};
324
325&uart2 {
326	status = "okay";
327};
328
329&uart3 {
330	status = "okay";
331};
332
333&rtc {
334	clocks = <&clocks CLK_RTC>, <&pmic_ap_clk>;
335	clock-names = "rtc", "rtc_src";
336};
337
338&sdhci0 {
339	bus-width = <4>;
340	non-removable;
341	status = "okay";
342	vmmc-supply = <&ldo5_reg>;
343	pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4>;
344	pinctrl-names = "default";
345};
346
347&sdhci2 {
348	bus-width = <4>;
349	cd-gpios = <&gph3 4 1>;
350	vmmc-supply = <&vtf_reg>;
351	cd-inverted;
352	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &t_flash_detect>;
353	pinctrl-names = "default";
354	status = "okay";
355};
356
357&onenand {
358	status = "okay";
359};
360
361&hsotg {
362	vusb_a-supply = <&ldo3_reg>;
363	vusb_d-supply = <&ldo8_reg>;
364	dr_mode = "peripheral";
365	status = "okay";
366};
367
368&usbphy {
369	status = "okay";
370};
371
372&fimd {
373	pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
374	pinctrl-names = "default";
375	status = "okay";
376
377	display-timings {
378		native-mode = <&timing0>;
379		timing0: timing {
380			clock-frequency = <0>;
381			hactive = <800>;
382			vactive = <480>;
383			hfront-porch = <16>;
384			hback-porch = <16>;
385			hsync-len = <2>;
386			vback-porch = <3>;
387			vfront-porch = <28>;
388			vsync-len = <1>;
389		};
390	};
391};
392
393&pinctrl0 {
394	t_flash_detect: t-flash-detect {
395		samsung,pins = "gph3-4";
396		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
397		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
398	};
399};
400