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