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 i2c-parent = <&i2c_4>; 64 65 our-claim-gpios = <&gpf0 3 GPIO_ACTIVE_LOW>; 66 their-claim-gpios = <&gpe0 4 GPIO_ACTIVE_LOW>; 67 slew-delay-us = <10>; 68 wait-retry-us = <3000>; 69 wait-free-us = <50000>; 70 71 pinctrl-names = "default"; 72 pinctrl-0 = <&arb_our_claim &arb_their_claim>; 73 74 /* Use ID 104 as a hint that we're on physical bus 4 */ 75 i2c_104: i2c-arb { 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&clock { 229 assigned-clocks = <&clock CLK_FOUT_EPLL>; 230 assigned-clock-rates = <49152000>; 231}; 232 233&clock_audss { 234 assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>; 235 assigned-clock-parents = <&clock CLK_FOUT_EPLL>; 236}; 237 238&cpu0 { 239 cpu0-supply = <&buck2_reg>; 240}; 241 242&dp { 243 status = "okay"; 244 pinctrl-names = "default"; 245 pinctrl-0 = <&dp_hpd>; 246 samsung,color-space = <0>; 247 samsung,color-depth = <1>; 248 samsung,link-rate = <0x0a>; 249 samsung,lane-count = <2>; 250 hpd-gpios = <&gpx0 7 GPIO_ACTIVE_HIGH>; 251 252 ports { 253 port { 254 dp_out: endpoint { 255 remote-endpoint = <&bridge_in>; 256 }; 257 }; 258 }; 259}; 260 261&ehci { 262 samsung,vbus-gpio = <&gpx1 1 GPIO_ACTIVE_HIGH>; 263}; 264 265&fimd { 266 status = "okay"; 267 samsung,invert-vclk; 268}; 269 270&hdmi { 271 status = "okay"; 272 hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>; 273 pinctrl-names = "default"; 274 pinctrl-0 = <&hdmi_hpd_irq>; 275 ddc = <&i2c_2>; 276 hdmi-en-supply = <&tps65090_fet7>; 277 vdd-supply = <&ldo8_reg>; 278 vdd_osc-supply = <&ldo10_reg>; 279 vdd_pll-supply = <&ldo8_reg>; 280}; 281 282&hdmicec { 283 status = "okay"; 284}; 285 286&i2c_0 { 287 status = "okay"; 288 samsung,i2c-sda-delay = <100>; 289 samsung,i2c-max-bus-freq = <378000>; 290 291 max77686: pmic@9 { 292 compatible = "maxim,max77686"; 293 interrupt-parent = <&gpx3>; 294 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 295 pinctrl-names = "default"; 296 pinctrl-0 = <&max77686_irq>; 297 wakeup-source; 298 reg = <0x09>; 299 #clock-cells = <1>; 300 301 voltage-regulators { 302 ldo1_reg: LDO1 { 303 regulator-name = "P1.0V_LDO_OUT1"; 304 regulator-min-microvolt = <1000000>; 305 regulator-max-microvolt = <1000000>; 306 regulator-always-on; 307 }; 308 309 ldo2_reg: LDO2 { 310 regulator-name = "P1.8V_LDO_OUT2"; 311 regulator-min-microvolt = <1800000>; 312 regulator-max-microvolt = <1800000>; 313 regulator-always-on; 314 }; 315 316 ldo3_reg: LDO3 { 317 regulator-name = "P1.8V_LDO_OUT3"; 318 regulator-min-microvolt = <1800000>; 319 regulator-max-microvolt = <1800000>; 320 regulator-always-on; 321 }; 322 323 ldo7_reg: LDO7 { 324 regulator-name = "P1.1V_LDO_OUT7"; 325 regulator-min-microvolt = <1100000>; 326 regulator-max-microvolt = <1100000>; 327 regulator-always-on; 328 }; 329 330 ldo8_reg: LDO8 { 331 regulator-name = "P1.0V_LDO_OUT8"; 332 regulator-min-microvolt = <1000000>; 333 regulator-max-microvolt = <1000000>; 334 regulator-always-on; 335 }; 336 337 ldo10_reg: LDO10 { 338 regulator-name = "P1.8V_LDO_OUT10"; 339 regulator-min-microvolt = <1800000>; 340 regulator-max-microvolt = <1800000>; 341 regulator-always-on; 342 }; 343 344 ldo12_reg: LDO12 { 345 regulator-name = "P3.0V_LDO_OUT12"; 346 regulator-min-microvolt = <3000000>; 347 regulator-max-microvolt = <3000000>; 348 regulator-always-on; 349 }; 350 351 ldo14_reg: LDO14 { 352 regulator-name = "P1.8V_LDO_OUT14"; 353 regulator-min-microvolt = <1800000>; 354 regulator-max-microvolt = <1800000>; 355 regulator-always-on; 356 }; 357 358 ldo15_reg: LDO15 { 359 regulator-name = "P1.0V_LDO_OUT15"; 360 regulator-min-microvolt = <1000000>; 361 regulator-max-microvolt = <1000000>; 362 regulator-always-on; 363 }; 364 365 ldo16_reg: LDO16 { 366 regulator-name = "P1.8V_LDO_OUT16"; 367 regulator-min-microvolt = <1800000>; 368 regulator-max-microvolt = <1800000>; 369 regulator-always-on; 370 }; 371 372 buck1_reg: BUCK1 { 373 regulator-name = "vdd_mif"; 374 regulator-min-microvolt = <950000>; 375 regulator-max-microvolt = <1300000>; 376 regulator-always-on; 377 regulator-boot-on; 378 }; 379 380 buck2_reg: BUCK2 { 381 regulator-name = "vdd_arm"; 382 regulator-min-microvolt = <850000>; 383 regulator-max-microvolt = <1350000>; 384 regulator-always-on; 385 regulator-boot-on; 386 }; 387 388 buck3_reg: BUCK3 { 389 regulator-name = "vdd_int"; 390 regulator-min-microvolt = <900000>; 391 regulator-max-microvolt = <1200000>; 392 regulator-always-on; 393 regulator-boot-on; 394 }; 395 396 buck4_reg: BUCK4 { 397 regulator-name = "vdd_g3d"; 398 regulator-min-microvolt = <850000>; 399 regulator-max-microvolt = <1300000>; 400 regulator-always-on; 401 regulator-boot-on; 402 }; 403 404 buck5_reg: BUCK5 { 405 regulator-name = "P1.8V_BUCK_OUT5"; 406 regulator-min-microvolt = <1800000>; 407 regulator-max-microvolt = <1800000>; 408 regulator-always-on; 409 regulator-boot-on; 410 }; 411 412 buck6_reg: BUCK6 { 413 regulator-name = "P1.35V_BUCK_OUT6"; 414 regulator-min-microvolt = <1350000>; 415 regulator-max-microvolt = <1350000>; 416 regulator-always-on; 417 }; 418 419 buck7_reg: BUCK7 { 420 regulator-name = "P2.0V_BUCK_OUT7"; 421 regulator-min-microvolt = <2000000>; 422 regulator-max-microvolt = <2000000>; 423 regulator-always-on; 424 }; 425 426 buck8_reg: BUCK8 { 427 regulator-name = "P2.85V_BUCK_OUT8"; 428 regulator-min-microvolt = <2850000>; 429 regulator-max-microvolt = <2850000>; 430 regulator-always-on; 431 }; 432 }; 433 }; 434}; 435 436&i2c_1 { 437 status = "okay"; 438 samsung,i2c-sda-delay = <100>; 439 samsung,i2c-max-bus-freq = <378000>; 440 441 trackpad@67 { 442 reg = <0x67>; 443 compatible = "cypress,cyapa"; 444 interrupts = <2 IRQ_TYPE_NONE>; 445 interrupt-parent = <&gpx1>; 446 wakeup-source; 447 }; 448}; 449 450/* 451 * Disabled pullups since external part has its own pullups and 452 * double-pulling gets us out of spec in some cases. 453 */ 454&i2c2_bus { 455 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 456}; 457 458&i2c_2 { 459 status = "okay"; 460 /* used by HDMI DDC */ 461 samsung,i2c-sda-delay = <100>; 462 samsung,i2c-max-bus-freq = <66000>; 463}; 464 465&i2c_3 { 466 status = "okay"; 467 samsung,i2c-sda-delay = <100>; 468 samsung,i2c-max-bus-freq = <66000>; 469}; 470 471&i2c_4 { 472 status = "okay"; 473 samsung,i2c-sda-delay = <100>; 474 samsung,i2c-max-bus-freq = <66000>; 475}; 476 477&i2c_5 { 478 status = "okay"; 479 samsung,i2c-sda-delay = <100>; 480 samsung,i2c-max-bus-freq = <66000>; 481}; 482 483&i2c_7 { 484 status = "okay"; 485 samsung,i2c-sda-delay = <100>; 486 samsung,i2c-max-bus-freq = <66000>; 487 488 ptn3460: lvds-bridge@20 { 489 compatible = "nxp,ptn3460"; 490 reg = <0x20>; 491 powerdown-gpios = <&gpy2 5 GPIO_ACTIVE_HIGH>; 492 reset-gpios = <&gpx1 5 GPIO_ACTIVE_HIGH>; 493 edid-emulation = <5>; 494 495 ports { 496 #address-cells = <1>; 497 #size-cells = <0>; 498 499 port@0 { 500 reg = <0>; 501 502 bridge_out: endpoint { 503 remote-endpoint = <&panel_in>; 504 }; 505 }; 506 507 port@1 { 508 reg = <1>; 509 510 bridge_in: endpoint { 511 remote-endpoint = <&dp_out>; 512 }; 513 }; 514 }; 515 }; 516}; 517 518&i2c_8 { 519 status = "okay"; 520 /* used by HDMI PHY */ 521 samsung,i2c-sda-delay = <100>; 522 samsung,i2c-max-bus-freq = <378000>; 523}; 524 525&i2s0 { 526 assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>; 527 assigned-clock-parents = <&clock_audss EXYNOS_I2S_BUS>; 528 status = "okay"; 529}; 530 531&mali { 532 mali-supply = <&buck4_reg>; 533 status = "okay"; 534}; 535 536&mixer { 537 status = "okay"; 538}; 539 540/* eMMC flash */ 541&mmc_0 { 542 status = "okay"; 543 non-removable; 544 samsung,dw-mshc-ciu-div = <3>; 545 samsung,dw-mshc-sdr-timing = <2 3>; 546 samsung,dw-mshc-ddr-timing = <1 2>; 547 pinctrl-names = "default"; 548 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4 &sd0_bus8>; 549 bus-width = <8>; 550 cap-mmc-highspeed; 551 mmc-ddr-1_8v; 552}; 553 554/* uSD card */ 555&mmc_2 { 556 status = "okay"; 557 card-detect-delay = <200>; 558 samsung,dw-mshc-ciu-div = <3>; 559 samsung,dw-mshc-sdr-timing = <2 3>; 560 samsung,dw-mshc-ddr-timing = <1 2>; 561 pinctrl-names = "default"; 562 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; 563 bus-width = <4>; 564 wp-gpios = <&gpc2 1 GPIO_ACTIVE_HIGH>; 565 cap-sd-highspeed; 566}; 567 568/* 569 * On Snow we've got SIP WiFi and so can keep drive strengths low to 570 * reduce EMI. 571 * 572 * WiFi SDIO module 573 */ 574&mmc_3 { 575 status = "okay"; 576 non-removable; 577 cap-sdio-irq; 578 keep-power-in-suspend; 579 samsung,dw-mshc-ciu-div = <3>; 580 samsung,dw-mshc-sdr-timing = <2 3>; 581 samsung,dw-mshc-ddr-timing = <1 2>; 582 pinctrl-names = "default"; 583 pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &wifi_en &wifi_rst>; 584 bus-width = <4>; 585 cap-sd-highspeed; 586 mmc-pwrseq = <&mmc3_pwrseq>; 587}; 588 589&pinctrl_0 { 590 wifi_en: wifi-en-pins { 591 samsung,pins = "gpx0-1"; 592 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; 593 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 594 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 595 }; 596 597 wifi_rst: wifi-rst-pins { 598 samsung,pins = "gpx0-2"; 599 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; 600 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 601 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 602 }; 603 604 power_key_irq: power-key-irq-pins { 605 samsung,pins = "gpx1-3"; 606 samsung,pin-function = <EXYNOS_PIN_FUNC_F>; 607 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 608 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 609 }; 610 611 ec_irq: ec-irq-pins { 612 samsung,pins = "gpx1-6"; 613 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; 614 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 615 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 616 }; 617 618 tps65090_irq: tps65090-irq-pins { 619 samsung,pins = "gpx2-6"; 620 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; 621 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 622 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 623 }; 624 625 usb3_vbus_en: usb3-vbus-en-pins { 626 samsung,pins = "gpx2-7"; 627 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; 628 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 629 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 630 }; 631 632 max77686_irq: max77686-irq-pins { 633 samsung,pins = "gpx3-2"; 634 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; 635 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 636 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 637 }; 638 639 lid_irq: lid-irq-pins { 640 samsung,pins = "gpx3-5"; 641 samsung,pin-function = <EXYNOS_PIN_FUNC_F>; 642 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 643 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 644 }; 645 646 hdmi_hpd_irq: hdmi-hpd-irq-pins { 647 samsung,pins = "gpx3-7"; 648 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; 649 samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; 650 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 651 }; 652}; 653 654&pinctrl_1 { 655 arb_their_claim: arb-their-claim-pins { 656 samsung,pins = "gpe0-4"; 657 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; 658 samsung,pin-pud = <EXYNOS_PIN_PULL_UP>; 659 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 660 }; 661 662 arb_our_claim: arb-our-claim-pins { 663 samsung,pins = "gpf0-3"; 664 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; 665 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 666 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 667 }; 668}; 669 670&pmu_system_controller { 671 assigned-clocks = <&pmu_system_controller 0>; 672 assigned-clock-parents = <&clock CLK_FIN_PLL>; 673}; 674 675&rtc { 676 status = "okay"; 677 clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>; 678 clock-names = "rtc", "rtc_src"; 679}; 680 681&sd3_bus4 { 682 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 683}; 684 685&sd3_clk { 686 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 687}; 688 689&sd3_cmd { 690 samsung,pin-pud = <EXYNOS_PIN_PULL_UP>; 691 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 692}; 693 694&spi_1 { 695 status = "okay"; 696 samsung,spi-src-clk = <0>; 697 num-cs = <1>; 698 cs-gpios = <&gpa2 5 GPIO_ACTIVE_HIGH>; 699}; 700 701&usbdrd { 702 vdd10-supply = <&ldo15_reg>; 703 vdd33-supply = <&ldo12_reg>; 704}; 705 706&usbdrd_dwc3 { 707 dr_mode = "host"; 708}; 709 710&usbdrd_phy { 711 vbus-supply = <&usb3_vbus_reg>; 712}; 713 714#include "../cros-ec-keyboard.dtsi" 715