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