• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Hardkernel Odroid XU board device tree source
4 *
5 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
6 *		http://www.samsung.com
7 * Copyright (c) 2016 Krzysztof Kozlowski
8 */
9
10/dts-v1/;
11#include "exynos5410.dtsi"
12#include <dt-bindings/clock/maxim,max77802.h>
13#include <dt-bindings/gpio/gpio.h>
14#include <dt-bindings/interrupt-controller/irq.h>
15#include <dt-bindings/sound/samsung-i2s.h>
16#include "exynos54xx-odroidxu-leds.dtsi"
17
18/ {
19	model = "Hardkernel Odroid XU";
20	compatible = "hardkernel,odroid-xu", "samsung,exynos5410", "samsung,exynos5";
21
22	memory@40000000 {
23		device_type = "memory";
24		reg = <0x40000000 0x7ea00000>;
25	};
26
27	chosen {
28		stdout-path = "serial2:115200n8";
29	};
30
31	emmc_pwrseq: pwrseq {
32		pinctrl-0 = <&emmc_nrst_pin>;
33		pinctrl-names = "default";
34		compatible = "mmc-pwrseq-emmc";
35		reset-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>;
36	};
37
38	fan0: pwm-fan {
39		compatible = "pwm-fan";
40		pwms = <&pwm 0 20972 0>;
41		#cooling-cells = <2>;
42		cooling-levels = <0 130 170 230>;
43	};
44
45	fin_pll: xxti {
46		compatible = "fixed-clock";
47		clock-frequency = <24000000>;
48		clock-output-names = "fin_pll";
49		#clock-cells = <0>;
50	};
51
52	firmware@2073000 {
53		compatible = "samsung,secure-firmware";
54		reg = <0x02073000 0x1000>;
55	};
56
57	sound: sound {
58		compatible = "simple-audio-card";
59
60		simple-audio-card,name = "Odroid-XU";
61		simple-audio-card,widgets =
62			"Headphone", "Headphone Jack",
63			"Speakers", "Speakers";
64		simple-audio-card,routing =
65			"Headphone Jack", "HPL",
66			"Headphone Jack", "HPR",
67			"Headphone Jack", "MICBIAS",
68			"IN1", "Headphone Jack",
69			"Speakers", "SPKL",
70			"Speakers", "SPKR";
71
72		simple-audio-card,format = "i2s";
73		simple-audio-card,bitclock-master = <&link0_codec>;
74		simple-audio-card,frame-master = <&link0_codec>;
75
76		simple-audio-card,cpu {
77			sound-dai = <&audi2s0 0>;
78			system-clock-frequency = <19200000>;
79		};
80
81		link0_codec: simple-audio-card,codec {
82			sound-dai = <&max98090>;
83			clocks = <&audi2s0 CLK_I2S_CDCLK>;
84		};
85	};
86};
87
88&adc {
89	vdd-supply = <&ldo10_reg>;
90	status = "okay";
91};
92
93&audi2s0 {
94	status = "okay";
95};
96
97&clock {
98	clocks = <&fin_pll>;
99	assigned-clocks = <&clock CLK_FOUT_EPLL>;
100	assigned-clock-rates = <192000000>;
101};
102
103&clock_audss {
104	assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
105			<&clock_audss EXYNOS_MOUT_I2S>,
106			<&clock_audss EXYNOS_DOUT_SRP>,
107			<&clock_audss EXYNOS_DOUT_AUD_BUS>;
108
109	assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
110			<&clock_audss EXYNOS_MOUT_AUDSS>;
111
112	assigned-clock-rates =  <0>,
113				<0>,
114				<96000000>,
115				<19200000>;
116};
117
118&cpu0_thermal {
119	thermal-sensors = <&tmu_cpu0 0>;
120	polling-delay-passive = <0>;
121	polling-delay = <0>;
122
123	trips {
124		cpu_alert0: cpu-alert-0 {
125			temperature = <50000>; /* millicelsius */
126			hysteresis = <5000>; /* millicelsius */
127			type = "active";
128		};
129		cpu_alert1: cpu-alert-1 {
130			temperature = <60000>; /* millicelsius */
131			hysteresis = <5000>; /* millicelsius */
132			type = "active";
133		};
134		cpu_alert2: cpu-alert-2 {
135			temperature = <70000>; /* millicelsius */
136			hysteresis = <5000>; /* millicelsius */
137			type = "active";
138		};
139		cpu_crit0: cpu-crit-0 {
140			temperature = <120000>; /* millicelsius */
141			hysteresis = <0>; /* millicelsius */
142			type = "critical";
143		};
144	};
145
146	cooling-maps {
147		map0 {
148			trip = <&cpu_alert0>;
149			cooling-device = <&fan0 0 1>;
150		};
151		map1 {
152			trip = <&cpu_alert1>;
153			cooling-device = <&fan0 1 2>;
154		};
155		map2 {
156			trip = <&cpu_alert2>;
157			cooling-device = <&fan0 2 3>;
158		};
159	};
160};
161
162&hsi2c_4 {
163	samsung,i2c-sda-delay = <100>;
164	samsung,i2c-max-bus-freq = <400000>;
165	status = "okay";
166
167	usb3503: usb-hub@8 {
168		compatible = "smsc,usb3503";
169		reg = <0x08>;
170
171		intn-gpios = <&gpx0 7 GPIO_ACTIVE_HIGH>;
172		connect-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>;
173		reset-gpios = <&gpx1 4 GPIO_ACTIVE_HIGH>;
174		initial-mode = <1>;
175
176		clock-names = "refclk";
177		clocks = <&pmu_system_controller 0>;
178		refclk-frequency = <24000000>;
179	};
180
181	max77802: pmic@9 {
182		compatible = "maxim,max77802";
183		reg = <0x9>;
184		interrupt-parent = <&gpx0>;
185		interrupts = <4 IRQ_TYPE_NONE>;
186		pinctrl-names = "default";
187		pinctrl-0 = <&max77802_irq>, <&pmic_dvs_1>, <&pmic_dvs_2>,
188			    <&pmic_dvs_3>;
189		#clock-cells = <1>;
190
191		inl1-supply = <&buck5_reg>;
192		inl2-supply = <&buck7_reg>;
193		inl3-supply = <&buck9_reg>;
194		inl4-supply = <&buck9_reg>;
195		inl5-supply = <&buck9_reg>;
196		inl6-supply = <&buck10_reg>;
197		inl7-supply = <&buck9_reg>;
198		/* inl9 supply is BOOST, not configured here */
199		inl10-supply = <&buck7_reg>;
200
201		regulators {
202			buck1_reg: BUCK1 {
203				regulator-name = "vdd_mif";
204				regulator-min-microvolt = <800000>;
205				regulator-max-microvolt = <1300000>;
206				regulator-always-on;
207				regulator-boot-on;
208			};
209
210			buck2_reg: BUCK2 {
211				regulator-name = "vdd_arm";
212				regulator-min-microvolt = <800000>;
213				regulator-max-microvolt = <1500000>;
214				regulator-always-on;
215				regulator-boot-on;
216			};
217
218			buck3_reg: BUCK3 {
219				regulator-name = "vdd_int";
220				regulator-min-microvolt = <800000>;
221				regulator-max-microvolt = <1400000>;
222				regulator-always-on;
223				regulator-boot-on;
224			};
225
226			buck4_reg: BUCK4 {
227				regulator-name = "vdd_g3d";
228				regulator-min-microvolt = <800000>;
229				regulator-max-microvolt = <1400000>;
230				regulator-always-on;
231				regulator-boot-on;
232			};
233
234			buck5_reg: BUCK5 {
235				regulator-name = "vdd_mem";
236				regulator-min-microvolt = <800000>;
237				regulator-max-microvolt = <1500000>;
238				regulator-always-on;
239				regulator-boot-on;
240			};
241
242			buck6_reg: BUCK6 {
243				regulator-name = "vdd_kfc";
244				regulator-min-microvolt = <800000>;
245				regulator-max-microvolt = <1500000>;
246				regulator-always-on;
247				regulator-boot-on;
248			};
249
250			buck7_reg: BUCK7 {
251				regulator-name = "buck7";
252				regulator-min-microvolt = <1300000>;
253				regulator-max-microvolt = <1300000>;
254				regulator-always-on;
255				regulator-boot-on;
256			};
257
258			buck8_reg: BUCK8 {
259				/* vdd_mmc0 */
260				regulator-name = "vddf_2v85";
261				regulator-min-microvolt = <2850000>;
262				regulator-max-microvolt = <2850000>;
263				regulator-always-on;
264				regulator-boot-on;
265			};
266
267			buck9_reg: BUCK9 {
268				regulator-name = "buck9";
269				regulator-min-microvolt = <3000000>;
270				regulator-max-microvolt = <3000000>;
271				regulator-always-on;
272				regulator-boot-on;
273			};
274
275			buck10_reg: BUCK10 {
276				regulator-name = "buck10";
277				regulator-min-microvolt = <2950000>;
278				regulator-max-microvolt = <2950000>;
279				regulator-always-on;
280				regulator-boot-on;
281			};
282
283			ldo1_reg: LDO1 {
284				regulator-name = "vdd_alive";
285				regulator-min-microvolt = <1000000>;
286				regulator-max-microvolt = <1000000>;
287				regulator-always-on;
288			};
289
290			ldo2_reg: LDO2 {
291				regulator-name = "vddq_m1_m2";
292				regulator-min-microvolt = <1200000>;
293				regulator-max-microvolt = <1200000>;
294				regulator-always-on;
295			};
296
297			ldo3_reg: LDO3 {
298				regulator-name = "vddq_gpio";
299				regulator-min-microvolt = <1800000>;
300				regulator-max-microvolt = <1800000>;
301				regulator-always-on;
302			};
303
304			ldo4_reg: LDO4 {
305				regulator-name = "vddq_mmc2";
306				regulator-min-microvolt = <1800000>;
307				regulator-max-microvolt = <3000000>;
308				/* Having it off prevents reboot */
309				regulator-always-on;
310			};
311
312			ldo5_reg: LDO5 {
313				regulator-name = "vdd18_hsic";
314				regulator-min-microvolt = <1800000>;
315				regulator-max-microvolt = <1800000>;
316				regulator-always-on;
317			};
318
319			ldo6_reg: LDO6 {
320				regulator-name = "vdd18_bpll";
321				regulator-min-microvolt = <1800000>;
322				regulator-max-microvolt = <1800000>;
323				regulator-always-on;
324			};
325
326			ldo7_reg: LDO7 {
327				regulator-name = "vddq_lcd";
328				regulator-min-microvolt = <1800000>;
329				regulator-max-microvolt = <1800000>;
330			};
331
332			ldo8_reg: LDO8 {
333				regulator-name = "vdd10_hdmi";
334				regulator-min-microvolt = <1000000>;
335				regulator-max-microvolt = <1000000>;
336				regulator-always-on;
337			};
338
339			ldo9_reg: LDO9 {
340				regulator-name = "ldo9";
341			};
342
343			ldo10_reg: LDO10 {
344				regulator-name = "vdd18_mipi";
345				regulator-min-microvolt = <1800000>;
346				regulator-max-microvolt = <1800000>;
347				regulator-always-on;
348			};
349
350			ldo11_reg: LDO11 {
351				regulator-name = "vddq_mmc01";
352				regulator-min-microvolt = <1800000>;
353				regulator-max-microvolt = <1800000>;
354				/*
355				 * Having it off prevents accessing MMC after
356				 * reboot with error:
357				 * MMC Device 1: Clock OFF has been failed.
358				 */
359				regulator-always-on;
360			};
361
362			ldo12_reg: LDO12 {
363				regulator-name = "vdd33_usb3";
364				regulator-min-microvolt = <3300000>;
365				regulator-max-microvolt = <3300000>;
366				regulator-always-on;
367			};
368
369			ldo13_reg: LDO13 {
370				regulator-name = "vddq_abbg0";
371				regulator-min-microvolt = <1800000>;
372				regulator-max-microvolt = <1800000>;
373				regulator-always-on;
374			};
375
376			ldo14_reg: LDO14 {
377				regulator-name = "vddq_abbg1";
378				regulator-min-microvolt = <1800000>;
379				regulator-max-microvolt = <1800000>;
380				regulator-always-on;
381			};
382
383			ldo15_reg: LDO15 {
384				regulator-name = "vdd10_usb3";
385				regulator-min-microvolt = <1000000>;
386				regulator-max-microvolt = <1000000>;
387				regulator-always-on;
388			};
389
390			ldo16_reg: LDO16 {
391				regulator-name = "ldo16";
392			};
393
394			ldo17_reg: LDO17 {
395				regulator-name = "cam_sensor_core";
396				regulator-min-microvolt = <1200000>;
397				regulator-max-microvolt = <1200000>;
398			};
399
400			ldo18_reg: LDO18 {
401				regulator-name = "ldo18";
402				regulator-min-microvolt = <1800000>;
403				regulator-max-microvolt = <1800000>;
404			};
405
406			ldo19_reg: LDO19 {
407				regulator-name = "ldo19";
408			};
409
410			ldo20_reg: LDO20 {
411				regulator-name = "vdd_mmc0";
412				regulator-min-microvolt = <1800000>;
413				regulator-max-microvolt = <1800000>;
414			};
415
416			ldo21_reg: LDO21 {
417				/* vdd_mmc2 */
418				regulator-name = "vddf_2v8";
419				regulator-min-microvolt = <2850000>;
420				regulator-max-microvolt = <2850000>;
421			};
422
423			ldo22_reg: LDO22 {
424				regulator-name = "ldo22";
425			};
426
427			ldo23_reg: LDO23 {
428				regulator-name = "dp_p3v3";
429				regulator-min-microvolt = <3300000>;
430				regulator-max-microvolt = <3300000>;
431				regulator-always-on;
432			};
433
434			ldo24_reg: LDO24 {
435				regulator-name = "cam_af";
436				regulator-min-microvolt = <2800000>;
437				regulator-max-microvolt = <2800000>;
438			};
439
440			ldo25_reg: LDO25 {
441				regulator-name = "eth_p3v3";
442				regulator-min-microvolt = <3300000>;
443				regulator-max-microvolt = <3300000>;
444				regulator-always-on;
445			};
446
447			ldo26_reg: LDO26 {
448				regulator-name = "usb30_extclk";
449				regulator-min-microvolt = <3300000>;
450				regulator-max-microvolt = <3300000>;
451				regulator-always-on;
452			};
453
454			ldo27_reg: LDO27 {
455				regulator-name = "ldo27";
456			};
457
458			ldo28_reg: LDO28 {
459				regulator-name = "ldo28";
460			};
461
462			ldo29_reg: LDO29 {
463				regulator-name = "ldo29";
464			};
465
466			ldo30_reg: LDO30 {
467				regulator-name = "vddq_e1_e2";
468				regulator-min-microvolt = <1200000>;
469				regulator-max-microvolt = <1200000>;
470				regulator-always-on;
471			};
472
473			ldo31_reg: LDO31 {
474				regulator-name = "ldo31";
475			};
476
477			/* On revisions with ti,ina231 this is sensor VS */
478			ldo32_reg: LDO32 {
479				regulator-name = "vs_power_meter";
480				regulator-min-microvolt = <3300000>;
481				regulator-max-microvolt = <3300000>;
482			};
483
484			ldo33_reg: LDO33 {
485				regulator-name = "ldo33";
486			};
487
488			ldo34_reg: LDO34 {
489				regulator-name = "ldo34";
490			};
491
492			ldo35_reg: LDO35 {
493				regulator-name = "ldo35";
494			};
495		};
496	};
497};
498
499&i2c_1 {
500	status = "okay";
501	max98090: max98090@10 {
502		compatible = "maxim,max98090";
503		reg = <0x10>;
504		interrupt-parent = <&gpj3>;
505		interrupts = <0 IRQ_TYPE_NONE>;
506		clocks = <&audi2s0 CLK_I2S_CDCLK>;
507		clock-names = "mclk";
508		#sound-dai-cells = <0>;
509	};
510};
511
512&mmc_0 {
513	status = "okay";
514	mmc-pwrseq = <&emmc_pwrseq>;
515	cd-gpios = <&gpc0 2 GPIO_ACTIVE_LOW>;
516	card-detect-delay = <200>;
517	samsung,dw-mshc-ciu-div = <3>;
518	samsung,dw-mshc-sdr-timing = <0 4>;
519	samsung,dw-mshc-ddr-timing = <0 2>;
520	pinctrl-names = "default";
521	pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd>;
522	bus-width = <8>;
523	cap-mmc-highspeed;
524	mmc-hs200-1_8v;
525	vmmc-supply = <&ldo20_reg>;
526	vqmmc-supply = <&ldo11_reg>;
527};
528
529&mmc_2 {
530	status = "okay";
531	card-detect-delay = <200>;
532	samsung,dw-mshc-ciu-div = <3>;
533	samsung,dw-mshc-sdr-timing = <0 4>;
534	samsung,dw-mshc-ddr-timing = <0 2>;
535	pinctrl-names = "default";
536	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4 &sd2_wp>;
537	bus-width = <4>;
538	cap-sd-highspeed;
539	vmmc-supply = <&ldo21_reg>;
540	vqmmc-supply = <&ldo4_reg>;
541};
542
543&pinctrl_0 {
544	emmc_nrst_pin: emmc-nrst {
545		samsung,pins = "gpd1-0";
546		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
547		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
548		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
549	};
550
551	sd2_wp: sd2-wp {
552		samsung,pins = "gpm5-0";
553		samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
554		/* Pin is floating so be sure to disable write-protect */
555		samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
556		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV4>;
557	};
558
559	pmic_dvs_3: pmic-dvs-3 {
560		samsung,pins = "gpx0-0";
561		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
562		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
563		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
564	};
565
566	pmic_dvs_2: pmic-dvs-2 {
567		samsung,pins = "gpx0-1";
568		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
569		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
570		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
571	};
572
573	pmic_dvs_1: pmic-dvs-1 {
574		samsung,pins = "gpx0-2";
575		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
576		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
577		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
578		samsung,pin-val = <1>;
579	};
580
581	max77802_irq: max77802-irq {
582		samsung,pins = "gpx0-4";
583		samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
584		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
585		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
586	};
587};
588
589&pwm {
590	/*
591	 * PWM 0 -- fan
592	 * PWM 1 -- Green LED
593	 * PWM 2 -- Blue LED
594	 * PWM 3 -- on MIPI connector for backlight
595	 */
596	pinctrl-0 = <&pwm0_out &pwm1_out &pwm2_out &pwm3_out>;
597	pinctrl-names = "default";
598	status = "okay";
599};
600
601&rtc {
602	status = "okay";
603	clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>;
604	clock-names = "rtc", "rtc_src";
605};
606
607&serial_0 {
608	status = "okay";
609};
610
611&serial_1 {
612	status = "okay";
613};
614
615&serial_2 {
616	status = "okay";
617};
618
619&serial_3 {
620	status = "okay";
621};
622
623&tmu_cpu0 {
624	vtmu-supply = <&ldo10_reg>;
625};
626
627&tmu_cpu1 {
628	vtmu-supply = <&ldo10_reg>;
629};
630
631&tmu_cpu2 {
632	vtmu-supply = <&ldo10_reg>;
633};
634
635&tmu_cpu3 {
636	vtmu-supply = <&ldo10_reg>;
637};
638
639&usbdrd_dwc3_0 {
640	dr_mode = "host";
641};
642
643&usbdrd_dwc3_1 {
644	dr_mode = "peripheral";
645};
646
647&usbdrd3_0 {
648	vdd33-supply = <&ldo12_reg>;
649	vdd10-supply = <&ldo15_reg>;
650};
651
652&usbdrd3_1 {
653	vdd33-supply = <&ldo12_reg>;
654	vdd10-supply = <&ldo15_reg>;
655};
656