Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
| 2 | /* |
| 3 | * Devicetree for the Samsung Galaxy Beam GT-I8530 also known as Gavini. |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | #include "ste-db8500.dtsi" |
| 8 | #include "ste-ab8500.dtsi" |
| 9 | #include "ste-dbx5x0-pinctrl.dtsi" |
| 10 | #include <dt-bindings/gpio/gpio.h> |
| 11 | #include <dt-bindings/leds/common.h> |
| 12 | #include <dt-bindings/input/input.h> |
| 13 | #include <dt-bindings/interrupt-controller/irq.h> |
| 14 | |
| 15 | / { |
| 16 | model = "Samsung Galaxy Beam (GT-I8530)"; |
| 17 | compatible = "samsung,gavini", "st-ericsson,u8500"; |
| 18 | |
| 19 | chosen { |
| 20 | stdout-path = &serial2; |
| 21 | }; |
| 22 | |
| 23 | battery: battery { |
| 24 | compatible = "samsung,eb585157lu"; |
| 25 | }; |
| 26 | |
| 27 | thermal-zones { |
| 28 | battery-thermal { |
| 29 | /* This zone will be polled by the battery temperature code */ |
| 30 | polling-delay = <0>; |
| 31 | polling-delay-passive = <0>; |
| 32 | thermal-sensors = <&bat_therm>; |
| 33 | |
| 34 | trips { |
| 35 | battery-crit-hi { |
| 36 | temperature = <70000>; |
| 37 | hysteresis = <2000>; |
| 38 | type = "critical"; |
| 39 | }; |
| 40 | }; |
| 41 | }; |
| 42 | }; |
| 43 | |
| 44 | bat_therm: thermistor { |
| 45 | compatible = "samsung,1404-001221"; |
| 46 | io-channels = <&gpadc 0x02>; /* BatTemp */ |
| 47 | pullup-uv = <1800000>; |
| 48 | pullup-ohm = <230000>; |
| 49 | pulldown-ohm = <0>; |
| 50 | #thermal-sensor-cells = <0>; |
| 51 | }; |
| 52 | |
| 53 | /* TI TXS0206 level translator for 2.9 V */ |
| 54 | sd_level_translator: regulator-gpio { |
| 55 | compatible = "regulator-fixed"; |
| 56 | |
| 57 | /* GPIO193 EN */ |
| 58 | gpios = <&gpio6 1 GPIO_ACTIVE_HIGH>; |
| 59 | enable-active-high; |
| 60 | |
| 61 | regulator-name = "sd-level-translator"; |
| 62 | regulator-min-microvolt = <2900000>; |
| 63 | regulator-max-microvolt = <2900000>; |
| 64 | regulator-type = "voltage"; |
| 65 | |
| 66 | startup-delay-us = <200>; |
| 67 | |
| 68 | pinctrl-names = "default"; |
| 69 | pinctrl-0 = <&sd_level_translator_default>; |
| 70 | }; |
| 71 | |
| 72 | /* External LDO for eMMC LDO VMEM_3V3 controlled by GPIO6 */ |
| 73 | ldo_3v3_reg: regulator-gpio-ldo-3v3 { |
| 74 | compatible = "regulator-fixed"; |
| 75 | /* Supplied in turn by VBAT */ |
| 76 | regulator-name = "VMEM_3V3"; |
| 77 | regulator-min-microvolt = <3300000>; |
| 78 | regulator-max-microvolt = <3300000>; |
| 79 | gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>; |
| 80 | startup-delay-us = <5000>; // FIXME |
| 81 | enable-active-high; |
| 82 | pinctrl-names = "default"; |
| 83 | pinctrl-0 = <&emmc_ldo_en_default_mode>; |
| 84 | }; |
| 85 | |
| 86 | /* |
| 87 | * External Ricoh "TSP" regulator for the touchscreen. |
| 88 | * One GPIO line controls two voltages of 3.3V and 1.8V |
| 89 | * this line is known as "TSP_LDO_ON1" in the schematics. |
| 90 | */ |
| 91 | ldo_tsp_3v3_reg: regulator-gpio-tsp-ldo-3v3 { |
| 92 | compatible = "regulator-fixed"; |
| 93 | /* Supplied in turn by VBAT */ |
| 94 | regulator-name = "LDO_TSP_A3V3"; |
| 95 | regulator-min-microvolt = <3300000>; |
| 96 | regulator-max-microvolt = <3300000>; |
| 97 | /* GPIO94 controls this regulator */ |
| 98 | gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>; |
| 99 | /* 70 ms power-on delay */ |
| 100 | startup-delay-us = <70000>; |
| 101 | enable-active-high; |
| 102 | pinctrl-names = "default"; |
| 103 | pinctrl-0 = <&tsp_ldo_en_default_mode>; |
| 104 | }; |
| 105 | ldo_tsp_1v8_reg: regulator-gpio-tsp-ldo-1v8 { |
| 106 | compatible = "regulator-fixed"; |
| 107 | /* Supplied in turn by VBAT */ |
| 108 | regulator-name = "VREG_TSP_1V8"; |
| 109 | regulator-min-microvolt = <1800000>; |
| 110 | regulator-max-microvolt = <1800000>; |
| 111 | /* GPIO94 controls this regulator */ |
| 112 | gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>; |
| 113 | /* 70 ms power-on delay */ |
| 114 | startup-delay-us = <70000>; |
| 115 | enable-active-high; |
| 116 | pinctrl-names = "default"; |
| 117 | pinctrl-0 = <&tsp_ldo_en_default_mode>; |
| 118 | }; |
| 119 | |
| 120 | /* |
| 121 | * External Ricoh RP152L010B-TR LCD LDO regulator for the display. |
| 122 | * LCD_PWR_EN controls both a 3.0V and 1.8V output. |
| 123 | */ |
| 124 | lcd_3v0_reg: regulator-gpio-lcd-3v0 { |
| 125 | compatible = "regulator-fixed"; |
| 126 | /* Supplied in turn by VBAT */ |
| 127 | regulator-name = "VREG_LCD_3V0"; |
| 128 | regulator-min-microvolt = <3000000>; |
| 129 | regulator-max-microvolt = <3000000>; |
| 130 | /* GPIO219 controls this regulator */ |
| 131 | gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>; |
| 132 | enable-active-high; |
| 133 | pinctrl-names = "default"; |
| 134 | pinctrl-0 = <&lcd_pwr_en_default_mode>; |
| 135 | }; |
| 136 | lcd_1v8_reg: regulator-gpio-lcd-1v8 { |
| 137 | compatible = "regulator-fixed"; |
| 138 | /* Supplied in turn by VBAT */ |
| 139 | regulator-name = "VREG_LCD_1V8"; |
| 140 | regulator-min-microvolt = <1800000>; |
| 141 | regulator-max-microvolt = <1800000>; |
| 142 | /* GPIO219 controls this regulator too */ |
| 143 | gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>; |
| 144 | enable-active-high; |
| 145 | pinctrl-names = "default"; |
| 146 | pinctrl-0 = <&lcd_pwr_en_default_mode>; |
| 147 | }; |
| 148 | |
| 149 | /* |
| 150 | * This regulator is a GPIO line that drives the Broadcom WLAN |
| 151 | * line WL_REG_ON high and enables the internal regulators |
| 152 | * inside the chip. Unfortunatley it is erroneously named |
| 153 | * WLAN_RST_N on the schematic but it is not a reset line. |
| 154 | * |
| 155 | * The voltage specified here is only used to determine the OCR mask, |
| 156 | * the for the SDIO connector, the chip is actually connected |
| 157 | * directly to VBAT. |
| 158 | */ |
| 159 | wl_reg: regulator-gpio-wlan { |
| 160 | compatible = "regulator-fixed"; |
| 161 | regulator-name = "WL_REG_ON"; |
| 162 | regulator-min-microvolt = <3000000>; |
| 163 | regulator-max-microvolt = <3000000>; |
| 164 | startup-delay-us = <100000>; |
| 165 | /* GPIO215 (WLAN_RST_N to WL_REG_ON) */ |
| 166 | gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>; |
| 167 | enable-active-high; |
| 168 | pinctrl-names = "default"; |
| 169 | pinctrl-0 = <&wlan_ldo_en_default>; |
| 170 | }; |
| 171 | |
| 172 | gpio-keys { |
| 173 | compatible = "gpio-keys"; |
| 174 | pinctrl-names = "default"; |
| 175 | pinctrl-0 = <&gpio_keys_default_mode>; |
| 176 | |
| 177 | button-projector { |
| 178 | linux,code = <KEY_SWITCHVIDEOMODE>; |
| 179 | label = "Projector"; |
| 180 | /* GPIO32 "Projector On HotKey" */ |
| 181 | gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; |
| 182 | }; |
| 183 | button-home { |
| 184 | linux,code = <KEY_HOME>; |
| 185 | label = "HOME"; |
| 186 | /* GPIO91 */ |
| 187 | gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; |
| 188 | }; |
| 189 | button-volup { |
| 190 | linux,code = <KEY_VOLUMEUP>; |
| 191 | label = "VOL+"; |
| 192 | /* GPIO67 */ |
| 193 | gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; |
| 194 | }; |
| 195 | button-voldown { |
| 196 | linux,code = <KEY_VOLUMEDOWN>; |
| 197 | label = "VOL-"; |
| 198 | /* GPIO92 */ |
| 199 | gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; |
| 200 | }; |
| 201 | }; |
| 202 | |
| 203 | /* Richtek RT8515GQW Flash LED Driver IC */ |
| 204 | flash { |
| 205 | compatible = "richtek,rt8515"; |
| 206 | /* GPIO 140 */ |
| 207 | enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>; |
| 208 | /* GPIO 141 */ |
| 209 | ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>; |
| 210 | /* |
| 211 | * RFS is 16 kOhm and RTS is 100 kOhm giving |
| 212 | * the flash max current 343mA and torch max |
| 213 | * current 55 mA. |
| 214 | */ |
| 215 | richtek,rfs-ohms = <16000>; |
| 216 | richtek,rts-ohms = <100000>; |
| 217 | pinctrl-names = "default"; |
| 218 | pinctrl-0 = <&gpio_flash_default_mode>; |
| 219 | |
| 220 | led { |
| 221 | function = LED_FUNCTION_FLASH; |
| 222 | color = <LED_COLOR_ID_WHITE>; |
| 223 | flash-max-timeout-us = <250000>; |
| 224 | flash-max-microamp = <343750>; |
| 225 | led-max-microamp = <55000>; |
| 226 | }; |
| 227 | }; |
| 228 | |
| 229 | gpio-leds { |
| 230 | compatible = "gpio-leds"; |
| 231 | pinctrl-names = "default"; |
| 232 | pinctrl-0 = <&gpio_leds_default_mode>; |
| 233 | used-led { |
| 234 | label = "touchkeys"; |
| 235 | /* GPIO68 */ |
| 236 | gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; |
| 237 | default-state = "on"; |
| 238 | }; |
| 239 | }; |
| 240 | |
| 241 | ktd259: backlight { |
| 242 | compatible = "kinetic,ktd259"; |
| 243 | /* GPIO20 */ |
| 244 | enable-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; |
| 245 | /* Default to 13/32 brightness */ |
| 246 | default-brightness = <13>; |
| 247 | pinctrl-names = "default"; |
| 248 | pinctrl-0 = <&ktd259_backlight_default_mode>; |
| 249 | }; |
| 250 | |
| 251 | /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */ |
| 252 | i2c-gpio-0 { |
| 253 | compatible = "i2c-gpio"; |
| 254 | sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; |
| 255 | scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; |
| 256 | pinctrl-names = "default"; |
| 257 | pinctrl-0 = <&i2c_gpio_0_default>; |
| 258 | #address-cells = <1>; |
| 259 | #size-cells = <0>; |
| 260 | |
| 261 | /* Yamaha YAS530 magnetometer */ |
| 262 | magnetometer@2e { |
| 263 | compatible = "yamaha,yas530"; |
| 264 | reg = <0x2e>; |
| 265 | /* VDD 3V */ |
| 266 | vdd-supply = <&ab8500_ldo_aux1_reg>; |
| 267 | /* IOVDD 1.8V */ |
| 268 | iovdd-supply = <&ab8500_ldo_aux2_reg>; |
| 269 | /* GPIO204 COMPASS_RST_N */ |
| 270 | reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>; |
| 271 | pinctrl-names = "default"; |
| 272 | pinctrl-0 = <&yas530_default>; |
| 273 | }; |
| 274 | /* TODO: this should also be used by the NCP6914 Camera power management unit */ |
| 275 | }; |
| 276 | |
| 277 | /* |
| 278 | * TODO: See if we can use the PL023 for this instead. |
| 279 | */ |
| 280 | spi { |
| 281 | compatible = "spi-gpio"; |
| 282 | /* Clock on GPIO220, pin SCL */ |
| 283 | sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>; |
| 284 | /* MOSI on GPIO224, pin SDI "slave data in" */ |
| 285 | mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>; |
| 286 | /* MISO on GPIO225, pin SDO "slave data out" */ |
| 287 | miso-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; |
| 288 | /* Chip select on GPIO223 */ |
| 289 | cs-gpios = <&gpio6 31 GPIO_ACTIVE_LOW>; |
| 290 | num-chipselects = <1>; |
| 291 | |
| 292 | pinctrl-names = "default"; |
| 293 | pinctrl-0 = <&spi_gpio_0_default>; |
| 294 | #address-cells = <1>; |
| 295 | #size-cells = <0>; |
| 296 | |
| 297 | panel@0 { |
| 298 | compatible = "samsung,lms397kf04"; |
| 299 | /* 300 ns at read cycle -> 3 MHz max speed */ |
| 300 | //spi-max-frequency = <3000000>; |
| 301 | spi-max-frequency = <1200000>; |
| 302 | /* TYPE 3: inverse clock polarity and phase */ |
| 303 | spi-cpha; |
| 304 | spi-cpol; |
| 305 | |
| 306 | reg = <0>; |
| 307 | vci-supply = <&lcd_3v0_reg>; |
| 308 | vccio-supply = <&lcd_1v8_reg>; |
| 309 | /* Reset on GPIO139 */ |
| 310 | reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; |
| 311 | pinctrl-names = "default"; |
| 312 | pinctrl-0 = <&panel_default_mode>; |
| 313 | backlight = <&ktd259>; |
| 314 | |
| 315 | port { |
| 316 | panel_in: endpoint { |
| 317 | remote-endpoint = <&display_out>; |
| 318 | }; |
| 319 | }; |
| 320 | }; |
| 321 | }; |
| 322 | |
| 323 | /* Bit-banged I2C on GPIO201 and GPIO202 also called "MOT_I2C" */ |
| 324 | i2c-gpio-2 { |
| 325 | compatible = "i2c-gpio"; |
| 326 | sda-gpios = <&gpio6 10 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; |
| 327 | scl-gpios = <&gpio6 9 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; |
| 328 | pinctrl-names = "default"; |
| 329 | pinctrl-0 = <&i2c_gpio_2_default>; |
| 330 | #address-cells = <1>; |
| 331 | #size-cells = <0>; |
| 332 | /* TODO: add the Immersion ISA1200 I2C device here */ |
| 333 | }; |
| 334 | |
| 335 | /* Bit-banged I2C on GPIO196 and GPIO197 also called "MPR_I2C" */ |
| 336 | i2c-gpio-3 { |
| 337 | compatible = "i2c-gpio"; |
| 338 | sda-gpios = <&gpio6 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; |
| 339 | scl-gpios = <&gpio6 4 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; |
| 340 | pinctrl-names = "default"; |
| 341 | pinctrl-0 = <&i2c_gpio_3_default>; |
| 342 | #address-cells = <1>; |
| 343 | #size-cells = <0>; |
| 344 | /* TODO: add the DPP2601 projector I2C device 0x1b here */ |
| 345 | }; |
| 346 | |
| 347 | soc { |
| 348 | /* External Micro SD slot */ |
| 349 | mmc@80126000 { |
| 350 | arm,primecell-periphid = <0x10480180>; |
| 351 | max-frequency = <50000000>; |
| 352 | bus-width = <4>; |
| 353 | cap-sd-highspeed; |
| 354 | cap-mmc-highspeed; |
| 355 | st,sig-pin-fbclk; |
| 356 | full-pwr-cycle; |
| 357 | /* MMC is powered by AUX3 1.2V .. 2.91V */ |
| 358 | vmmc-supply = <&ab8500_ldo_aux3_reg>; |
| 359 | /* 2.9 V level translator */ |
| 360 | vqmmc-supply = <&sd_level_translator>; |
| 361 | pinctrl-names = "default", "sleep"; |
| 362 | pinctrl-0 = <&mc0_a_2_default>; |
| 363 | pinctrl-1 = <&mc0_a_2_sleep>; |
| 364 | /* "flash detect" actually card detect */ |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 365 | cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 366 | status = "okay"; |
| 367 | }; |
| 368 | |
| 369 | /* WLAN SDIO channel */ |
| 370 | mmc@80118000 { |
| 371 | arm,primecell-periphid = <0x10480180>; |
| 372 | max-frequency = <50000000>; |
| 373 | bus-width = <4>; |
| 374 | non-removable; |
| 375 | cap-sd-highspeed; |
| 376 | pinctrl-names = "default", "sleep"; |
| 377 | pinctrl-0 = <&mc1_a_2_default>; |
| 378 | pinctrl-1 = <&mc1_a_2_sleep>; |
| 379 | /* |
| 380 | * GPIO-controlled voltage enablement: this drives |
| 381 | * the WL_REG_ON line high when we use this device. |
| 382 | * Represented as regulator to fill OCR mask. |
| 383 | */ |
| 384 | vmmc-supply = <&wl_reg>; |
| 385 | |
| 386 | #address-cells = <1>; |
| 387 | #size-cells = <0>; |
| 388 | status = "okay"; |
| 389 | |
| 390 | wifi@1 { |
| 391 | compatible = "brcm,bcm4330-fmac", "brcm,bcm4329-fmac"; |
| 392 | reg = <1>; |
| 393 | /* GPIO216 WL_HOST_WAKE */ |
| 394 | interrupt-parent = <&gpio6>; |
| 395 | interrupts = <24 IRQ_TYPE_EDGE_FALLING>; |
| 396 | interrupt-names = "host-wake"; |
| 397 | pinctrl-names = "default"; |
| 398 | pinctrl-0 = <&wlan_default_mode>; |
| 399 | }; |
| 400 | }; |
| 401 | |
| 402 | /* eMMC */ |
| 403 | mmc@80005000 { |
| 404 | arm,primecell-periphid = <0x10480180>; |
| 405 | max-frequency = <50000000>; |
| 406 | bus-width = <8>; |
| 407 | non-removable; |
| 408 | cap-mmc-highspeed; |
| 409 | mmc-ddr-1_8v; |
| 410 | no-sdio; |
| 411 | no-sd; |
| 412 | vmmc-supply = <&ldo_3v3_reg>; |
| 413 | pinctrl-names = "default", "sleep"; |
| 414 | pinctrl-0 = <&mc2_a_1_default>; |
| 415 | pinctrl-1 = <&mc2_a_1_sleep>; |
| 416 | status = "okay"; |
| 417 | }; |
| 418 | |
| 419 | /* GBF (Bluetooth) UART */ |
| 420 | serial@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 | host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>; |
| 434 | /* BT_RST_N on GPIO209 */ |
| 435 | reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; |
| 436 | pinctrl-names = "default"; |
| 437 | pinctrl-0 = <&bluetooth_default_mode>; |
| 438 | }; |
| 439 | }; |
| 440 | |
| 441 | /* GPS UART */ |
| 442 | serial@80121000 { |
| 443 | status = "okay"; |
| 444 | pinctrl-names = "default", "sleep"; |
| 445 | /* CTS/RTS is not used, CTS is repurposed as GPIO */ |
| 446 | pinctrl-0 = <&u1rxtx_a_1_default>; |
| 447 | pinctrl-1 = <&u1rxtx_a_1_sleep>; |
| 448 | /* FIXME: add a device for the GPS here */ |
| 449 | }; |
| 450 | |
| 451 | /* Debugging console UART connected to TSU6111RSVR (FSA880) */ |
| 452 | serial@80007000 { |
| 453 | status = "okay"; |
| 454 | pinctrl-names = "default", "sleep"; |
| 455 | pinctrl-0 = <&u2rxtx_c_1_default>; |
| 456 | pinctrl-1 = <&u2rxtx_c_1_sleep>; |
| 457 | }; |
| 458 | |
| 459 | prcmu@80157000 { |
| 460 | ab8500 { |
| 461 | phy { |
| 462 | pinctrl-names = "default", "sleep"; |
| 463 | pinctrl-0 = <&usb_a_1_default>; |
| 464 | pinctrl-1 = <&usb_a_1_sleep>; |
| 465 | }; |
| 466 | |
| 467 | ab8500_fg { |
| 468 | line-impedance-micro-ohms = <43000>; |
| 469 | }; |
| 470 | |
| 471 | regulator { |
| 472 | ab8500_ldo_aux1 { |
| 473 | /* Used for VDD for sensors */ |
| 474 | regulator-name = "V-SENSORS-VDD"; |
| 475 | regulator-min-microvolt = <3000000>; |
| 476 | regulator-max-microvolt = <3000000>; |
| 477 | }; |
| 478 | |
| 479 | ab8500_ldo_aux2 { |
| 480 | /* Used for VIO for sensors */ |
| 481 | regulator-name = "V-SENSORS-VIO"; |
| 482 | regulator-min-microvolt = <1800000>; |
| 483 | regulator-max-microvolt = <1800000>; |
| 484 | }; |
| 485 | |
| 486 | ab8500_ldo_aux3 { |
| 487 | /* Used for voltage for external MMC/SD card */ |
| 488 | regulator-name = "V-MMC-SD"; |
| 489 | regulator-min-microvolt = <1200000>; |
| 490 | regulator-max-microvolt = <2910000>; |
| 491 | }; |
| 492 | }; |
| 493 | }; |
| 494 | }; |
| 495 | |
| 496 | /* I2C0 */ |
| 497 | i2c@80004000 { |
| 498 | status = "okay"; |
| 499 | pinctrl-names = "default", "sleep"; |
| 500 | pinctrl-0 = <&i2c0_a_1_default>; |
| 501 | pinctrl-1 = <&i2c0_a_1_sleep>; |
| 502 | |
| 503 | /* FIXME: fix the proximity sensor bindings and driver */ |
| 504 | proximity@39 { |
| 505 | /* Gavini has the GP2A030S00F proximity sensor */ |
| 506 | compatible = "sharp,gp2a030s00f"; |
| 507 | clock-frequency = <400000>; |
| 508 | reg = <0x39>; |
| 509 | /* FIXME: GPIO146 provides power on, IR LED? */ |
| 510 | }; |
| 511 | |
| 512 | gyroscope@68 { |
| 513 | compatible = "invensense,mpu3050"; |
| 514 | reg = <0x68>; |
| 515 | /* GPIO226 interrupt */ |
| 516 | interrupt-parent = <&gpio7>; |
| 517 | interrupts = <2 IRQ_TYPE_EDGE_FALLING>; |
| 518 | mount-matrix = "0", "1", "0", |
| 519 | "1", "0", "0", |
| 520 | "0", "0", "1"; |
| 521 | vlogic-supply = <&ab8500_ldo_aux2_reg>; // 1.8V |
| 522 | vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V |
| 523 | pinctrl-names = "default"; |
| 524 | pinctrl-0 = <&mpu3050_default>; |
| 525 | |
| 526 | /* |
| 527 | * The MPU-3050 acts as a hub for the |
| 528 | * accelerometer. |
| 529 | */ |
| 530 | i2c-gate { |
| 531 | #address-cells = <1>; |
| 532 | #size-cells = <0>; |
| 533 | |
| 534 | /* Bosch BMA222E accelerometer */ |
| 535 | accelerometer@18 { |
| 536 | compatible = "bosch,bma222e"; |
| 537 | reg = <0x18>; |
| 538 | mount-matrix = "0", "-1", "0", |
| 539 | "1", "0", "0", |
| 540 | "0", "0", "1"; |
| 541 | vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V |
| 542 | vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V |
| 543 | }; |
| 544 | }; |
| 545 | }; |
| 546 | }; |
| 547 | |
| 548 | /* I2C2 "AGC I2C" */ |
| 549 | i2c@80128000 { |
| 550 | status = "okay"; |
| 551 | pinctrl-names = "default", "sleep"; |
| 552 | pinctrl-0 = <&i2c2_b_1_default>; |
| 553 | pinctrl-1 = <&i2c2_b_1_sleep>; |
| 554 | |
| 555 | /* Texas Instruments TSU6111 micro USB switch */ |
| 556 | usb-switch@25 { |
| 557 | compatible = "ti,tsu6111"; |
| 558 | reg = <0x25>; |
| 559 | /* Interrupt JACK_INT_N on GPIO95 */ |
| 560 | interrupt-parent = <&gpio2>; |
| 561 | interrupts = <31 IRQ_TYPE_EDGE_FALLING>; |
| 562 | pinctrl-names = "default"; |
| 563 | pinctrl-0 = <&tsu6111_default>; |
| 564 | }; |
| 565 | }; |
| 566 | |
| 567 | /* I2C3 */ |
| 568 | i2c@80110000 { |
| 569 | status = "okay"; |
| 570 | |
| 571 | pinctrl-names = "default", "sleep"; |
| 572 | pinctrl-0 = <&i2c3_c_2_default>; |
| 573 | pinctrl-1 = <&i2c3_c_2_sleep>; |
| 574 | |
| 575 | /* Melfas MMS136 touchscreen */ |
| 576 | touchscreen@48 { |
| 577 | compatible = "melfas,mms136"; |
| 578 | reg = <0x48>; |
| 579 | /* GPIO218 (TSP_INT_1V8) */ |
| 580 | interrupt-parent = <&gpio6>; |
| 581 | interrupts = <26 IRQ_TYPE_EDGE_FALLING>; |
| 582 | /* AVDD is "analog supply", 2.57-3.47 V */ |
| 583 | avdd-supply = <&ldo_tsp_3v3_reg>; |
| 584 | /* VDD is "digital supply" 1.71-3.47V */ |
| 585 | vdd-supply = <&ldo_tsp_1v8_reg>; |
| 586 | pinctrl-names = "default"; |
| 587 | pinctrl-0 = <&tsp_default>; |
| 588 | touchscreen-size-x = <480>; |
| 589 | touchscreen-size-y = <800>; |
| 590 | }; |
| 591 | }; |
| 592 | |
| 593 | mcde@a0350000 { |
| 594 | status = "okay"; |
| 595 | pinctrl-names = "default"; |
| 596 | pinctrl-0 = <&dpi_default_mode>; |
| 597 | |
| 598 | port { |
| 599 | display_out: endpoint { |
| 600 | remote-endpoint = <&panel_in>; |
| 601 | }; |
| 602 | }; |
| 603 | }; |
| 604 | }; |
| 605 | }; |
| 606 | |
| 607 | &pinctrl { |
| 608 | /* |
| 609 | * This extends the MC0_A_2 default config to include |
| 610 | * the card detect GPIO217 line. |
| 611 | */ |
| 612 | sdi0 { |
| 613 | mc0_a_2_default { |
| 614 | default_cfg4 { |
| 615 | pins = "GPIO217_AH12"; /* card detect */ |
| 616 | ste,config = <&gpio_in_nopull>; |
| 617 | }; |
| 618 | }; |
| 619 | }; |
| 620 | mcde { |
| 621 | dpi_default_mode: dpi_default { |
| 622 | default_mux1 { |
| 623 | /* Mux in all the data lines */ |
| 624 | function = "lcd"; |
| 625 | groups = |
| 626 | /* Data lines D0-D7 GPIO70..GPIO77 */ |
| 627 | "lcd_d0_d7_a_1", |
| 628 | /* Data lines D8-D11 GPIO78..GPIO81 */ |
| 629 | "lcd_d8_d11_a_1", |
| 630 | /* Data lines D12-D15 GPIO82..GPIO85 */ |
| 631 | "lcd_d12_d15_a_1", |
| 632 | /* Data lines D16-D23 GPIO161..GPIO168 */ |
| 633 | "lcd_d16_d23_b_1"; |
| 634 | }; |
| 635 | default_mux2 { |
| 636 | function = "lcda"; |
| 637 | /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */ |
| 638 | groups = "lcdaclk_b_1", "lcda_b_1"; |
| 639 | }; |
| 640 | /* Input, no pull-up is the default state for pins used for an alt function */ |
| 641 | default_cfg1 { |
| 642 | pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23"; |
| 643 | ste,config = <&in_nopull>; |
| 644 | }; |
| 645 | }; |
| 646 | }; |
| 647 | /* GPIO for panel reset control */ |
| 648 | panel { |
| 649 | panel_default_mode: panel_default { |
| 650 | gavini_cfg1 { |
| 651 | /* Reset line */ |
| 652 | pins = "GPIO139_C9"; |
| 653 | ste,config = <&gpio_out_lo>; |
| 654 | }; |
| 655 | }; |
| 656 | }; |
| 657 | /* GPIO that enables the LDO regulator for the eMMC */ |
| 658 | emmc-ldo { |
| 659 | emmc_ldo_en_default_mode: emmc_ldo_default { |
| 660 | /* LDO enable on GPIO6 */ |
| 661 | gavini_cfg1 { |
| 662 | pins = "GPIO6_AF6"; |
| 663 | ste,config = <&gpio_out_hi>; |
| 664 | }; |
| 665 | }; |
| 666 | }; |
| 667 | /* GPIO that enables the LDO regulator for the touchscreen */ |
| 668 | tsp-ldo { |
| 669 | tsp_ldo_en_default_mode: tsp_ldo_default { |
| 670 | /* LDO enable on GPIO94 */ |
| 671 | gavini_cfg1 { |
| 672 | pins = "GPIO94_D7"; |
| 673 | ste,config = <&gpio_out_hi>; |
| 674 | }; |
| 675 | }; |
| 676 | }; |
| 677 | /* Reset line for the Yamaha YAS530 magnetometer */ |
| 678 | yas530 { |
| 679 | yas530_default: yas530_janice { |
| 680 | janice_cfg1 { |
| 681 | pins = "GPIO204_AF23"; |
| 682 | ste,config = <&gpio_out_hi>; |
| 683 | }; |
| 684 | }; |
| 685 | }; |
| 686 | /* Flash and torch */ |
| 687 | flash { |
| 688 | gpio_flash_default_mode: flash_default { |
| 689 | janice_cfg1 { |
| 690 | pins = "GPIO140_B11", "GPIO141_C12"; |
| 691 | ste,config = <&gpio_out_lo>; |
| 692 | }; |
| 693 | }; |
| 694 | }; |
| 695 | /* GPIO that enables the LDO regulator for the key LED */ |
| 696 | gpio-leds { |
| 697 | gpio_leds_default_mode: gpio_leds_default { |
| 698 | /* EN_LED_LDO on GPIO68 */ |
| 699 | gavini_cfg1 { |
| 700 | pins = "GPIO68_E1"; |
| 701 | ste,config = <&gpio_out_hi>; |
| 702 | }; |
| 703 | }; |
| 704 | }; |
| 705 | backlight { |
| 706 | ktd259_backlight_default_mode: backlight_default { |
| 707 | skomer_cfg1 { |
| 708 | pins = "GPIO20_AB4"; /* LCD_BL_EN */ |
| 709 | ste,config = <&gpio_out_lo>; |
| 710 | }; |
| 711 | }; |
| 712 | }; |
| 713 | /* GPIO that enables the LDO regulator for the touchkeys */ |
| 714 | touchkey-ldo { |
| 715 | tsp_ldo_on2_default_mode: tsp_ldo_on2_default { |
| 716 | /* TSP_LDO_ON2 on GPIO89 */ |
| 717 | gavini_cfg1 { |
| 718 | pins = "GPIO89_E6"; |
| 719 | ste,config = <&gpio_out_lo>; |
| 720 | }; |
| 721 | }; |
| 722 | }; |
| 723 | touchkey { |
| 724 | touchkey_default_mode: touchkey_default { |
| 725 | gavini_cfg1 { |
| 726 | /* Interrupt */ |
| 727 | pins = "GPIO198_AG25"; |
| 728 | ste,config = <&gpio_in_nopull>; |
| 729 | }; |
| 730 | gavini_cfg2 { |
| 731 | /* Reset, actually completely unused (not routed) */ |
| 732 | pins = "GPIO205_AG23"; |
| 733 | ste,config = <&gpio_in_pd>; |
| 734 | }; |
| 735 | }; |
| 736 | }; |
| 737 | /* GPIO that enables the LDO regulator for the LCD display */ |
| 738 | lcd-ldo { |
| 739 | lcd_pwr_en_default_mode: lcd_pwr_en_default { |
| 740 | /* LCD_PWR_EN on GPIO219 */ |
| 741 | gavini_cfg1 { |
| 742 | pins = "GPIO219_AG10"; |
| 743 | ste,config = <&gpio_out_hi>; |
| 744 | }; |
| 745 | }; |
| 746 | }; |
| 747 | /* GPIO that enables the WLAN internal LDO regulators */ |
| 748 | wlan-ldo { |
| 749 | wlan_ldo_en_default: wlan_ldo_default { |
| 750 | /* GPIO215 named WLAN_RST_N */ |
| 751 | gavini_cfg1 { |
| 752 | pins = "GPIO215_AH13"; |
| 753 | ste,config = <&gpio_out_lo>; |
| 754 | }; |
| 755 | }; |
| 756 | }; |
| 757 | /* GPIO that enables the 2.9V SD card level translator */ |
| 758 | sd-level-translator { |
| 759 | sd_level_translator_default: sd_level_translator_default { |
| 760 | /* level shifter on GPIO193 */ |
| 761 | skomer_cfg1 { |
| 762 | pins = "GPIO193_AH27"; |
| 763 | ste,config = <&gpio_out_hi>; |
| 764 | }; |
| 765 | }; |
| 766 | }; |
| 767 | /* GPIO keys */ |
| 768 | gpio-keys { |
| 769 | gpio_keys_default_mode: gpio_keys_default { |
| 770 | skomer_cfg1 { |
| 771 | pins = "GPIO32_V2", /* Projector On HotKey */ |
| 772 | "GPIO67_G2", /* VOL UP */ |
| 773 | "GPIO91_B6", /* HOME */ |
| 774 | "GPIO92_D6"; /* VOL DOWN */ |
| 775 | ste,config = <&gpio_in_pu>; |
| 776 | }; |
| 777 | }; |
| 778 | }; |
| 779 | /* Interrupt line for the Atmel MXT228 touchscreen */ |
| 780 | tsp { |
| 781 | tsp_default: tsp_default { |
| 782 | gavini_cfg1 { |
| 783 | pins = "GPIO218_AH11"; /* TSP_INT_1V8 */ |
| 784 | ste,config = <&gpio_in_nopull>; |
| 785 | }; |
| 786 | }; |
| 787 | }; |
| 788 | /* Interrupt line for Invensense MPU3050 gyroscope */ |
| 789 | mpu3050 { |
| 790 | mpu3050_default: mpu3050 { |
| 791 | gavini_cfg1 { |
| 792 | /* GPIO226 used for IRQ */ |
| 793 | pins = "GPIO226_AF8"; |
| 794 | ste,config = <&gpio_in_nopull>; |
| 795 | }; |
| 796 | }; |
| 797 | }; |
| 798 | /* GPIO-based I2C bus for magnetometer and NCP6914 */ |
| 799 | i2c-gpio-0 { |
| 800 | i2c_gpio_0_default: i2c_gpio_0 { |
| 801 | gavini_cfg1 { |
| 802 | pins = "GPIO143_D12", "GPIO144_B13"; |
| 803 | ste,config = <&gpio_in_nopull>; |
| 804 | }; |
| 805 | }; |
| 806 | }; |
| 807 | /* GPIO-based I2C bus for the Immersion ISA1200 */ |
| 808 | i2c-gpio-2 { |
| 809 | i2c_gpio_2_default: i2c_gpio_2 { |
| 810 | gavini_cfg1 { |
| 811 | pins = "GPIO201_AF24", "GPIO202_AF25"; |
| 812 | ste,config = <&gpio_in_nopull>; |
| 813 | }; |
| 814 | }; |
| 815 | }; |
| 816 | /* GPIO-based I2C bus for the TI DPP2601 */ |
| 817 | i2c-gpio-3 { |
| 818 | i2c_gpio_3_default: i2c_gpio_3 { |
| 819 | gavini_cfg1 { |
| 820 | pins = "GPIO196_AG26", "GPIO197_AH24"; |
| 821 | ste,config = <&gpio_in_nopull>; |
| 822 | }; |
| 823 | }; |
| 824 | }; |
| 825 | /* GPIO-based SPI bus for the display */ |
| 826 | spi-gpio-0 { |
| 827 | spi_gpio_0_default: spi_gpio_0_d { |
| 828 | gavini_cfg1 { |
| 829 | pins = "GPIO220_AH10", "GPIO223_AH9", "GPIO224_AG9"; |
| 830 | ste,config = <&gpio_out_hi>; |
| 831 | }; |
| 832 | gavini_cfg2 { |
| 833 | pins = "GPIO225_AG8"; |
| 834 | ste,config = <&gpio_in_nopull>; |
| 835 | }; |
| 836 | }; |
| 837 | spi_gpio_0_sleep: spi_gpio_0_s { |
| 838 | gavini_cfg1 { |
| 839 | pins = "GPIO220_AH10", "GPIO223_AH9", |
| 840 | "GPIO224_AG9", "GPIO225_AG8"; |
| 841 | ste,config = <&gpio_out_hi>; |
| 842 | }; |
| 843 | gavini_cfg2 { |
| 844 | pins = "GPIO225_AG8"; |
| 845 | ste,config = <&gpio_out_lo>; |
| 846 | }; |
| 847 | }; |
| 848 | }; |
| 849 | wlan { |
| 850 | wlan_default_mode: wlan_default { |
| 851 | /* GPIO216 for WL_HOST_WAKE */ |
| 852 | gavini_cfg2 { |
| 853 | pins = "GPIO216_AG12"; |
| 854 | ste,config = <&gpio_in_pd>; |
| 855 | }; |
| 856 | }; |
| 857 | }; |
| 858 | bluetooth { |
| 859 | bluetooth_default_mode: bluetooth_default { |
| 860 | /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */ |
| 861 | gavini_cfg1 { |
| 862 | pins = "GPIO199_AH23", "GPIO222_AJ9"; |
| 863 | ste,config = <&gpio_out_lo>; |
| 864 | }; |
| 865 | /* GPIO97 BT_HOST_WAKE */ |
| 866 | gavini_cfg2 { |
| 867 | pins = "GPIO97_D9"; |
| 868 | ste,config = <&gpio_in_nopull>; |
| 869 | }; |
| 870 | /* GPIO209 BT_RST_N */ |
| 871 | gavini_cfg3 { |
| 872 | pins = "GPIO209_AG15"; |
| 873 | ste,config = <&gpio_out_hi>; |
| 874 | }; |
| 875 | }; |
| 876 | }; |
| 877 | /* Interrupt line for TI TSU6111 Micro USB switch */ |
| 878 | tsu6111 { |
| 879 | tsu6111_default: tsu6111 { |
| 880 | gavini_cfg1 { |
| 881 | /* GPIO95 used for IRQ */ |
| 882 | pins = "GPIO95_E8"; |
| 883 | ste,config = <&gpio_in_nopull>; |
| 884 | }; |
| 885 | }; |
| 886 | }; |
| 887 | }; |