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