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