1279377Simp/*
2279377Simp * Common definition for Hardkernel's Exynos4412 based ODROID-X/X2/U2/U3 boards
3279377Simp * device tree source
4279377Simp *
5279377Simp * This program is free software; you can redistribute it and/or modify
6279377Simp * it under the terms of the GNU General Public License version 2 as
7279377Simp * published by the Free Software Foundation.
8279377Simp*/
9279377Simp
10279377Simp#include <dt-bindings/sound/samsung-i2s.h>
11279377Simp#include <dt-bindings/input/input.h>
12295436Sandrew#include <dt-bindings/clock/maxim,max77686.h>
13279377Simp#include "exynos4412.dtsi"
14295436Sandrew#include <dt-bindings/gpio/gpio.h>
15279377Simp
16279377Simp/ {
17279377Simp	chosen {
18279377Simp		stdout-path = &serial_1;
19279377Simp	};
20279377Simp
21279377Simp	firmware@0204F000 {
22279377Simp		compatible = "samsung,secure-firmware";
23279377Simp		reg = <0x0204F000 0x1000>;
24279377Simp	};
25279377Simp
26279377Simp	gpio_keys {
27279377Simp		compatible = "gpio-keys";
28279377Simp		pinctrl-names = "default";
29279377Simp		pinctrl-0 = <&gpio_power_key>;
30279377Simp
31279377Simp		power_key {
32279377Simp			interrupt-parent = <&gpx1>;
33279377Simp			interrupts = <3 0>;
34295436Sandrew			gpios = <&gpx1 3 GPIO_ACTIVE_LOW>;
35279377Simp			linux,code = <KEY_POWER>;
36279377Simp			label = "power key";
37279377Simp			debounce-interval = <10>;
38279377Simp			gpio-key,wakeup;
39279377Simp		};
40279377Simp	};
41279377Simp
42279377Simp	sound: sound {
43279377Simp		compatible = "simple-audio-card";
44279377Simp		assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
45279377Simp				<&clock_audss EXYNOS_MOUT_I2S>,
46279377Simp				<&clock_audss EXYNOS_DOUT_SRP>,
47279377Simp				<&clock_audss EXYNOS_DOUT_AUD_BUS>;
48279377Simp		assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
49279377Simp				<&clock_audss EXYNOS_MOUT_AUDSS>;
50279377Simp		assigned-clock-rates = <0>,
51279377Simp				<0>,
52279377Simp				<192000000>,
53279377Simp				<19200000>;
54279377Simp
55279377Simp		simple-audio-card,format = "i2s";
56279377Simp		simple-audio-card,bitclock-master = <&link0_codec>;
57279377Simp		simple-audio-card,frame-master = <&link0_codec>;
58279377Simp
59279377Simp		simple-audio-card,cpu {
60279377Simp			sound-dai = <&i2s0 0>;
61279377Simp			system-clock-frequency = <19200000>;
62279377Simp		};
63279377Simp
64279377Simp		link0_codec: simple-audio-card,codec {
65279377Simp			sound-dai = <&max98090>;
66279377Simp			clocks = <&i2s0 CLK_I2S_CDCLK>;
67279377Simp		};
68279377Simp	};
69279377Simp
70295436Sandrew	emmc_pwrseq: pwrseq {
71295436Sandrew		pinctrl-0 = <&sd1_cd>;
72279377Simp		pinctrl-names = "default";
73295436Sandrew		compatible = "mmc-pwrseq-emmc";
74295436Sandrew		reset-gpios = <&gpk1 2 GPIO_ACTIVE_LOW>;
75279377Simp	};
76279377Simp
77279377Simp	camera {
78279377Simp		status = "okay";
79279377Simp		pinctrl-names = "default";
80279377Simp		pinctrl-0 = <>;
81295436Sandrew	};
82279377Simp
83295436Sandrew	fixed-rate-clocks {
84295436Sandrew		xxti {
85295436Sandrew			compatible = "samsung,clock-xxti";
86295436Sandrew			clock-frequency = <0>;
87279377Simp		};
88279377Simp
89295436Sandrew		xusbxti {
90295436Sandrew			compatible = "samsung,clock-xusbxti";
91295436Sandrew			clock-frequency = <24000000>;
92279377Simp		};
93295436Sandrew	};
94279377Simp
95295436Sandrew	thermal-zones {
96295436Sandrew		cpu_thermal: cpu-thermal {
97295436Sandrew			cooling-maps {
98295436Sandrew				map0 {
99295436Sandrew				     /* Corresponds to 800MHz at freq_table */
100295436Sandrew				     cooling-device = <&cpu0 7 7>;
101295436Sandrew				};
102295436Sandrew				map1 {
103295436Sandrew				     /* Corresponds to 200MHz at freq_table */
104295436Sandrew				     cooling-device = <&cpu0 13 13>;
105295436Sandrew			       };
106295436Sandrew		       };
107279377Simp		};
108279377Simp	};
109295436Sandrew};
110279377Simp
111295436Sandrew&cpu0 {
112295436Sandrew	cpu0-supply = <&buck2_reg>;
113295436Sandrew};
114295436Sandrew
115295436Sandrew/* RSTN signal for eMMC */
116295436Sandrew&sd1_cd {
117295436Sandrew	samsung,pin-pud = <0>;
118295436Sandrew	samsung,pin-drv = <0>;
119295436Sandrew};
120295436Sandrew
121295436Sandrew&pinctrl_1 {
122295436Sandrew	gpio_power_key: power_key {
123295436Sandrew		samsung,pins = "gpx1-3";
124295436Sandrew		samsung,pin-pud = <0>;
125279377Simp	};
126279377Simp
127295436Sandrew	max77686_irq: max77686-irq {
128295436Sandrew		samsung,pins = "gpx3-2";
129295436Sandrew		samsung,pin-function = <0>;
130295436Sandrew		samsung,pin-pud = <0>;
131295436Sandrew		samsung,pin-drv = <0>;
132279377Simp	};
133279377Simp
134295436Sandrew	hdmi_hpd: hdmi-hpd {
135295436Sandrew		samsung,pins = "gpx3-7";
136295436Sandrew		samsung,pin-pud = <1>;
137279377Simp	};
138295436Sandrew};
139279377Simp
140295436Sandrew&ehci {
141295436Sandrew	status = "okay";
142295436Sandrew};
143279377Simp
144295436Sandrew&exynos_usbphy {
145295436Sandrew	status = "okay";
146295436Sandrew};
147295436Sandrew
148295436Sandrew&fimc_0 {
149295436Sandrew	status = "okay";
150295436Sandrew	assigned-clocks = <&clock CLK_MOUT_FIMC0>,
151295436Sandrew			<&clock CLK_SCLK_FIMC0>;
152295436Sandrew	assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
153295436Sandrew	assigned-clock-rates = <0>, <176000000>;
154295436Sandrew};
155295436Sandrew
156295436Sandrew&fimc_1 {
157295436Sandrew	status = "okay";
158295436Sandrew	assigned-clocks = <&clock CLK_MOUT_FIMC1>,
159295436Sandrew			<&clock CLK_SCLK_FIMC1>;
160295436Sandrew	assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
161295436Sandrew	assigned-clock-rates = <0>, <176000000>;
162295436Sandrew};
163295436Sandrew
164295436Sandrew&fimc_2 {
165295436Sandrew	status = "okay";
166295436Sandrew	assigned-clocks = <&clock CLK_MOUT_FIMC2>,
167295436Sandrew			<&clock CLK_SCLK_FIMC2>;
168295436Sandrew	assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
169295436Sandrew	assigned-clock-rates = <0>, <176000000>;
170295436Sandrew};
171295436Sandrew
172295436Sandrew&fimc_3 {
173295436Sandrew	status = "okay";
174295436Sandrew	assigned-clocks = <&clock CLK_MOUT_FIMC3>,
175295436Sandrew			<&clock CLK_SCLK_FIMC3>;
176295436Sandrew	assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
177295436Sandrew	assigned-clock-rates = <0>, <176000000>;
178295436Sandrew};
179295436Sandrew
180295436Sandrew&hdmi {
181295436Sandrew	hpd-gpio = <&gpx3 7 GPIO_ACTIVE_HIGH>;
182295436Sandrew	pinctrl-names = "default";
183295436Sandrew	pinctrl-0 = <&hdmi_hpd>;
184295436Sandrew	vdd-supply = <&ldo8_reg>;
185295436Sandrew	vdd_osc-supply = <&ldo10_reg>;
186295436Sandrew	vdd_pll-supply = <&ldo8_reg>;
187295436Sandrew	ddc = <&i2c_2>;
188295436Sandrew	status = "okay";
189295436Sandrew};
190295436Sandrew
191295436Sandrew&hsotg {
192295436Sandrew	dr_mode = "peripheral";
193295436Sandrew	status = "okay";
194295436Sandrew	vusb_d-supply = <&ldo15_reg>;
195295436Sandrew	vusb_a-supply = <&ldo12_reg>;
196295436Sandrew};
197295436Sandrew
198295436Sandrew&i2c_0 {
199295436Sandrew	samsung,i2c-sda-delay = <100>;
200295436Sandrew	samsung,i2c-max-bus-freq = <400000>;
201295436Sandrew	status = "okay";
202295436Sandrew
203295436Sandrew	usb3503: usb3503@08 {
204295436Sandrew		compatible = "smsc,usb3503";
205295436Sandrew		reg = <0x08>;
206295436Sandrew
207295436Sandrew		intn-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>;
208295436Sandrew		connect-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
209295436Sandrew		reset-gpios = <&gpx3 5 GPIO_ACTIVE_HIGH>;
210295436Sandrew		initial-mode = <1>;
211279377Simp	};
212279377Simp
213295436Sandrew	max77686: pmic@09 {
214295436Sandrew		compatible = "maxim,max77686";
215295436Sandrew		interrupt-parent = <&gpx3>;
216295436Sandrew		interrupts = <2 0>;
217279377Simp		pinctrl-names = "default";
218295436Sandrew		pinctrl-0 = <&max77686_irq>;
219295436Sandrew		reg = <0x09>;
220295436Sandrew		#clock-cells = <1>;
221279377Simp
222295436Sandrew		voltage-regulators {
223295436Sandrew			ldo1_reg: LDO1 {
224295436Sandrew				regulator-name = "VDD_ALIVE_1.0V";
225295436Sandrew				regulator-min-microvolt = <1000000>;
226295436Sandrew				regulator-max-microvolt = <1000000>;
227295436Sandrew				regulator-always-on;
228295436Sandrew			};
229279377Simp
230295436Sandrew			ldo2_reg: LDO2 {
231295436Sandrew				regulator-name = "VDDQ_M1_2_1.8V";
232295436Sandrew				regulator-min-microvolt = <1800000>;
233295436Sandrew				regulator-max-microvolt = <1800000>;
234295436Sandrew				regulator-always-on;
235295436Sandrew			};
236279377Simp
237295436Sandrew			ldo3_reg: LDO3 {
238295436Sandrew				regulator-name = "VDDQ_EXT_1.8V";
239295436Sandrew				regulator-min-microvolt = <1800000>;
240295436Sandrew				regulator-max-microvolt = <1800000>;
241295436Sandrew				regulator-always-on;
242295436Sandrew			};
243279377Simp
244295436Sandrew			ldo4_reg: LDO4 {
245295436Sandrew				regulator-name = "VDDQ_MMC2_2.8V";
246295436Sandrew				regulator-min-microvolt = <2800000>;
247295436Sandrew				regulator-max-microvolt = <2800000>;
248295436Sandrew				regulator-always-on;
249295436Sandrew				regulator-boot-on;
250295436Sandrew			};
251279377Simp
252295436Sandrew			ldo5_reg: LDO5 {
253295436Sandrew				regulator-name = "VDDQ_MMC1_3_1.8V";
254295436Sandrew				regulator-min-microvolt = <1800000>;
255295436Sandrew				regulator-max-microvolt = <1800000>;
256295436Sandrew				regulator-always-on;
257295436Sandrew				regulator-boot-on;
258295436Sandrew			};
259279377Simp
260295436Sandrew			ldo6_reg: LDO6 {
261295436Sandrew				regulator-name = "VDD10_MPLL_1.0V";
262295436Sandrew				regulator-min-microvolt = <1000000>;
263295436Sandrew				regulator-max-microvolt = <1000000>;
264295436Sandrew				regulator-always-on;
265295436Sandrew			};
266279377Simp
267295436Sandrew			ldo7_reg: LDO7 {
268295436Sandrew				regulator-name = "VDD10_XPLL_1.0V";
269295436Sandrew				regulator-min-microvolt = <1000000>;
270295436Sandrew				regulator-max-microvolt = <1000000>;
271295436Sandrew				regulator-always-on;
272295436Sandrew			};
273279377Simp
274295436Sandrew			ldo8_reg: LDO8 {
275295436Sandrew				regulator-name = "VDD10_HDMI_1.0V";
276295436Sandrew				regulator-min-microvolt = <1000000>;
277295436Sandrew				regulator-max-microvolt = <1000000>;
278295436Sandrew			};
279279377Simp
280295436Sandrew			ldo10_reg: LDO10 {
281295436Sandrew				regulator-name = "VDDQ_MIPIHSI_1.8V";
282295436Sandrew				regulator-min-microvolt = <1800000>;
283295436Sandrew				regulator-max-microvolt = <1800000>;
284295436Sandrew			};
285279377Simp
286295436Sandrew			ldo11_reg: LDO11 {
287295436Sandrew				regulator-name = "VDD18_ABB1_1.8V";
288295436Sandrew				regulator-min-microvolt = <1800000>;
289295436Sandrew				regulator-max-microvolt = <1800000>;
290295436Sandrew				regulator-always-on;
291295436Sandrew			};
292279377Simp
293295436Sandrew			ldo12_reg: LDO12 {
294295436Sandrew				regulator-name = "VDD33_USB_3.3V";
295295436Sandrew				regulator-min-microvolt = <3300000>;
296295436Sandrew				regulator-max-microvolt = <3300000>;
297295436Sandrew				regulator-always-on;
298295436Sandrew				regulator-boot-on;
299295436Sandrew			};
300279377Simp
301295436Sandrew			ldo13_reg: LDO13 {
302295436Sandrew				regulator-name = "VDDQ_C2C_W_1.8V";
303295436Sandrew				regulator-min-microvolt = <1800000>;
304295436Sandrew				regulator-max-microvolt = <1800000>;
305295436Sandrew				regulator-always-on;
306295436Sandrew				regulator-boot-on;
307295436Sandrew			};
308279377Simp
309295436Sandrew			ldo14_reg: LDO14 {
310295436Sandrew				regulator-name = "VDD18_ABB0_2_1.8V";
311295436Sandrew				regulator-min-microvolt = <1800000>;
312295436Sandrew				regulator-max-microvolt = <1800000>;
313295436Sandrew				regulator-always-on;
314295436Sandrew				regulator-boot-on;
315295436Sandrew			};
316279377Simp
317295436Sandrew			ldo15_reg: LDO15 {
318295436Sandrew				regulator-name = "VDD10_HSIC_1.0V";
319295436Sandrew				regulator-min-microvolt = <1000000>;
320295436Sandrew				regulator-max-microvolt = <1000000>;
321295436Sandrew				regulator-always-on;
322295436Sandrew				regulator-boot-on;
323295436Sandrew			};
324279377Simp
325295436Sandrew			ldo16_reg: LDO16 {
326295436Sandrew				regulator-name = "VDD18_HSIC_1.8V";
327295436Sandrew				regulator-min-microvolt = <1800000>;
328295436Sandrew				regulator-max-microvolt = <1800000>;
329295436Sandrew				regulator-always-on;
330295436Sandrew				regulator-boot-on;
331295436Sandrew			};
332279377Simp
333295436Sandrew			ldo20_reg: LDO20 {
334295436Sandrew				regulator-name = "LDO20_1.8V";
335295436Sandrew				regulator-min-microvolt = <1800000>;
336295436Sandrew				regulator-max-microvolt = <1800000>;
337295436Sandrew				regulator-boot-on;
338295436Sandrew			};
339279377Simp
340295436Sandrew			ldo21_reg: LDO21 {
341295436Sandrew				regulator-name = "LDO21_3.3V";
342295436Sandrew				regulator-min-microvolt = <3300000>;
343295436Sandrew				regulator-max-microvolt = <3300000>;
344295436Sandrew				regulator-always-on;
345295436Sandrew				regulator-boot-on;
346295436Sandrew			};
347279377Simp
348295436Sandrew			ldo25_reg: LDO25 {
349295436Sandrew				regulator-name = "VDDQ_LCD_1.8V";
350295436Sandrew				regulator-min-microvolt = <1800000>;
351295436Sandrew				regulator-max-microvolt = <1800000>;
352295436Sandrew				regulator-always-on;
353295436Sandrew				regulator-boot-on;
354295436Sandrew			};
355279377Simp
356295436Sandrew			buck1_reg: BUCK1 {
357295436Sandrew				regulator-name = "vdd_mif";
358295436Sandrew				regulator-min-microvolt = <1000000>;
359295436Sandrew				regulator-max-microvolt = <1000000>;
360295436Sandrew				regulator-always-on;
361295436Sandrew				regulator-boot-on;
362295436Sandrew			};
363279377Simp
364295436Sandrew			buck2_reg: BUCK2 {
365295436Sandrew				regulator-name = "vdd_arm";
366295436Sandrew				regulator-min-microvolt = <900000>;
367295436Sandrew				regulator-max-microvolt = <1350000>;
368295436Sandrew				regulator-always-on;
369295436Sandrew				regulator-boot-on;
370295436Sandrew			};
371279377Simp
372295436Sandrew			buck3_reg: BUCK3 {
373295436Sandrew				regulator-name = "vdd_int";
374295436Sandrew				regulator-min-microvolt = <1000000>;
375295436Sandrew				regulator-max-microvolt = <1000000>;
376295436Sandrew				regulator-always-on;
377295436Sandrew				regulator-boot-on;
378295436Sandrew			};
379279377Simp
380295436Sandrew			buck4_reg: BUCK4 {
381295436Sandrew				regulator-name = "vdd_g3d";
382295436Sandrew				regulator-min-microvolt = <900000>;
383295436Sandrew				regulator-max-microvolt = <1100000>;
384295436Sandrew				regulator-microvolt-offset = <50000>;
385295436Sandrew			};
386279377Simp
387295436Sandrew			buck5_reg: BUCK5 {
388295436Sandrew				regulator-name = "VDDQ_CKEM1_2_1.2V";
389295436Sandrew				regulator-min-microvolt = <1200000>;
390295436Sandrew				regulator-max-microvolt = <1200000>;
391295436Sandrew				regulator-always-on;
392295436Sandrew				regulator-boot-on;
393295436Sandrew			};
394279377Simp
395295436Sandrew			buck6_reg: BUCK6 {
396295436Sandrew				regulator-name = "BUCK6_1.35V";
397295436Sandrew				regulator-min-microvolt = <1350000>;
398295436Sandrew				regulator-max-microvolt = <1350000>;
399295436Sandrew				regulator-always-on;
400295436Sandrew				regulator-boot-on;
401295436Sandrew			};
402279377Simp
403295436Sandrew			buck7_reg: BUCK7 {
404295436Sandrew				regulator-name = "BUCK7_2.0V";
405295436Sandrew				regulator-min-microvolt = <2000000>;
406295436Sandrew				regulator-max-microvolt = <2000000>;
407295436Sandrew				regulator-always-on;
408295436Sandrew			};
409279377Simp
410295436Sandrew			buck8_reg: BUCK8 {
411295436Sandrew				regulator-name = "BUCK8_2.8V";
412295436Sandrew				regulator-min-microvolt = <2800000>;
413295436Sandrew				regulator-max-microvolt = <2800000>;
414279377Simp			};
415279377Simp		};
416279377Simp	};
417295436Sandrew};
418279377Simp
419295436Sandrew&i2c_1 {
420295436Sandrew	status = "okay";
421295436Sandrew	max98090: max98090@10 {
422295436Sandrew		compatible = "maxim,max98090";
423295436Sandrew		reg = <0x10>;
424295436Sandrew		interrupt-parent = <&gpx0>;
425295436Sandrew		interrupts = <0 0>;
426295436Sandrew		clocks = <&i2s0 CLK_I2S_CDCLK>;
427295436Sandrew		clock-names = "mclk";
428295436Sandrew		#sound-dai-cells = <0>;
429279377Simp	};
430295436Sandrew};
431279377Simp
432295436Sandrew&i2c_2 {
433295436Sandrew	status = "okay";
434295436Sandrew};
435279377Simp
436295436Sandrew&i2c_8 {
437295436Sandrew	status = "okay";
438295436Sandrew};
439279377Simp
440295436Sandrew&i2s0 {
441295436Sandrew	pinctrl-0 = <&i2s0_bus>;
442295436Sandrew	pinctrl-names = "default";
443295436Sandrew	status = "okay";
444295436Sandrew	clocks = <&clock_audss EXYNOS_I2S_BUS>,
445295436Sandrew		 <&clock_audss EXYNOS_DOUT_AUD_BUS>,
446295436Sandrew		 <&clock_audss EXYNOS_SCLK_I2S>;
447295436Sandrew	clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
448279377Simp};
449279377Simp
450295436Sandrew&mixer {
451295436Sandrew	status = "okay";
452295436Sandrew};
453279377Simp
454295436Sandrew&mshc_0 {
455295436Sandrew	pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
456295436Sandrew	pinctrl-names = "default";
457295436Sandrew	vmmc-supply = <&ldo20_reg &buck8_reg>;
458295436Sandrew	mmc-pwrseq = <&emmc_pwrseq>;
459295436Sandrew	status = "okay";
460295436Sandrew
461295436Sandrew	num-slots = <1>;
462295436Sandrew	broken-cd;
463295436Sandrew	card-detect-delay = <200>;
464295436Sandrew	samsung,dw-mshc-ciu-div = <3>;
465295436Sandrew	samsung,dw-mshc-sdr-timing = <2 3>;
466295436Sandrew	samsung,dw-mshc-ddr-timing = <1 2>;
467295436Sandrew	bus-width = <8>;
468295436Sandrew	cap-mmc-highspeed;
469279377Simp};
470295436Sandrew
471295436Sandrew&rtc {
472295436Sandrew	status = "okay";
473295436Sandrew	clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>;
474295436Sandrew	clock-names = "rtc", "rtc_src";
475295436Sandrew};
476295436Sandrew
477295436Sandrew&sdhci_2 {
478295436Sandrew	bus-width = <4>;
479295436Sandrew	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
480295436Sandrew	pinctrl-names = "default";
481295436Sandrew	vmmc-supply = <&ldo4_reg &ldo21_reg>;
482295436Sandrew	cd-gpios = <&gpk2 2 GPIO_ACTIVE_HIGH>;
483295436Sandrew	cd-inverted;
484295436Sandrew	status = "okay";
485295436Sandrew};
486295436Sandrew
487295436Sandrew&serial_0 {
488295436Sandrew	status = "okay";
489295436Sandrew};
490295436Sandrew
491295436Sandrew&serial_1 {
492295436Sandrew	status = "okay";
493295436Sandrew};
494295436Sandrew
495295436Sandrew&tmu {
496295436Sandrew	vtmu-supply = <&ldo10_reg>;
497295436Sandrew	status = "okay";
498295436Sandrew};
499295436Sandrew
500295436Sandrew&watchdog {
501295436Sandrew	status = "okay";
502295436Sandrew};
503