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