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