Merge branch 'fix/rt5645' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / exynos5250-snow.dts
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         sound {
181                 compatible = "google,snow-audio-max98095";
182
183                 samsung,model = "Snow-I2S-MAX98095";
184                 samsung,i2s-controller = <&i2s0>;
185                 samsung,audio-codec = <&max98095>;
186         };
187
188         usb3_vbus_reg: regulator-usb3 {
189                 compatible = "regulator-fixed";
190                 regulator-name = "P5.0V_USB3CON";
191                 regulator-min-microvolt = <5000000>;
192                 regulator-max-microvolt = <5000000>;
193                 gpio = <&gpx2 7 GPIO_ACTIVE_HIGH>;
194                 pinctrl-names = "default";
195                 pinctrl-0 = <&usb3_vbus_en>;
196                 enable-active-high;
197         };
198
199         fixed-rate-clocks {
200                 xxti {
201                         compatible = "samsung,clock-xxti";
202                         clock-frequency = <24000000>;
203                 };
204         };
205
206         backlight: backlight {
207                 compatible = "pwm-backlight";
208                 pwms = <&pwm 0 1000000 0>;
209                 brightness-levels = <0 100 500 1000 1500 2000 2500 2800>;
210                 default-brightness-level = <7>;
211                 enable-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>;
212                 power-supply = <&fet1>;
213                 pinctrl-0 = <&pwm0_out>;
214                 pinctrl-names = "default";
215         };
216
217         panel: panel {
218                 compatible = "auo,b116xw03";
219                 power-supply = <&fet6>;
220                 backlight = <&backlight>;
221
222                 port {
223                         panel_in: endpoint {
224                                 remote-endpoint = <&bridge_out>;
225                         };
226                 };
227         };
228
229         mmc3_pwrseq: mmc3_pwrseq {
230                 compatible = "mmc-pwrseq-simple";
231                 reset-gpios = <&gpx0 2 GPIO_ACTIVE_LOW>, /* WIFI_RSTn */
232                               <&gpx0 1 GPIO_ACTIVE_LOW>; /* WIFI_EN */
233                 clocks = <&max77686 MAX77686_CLK_PMIC>;
234                 clock-names = "ext_clock";
235         };
236 };
237
238 &dp {
239         status = "okay";
240         pinctrl-names = "default";
241         pinctrl-0 = <&dp_hpd>;
242         samsung,color-space = <0>;
243         samsung,dynamic-range = <0>;
244         samsung,ycbcr-coeff = <0>;
245         samsung,color-depth = <1>;
246         samsung,link-rate = <0x0a>;
247         samsung,lane-count = <2>;
248         samsung,hpd-gpio = <&gpx0 7 GPIO_ACTIVE_HIGH>;
249
250         ports {
251                 port@0 {
252                         dp_out: endpoint {
253                                 remote-endpoint = <&bridge_in>;
254                         };
255                 };
256         };
257 };
258
259 &ehci {
260         samsung,vbus-gpio = <&gpx1 1 GPIO_ACTIVE_HIGH>;
261 };
262
263 &fimd {
264         status = "okay";
265         samsung,invert-vclk;
266 };
267
268 &hdmi {
269         hpd-gpio = <&gpx3 7 GPIO_ACTIVE_HIGH>;
270         pinctrl-names = "default";
271         pinctrl-0 = <&hdmi_hpd_irq>;
272         phy = <&hdmiphy>;
273         ddc = <&i2c_2>;
274         hdmi-en-supply = <&tps65090_fet7>;
275         vdd-supply = <&ldo8_reg>;
276         vdd_osc-supply = <&ldo10_reg>;
277         vdd_pll-supply = <&ldo8_reg>;
278 };
279
280 &i2c_0 {
281         status = "okay";
282         samsung,i2c-sda-delay = <100>;
283         samsung,i2c-max-bus-freq = <378000>;
284
285         max77686: max77686@09 {
286                 compatible = "maxim,max77686";
287                 interrupt-parent = <&gpx3>;
288                 interrupts = <2 IRQ_TYPE_NONE>;
289                 pinctrl-names = "default";
290                 pinctrl-0 = <&max77686_irq>;
291                 wakeup-source;
292                 reg = <0x09>;
293                 #clock-cells = <1>;
294
295                 voltage-regulators {
296                         ldo1_reg: LDO1 {
297                                 regulator-name = "P1.0V_LDO_OUT1";
298                                 regulator-min-microvolt = <1000000>;
299                                 regulator-max-microvolt = <1000000>;
300                                 regulator-always-on;
301                         };
302
303                         ldo2_reg: LDO2 {
304                                 regulator-name = "P1.8V_LDO_OUT2";
305                                 regulator-min-microvolt = <1800000>;
306                                 regulator-max-microvolt = <1800000>;
307                                 regulator-always-on;
308                         };
309
310                         ldo3_reg: LDO3 {
311                                 regulator-name = "P1.8V_LDO_OUT3";
312                                 regulator-min-microvolt = <1800000>;
313                                 regulator-max-microvolt = <1800000>;
314                                 regulator-always-on;
315                         };
316
317                         ldo7_reg: LDO7 {
318                                 regulator-name = "P1.1V_LDO_OUT7";
319                                 regulator-min-microvolt = <1100000>;
320                                 regulator-max-microvolt = <1100000>;
321                                 regulator-always-on;
322                         };
323
324                         ldo8_reg: LDO8 {
325                                 regulator-name = "P1.0V_LDO_OUT8";
326                                 regulator-min-microvolt = <1000000>;
327                                 regulator-max-microvolt = <1000000>;
328                                 regulator-always-on;
329                         };
330
331                         ldo10_reg: LDO10 {
332                                 regulator-name = "P1.8V_LDO_OUT10";
333                                 regulator-min-microvolt = <1800000>;
334                                 regulator-max-microvolt = <1800000>;
335                                 regulator-always-on;
336                         };
337
338                         ldo12_reg: LDO12 {
339                                 regulator-name = "P3.0V_LDO_OUT12";
340                                 regulator-min-microvolt = <3000000>;
341                                 regulator-max-microvolt = <3000000>;
342                                 regulator-always-on;
343                         };
344
345                         ldo14_reg: LDO14 {
346                                 regulator-name = "P1.8V_LDO_OUT14";
347                                 regulator-min-microvolt = <1800000>;
348                                 regulator-max-microvolt = <1800000>;
349                                 regulator-always-on;
350                         };
351
352                         ldo15_reg: LDO15 {
353                                 regulator-name = "P1.0V_LDO_OUT15";
354                                 regulator-min-microvolt = <1000000>;
355                                 regulator-max-microvolt = <1000000>;
356                                 regulator-always-on;
357                         };
358
359                         ldo16_reg: LDO16 {
360                                 regulator-name = "P1.8V_LDO_OUT16";
361                                 regulator-min-microvolt = <1800000>;
362                                 regulator-max-microvolt = <1800000>;
363                                 regulator-always-on;
364                         };
365
366                         buck1_reg: BUCK1 {
367                                 regulator-name = "vdd_mif";
368                                 regulator-min-microvolt = <950000>;
369                                 regulator-max-microvolt = <1300000>;
370                                 regulator-always-on;
371                                 regulator-boot-on;
372                         };
373
374                         buck2_reg: BUCK2 {
375                                 regulator-name = "vdd_arm";
376                                 regulator-min-microvolt = <850000>;
377                                 regulator-max-microvolt = <1350000>;
378                                 regulator-always-on;
379                                 regulator-boot-on;
380                         };
381
382                         buck3_reg: BUCK3 {
383                                 regulator-name = "vdd_int";
384                                 regulator-min-microvolt = <900000>;
385                                 regulator-max-microvolt = <1200000>;
386                                 regulator-always-on;
387                                 regulator-boot-on;
388                         };
389
390                         buck4_reg: BUCK4 {
391                                 regulator-name = "vdd_g3d";
392                                 regulator-min-microvolt = <850000>;
393                                 regulator-max-microvolt = <1300000>;
394                                 regulator-always-on;
395                                 regulator-boot-on;
396                         };
397
398                         buck5_reg: BUCK5 {
399                                 regulator-name = "P1.8V_BUCK_OUT5";
400                                 regulator-min-microvolt = <1800000>;
401                                 regulator-max-microvolt = <1800000>;
402                                 regulator-always-on;
403                                 regulator-boot-on;
404                         };
405
406                         buck6_reg: BUCK6 {
407                                 regulator-name = "P1.35V_BUCK_OUT6";
408                                 regulator-min-microvolt = <1350000>;
409                                 regulator-max-microvolt = <1350000>;
410                                 regulator-always-on;
411                         };
412
413                         buck7_reg: BUCK7 {
414                                 regulator-name = "P2.0V_BUCK_OUT7";
415                                 regulator-min-microvolt = <2000000>;
416                                 regulator-max-microvolt = <2000000>;
417                                 regulator-always-on;
418                         };
419
420                         buck8_reg: BUCK8 {
421                                 regulator-name = "P2.85V_BUCK_OUT8";
422                                 regulator-min-microvolt = <2850000>;
423                                 regulator-max-microvolt = <2850000>;
424                                 regulator-always-on;
425                         };
426                 };
427         };
428 };
429
430 &i2c_1 {
431         status = "okay";
432         samsung,i2c-sda-delay = <100>;
433         samsung,i2c-max-bus-freq = <378000>;
434
435         trackpad {
436                 reg = <0x67>;
437                 compatible = "cypress,cyapa";
438                 interrupts = <2 IRQ_TYPE_NONE>;
439                 interrupt-parent = <&gpx1>;
440                 wakeup-source;
441         };
442 };
443
444 /*
445  * Disabled pullups since external part has its own pullups and
446  * double-pulling gets us out of spec in some cases.
447  */
448 &i2c2_bus {
449         samsung,pin-pud = <0>;
450 };
451
452 &i2c_2 {
453         status = "okay";
454         samsung,i2c-sda-delay = <100>;
455         samsung,i2c-max-bus-freq = <66000>;
456
457         hdmiddc@50 {
458                 compatible = "samsung,exynos4210-hdmiddc";
459                 reg = <0x50>;
460         };
461 };
462
463 &i2c_3 {
464         status = "okay";
465         samsung,i2c-sda-delay = <100>;
466         samsung,i2c-max-bus-freq = <66000>;
467 };
468
469 &i2c_4 {
470         status = "okay";
471         samsung,i2c-sda-delay = <100>;
472         samsung,i2c-max-bus-freq = <66000>;
473 };
474
475 &i2c_5 {
476         status = "okay";
477         samsung,i2c-sda-delay = <100>;
478         samsung,i2c-max-bus-freq = <66000>;
479 };
480
481 &i2c_7 {
482         status = "okay";
483         samsung,i2c-sda-delay = <100>;
484         samsung,i2c-max-bus-freq = <66000>;
485
486         ptn3460: lvds-bridge@20 {
487                 compatible = "nxp,ptn3460";
488                 reg = <0x20>;
489                 powerdown-gpios = <&gpy2 5 GPIO_ACTIVE_HIGH>;
490                 reset-gpios = <&gpx1 5 GPIO_ACTIVE_HIGH>;
491                 edid-emulation = <5>;
492
493                 ports {
494                         port@0 {
495                                 bridge_out: endpoint {
496                                         remote-endpoint = <&panel_in>;
497                                 };
498                         };
499
500                         port@1 {
501                                 bridge_in: endpoint {
502                                         remote-endpoint = <&dp_out>;
503                                 };
504                         };
505                 };
506         };
507
508         max98095: codec@11 {
509                 compatible = "maxim,max98095";
510                 reg = <0x11>;
511                 pinctrl-0 = <&max98095_en>;
512                 pinctrl-names = "default";
513         };
514 };
515
516 &i2c_8 {
517         status = "okay";
518         samsung,i2c-sda-delay = <100>;
519         samsung,i2c-max-bus-freq = <378000>;
520
521         hdmiphy: hdmiphy@38 {
522                 compatible = "samsung,exynos4212-hdmiphy";
523                 reg = <0x38>;
524         };
525 };
526
527 &i2s0 {
528         status = "okay";
529 };
530
531 &mmc_0 {
532         status = "okay";
533         num-slots = <1>;
534         broken-cd;
535         card-detect-delay = <200>;
536         samsung,dw-mshc-ciu-div = <3>;
537         samsung,dw-mshc-sdr-timing = <2 3>;
538         samsung,dw-mshc-ddr-timing = <1 2>;
539         pinctrl-names = "default";
540         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4 &sd0_bus8>;
541         bus-width = <8>;
542         cap-mmc-highspeed;
543 };
544
545 &mmc_2 {
546         status = "okay";
547         num-slots = <1>;
548         card-detect-delay = <200>;
549         samsung,dw-mshc-ciu-div = <3>;
550         samsung,dw-mshc-sdr-timing = <2 3>;
551         samsung,dw-mshc-ddr-timing = <1 2>;
552         pinctrl-names = "default";
553         pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
554         bus-width = <4>;
555         wp-gpios = <&gpc2 1 GPIO_ACTIVE_HIGH>;
556         cap-sd-highspeed;
557 };
558
559 /*
560  * On Snow we've got SIP WiFi and so can keep drive strengths low to
561  * reduce EMI.
562  */
563 &mmc_3 {
564         status = "okay";
565         num-slots = <1>;
566         broken-cd;
567         cap-sdio-irq;
568         keep-power-in-suspend;
569         card-detect-delay = <200>;
570         samsung,dw-mshc-ciu-div = <3>;
571         samsung,dw-mshc-sdr-timing = <2 3>;
572         samsung,dw-mshc-ddr-timing = <1 2>;
573         pinctrl-names = "default";
574         pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &wifi_en &wifi_rst>;
575         bus-width = <4>;
576         cap-sd-highspeed;
577         mmc-pwrseq = <&mmc3_pwrseq>;
578 };
579
580 &pinctrl_0 {
581         wifi_en: wifi-en {
582                 samsung,pins = "gpx0-1";
583                 samsung,pin-function = <1>;
584                 samsung,pin-pud = <0>;
585                 samsung,pin-drv = <0>;
586         };
587
588         wifi_rst: wifi-rst {
589                 samsung,pins = "gpx0-2";
590                 samsung,pin-function = <1>;
591                 samsung,pin-pud = <0>;
592                 samsung,pin-drv = <0>;
593         };
594
595         power_key_irq: power-key-irq {
596                 samsung,pins = "gpx1-3";
597                 samsung,pin-function = <0xf>;
598                 samsung,pin-pud = <0>;
599                 samsung,pin-drv = <0>;
600         };
601
602         ec_irq: ec-irq {
603                 samsung,pins = "gpx1-6";
604                 samsung,pin-function = <0>;
605                 samsung,pin-pud = <0>;
606                 samsung,pin-drv = <0>;
607         };
608
609         max98095_en: max98095-en {
610                 samsung,pins = "gpx1-7";
611                 samsung,pin-function = <0>;
612                 samsung,pin-pud = <3>;
613                 samsung,pin-drv = <0>;
614         };
615
616         tps65090_irq: tps65090-irq {
617                 samsung,pins = "gpx2-6";
618                 samsung,pin-function = <0>;
619                 samsung,pin-pud = <0>;
620                 samsung,pin-drv = <0>;
621         };
622
623         usb3_vbus_en: usb3-vbus-en {
624                 samsung,pins = "gpx2-7";
625                 samsung,pin-function = <1>;
626                 samsung,pin-pud = <0>;
627                 samsung,pin-drv = <0>;
628         };
629
630         max77686_irq: max77686-irq {
631                 samsung,pins = "gpx3-2";
632                 samsung,pin-function = <0>;
633                 samsung,pin-pud = <0>;
634                 samsung,pin-drv = <0>;
635         };
636
637         lid_irq: lid-irq {
638                 samsung,pins = "gpx3-5";
639                 samsung,pin-function = <0xf>;
640                 samsung,pin-pud = <0>;
641                 samsung,pin-drv = <0>;
642         };
643
644         hdmi_hpd_irq: hdmi-hpd-irq {
645                 samsung,pins = "gpx3-7";
646                 samsung,pin-function = <0>;
647                 samsung,pin-pud = <1>;
648                 samsung,pin-drv = <0>;
649         };
650 };
651
652 &pinctrl_1 {
653         arb_their_claim: arb-their-claim {
654                 samsung,pins = "gpe0-4";
655                 samsung,pin-function = <0>;
656                 samsung,pin-pud = <3>;
657                 samsung,pin-drv = <0>;
658         };
659
660         arb_our_claim: arb-our-claim {
661                 samsung,pins = "gpf0-3";
662                 samsung,pin-function = <1>;
663                 samsung,pin-pud = <0>;
664                 samsung,pin-drv = <0>;
665         };
666 };
667
668 &rtc {
669         status = "okay";
670         clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>;
671         clock-names = "rtc", "rtc_src";
672 };
673
674 &sd3_bus4 {
675         samsung,pin-drv = <0>;
676 };
677
678 &sd3_clk {
679         samsung,pin-drv = <0>;
680 };
681
682 &sd3_cmd {
683         samsung,pin-pud = <3>;
684         samsung,pin-drv = <0>;
685 };
686
687 &spi_1 {
688         status = "okay";
689         samsung,spi-src-clk = <0>;
690         num-cs = <1>;
691 };
692
693 &usbdrd_dwc3 {
694         dr_mode = "host";
695 };
696
697 &usbdrd_phy {
698         vbus-supply = <&usb3_vbus_reg>;
699 };
700
701 #include "cros-ec-keyboard.dtsi"