ste-ux500-samsung-golden.dts (15958B)
1// SPDX-License-Identifier: GPL-2.0-only 2/dts-v1/; 3 4#include "ste-db8500.dtsi" 5#include "ste-ab8505.dtsi" 6#include "ste-dbx5x0-pinctrl.dtsi" 7#include <dt-bindings/gpio/gpio.h> 8#include <dt-bindings/leds/common.h> 9#include <dt-bindings/input/input.h> 10#include <dt-bindings/interrupt-controller/irq.h> 11 12/* 13 * Note: This device tree cannot be booted directly with the Samsung bootloader. 14 * You need an intermediate, device-tree compatible bootloader 15 * that locks the L2 cache. Otherwise the kernel will crash after decompression. 16 * 17 * There is a port of (mainline) U-Boot, see 18 * https://wiki.postmarketos.org/wiki/ST-Ericsson_NovaThor_U8500#U-Boot 19 */ 20/ { 21 model = "Samsung Galaxy S III mini (GT-I8190)"; 22 compatible = "samsung,golden", "st-ericsson,u8500"; 23 24 chosen { 25 stdout-path = &serial2; 26 }; 27 28 battery: battery { 29 compatible = "samsung,eb-l1m7flu"; 30 }; 31 32 thermal-zones { 33 battery-thermal { 34 /* This zone will be polled by the battery temperature code */ 35 polling-delay = <0>; 36 polling-delay-passive = <0>; 37 thermal-sensors = <&bat_therm>; 38 }; 39 }; 40 41 bat_therm: thermistor { 42 compatible = "samsung,1404-001221"; 43 io-channels = <&gpadc 0x02>; /* BatTemp */ 44 pullup-uv = <1800000>; 45 pullup-ohm = <230000>; 46 pulldown-ohm = <0>; 47 #thermal-sensor-cells = <0>; 48 }; 49 50 i2c-gpio-0 { 51 compatible = "i2c-gpio"; 52 sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 53 scl-gpios = <&gpio2 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 54 55 pinctrl-names = "default"; 56 pinctrl-0 = <&i2c_gpio_0_default>; 57 58 #address-cells = <1>; 59 #size-cells = <0>; 60 61 touchkey@20 { 62 compatible = "coreriver,tc360-touchkey"; 63 reg = <0x20>; 64 vdd-supply = <&ab8500_ldo_aux4_reg>; 65 vcc-supply = <&ab8500_ldo_aux6_reg>; 66 67 interrupt-parent = <&gpio2>; 68 interrupts = <15 IRQ_TYPE_EDGE_FALLING>; 69 70 pinctrl-names = "default"; 71 pinctrl-0 = <&touchkey_default>; 72 linux,keycodes = <KEY_MENU KEY_BACK>; 73 }; 74 }; 75 76 i2c-gpio-1 { 77 compatible = "i2c-gpio"; 78 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 79 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 80 81 pinctrl-names = "default"; 82 pinctrl-0 = <&i2c_gpio_1_default>; 83 84 #address-cells = <1>; 85 #size-cells = <0>; 86 87 magnetometer@c { 88 compatible = "alps,hscdtd008a"; 89 reg = <0x0c>; 90 91 avdd-supply = <&ab8500_ldo_aux1_reg>; 92 dvdd-supply = <&ab8500_ldo_aux8_reg>; 93 }; 94 }; 95 96 soc { 97 /* External Micro SD card slot */ 98 mmc@80126000 { 99 status = "okay"; 100 101 arm,primecell-periphid = <0x10480180>; 102 max-frequency = <100000000>; 103 bus-width = <4>; 104 105 non-removable; 106 /* 107 * Unfortunately, there is no way to enable the UHS 108 * modes due to a limitation of the SD level translator: 109 * It will either translate to 2.9V or disconnect the 110 * DATA lines, so switching to 1.8V signal voltage fails. 111 */ 112 cap-sd-highspeed; 113 cap-mmc-highspeed; 114 st,sig-pin-fbclk; 115 full-pwr-cycle; 116 117 vmmc-supply = <&ab8500_ldo_aux3_reg>; 118 vqmmc-supply = <&sd_level_translator>; 119 120 pinctrl-names = "default", "sleep"; 121 pinctrl-0 = <&mc0_a_2_default>; 122 pinctrl-1 = <&mc0_a_2_sleep>; 123 }; 124 125 /* WLAN SDIO */ 126 mmc@80118000 { 127 status = "okay"; 128 129 arm,primecell-periphid = <0x10480180>; 130 max-frequency = <50000000>; 131 bus-width = <4>; 132 133 non-removable; 134 cap-sd-highspeed; 135 136 vmmc-supply = <&wl_reg_on>; 137 138 pinctrl-names = "default", "sleep"; 139 pinctrl-0 = <&mc1_a_2_default>; 140 pinctrl-1 = <&mc1_a_2_sleep>; 141 142 #address-cells = <1>; 143 #size-cells = <0>; 144 145 wifi@1 { 146 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac"; 147 reg = <1>; 148 149 /* GPIO216 (WLAN_HOST_WAKE) */ 150 interrupt-parent = <&gpio6>; 151 interrupts = <24 IRQ_TYPE_EDGE_FALLING>; 152 interrupt-names = "host-wake"; 153 154 pinctrl-names = "default"; 155 pinctrl-0 = <&wlan_default>; 156 }; 157 }; 158 159 /* eMMC */ 160 mmc@80005000 { 161 status = "okay"; 162 163 arm,primecell-periphid = <0x10480180>; 164 max-frequency = <100000000>; 165 bus-width = <8>; 166 167 non-removable; 168 cap-mmc-highspeed; 169 mmc-ddr-1_8v; 170 no-sdio; 171 no-sd; 172 173 vmmc-supply = <&vmem_3v3>; 174 175 pinctrl-names = "default", "sleep"; 176 pinctrl-0 = <&mc2_a_1_default>; 177 pinctrl-1 = <&mc2_a_1_sleep>; 178 }; 179 180 /* BT UART */ 181 uart@80120000 { 182 status = "okay"; 183 184 pinctrl-names = "default", "sleep"; 185 pinctrl-0 = <&u0_a_1_default>; 186 pinctrl-1 = <&u0_a_1_sleep>; 187 188 bluetooth { 189 /* BCM4334B0 actually */ 190 compatible = "brcm,bcm4330-bt"; 191 /* GPIO222 (BT_VREG_ON) */ 192 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>; 193 /* GPIO199 (BT_WAKE) */ 194 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; 195 /* GPIO97 (BT_HOST_WAKE) */ 196 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>; 197 198 pinctrl-names = "default"; 199 pinctrl-0 = <&bluetooth_default>; 200 }; 201 }; 202 203 /* GPF UART */ 204 uart@80121000 { 205 status = "okay"; 206 207 pinctrl-names = "default", "sleep"; 208 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>; 209 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>; 210 }; 211 212 /* Debugging console UART */ 213 uart@80007000 { 214 status = "okay"; 215 216 pinctrl-names = "default", "sleep"; 217 pinctrl-0 = <&u2rxtx_c_1_default>; 218 pinctrl-1 = <&u2rxtx_c_1_sleep>; 219 }; 220 221 i2c@80004000 { 222 status = "okay"; 223 224 pinctrl-names = "default", "sleep"; 225 pinctrl-0 = <&i2c0_a_1_default>; 226 pinctrl-1 = <&i2c0_a_1_sleep>; 227 228 proximity@44 { 229 compatible = "sharp,gp2ap002s00f"; 230 reg = <0x44>; 231 232 /* GPIO146 (PS_INT) */ 233 interrupt-parent = <&gpio4>; 234 interrupts = <18 IRQ_TYPE_EDGE_FALLING>; 235 236 vdd-supply = <&ab8500_ldo_aux1_reg>; 237 vio-supply = <&ab8500_ldo_aux8_reg>; 238 239 pinctrl-names = "default"; 240 pinctrl-0 = <&proximity_default>; 241 242 sharp,proximity-far-hysteresis = <0x40>; 243 sharp,proximity-close-hysteresis = <0x0f>; 244 }; 245 }; 246 247 i2c@80128000 { 248 status = "okay"; 249 250 pinctrl-names = "default", "sleep"; 251 pinctrl-0 = <&i2c2_b_2_default>; 252 pinctrl-1 = <&i2c2_b_2_sleep>; 253 254 imu@68 { 255 compatible = "invensense,mpu6050"; 256 reg = <0x68>; 257 258 /* GPIO206 (ACC_INT) */ 259 interrupt-parent = <&gpio6>; 260 interrupts = <14 IRQ_TYPE_EDGE_RISING>; 261 262 mount-matrix = "0", "1", "0", 263 "-1", "0", "0", 264 "0", "0", "1"; 265 266 vdd-supply = <&ab8500_ldo_aux1_reg>; 267 vddio-supply = <&ab8500_ldo_aux8_reg>; 268 269 pinctrl-names = "default"; 270 pinctrl-0 = <&imu_default>; 271 }; 272 }; 273 274 i2c@80110000 { 275 status = "okay"; 276 277 pinctrl-names = "default", "sleep"; 278 pinctrl-0 = <&i2c3_c_2_default>; 279 pinctrl-1 = <&i2c3_c_2_sleep>; 280 281 touchscreen@4a { 282 compatible = "atmel,maxtouch"; 283 reg = <0x4a>; 284 285 /* GPIO218 (TSP_INT_1V8) */ 286 interrupt-parent = <&gpio6>; 287 interrupts = <26 IRQ_TYPE_EDGE_FALLING>; 288 289 /* VDDA is "analog supply", 2.57-3.47 V */ 290 vdda-supply = <&ab8500_ldo_aux2_reg>; 291 /* VDD is "digital supply" 1.71-3.47V */ 292 vdd-supply = <&ab8500_ldo_aux5_reg>; 293 294 pinctrl-names = "default"; 295 pinctrl-0 = <&tsp_default>; 296 }; 297 }; 298 299 prcmu@80157000 { 300 ab8505 { 301 phy { 302 pinctrl-names = "default", "sleep"; 303 pinctrl-0 = <&usb_a_1_default>; 304 pinctrl-1 = <&usb_a_1_sleep>; 305 }; 306 307 ab8500_fg { 308 line-impedance-micro-ohms = <36000>; 309 }; 310 311 regulator { 312 ab8500_ldo_aux1 { 313 regulator-name = "sensor_3v"; 314 regulator-min-microvolt = <3000000>; 315 regulator-max-microvolt = <3000000>; 316 }; 317 318 ab8500_ldo_aux2 { 319 regulator-name = "vreg_tsp_a3v3"; 320 regulator-min-microvolt = <3300000>; 321 regulator-max-microvolt = <3300000>; 322 }; 323 324 ab8500_ldo_aux3 { 325 regulator-name = "vdd_tf_2v91"; 326 }; 327 328 ab8500_ldo_aux4 { 329 regulator-name = "key_led_3.3v"; 330 regulator-min-microvolt = <3300000>; 331 regulator-max-microvolt = <3300000>; 332 }; 333 334 ab8500_ldo_aux5 { 335 regulator-name = "vreg_tsp_1v8"; 336 regulator-min-microvolt = <1800000>; 337 regulator-max-microvolt = <1800000>; 338 }; 339 340 ab8500_ldo_aux6 { 341 regulator-name = "touch_key_2.2v"; 342 regulator-min-microvolt = <2200000>; 343 regulator-max-microvolt = <2200000>; 344 }; 345 346 ab8500_ldo_aux8 { 347 regulator-name = "sensor_1v8"; 348 }; 349 }; 350 }; 351 }; 352 353 mcde@a0350000 { 354 status = "okay"; 355 pinctrl-names = "default"; 356 pinctrl-0 = <&dsi_default_mode>; 357 358 dsi@a0351000 { 359 panel@0 { 360 compatible = "samsung,s6e63m0"; 361 reg = <0>; 362 max-brightness = <15>; 363 vdd3-supply = <&panel_reg_3v0>; 364 vci-supply = <&panel_reg_1v8>; 365 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; 366 /* ESD (electrostatic discharge) detection interrupt */ 367 interrupt-parent = <&gpio2>; 368 interrupts = <18 IRQ_TYPE_EDGE_RISING>; 369 interrupt-names = "esd"; 370 pinctrl-names = "default"; 371 pinctrl-0 = <&display_default_mode>; 372 }; 373 }; 374 }; 375 }; 376 377 gpio-keys { 378 compatible = "gpio-keys"; 379 380 pinctrl-names = "default"; 381 pinctrl-0 = <&gpio_keys_default>; 382 383 label = "GPIO Buttons"; 384 385 volume-up { 386 label = "Volume Up"; 387 /* GPIO67 (VOL_UP) */ 388 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; 389 linux,code = <KEY_VOLUMEUP>; 390 }; 391 392 volume-down { 393 label = "Volume Down"; 394 /* GPIO92 (VOL_DOWN) */ 395 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; 396 linux,code = <KEY_VOLUMEDOWN>; 397 }; 398 399 home { 400 label = "Home"; 401 /* GPIO91 (HOME_KEY) */ 402 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; 403 linux,code = <KEY_HOMEPAGE>; 404 }; 405 }; 406 407 /* Richtek RT8515GQW Flash LED Driver IC */ 408 flash { 409 compatible = "richtek,rt8515"; 410 /* GPIO 140 */ 411 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>; 412 /* GPIO 141 */ 413 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>; 414 /* 415 * RFS is 16 kOhm and RTS is 100 kOhm giving 416 * the flash max current 343mA and torch max 417 * current 55 mA. 418 */ 419 richtek,rfs-ohms = <16000>; 420 richtek,rts-ohms = <100000>; 421 pinctrl-names = "default"; 422 pinctrl-0 = <&gpio_flash_default_mode>; 423 424 led { 425 function = LED_FUNCTION_FLASH; 426 color = <LED_COLOR_ID_WHITE>; 427 flash-max-timeout-us = <250000>; 428 flash-max-microamp = <343750>; 429 led-max-microamp = <55000>; 430 }; 431 }; 432 433 vibrator { 434 compatible = "gpio-vibrator"; 435 /* GPIO195 (MOT_EN) */ 436 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>; 437 438 pinctrl-names = "default"; 439 pinctrl-0 = <&vibrator_default>; 440 }; 441 442 /* External LDO for eMMC */ 443 vmem_3v3: regulator-vmem { 444 compatible = "regulator-fixed"; 445 446 regulator-name = "vmem_3v3"; 447 regulator-min-microvolt = <3300000>; 448 regulator-max-microvolt = <3300000>; 449 regulator-boot-on; 450 451 startup-delay-us = <200>; 452 453 /* GPIO223 (MEM_LDO_EN) */ 454 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>; 455 enable-active-high; 456 457 pinctrl-names = "default"; 458 pinctrl-0 = <&mem_ldo_default>; 459 }; 460 461 /* TI TXS0206-29 level translator for 2.9 V */ 462 sd_level_translator: regulator-sd-level-translator { 463 compatible = "regulator-fixed"; 464 465 regulator-name = "sd-level-translator"; 466 regulator-min-microvolt = <2900000>; 467 regulator-max-microvolt = <2900000>; 468 469 startup-delay-us = <200>; 470 471 /* GPIO87 (TXS0206-29_EN) */ 472 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>; 473 enable-active-high; 474 475 pinctrl-names = "default"; 476 pinctrl-0 = <&sd_level_translator_default>; 477 }; 478 479 /* 480 * WL_REG_ON takes WLAN out of reset and enables the internal regulators. 481 * The voltage specified here is only used to determine the OCR mask, 482 * the BCM chip is actually connected directly to VBAT. 483 */ 484 wl_reg_on: regulator-wl-reg-on { 485 compatible = "regulator-fixed"; 486 487 regulator-name = "wl-reg-on"; 488 regulator-min-microvolt = <3000000>; 489 regulator-max-microvolt = <3000000>; 490 491 startup-delay-us = <100000>; 492 493 /* GPIO215 (WLAN_EN) */ 494 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>; 495 enable-active-high; 496 497 pinctrl-names = "default"; 498 pinctrl-0 = <&wlan_en_default>; 499 }; 500 501 /* MIC5366 GPIO-controlled regulator */ 502 panel_reg_1v8: regulator-panel-1v8 { 503 compatible = "regulator-fixed"; 504 505 regulator-name = "panel-fixed-supply"; 506 regulator-min-microvolt = <1800000>; 507 regulator-max-microvolt = <1800000>; 508 /* GPIO219 */ 509 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>; 510 511 startup-delay-us = <200>; 512 enable-active-high; 513 514 pinctrl-names = "default"; 515 pinctrl-0 = <&panel_reg_default_mode>; 516 }; 517 518 /* MIC5366 GPIO-controlled regulator */ 519 panel_reg_3v0: regulator-panel-3v0 { 520 compatible = "regulator-fixed"; 521 522 regulator-name = "panel-fixed-supply"; 523 regulator-min-microvolt = <3000000>; 524 regulator-max-microvolt = <3000000>; 525 /* GPIO219 */ 526 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>; 527 528 startup-delay-us = <200>; 529 enable-active-high; 530 531 pinctrl-names = "default"; 532 pinctrl-0 = <&panel_reg_default_mode>; 533 }; 534}; 535 536&pinctrl { 537 gpio-keys { 538 gpio_keys_default: gpio_keys_default { 539 golden_cfg1 { 540 pins = "GPIO67", /* VOL_UP */ 541 "GPIO91", /* HOME_KEY */ 542 "GPIO92"; /* VOL_DOWN */ 543 ste,config = <&gpio_in_pu>; 544 }; 545 }; 546 }; 547 548 i2c-gpio-0 { 549 i2c_gpio_0_default: i2c_gpio_0 { 550 golden_cfg1 { 551 pins = "GPIO77", /* TOUCHKEY_SCL */ 552 "GPIO78"; /* TOUCHKEY_SDA */ 553 ste,config = <&gpio_in_nopull>; 554 }; 555 }; 556 }; 557 558 flash { 559 gpio_flash_default_mode: flash_default { 560 golden_cfg1 { 561 pins = "GPIO140_B11", "GPIO141_C12"; 562 ste,config = <&gpio_out_lo>; 563 }; 564 }; 565 }; 566 567 i2c-gpio-1 { 568 i2c_gpio_1_default: i2c_gpio_1 { 569 golden_cfg1 { 570 pins = "GPIO151", /* COMP_SCL */ 571 "GPIO152"; /* COMP_SDA */ 572 ste,config = <&gpio_in_nopull>; 573 }; 574 }; 575 }; 576 577 touchkey { 578 touchkey_default: touchkey_default { 579 golden_cfg1 { 580 pins = "GPIO79"; /* TOUCHKEY_INT */ 581 ste,config = <&gpio_in_nopull>; 582 }; 583 }; 584 }; 585 586 sdi0 { 587 sd_level_translator_default: sd_level_translator_default { 588 golden_cfg1 { 589 pins = "GPIO87_B3"; /* TXS0206-29_EN */ 590 ste,config = <&gpio_out_lo>; 591 }; 592 }; 593 }; 594 595 sdi2 { 596 mem_ldo_default: mem_ldo_default { 597 golden_cfg1 { 598 pins = "GPIO223_AH9"; /* MEM_LDO_EN */ 599 ste,config = <&gpio_out_hi>; 600 }; 601 }; 602 }; 603 604 mcde { 605 dsi_default_mode: dsi_default { 606 default_mux1 { 607 /* Mux in VSI0 used for DSI TE */ 608 function = "lcd"; 609 groups = 610 "lcdvsi0_a_1"; /* VSI0 for LCD */ 611 }; 612 default_cfg1 { 613 pins = 614 "GPIO68_E1"; /* VSI0 */ 615 ste,config = <&in_nopull>; 616 }; 617 }; 618 }; 619 620 display { 621 display_default_mode: display_default { 622 golden_cfg1 { 623 pins = "GPIO139_C9"; /* MIPI_DSI0_RESET_N */ 624 ste,config = <&gpio_out_lo>; 625 }; 626 golden_cfg2 { 627 pins = "GPIO82_C1"; /* LDI_ESD_DET */ 628 ste,config = <&gpio_in_pu>; 629 }; 630 }; 631 panel_reg_default_mode: panel_reg_default { 632 golden_cfg1 { 633 pins = "GPIO219_AG10"; /* LCD_PWR_EN */ 634 ste,config = <&gpio_out_lo>; 635 }; 636 }; 637 }; 638 639 proximity { 640 proximity_default: proximity_default { 641 golden_cfg1 { 642 pins = "GPIO146_D13"; /* PS_INT */ 643 ste,config = <&gpio_in_nopull>; 644 }; 645 }; 646 }; 647 648 imu { 649 imu_default: imu_default { 650 golden_cfg1 { 651 pins = "GPIO206_AG24"; /* ACC_INT */ 652 ste,config = <&gpio_in_pd>; 653 }; 654 }; 655 }; 656 657 tsp { 658 tsp_default: tsp_default { 659 golden_cfg1 { 660 pins = "GPIO218_AH11"; /* TSP_INT_1V8 */ 661 ste,config = <&gpio_in_nopull>; 662 }; 663 }; 664 }; 665 666 wlan { 667 wlan_default: wlan_default { 668 golden_cfg1 { 669 pins = "GPIO216_AG12"; /* WLAN_HOST_WAKE */ 670 ste,config = <&gpio_in_pd>; 671 }; 672 }; 673 674 wlan_en_default: wlan_en_default { 675 golden_cfg1 { 676 pins = "GPIO215_AH13"; /* WLAN_EN */ 677 ste,config = <&gpio_out_lo>; 678 }; 679 }; 680 }; 681 682 bluetooth { 683 bluetooth_default: bluetooth_default { 684 golden_cfg1 { 685 pins = "GPIO199_AH23", /* BT_WAKE */ 686 "GPIO222_AJ9"; /* BT_VREG_ON */ 687 ste,config = <&gpio_out_lo>; 688 }; 689 golden_cfg2 { 690 pins = "GPIO97_D9"; /* BT_HOST_WAKE */ 691 ste,config = <&gpio_in_nopull>; 692 }; 693 }; 694 }; 695 696 vibrator { 697 vibrator_default: vibrator_default { 698 golden_cfg1 { 699 pins = "GPIO195_AG28"; /* MOT_EN */ 700 ste,config = <&gpio_out_lo>; 701 }; 702 }; 703 }; 704}; 705 706&ab8505_gpio { 707 /* Hog a few default settings */ 708 pinctrl-names = "default"; 709 pinctrl-0 = <&gpio_default>; 710 711 gpio { 712 gpio_default: gpio_default { 713 golden_mux { 714 /* Change unused pins to GPIO mode */ 715 function = "gpio"; 716 groups = "gpio3_a_1", /* default: SysClkReq4 */ 717 "gpio14_a_1"; /* default: PWMOut1 */ 718 }; 719 golden_cfg1 { 720 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4"; 721 bias-disable; 722 }; 723 }; 724 }; 725};