1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Devicetree for the Samsung Galaxy Ace 2 GT-I8160 also known as Codina. 4 * 5 * NOTE: this is the most common variant according to the vendor tree, known 6 * as "R0.0". There appears to be a "R0.4" variant with backlight on GPIO69, 7 * AB8505 and other changes. There is also talk about some variants having a 8 * Samsung S6D27A1 display, indicated by passing a different command line from 9 * the boot loader. 10 * 11 * The Samsung tree further talks about GT-I8160P and GT-I8160chn (China). 12 * The GT-I8160 plain is known as the "europe" variant. 13 * The GT-I8160P is the CDMA version and it appears to not use the ST 14 * Microelectronics accelerometer and reportedly has NFC mounted. 15 * The GT-I8160chn appears to be the same as the europe variant. 16 * 17 * There is also the Codina-TMO, Samsung SGH-T599, which has its own device 18 * tree. 19 */ 20 21/dts-v1/; 22#include "ste-db8500.dtsi" 23#include "ste-ab8500.dtsi" 24#include "ste-dbx5x0-pinctrl.dtsi" 25#include <dt-bindings/gpio/gpio.h> 26#include <dt-bindings/leds/common.h> 27#include <dt-bindings/input/input.h> 28#include <dt-bindings/interrupt-controller/irq.h> 29 30/ { 31 model = "Samsung Galaxy Ace 2 (GT-I8160)"; 32 compatible = "samsung,codina", "st-ericsson,u8500"; 33 34 cpus { 35 cpu@300 { 36 /* 37 * This has a frequency cap at ~800 MHz in the firmware. 38 * (Changing this number here will not overclock it.) 39 */ 40 operating-points = <798720 0 41 399360 0 42 199680 0>; 43 }; 44 }; 45 46 chosen { 47 stdout-path = &serial2; 48 }; 49 50 battery: battery { 51 compatible = "samsung,eb425161lu"; 52 }; 53 54 thermal-zones { 55 battery-thermal { 56 /* This zone will be polled by the battery temperature code */ 57 polling-delay = <0>; 58 polling-delay-passive = <0>; 59 thermal-sensors = <&bat_therm>; 60 61 trips { 62 battery-crit-hi { 63 temperature = <70000>; 64 hysteresis = <2000>; 65 type = "critical"; 66 }; 67 }; 68 }; 69 }; 70 71 bat_therm: thermistor { 72 compatible = "samsung,1404-001221"; 73 io-channels = <&gpadc 0x02>; /* BatTemp */ 74 pullup-uv = <1800000>; 75 pullup-ohm = <230000>; 76 pulldown-ohm = <0>; 77 #thermal-sensor-cells = <0>; 78 }; 79 80 /* TI TXS0206 level translator for 2.9 V */ 81 sd_level_translator: regulator-gpio { 82 compatible = "regulator-fixed"; 83 84 /* GPIO87 EN */ 85 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>; 86 enable-active-high; 87 88 regulator-name = "sd-level-translator"; 89 regulator-min-microvolt = <2900000>; 90 regulator-max-microvolt = <2900000>; 91 regulator-type = "voltage"; 92 93 startup-delay-us = <200>; 94 95 pinctrl-names = "default"; 96 pinctrl-0 = <&sd_level_translator_default>; 97 }; 98 99 /* External LDO MIC5366-3.3YMT for eMMC */ 100 ldo_3v3_reg: regulator-gpio-ldo-3v3 { 101 compatible = "regulator-fixed"; 102 /* Supplied in turn by VBAT */ 103 regulator-name = "VMEM_3V3"; 104 regulator-min-microvolt = <3300000>; 105 regulator-max-microvolt = <3300000>; 106 gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>; 107 startup-delay-us = <5000>; 108 enable-active-high; 109 pinctrl-names = "default"; 110 pinctrl-0 = <&emmc_ldo_en_default_mode>; 111 }; 112 113 /* 114 * External Ricoh "TSP" regulator for the touchscreen. 115 * One GPIO line controls two voltages of 3.3V and 1.8V 116 * this line is known as "TSP_LDO_ON1" in the schematics. 117 */ 118 ldo_tsp_3v3_reg: regulator-gpio-tsp-ldo-3v3 { 119 compatible = "regulator-fixed"; 120 /* Supplied in turn by VBAT */ 121 regulator-name = "LDO_TSP_A3V3"; 122 regulator-min-microvolt = <3300000>; 123 regulator-max-microvolt = <3300000>; 124 /* GPIO94 controls this regulator */ 125 gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>; 126 /* 70 ms power-on delay */ 127 startup-delay-us = <70000>; 128 enable-active-high; 129 pinctrl-names = "default"; 130 pinctrl-0 = <&tsp_ldo_en_default_mode>; 131 }; 132 ldo_tsp_1v8_reg: regulator-gpio-tsp-ldo-1v8 { 133 compatible = "regulator-fixed"; 134 /* Supplied in turn by VBAT */ 135 regulator-name = "VREG_TSP_1V8"; 136 regulator-min-microvolt = <1800000>; 137 regulator-max-microvolt = <1800000>; 138 /* GPIO94 controls this regulator */ 139 gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>; 140 /* 70 ms power-on delay */ 141 startup-delay-us = <70000>; 142 enable-active-high; 143 pinctrl-names = "default"; 144 pinctrl-0 = <&tsp_ldo_en_default_mode>; 145 }; 146 147 /* 148 * External Ricoh RP152L010B-TR LCD LDO regulator for the display. 149 * LCD_PWR_EN controls both a 3.0V and 1.8V output. 150 */ 151 lcd_3v0_reg: regulator-gpio-lcd-3v0 { 152 compatible = "regulator-fixed"; 153 /* Supplied in turn by VBAT */ 154 regulator-name = "VREG_LCD_3.0V"; 155 regulator-min-microvolt = <3000000>; 156 regulator-max-microvolt = <3000000>; 157 /* GPIO219 controls this regulator */ 158 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>; 159 enable-active-high; 160 pinctrl-names = "default"; 161 pinctrl-0 = <&lcd_pwr_en_default_mode>; 162 }; 163 lcd_1v8_reg: regulator-gpio-lcd-1v8 { 164 compatible = "regulator-fixed"; 165 /* Supplied in turn by VBAT */ 166 regulator-name = "VREG_LCD_1.8V"; 167 regulator-min-microvolt = <1800000>; 168 regulator-max-microvolt = <1800000>; 169 /* GPIO219 controls this regulator too */ 170 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>; 171 enable-active-high; 172 pinctrl-names = "default"; 173 pinctrl-0 = <&lcd_pwr_en_default_mode>; 174 }; 175 176 /* 177 * This regulator is a GPIO line that drives the Broadcom WLAN 178 * line WL_REG_ON high and enables the internal regulators 179 * inside the chip. Unfortunatley it is erroneously named 180 * WLAN_RST_N on the schematic but it is not a reset line. 181 * 182 * The voltage specified here is only used to determine the OCR mask, 183 * the for the SDIO connector, the chip is actually connected 184 * directly to VBAT. 185 */ 186 wl_reg: regulator-gpio-wlan { 187 compatible = "regulator-fixed"; 188 regulator-name = "WL_REG_ON"; 189 regulator-min-microvolt = <3000000>; 190 regulator-max-microvolt = <3000000>; 191 startup-delay-us = <100000>; 192 /* GPIO215 (WLAN_RST_N to WL_REG_ON) */ 193 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>; 194 enable-active-high; 195 pinctrl-names = "default"; 196 pinctrl-0 = <&wlan_ldo_en_default>; 197 }; 198 199 vibrator { 200 compatible = "gpio-vibrator"; 201 /* GPIO195 "MOT_EN" */ 202 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>; 203 pinctrl-names = "default"; 204 pinctrl-0 = <&vibrator_default>; 205 }; 206 207 gpio-keys { 208 compatible = "gpio-keys"; 209 pinctrl-names = "default"; 210 pinctrl-0 = <&gpio_keys_default_mode>; 211 212 button-home { 213 linux,code = <KEY_HOME>; 214 label = "HOME"; 215 /* GPIO91 */ 216 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; 217 }; 218 button-volup { 219 linux,code = <KEY_VOLUMEUP>; 220 label = "VOL+"; 221 /* GPIO67 */ 222 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; 223 }; 224 button-voldown { 225 linux,code = <KEY_VOLUMEDOWN>; 226 label = "VOL-"; 227 /* GPIO92 */ 228 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; 229 }; 230 }; 231 232 gpio-leds { 233 compatible = "gpio-leds"; 234 pinctrl-names = "default"; 235 pinctrl-0 = <&gpio_leds_default_mode>; 236 touchkey-led { 237 label = "touchkeys"; 238 /* 239 * GPIO194 on R0.0, R0.4 does not use this at all, it 240 * will instead turn LDO AUX4 on/off for key led backlighy. 241 * (Line is pulled down on R0.4) 242 */ 243 gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; 244 default-state = "on"; 245 }; 246 }; 247 248 ktd253: backlight { 249 compatible = "kinetic,ktd253"; 250 /* 251 * GPIO68 is for R0.0, the board file talks about a TMO variant 252 * (R0.4) using GPIO69. 253 */ 254 enable-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; 255 /* Default to 13/32 brightness */ 256 default-brightness = <13>; 257 pinctrl-names = "default"; 258 pinctrl-0 = <&ktd253_backlight_default_mode>; 259 }; 260 261 /* Richtek RT8515GQW Flash LED Driver IC */ 262 flash { 263 compatible = "richtek,rt8515"; 264 /* GPIO 140 */ 265 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>; 266 /* GPIO 141 */ 267 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>; 268 /* 269 * RFS is 16 kOhm and RTS is 100 kOhm giving 270 * the flash max current 343mA and torch max 271 * current 55 mA. 272 */ 273 richtek,rfs-ohms = <16000>; 274 richtek,rts-ohms = <100000>; 275 pinctrl-names = "default"; 276 pinctrl-0 = <&gpio_flash_default_mode>; 277 278 led { 279 function = LED_FUNCTION_FLASH; 280 color = <LED_COLOR_ID_WHITE>; 281 flash-max-timeout-us = <250000>; 282 flash-max-microamp = <343750>; 283 led-max-microamp = <55000>; 284 }; 285 }; 286 287 /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */ 288 i2c-gpio-0 { 289 compatible = "i2c-gpio"; 290 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 291 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 292 pinctrl-names = "default"; 293 pinctrl-0 = <&i2c_gpio_0_default>; 294 #address-cells = <1>; 295 #size-cells = <0>; 296 297 magnetometer@c { 298 compatible = "alps,hscdtd008a"; 299 reg = <0x0c>; 300 clock-frequency = <400000>; 301 302 avdd-supply = <&ab8500_ldo_aux1_reg>; // 3V 303 dvdd-supply = <&ab8500_ldo_aux2_reg>; // 1.8V 304 }; 305 /* TODO: this should also be used by the SM5103 Camera power management unit */ 306 }; 307 308 /* Bit-banged I2C on GPIO151 and GPIO152 also called "NFC I2C" */ 309 i2c-gpio-1 { 310 compatible = "i2c-gpio"; 311 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 312 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 313 pinctrl-names = "default"; 314 pinctrl-0 = <&i2c_gpio_1_default>; 315 #address-cells = <1>; 316 #size-cells = <0>; 317 318 nfc@2b { 319 /* NXP NFC circuit PN544 C1 marked NXP 44501 */ 320 compatible = "nxp,pn544-i2c"; 321 /* IF0, IF1 high, gives I2C address 0x2B */ 322 reg = <0x2b>; 323 clock-frequency = <400000>; 324 /* NFC IRQ on GPIO32 */ 325 interrupt-parent = <&gpio1>; 326 interrupts = <0 IRQ_TYPE_EDGE_FALLING>; 327 /* GPIO 31 */ 328 firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; 329 /* GPIO88 */ 330 enable-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>; 331 pinctrl-names = "default"; 332 pinctrl-0 = <&pn544_codina_default>; 333 }; 334 }; 335 336 spi { 337 compatible = "spi-gpio"; 338 /* Clock on GPIO220, pin SCL */ 339 sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>; 340 /* MOSI on GPIO224, pin SDI "slave data in" */ 341 mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>; 342 /* MISO on GPIO225, pin SDO "slave data out" */ 343 miso-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; 344 /* Chip select on GPIO201 */ 345 cs-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; 346 num-chipselects = <1>; 347 348 pinctrl-names = "default"; 349 pinctrl-0 = <&spi_gpio_0_default>; 350 #address-cells = <1>; 351 #size-cells = <0>; 352 353 /* 354 * Some Codinas (90%) have a WideChips WS2401-based LMS380KF01 355 * display mounted and some 10% has a Samsung S6D27A1 instead. 356 * The boot loader needs to modify this compatible to 357 * correspond to whatever is passed from the early Samsung boot. 358 */ 359 panel@0 { 360 compatible = "samsung,lms380kf01"; 361 spi-max-frequency = <1200000>; 362 /* TYPE 3: inverse clock polarity and phase */ 363 spi-cpha; 364 spi-cpol; 365 366 reg = <0>; 367 vci-supply = <&lcd_3v0_reg>; 368 vccio-supply = <&lcd_1v8_reg>; 369 370 /* Reset on GPIO139 */ 371 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; 372 /* LCD_VGH/LCD_DETECT, ESD IRQ on GPIO93 */ 373 interrupt-parent = <&gpio2>; 374 interrupts = <29 IRQ_TYPE_EDGE_RISING>; 375 376 pinctrl-names = "default"; 377 pinctrl-0 = <&panel_default_mode>; 378 backlight = <&ktd253>; 379 380 port { 381 panel_in: endpoint { 382 remote-endpoint = <&display_out>; 383 }; 384 }; 385 }; 386 }; 387 388 soc { 389 /* External Micro SD slot */ 390 mmc@80126000 { 391 arm,primecell-periphid = <0x10480180>; 392 max-frequency = <100000000>; 393 bus-width = <4>; 394 cap-sd-highspeed; 395 cap-mmc-highspeed; 396 st,sig-pin-fbclk; 397 full-pwr-cycle; 398 /* MMC is powered by AUX3 1.2V .. 2.91V */ 399 vmmc-supply = <&ab8500_ldo_aux3_reg>; 400 /* 2.9 V level translator is using AUX3 at 2.9 V as well */ 401 vqmmc-supply = <&sd_level_translator>; 402 pinctrl-names = "default", "sleep"; 403 pinctrl-0 = <&mc0_a_2_default>; 404 pinctrl-1 = <&mc0_a_2_sleep>; 405 cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217 406 status = "okay"; 407 }; 408 409 /* WLAN SDIO channel */ 410 mmc@80118000 { 411 arm,primecell-periphid = <0x10480180>; 412 max-frequency = <50000000>; 413 bus-width = <4>; 414 non-removable; 415 cap-sd-highspeed; 416 pinctrl-names = "default", "sleep"; 417 pinctrl-0 = <&mc1_a_2_default>; 418 pinctrl-1 = <&mc1_a_2_sleep>; 419 /* 420 * GPIO-controlled voltage enablement: this drives 421 * the WL_REG_ON line high when we use this device. 422 * Represented as regulator to fill OCR mask. 423 */ 424 vmmc-supply = <&wl_reg>; 425 426 #address-cells = <1>; 427 #size-cells = <0>; 428 status = "okay"; 429 430 wifi@1 { 431 /* Actually BRCM4330 */ 432 compatible = "brcm,bcm4330-fmac", "brcm,bcm4329-fmac"; 433 reg = <1>; 434 /* GPIO216 WL_HOST_WAKE */ 435 interrupt-parent = <&gpio6>; 436 interrupts = <24 IRQ_TYPE_EDGE_FALLING>; 437 interrupt-names = "host-wake"; 438 pinctrl-names = "default"; 439 pinctrl-0 = <&wlan_default_mode>; 440 }; 441 }; 442 443 /* eMMC */ 444 mmc@80005000 { 445 arm,primecell-periphid = <0x10480180>; 446 max-frequency = <100000000>; 447 bus-width = <8>; 448 non-removable; 449 cap-mmc-highspeed; 450 mmc-ddr-1_8v; 451 no-sdio; 452 no-sd; 453 vmmc-supply = <&ldo_3v3_reg>; 454 vqmmc-supply = <&db8500_vsmps2_reg>; 455 pinctrl-names = "default", "sleep"; 456 /* 457 * This muxing excludes the feedback clock on GPIO130 458 * which is instead used for reset of the eMMC. 459 * GPIO130 will be set to input no pull-up resulting in 460 * a resistor pulling the reset high and taking the 461 * memory out of reset. 462 */ 463 pinctrl-0 = <&mc2_a_2_default>; 464 pinctrl-1 = <&mc2_a_2_sleep>; 465 status = "okay"; 466 }; 467 468 /* GBF (Bluetooth) UART */ 469 serial@80120000 { 470 pinctrl-names = "default", "sleep"; 471 pinctrl-0 = <&u0_a_1_default>; 472 pinctrl-1 = <&u0_a_1_sleep>; 473 status = "okay"; 474 475 bluetooth { 476 compatible = "brcm,bcm4330-bt"; 477 /* GPIO222 rail BT_VREG_EN to BT_REG_ON */ 478 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>; 479 /* BT_WAKE on GPIO199 */ 480 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; 481 /* BT_HOST_WAKE on GPIO97 */ 482 /* FIXME: convert to interrupt */ 483 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>; 484 /* BT_RST_N on GPIO209 */ 485 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; 486 pinctrl-names = "default"; 487 pinctrl-0 = <&bluetooth_default_mode>; 488 }; 489 }; 490 491 /* GPS UART */ 492 serial@80121000 { 493 status = "okay"; 494 pinctrl-names = "default", "sleep"; 495 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>; 496 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>; 497 498 gnss { 499 compatible = "brcm,bcm4751"; 500 /* GPS_RSTN on GPIO21 */ 501 reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; 502 /* GPS_ON_OFF on GPIO86 */ 503 enable-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>; 504 /* GPS_1V8 (VSMPS2) */ 505 vddio-supply = <&db8500_vsmps2_reg>; 506 pinctrl-names = "default"; 507 pinctrl-0 = <&bcm4751_codina_default>; 508 }; 509 }; 510 511 /* Debugging console UART connected to TSU6111RSVR (FSA880) */ 512 serial@80007000 { 513 status = "okay"; 514 pinctrl-names = "default", "sleep"; 515 pinctrl-0 = <&u2rxtx_c_1_default>; 516 pinctrl-1 = <&u2rxtx_c_1_sleep>; 517 }; 518 519 prcmu@80157000 { 520 ab8500 { 521 phy { 522 pinctrl-names = "default", "sleep"; 523 pinctrl-0 = <&usb_a_1_default>; 524 pinctrl-1 = <&usb_a_1_sleep>; 525 }; 526 527 ab8500_fg { 528 line-impedance-micro-ohms = <36000>; 529 }; 530 531 regulator { 532 ab8500_ldo_aux1 { 533 /* Used for VDD for sensors */ 534 regulator-name = "V-SENSORS-VDD"; 535 regulator-min-microvolt = <3000000>; 536 regulator-max-microvolt = <3000000>; 537 }; 538 539 ab8500_ldo_aux2 { 540 /* Used for VIO for sensors */ 541 regulator-name = "V-SENSORS-VIO"; 542 regulator-min-microvolt = <1800000>; 543 regulator-max-microvolt = <1800000>; 544 }; 545 546 ab8500_ldo_aux3 { 547 /* Used for voltage for external MMC/SD card */ 548 regulator-name = "V-MMC-SD"; 549 regulator-min-microvolt = <1200000>; 550 regulator-max-microvolt = <2910000>; 551 }; 552 }; 553 }; 554 }; 555 556 /* I2C0 also known as "AGC I2C" */ 557 i2c@80004000 { 558 status = "okay"; 559 pinctrl-names = "default", "sleep"; 560 pinctrl-0 = <&i2c0_a_1_default>; 561 pinctrl-1 = <&i2c0_a_1_sleep>; 562 563 proximity@39 { 564 /* Codina has the Amstaos TMD2672 */ 565 compatible = "amstaos,tmd2672"; 566 clock-frequency = <400000>; 567 reg = <0x39>; 568 569 /* IRQ on GPIO146 "PS_INT" */ 570 interrupt-parent = <&gpio4>; 571 interrupts = <18 IRQ_TYPE_EDGE_FALLING>; 572 /* FIXME: needs a VDDIO supply that is connected to a pull-up resistor */ 573 vdd-supply = <&ab8500_ldo_aux1_reg>; 574 pinctrl-names = "default"; 575 pinctrl-0 = <&tms2672_codina_default>; 576 }; 577 }; 578 579 /* I2C1 on GPIO16 and GPIO17 also called "MUS I2C" */ 580 i2c@80122000 { 581 status = "okay"; 582 pinctrl-names = "default","sleep"; 583 /* FIXME: If it doesn't work try what we use on Gavini */ 584 pinctrl-0 = <&i2c1_b_2_default>; 585 pinctrl-1 = <&i2c1_b_2_sleep>; 586 587 /* Texas Instruments TSU6111 micro USB switch */ 588 usb-switch@25 { 589 compatible = "ti,tsu6111"; 590 reg = <0x25>; 591 /* Interrupt JACK_INT_N on GPIO95 */ 592 interrupt-parent = <&gpio2>; 593 interrupts = <31 IRQ_TYPE_EDGE_FALLING>; 594 pinctrl-names = "default"; 595 pinctrl-0 = <&tsu6111_codina_default>; 596 }; 597 }; 598 599 /* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */ 600 i2c@80128000 { 601 status = "okay"; 602 pinctrl-names = "default", "sleep"; 603 pinctrl-0 = <&i2c2_b_2_default>; 604 pinctrl-1 = <&i2c2_b_2_sleep>; 605 606 lisd3dh@19 { 607 /* ST Microelectronics Accelerometer */ 608 compatible = "st,lis3dh-accel"; 609 st,drdy-int-pin = <1>; 610 reg = <0x19>; 611 vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V 612 vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V 613 mount-matrix = "0", "1", "0", 614 "-1", "0", "0", 615 "0", "0", "1"; 616 }; 617 }; 618 619 /* I2C3 */ 620 i2c@80110000 { 621 status = "okay"; 622 623 pinctrl-names = "default", "sleep"; 624 pinctrl-0 = <&i2c3_c_2_default>; 625 pinctrl-1 = <&i2c3_c_2_sleep>; 626 627 /* TODO: write bindings and driver for this touchscreen */ 628 629 /* Zinitix BT404 ISP part */ 630 isp@50 { 631 compatible = "zinitix,bt404-isp"; 632 reg = <0x50>; 633 pinctrl-names = "default"; 634 pinctrl-0 = <&tsp_default>; 635 }; 636 637 /* Zinitix BT404 touchscreen, also has the touchkeys for menu and back */ 638 touchscreen@20 { 639 compatible = "zinitix,bt404"; 640 reg = <0x20>; 641 /* GPIO218 (TSP_INT_1V8) */ 642 interrupt-parent = <&gpio6>; 643 interrupts = <26 IRQ_TYPE_EDGE_FALLING>; 644 vcca-supply = <&ldo_tsp_3v3_reg>; 645 vdd-supply = <&ldo_tsp_1v8_reg>; 646 zinitix,mode = <2>; 647 touchscreen-size-x = <480>; 648 touchscreen-size-y = <800>; 649 pinctrl-names = "default"; 650 pinctrl-0 = <&tsp_default>; 651 linux,keycodes = <KEY_MENU>, <KEY_BACK>; 652 }; 653 }; 654 655 mcde@a0350000 { 656 status = "okay"; 657 pinctrl-names = "default"; 658 pinctrl-0 = <&dpi_default_mode>; 659 660 port { 661 display_out: endpoint { 662 remote-endpoint = <&panel_in>; 663 }; 664 }; 665 }; 666 }; 667}; 668 669&pinctrl { 670 /* 671 * This extends the MC0_A_2 default config to include 672 * the card detect GPIO217 line. 673 */ 674 sdi0 { 675 mc0_a_2_default { 676 default_cfg4 { 677 pins = "GPIO217_AH12"; /* card detect */ 678 ste,config = <&gpio_in_pd>; 679 }; 680 }; 681 }; 682 sdi2 { 683 /* 684 * This will make the resistor mounted in R0.0 pull up 685 * the reset line and take the eMMC out of reset so set to 686 * GPIO input mode, no pull-up. On R0.4 variants, GPIO130 687 * could be set in GPIO mode and pulled down. (Not connected.) 688 */ 689 mc2_a_2_default { 690 default_cfg3 { 691 pins = "GPIO130_C8"; /* RST_N */ 692 ste,config = <&gpio_in_nopull>; 693 }; 694 }; 695 }; 696 /* GPIO that enables the 2.9V SD card level translator */ 697 sd-level-translator { 698 sd_level_translator_default: sd_level_translator_default { 699 /* level shifter on GPIO87 */ 700 codina_cfg1 { 701 pins = "GPIO87_B3"; 702 ste,config = <&gpio_out_hi>; 703 }; 704 }; 705 }; 706 /* GPIO that enables the LDO regulator for the eMMC */ 707 emmc-ldo { 708 emmc_ldo_en_default_mode: emmc_ldo_default { 709 /* LDO enable on GPIO223 */ 710 codina_cfg1 { 711 pins = "GPIO223_AH9"; 712 ste,config = <&gpio_out_hi>; 713 }; 714 }; 715 }; 716 /* GPIOs for panel control */ 717 panel { 718 panel_default_mode: panel_default { 719 codina_cfg1 { 720 /* Reset line */ 721 pins = "GPIO139_C9"; 722 ste,config = <&gpio_out_lo>; 723 }; 724 codina_cfg2 { 725 /* ESD IRQ line "LCD detect" */ 726 pins = "GPIO93_B7"; 727 ste,config = <&gpio_in_nopull>; 728 }; 729 }; 730 }; 731 /* GPIO that enables the LDO regulator for the touchscreen */ 732 tsp-ldo { 733 tsp_ldo_en_default_mode: tsp_ldo_default { 734 /* LDO enable on GPIO94 */ 735 gavini_cfg1 { 736 pins = "GPIO94_D7"; 737 ste,config = <&gpio_out_hi>; 738 }; 739 }; 740 }; 741 /* GPIO that enables the LDO regulator for the LCD display */ 742 lcd-ldo { 743 lcd_pwr_en_default_mode: lcd_pwr_en_default { 744 /* LCD_PWR_EN on GPIO219 */ 745 codina_cfg1 { 746 pins = "GPIO219_AG10"; 747 ste,config = <&gpio_out_hi>; 748 }; 749 }; 750 }; 751 /* GPIO that enables the LDO regulator for the key LED */ 752 key-led { 753 gpio_leds_default_mode: en_led_ldo_default { 754 /* EN_LED_LDO on GPIO194 */ 755 codina_cfg1 { 756 pins = "GPIO194_AF27"; 757 ste,config = <&gpio_out_hi>; 758 }; 759 }; 760 }; 761 /* GPIO that enables the WLAN internal LDO regulators */ 762 wlan-ldo { 763 wlan_ldo_en_default: wlan_ldo_default { 764 /* GPIO215 named WLAN_RST_N */ 765 codina_cfg1 { 766 pins = "GPIO215_AH13"; 767 ste,config = <&gpio_out_lo>; 768 }; 769 }; 770 }; 771 /* Backlight GPIO */ 772 backlight { 773 ktd253_backlight_default_mode: backlight_default { 774 skomer_cfg1 { 775 pins = "GPIO68_E1"; /* LCD_BL_CTRL */ 776 ste,config = <&gpio_out_lo>; 777 }; 778 }; 779 }; 780 /* Flash and torch */ 781 flash { 782 gpio_flash_default_mode: flash_default { 783 codina_cfg1 { 784 pins = "GPIO140_B11", "GPIO141_C12"; 785 ste,config = <&gpio_out_lo>; 786 }; 787 }; 788 }; 789 /* GPIO keys */ 790 gpio-keys { 791 gpio_keys_default_mode: gpio_keys_default { 792 skomer_cfg1 { 793 pins = "GPIO67_G2", /* VOL UP */ 794 "GPIO91_B6", /* HOME */ 795 "GPIO92_D6"; /* VOL DOWN */ 796 ste,config = <&gpio_in_pu>; 797 }; 798 }; 799 }; 800 /* Interrupt line for the Zinitix BT404 touchscreen */ 801 tsp { 802 tsp_default: tsp_default { 803 codina_cfg1 { 804 pins = "GPIO218_AH11"; /* TSP_INT_1V8 */ 805 ste,config = <&gpio_in_nopull>; 806 }; 807 }; 808 }; 809 /* Interrupt line for light/proximity sensor TMS2672 */ 810 tms2672 { 811 tms2672_codina_default: tms2672_codina { 812 codina_cfg1 { 813 pins = "GPIO146_D13"; 814 ste,config = <&gpio_in_nopull>; 815 }; 816 }; 817 }; 818 /* GPIO-based I2C bus for subpmu */ 819 i2c-gpio-0 { 820 i2c_gpio_0_default: i2c_gpio_0 { 821 codina_cfg1 { 822 pins = "GPIO143_D12", "GPIO144_B13"; 823 ste,config = <&gpio_in_nopull>; 824 }; 825 }; 826 }; 827 /* GPIO-based I2C bus for the NFC */ 828 i2c-gpio-1 { 829 i2c_gpio_1_default: i2c_gpio_1 { 830 codina_cfg1 { 831 pins = "GPIO151_D17", "GPIO152_D16"; 832 ste,config = <&gpio_in_nopull>; 833 }; 834 }; 835 }; 836 /* GPIO-based SPI bus for the display */ 837 spi-gpio-0 { 838 spi_gpio_0_default: spi_gpio_0_d { 839 codina_cfg1 { 840 pins = "GPIO220_AH10", "GPIO201_AF24", "GPIO224_AG9"; 841 ste,config = <&gpio_out_hi>; 842 }; 843 codina_cfg2 { 844 pins = "GPIO225_AG8"; 845 /* Needs pull down, no pull down resistor on board */ 846 ste,config = <&gpio_in_pd>; 847 }; 848 }; 849 spi_gpio_0_sleep: spi_gpio_0_s { 850 codina_cfg1 { 851 pins = "GPIO220_AH10", "GPIO201_AF24", 852 "GPIO224_AG9", "GPIO225_AG8"; 853 ste,config = <&gpio_out_hi>; 854 }; 855 }; 856 }; 857 wlan { 858 wlan_default_mode: wlan_default { 859 /* GPIO216 for WL_HOST_WAKE */ 860 codina_cfg2 { 861 pins = "GPIO216_AG12"; 862 ste,config = <&gpio_in_pd>; 863 }; 864 }; 865 }; 866 bluetooth { 867 bluetooth_default_mode: bluetooth_default { 868 /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */ 869 codina_cfg1 { 870 pins = "GPIO199_AH23", "GPIO222_AJ9"; 871 ste,config = <&gpio_out_lo>; 872 }; 873 /* GPIO97 BT_HOST_WAKE */ 874 codina_cfg2 { 875 pins = "GPIO97_D9"; 876 ste,config = <&gpio_in_nopull>; 877 }; 878 /* GPIO209 BT_RST_N */ 879 codina_cfg3 { 880 pins = "GPIO209_AG15"; 881 ste,config = <&gpio_out_hi>; 882 }; 883 }; 884 }; 885 /* Interrupt line for TI TSU6111 Micro USB switch */ 886 tsu6111 { 887 tsu6111_codina_default: tsu6111_codina { 888 codina_cfg1 { 889 /* GPIO95 used for IRQ */ 890 pins = "GPIO95_E8"; 891 ste,config = <&gpio_in_nopull>; 892 }; 893 }; 894 }; 895 nfc { 896 pn544_codina_default: pn544_codina { 897 /* Interrupt line */ 898 codina_cfg1 { 899 pins = "GPIO32_V2"; 900 ste,config = <&gpio_in_nopull>; 901 }; 902 /* Enable and firmware GPIOs */ 903 codina_cfg2 { 904 pins = "GPIO31_V3", "GPIO88_C4"; 905 ste,config = <&gpio_out_lo>; 906 }; 907 }; 908 }; 909 bcm4751 { 910 bcm4751_codina_default: bcm4751_codina { 911 /* Reset line, start out asserted */ 912 codina_cfg1 { 913 pins = "GPIO21_AB3"; 914 ste,config = <&gpio_out_lo>; 915 }; 916 /* GPS_ON_OFF, start out deasserted (off) */ 917 codina_cfg2 { 918 pins = "GPIO86_C6"; 919 ste,config = <&gpio_out_lo>; 920 }; 921 }; 922 }; 923 vibrator { 924 vibrator_default: vibrator_default { 925 codina_cfg1 { 926 pins = "GPIO195_AG28"; /* MOT_EN */ 927 ste,config = <&gpio_out_lo>; 928 }; 929 }; 930 }; 931 mcde { 932 dpi_default_mode: dpi_default { 933 default_mux1 { 934 /* Mux in all the data lines */ 935 function = "lcd"; 936 groups = 937 /* Data lines D0-D7 GPIO70..GPIO77 */ 938 "lcd_d0_d7_a_1", 939 /* Data lines D8-D11 GPIO78..GPIO81 */ 940 "lcd_d8_d11_a_1", 941 /* Data lines D12-D15 GPIO82..GPIO85 */ 942 "lcd_d12_d15_a_1", 943 /* Data lines D16-D23 GPIO161..GPIO168 */ 944 "lcd_d16_d23_b_1"; 945 }; 946 default_mux2 { 947 function = "lcda"; 948 /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */ 949 groups = "lcdaclk_b_1", "lcda_b_1"; 950 }; 951 /* Input, no pull-up is the default state for pins used for an alt function */ 952 default_cfg1 { 953 pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23"; 954 ste,config = <&in_nopull>; 955 }; 956 }; 957 }; 958}; 959