xref: /freebsd/sys/contrib/device-tree/src/arm/samsung/exynos5250-snow-common.dtsi (revision 1c4ee7dfb8affed302171232b0f612e6bcba3c10)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Google Snow board device tree source
4 *
5 * Copyright (c) 2012 Google, Inc
6 */
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/clock/maxim,max77686.h>
10#include <dt-bindings/interrupt-controller/irq.h>
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/sound/samsung-i2s.h>
13#include "exynos5250.dtsi"
14
15/ {
16	aliases {
17		i2c104 = &i2c_104;
18		mmc0 = &mmc_0; /* eMMC */
19		mmc1 = &mmc_2; /* SD */
20		mmc2 = &mmc_3; /* WiFi */
21	};
22
23	memory@40000000 {
24		device_type = "memory";
25		reg = <0x40000000 0x80000000>;
26	};
27
28	chosen {
29		bootargs = "console=tty1";
30		stdout-path = "serial3:115200n8";
31	};
32
33	gpio-keys {
34		compatible = "gpio-keys";
35		pinctrl-names = "default";
36		pinctrl-0 = <&power_key_irq &lid_irq>;
37
38		power-key {
39			label = "Power";
40			gpios = <&gpx1 3 GPIO_ACTIVE_LOW>;
41			linux,code = <KEY_POWER>;
42			wakeup-source;
43		};
44
45		lid-switch {
46			label = "Lid";
47			gpios = <&gpx3 5 GPIO_ACTIVE_LOW>;
48			linux,input-type = <5>; /* EV_SW */
49			linux,code = <0>; /* SW_LID */
50			debounce-interval = <1>;
51			wakeup-source;
52		};
53	};
54
55	vbat: vbat-fixed-regulator {
56		compatible = "regulator-fixed";
57		regulator-name = "vbat-supply";
58		regulator-boot-on;
59	};
60
61	i2c-arbitrator {
62		compatible = "i2c-arb-gpio-challenge";
63		#address-cells = <1>;
64		#size-cells = <0>;
65
66		i2c-parent = <&i2c_4>;
67
68		our-claim-gpio = <&gpf0 3 GPIO_ACTIVE_LOW>;
69		their-claim-gpios = <&gpe0 4 GPIO_ACTIVE_LOW>;
70		slew-delay-us = <10>;
71		wait-retry-us = <3000>;
72		wait-free-us = <50000>;
73
74		pinctrl-names = "default";
75		pinctrl-0 = <&arb_our_claim &arb_their_claim>;
76
77		/* Use ID 104 as a hint that we're on physical bus 4 */
78		i2c_104: i2c@0 {
79			reg = <0>;
80			#address-cells = <1>;
81			#size-cells = <0>;
82
83			battery: sbs-battery@b {
84				compatible = "sbs,sbs-battery";
85				reg = <0xb>;
86				sbs,poll-retry-count = <1>;
87			};
88
89			cros_ec: embedded-controller@1e {
90				compatible = "google,cros-ec-i2c";
91				reg = <0x1e>;
92				interrupts = <6 IRQ_TYPE_NONE>;
93				interrupt-parent = <&gpx1>;
94				pinctrl-names = "default";
95				pinctrl-0 = <&ec_irq>;
96				wakeup-source;
97			};
98
99			power-regulator@48 {
100				compatible = "ti,tps65090";
101				reg = <0x48>;
102
103				/*
104				 * Config irq to disable internal pulls
105				 * even though we run in polling mode.
106				 */
107				pinctrl-names = "default";
108				pinctrl-0 = <&tps65090_irq>;
109
110				vsys1-supply = <&vbat>;
111				vsys2-supply = <&vbat>;
112				vsys3-supply = <&vbat>;
113				infet1-supply = <&vbat>;
114				infet2-supply = <&vbat>;
115				infet3-supply = <&vbat>;
116				infet4-supply = <&vbat>;
117				infet5-supply = <&vbat>;
118				infet6-supply = <&vbat>;
119				infet7-supply = <&vbat>;
120				vsys-l1-supply = <&vbat>;
121				vsys-l2-supply = <&vbat>;
122
123				regulators {
124					dcdc1 {
125						ti,enable-ext-control;
126					};
127					dcdc2 {
128						ti,enable-ext-control;
129					};
130					dcdc3 {
131						ti,enable-ext-control;
132					};
133					fet1: fet1 {
134						regulator-name = "vcd_led";
135						ti,overcurrent-wait = <3>;
136					};
137					tps65090_fet2: fet2 {
138						regulator-name = "video_mid";
139						regulator-always-on;
140						ti,overcurrent-wait = <3>;
141					};
142					fet3 {
143						regulator-name = "wwan_r";
144						regulator-always-on;
145						ti,overcurrent-wait = <3>;
146					};
147					fet4 {
148						regulator-name = "sdcard";
149						ti,overcurrent-wait = <3>;
150					};
151					fet5 {
152						regulator-name = "camout";
153						regulator-always-on;
154						ti,overcurrent-wait = <3>;
155					};
156					fet6: fet6 {
157						regulator-name = "lcd_vdd";
158						ti,overcurrent-wait = <3>;
159					};
160					tps65090_fet7: fet7 {
161						regulator-name = "video_mid_1a";
162						regulator-always-on;
163						ti,overcurrent-wait = <3>;
164					};
165					ldo1 {
166					};
167					ldo2 {
168					};
169				};
170
171				charger {
172					compatible = "ti,tps65090-charger";
173				};
174			};
175		};
176	};
177
178	sound {
179		samsung,i2s-controller = <&i2s0>;
180	};
181
182	usb3_vbus_reg: regulator-usb3 {
183		compatible = "regulator-fixed";
184		regulator-name = "P5.0V_USB3CON";
185		regulator-min-microvolt = <5000000>;
186		regulator-max-microvolt = <5000000>;
187		gpio = <&gpx2 7 GPIO_ACTIVE_HIGH>;
188		pinctrl-names = "default";
189		pinctrl-0 = <&usb3_vbus_en>;
190		enable-active-high;
191	};
192
193	fixed-rate-clocks {
194		xxti {
195			compatible = "samsung,clock-xxti";
196			clock-frequency = <24000000>;
197		};
198	};
199
200	backlight: backlight {
201		compatible = "pwm-backlight";
202		pwms = <&pwm 0 1000000 0>;
203		brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
204		default-brightness-level = <7>;
205		enable-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>;
206		power-supply = <&fet1>;
207		pinctrl-0 = <&pwm0_out>;
208		pinctrl-names = "default";
209	};
210
211	panel: panel {
212		compatible = "auo,b116xw03";
213		power-supply = <&fet6>;
214		backlight = <&backlight>;
215
216		port {
217			panel_in: endpoint {
218				remote-endpoint = <&bridge_out>;
219			};
220		};
221	};
222
223	mmc3_pwrseq: mmc3-pwrseq {
224		compatible = "mmc-pwrseq-simple";
225		reset-gpios = <&gpx0 2 GPIO_ACTIVE_LOW>, /* WIFI_RSTn */
226			      <&gpx0 1 GPIO_ACTIVE_LOW>; /* WIFI_EN */
227		clocks = <&max77686 MAX77686_CLK_PMIC>;
228		clock-names = "ext_clock";
229	};
230};
231
232&clock {
233	assigned-clocks = <&clock CLK_FOUT_EPLL>;
234	assigned-clock-rates = <49152000>;
235};
236
237&clock_audss {
238	assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
239	assigned-clock-parents = <&clock CLK_FOUT_EPLL>;
240};
241
242&cpu0 {
243	cpu0-supply = <&buck2_reg>;
244};
245
246&dp {
247	status = "okay";
248	pinctrl-names = "default";
249	pinctrl-0 = <&dp_hpd>;
250	samsung,color-space = <0>;
251	samsung,color-depth = <1>;
252	samsung,link-rate = <0x0a>;
253	samsung,lane-count = <2>;
254	hpd-gpios = <&gpx0 7 GPIO_ACTIVE_HIGH>;
255
256	ports {
257		port {
258			dp_out: endpoint {
259				remote-endpoint = <&bridge_in>;
260			};
261		};
262	};
263};
264
265&ehci {
266	samsung,vbus-gpio = <&gpx1 1 GPIO_ACTIVE_HIGH>;
267};
268
269&fimd {
270	status = "okay";
271	samsung,invert-vclk;
272};
273
274&hdmi {
275	status = "okay";
276	hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
277	pinctrl-names = "default";
278	pinctrl-0 = <&hdmi_hpd_irq>;
279	ddc = <&i2c_2>;
280	hdmi-en-supply = <&tps65090_fet7>;
281	vdd-supply = <&ldo8_reg>;
282	vdd_osc-supply = <&ldo10_reg>;
283	vdd_pll-supply = <&ldo8_reg>;
284};
285
286&hdmicec {
287	status = "okay";
288};
289
290&i2c_0 {
291	status = "okay";
292	samsung,i2c-sda-delay = <100>;
293	samsung,i2c-max-bus-freq = <378000>;
294
295	max77686: pmic@9 {
296		compatible = "maxim,max77686";
297		interrupt-parent = <&gpx3>;
298		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
299		pinctrl-names = "default";
300		pinctrl-0 = <&max77686_irq>;
301		wakeup-source;
302		reg = <0x09>;
303		#clock-cells = <1>;
304
305		voltage-regulators {
306			ldo1_reg: LDO1 {
307				regulator-name = "P1.0V_LDO_OUT1";
308				regulator-min-microvolt = <1000000>;
309				regulator-max-microvolt = <1000000>;
310				regulator-always-on;
311			};
312
313			ldo2_reg: LDO2 {
314				regulator-name = "P1.8V_LDO_OUT2";
315				regulator-min-microvolt = <1800000>;
316				regulator-max-microvolt = <1800000>;
317				regulator-always-on;
318			};
319
320			ldo3_reg: LDO3 {
321				regulator-name = "P1.8V_LDO_OUT3";
322				regulator-min-microvolt = <1800000>;
323				regulator-max-microvolt = <1800000>;
324				regulator-always-on;
325			};
326
327			ldo7_reg: LDO7 {
328				regulator-name = "P1.1V_LDO_OUT7";
329				regulator-min-microvolt = <1100000>;
330				regulator-max-microvolt = <1100000>;
331				regulator-always-on;
332			};
333
334			ldo8_reg: LDO8 {
335				regulator-name = "P1.0V_LDO_OUT8";
336				regulator-min-microvolt = <1000000>;
337				regulator-max-microvolt = <1000000>;
338				regulator-always-on;
339			};
340
341			ldo10_reg: LDO10 {
342				regulator-name = "P1.8V_LDO_OUT10";
343				regulator-min-microvolt = <1800000>;
344				regulator-max-microvolt = <1800000>;
345				regulator-always-on;
346			};
347
348			ldo12_reg: LDO12 {
349				regulator-name = "P3.0V_LDO_OUT12";
350				regulator-min-microvolt = <3000000>;
351				regulator-max-microvolt = <3000000>;
352				regulator-always-on;
353			};
354
355			ldo14_reg: LDO14 {
356				regulator-name = "P1.8V_LDO_OUT14";
357				regulator-min-microvolt = <1800000>;
358				regulator-max-microvolt = <1800000>;
359				regulator-always-on;
360			};
361
362			ldo15_reg: LDO15 {
363				regulator-name = "P1.0V_LDO_OUT15";
364				regulator-min-microvolt = <1000000>;
365				regulator-max-microvolt = <1000000>;
366				regulator-always-on;
367			};
368
369			ldo16_reg: LDO16 {
370				regulator-name = "P1.8V_LDO_OUT16";
371				regulator-min-microvolt = <1800000>;
372				regulator-max-microvolt = <1800000>;
373				regulator-always-on;
374			};
375
376			buck1_reg: BUCK1 {
377				regulator-name = "vdd_mif";
378				regulator-min-microvolt = <950000>;
379				regulator-max-microvolt = <1300000>;
380				regulator-always-on;
381				regulator-boot-on;
382			};
383
384			buck2_reg: BUCK2 {
385				regulator-name = "vdd_arm";
386				regulator-min-microvolt = <850000>;
387				regulator-max-microvolt = <1350000>;
388				regulator-always-on;
389				regulator-boot-on;
390			};
391
392			buck3_reg: BUCK3 {
393				regulator-name = "vdd_int";
394				regulator-min-microvolt = <900000>;
395				regulator-max-microvolt = <1200000>;
396				regulator-always-on;
397				regulator-boot-on;
398			};
399
400			buck4_reg: BUCK4 {
401				regulator-name = "vdd_g3d";
402				regulator-min-microvolt = <850000>;
403				regulator-max-microvolt = <1300000>;
404				regulator-always-on;
405				regulator-boot-on;
406			};
407
408			buck5_reg: BUCK5 {
409				regulator-name = "P1.8V_BUCK_OUT5";
410				regulator-min-microvolt = <1800000>;
411				regulator-max-microvolt = <1800000>;
412				regulator-always-on;
413				regulator-boot-on;
414			};
415
416			buck6_reg: BUCK6 {
417				regulator-name = "P1.35V_BUCK_OUT6";
418				regulator-min-microvolt = <1350000>;
419				regulator-max-microvolt = <1350000>;
420				regulator-always-on;
421			};
422
423			buck7_reg: BUCK7 {
424				regulator-name = "P2.0V_BUCK_OUT7";
425				regulator-min-microvolt = <2000000>;
426				regulator-max-microvolt = <2000000>;
427				regulator-always-on;
428			};
429
430			buck8_reg: BUCK8 {
431				regulator-name = "P2.85V_BUCK_OUT8";
432				regulator-min-microvolt = <2850000>;
433				regulator-max-microvolt = <2850000>;
434				regulator-always-on;
435			};
436		};
437	};
438};
439
440&i2c_1 {
441	status = "okay";
442	samsung,i2c-sda-delay = <100>;
443	samsung,i2c-max-bus-freq = <378000>;
444
445	trackpad@67 {
446		reg = <0x67>;
447		compatible = "cypress,cyapa";
448		interrupts = <2 IRQ_TYPE_NONE>;
449		interrupt-parent = <&gpx1>;
450		wakeup-source;
451	};
452};
453
454/*
455 * Disabled pullups since external part has its own pullups and
456 * double-pulling gets us out of spec in some cases.
457 */
458&i2c2_bus {
459	samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
460};
461
462&i2c_2 {
463	status = "okay";
464	/* used by HDMI DDC */
465	samsung,i2c-sda-delay = <100>;
466	samsung,i2c-max-bus-freq = <66000>;
467};
468
469&i2c_3 {
470	status = "okay";
471	samsung,i2c-sda-delay = <100>;
472	samsung,i2c-max-bus-freq = <66000>;
473};
474
475&i2c_4 {
476	status = "okay";
477	samsung,i2c-sda-delay = <100>;
478	samsung,i2c-max-bus-freq = <66000>;
479};
480
481&i2c_5 {
482	status = "okay";
483	samsung,i2c-sda-delay = <100>;
484	samsung,i2c-max-bus-freq = <66000>;
485};
486
487&i2c_7 {
488	status = "okay";
489	samsung,i2c-sda-delay = <100>;
490	samsung,i2c-max-bus-freq = <66000>;
491
492	ptn3460: lvds-bridge@20 {
493		compatible = "nxp,ptn3460";
494		reg = <0x20>;
495		powerdown-gpios = <&gpy2 5 GPIO_ACTIVE_HIGH>;
496		reset-gpios = <&gpx1 5 GPIO_ACTIVE_HIGH>;
497		edid-emulation = <5>;
498
499		ports {
500			#address-cells = <1>;
501			#size-cells = <0>;
502
503			port@0 {
504				reg = <0>;
505
506				bridge_out: endpoint {
507					remote-endpoint = <&panel_in>;
508				};
509			};
510
511			port@1 {
512				reg = <1>;
513
514				bridge_in: endpoint {
515					remote-endpoint = <&dp_out>;
516				};
517			};
518		};
519	};
520};
521
522&i2c_8 {
523	status = "okay";
524	/* used by HDMI PHY */
525	samsung,i2c-sda-delay = <100>;
526	samsung,i2c-max-bus-freq = <378000>;
527};
528
529&i2s0 {
530	assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>;
531	assigned-clock-parents = <&clock_audss EXYNOS_I2S_BUS>;
532	status = "okay";
533};
534
535&mali {
536	mali-supply = <&buck4_reg>;
537	status = "okay";
538};
539
540&mixer {
541	status = "okay";
542};
543
544/* eMMC flash */
545&mmc_0 {
546	status = "okay";
547	non-removable;
548	samsung,dw-mshc-ciu-div = <3>;
549	samsung,dw-mshc-sdr-timing = <2 3>;
550	samsung,dw-mshc-ddr-timing = <1 2>;
551	pinctrl-names = "default";
552	pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4 &sd0_bus8>;
553	bus-width = <8>;
554	cap-mmc-highspeed;
555	mmc-ddr-1_8v;
556};
557
558/* uSD card */
559&mmc_2 {
560	status = "okay";
561	card-detect-delay = <200>;
562	samsung,dw-mshc-ciu-div = <3>;
563	samsung,dw-mshc-sdr-timing = <2 3>;
564	samsung,dw-mshc-ddr-timing = <1 2>;
565	pinctrl-names = "default";
566	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
567	bus-width = <4>;
568	wp-gpios = <&gpc2 1 GPIO_ACTIVE_HIGH>;
569	cap-sd-highspeed;
570};
571
572/*
573 * On Snow we've got SIP WiFi and so can keep drive strengths low to
574 * reduce EMI.
575 *
576 * WiFi SDIO module
577 */
578&mmc_3 {
579	status = "okay";
580	non-removable;
581	cap-sdio-irq;
582	keep-power-in-suspend;
583	samsung,dw-mshc-ciu-div = <3>;
584	samsung,dw-mshc-sdr-timing = <2 3>;
585	samsung,dw-mshc-ddr-timing = <1 2>;
586	pinctrl-names = "default";
587	pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &wifi_en &wifi_rst>;
588	bus-width = <4>;
589	cap-sd-highspeed;
590	mmc-pwrseq = <&mmc3_pwrseq>;
591};
592
593&pinctrl_0 {
594	wifi_en: wifi-en-pins {
595		samsung,pins = "gpx0-1";
596		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
597		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
598		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
599	};
600
601	wifi_rst: wifi-rst-pins {
602		samsung,pins = "gpx0-2";
603		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
604		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
605		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
606	};
607
608	power_key_irq: power-key-irq-pins {
609		samsung,pins = "gpx1-3";
610		samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
611		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
612		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
613	};
614
615	ec_irq: ec-irq-pins {
616		samsung,pins = "gpx1-6";
617		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
618		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
619		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
620	};
621
622	tps65090_irq: tps65090-irq-pins {
623		samsung,pins = "gpx2-6";
624		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
625		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
626		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
627	};
628
629	usb3_vbus_en: usb3-vbus-en-pins {
630		samsung,pins = "gpx2-7";
631		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
632		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
633		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
634	};
635
636	max77686_irq: max77686-irq-pins {
637		samsung,pins = "gpx3-2";
638		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
639		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
640		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
641	};
642
643	lid_irq: lid-irq-pins {
644		samsung,pins = "gpx3-5";
645		samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
646		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
647		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
648	};
649
650	hdmi_hpd_irq: hdmi-hpd-irq-pins {
651		samsung,pins = "gpx3-7";
652		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
653		samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
654		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
655	};
656};
657
658&pinctrl_1 {
659	arb_their_claim: arb-their-claim-pins {
660		samsung,pins = "gpe0-4";
661		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
662		samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
663		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
664	};
665
666	arb_our_claim: arb-our-claim-pins {
667		samsung,pins = "gpf0-3";
668		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
669		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
670		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
671	};
672};
673
674&pmu_system_controller {
675	assigned-clocks = <&pmu_system_controller 0>;
676	assigned-clock-parents = <&clock CLK_FIN_PLL>;
677};
678
679&rtc {
680	status = "okay";
681	clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>;
682	clock-names = "rtc", "rtc_src";
683};
684
685&sd3_bus4 {
686	samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
687};
688
689&sd3_clk {
690	samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
691};
692
693&sd3_cmd {
694	samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
695	samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
696};
697
698&spi_1 {
699	status = "okay";
700	samsung,spi-src-clk = <0>;
701	num-cs = <1>;
702	cs-gpios = <&gpa2 5 GPIO_ACTIVE_HIGH>;
703};
704
705&usbdrd {
706	vdd10-supply = <&ldo15_reg>;
707	vdd33-supply = <&ldo12_reg>;
708};
709
710&usbdrd_dwc3 {
711	dr_mode = "host";
712};
713
714&usbdrd_phy {
715	vbus-supply = <&usb3_vbus_reg>;
716};
717
718#include "../cros-ec-keyboard.dtsi"
719