1// SPDX-License-Identifier: GPL-2.0 2#include <dt-bindings/input/input.h> 3#include <dt-bindings/reset/qcom,gcc-msm8960.h> 4 5#include "qcom-msm8960.dtsi" 6#include "pm8921.dtsi" 7#include <dt-bindings/gpio/gpio.h> 8#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 9#include <dt-bindings/input/gpio-keys.h> 10 11/ { 12 model = "Samsung Galaxy Express SGH-I437"; 13 compatible = "samsung,expressatt", "qcom,msm8960"; 14 chassis-type = "handset"; 15 16 aliases { 17 serial0 = &gsbi5_serial; 18 mmc0 = &sdcc1; /* SDCC1 eMMC slot */ 19 mmc1 = &sdcc3; /* SDCC3 SD card slot */ 20 }; 21 22 chosen { 23 stdout-path = "serial0:115200n8"; 24 }; 25 26 gpio-keys { 27 compatible = "gpio-keys"; 28 29 pinctrl-names = "default"; 30 pinctrl-0 = <&gpio_keys_pin_a>; 31 32 key-home { 33 label = "Home"; 34 gpios = <&tlmm 40 GPIO_ACTIVE_LOW>; 35 debounce-interval = <5>; 36 linux,code = <KEY_HOMEPAGE>; 37 wakeup-event-action = <EV_ACT_ASSERTED>; 38 wakeup-source; 39 }; 40 41 key-volume-up { 42 label = "Volume Up"; 43 gpios = <&tlmm 50 GPIO_ACTIVE_LOW>; 44 debounce-interval = <5>; 45 linux,code = <KEY_VOLUMEUP>; 46 }; 47 48 key-volume-down { 49 label = "Volume Down"; 50 gpios = <&tlmm 81 GPIO_ACTIVE_LOW>; 51 debounce-interval = <5>; 52 linux,code = <KEY_VOLUMEDOWN>; 53 }; 54 }; 55}; 56 57&gsbi2 { 58 qcom,mode = <GSBI_PROT_I2C>; 59 60 status = "okay"; 61}; 62 63&gsbi2_i2c { 64 status = "okay"; 65 66 light-sensor@39 { 67 compatible = "amstaos,tmd2772"; 68 reg = <0x39>; 69 interrupts-extended = <&pm8921_gpio 6 IRQ_TYPE_EDGE_FALLING>; 70 vdd-supply = <&pm8921_l9>; 71 vddio-supply = <&pm8921_lvs4>; 72 73 /* TODO: Proximity doesn't work */ 74 amstaos,proximity-diodes = <0>; 75 led-max-microamp = <100000>; 76 77 pinctrl-0 = <&prox_sensor_int>; 78 pinctrl-names = "default"; 79 }; 80}; 81 82&gsbi5 { 83 qcom,mode = <GSBI_PROT_I2C_UART>; 84 status = "okay"; 85}; 86 87&gsbi5_serial { 88 status = "okay"; 89}; 90 91&sdcc1 { 92 vmmc-supply = <&pm8921_l5>; 93 status = "okay"; 94}; 95 96&sdcc3 { 97 vmmc-supply = <&pm8921_l6>; 98 vqmmc-supply = <&pm8921_l7>; 99 100 pinctrl-0 = <&sdcc3_default_state>; 101 pinctrl-1 = <&sdcc3_sleep_state>; 102 pinctrl-names = "default", "sleep"; 103 104 status = "okay"; 105}; 106 107&gsbi1 { 108 qcom,mode = <GSBI_PROT_SPI>; 109 pinctrl-0 = <&spi1_default>; 110 pinctrl-names = "default"; 111 status = "okay"; 112}; 113 114&gsbi1_spi { 115 status = "okay"; 116}; 117 118&gsbi3 { 119 qcom,mode = <GSBI_PROT_I2C>; 120 status = "okay"; 121}; 122 123&gsbi3_i2c { 124 status = "okay"; 125 126 // Atmel mXT224S touchscreen 127 touchscreen@4a { 128 compatible = "atmel,maxtouch"; 129 reg = <0x4a>; 130 interrupt-parent = <&tlmm>; 131 interrupts = <11 IRQ_TYPE_EDGE_FALLING>; 132 vdda-supply = <&pm8921_lvs6>; 133 vdd-supply = <&pm8921_l17>; 134 pinctrl-names = "default"; 135 pinctrl-0 = <&touchscreen>; 136 }; 137}; 138 139&tlmm { 140 spi1_default: spi1-default-state { 141 mosi-pins { 142 pins = "gpio6"; 143 function = "gsbi1"; 144 drive-strength = <12>; 145 bias-disable; 146 }; 147 148 miso-pins { 149 pins = "gpio7"; 150 function = "gsbi1"; 151 drive-strength = <12>; 152 bias-disable; 153 }; 154 155 cs-pins { 156 pins = "gpio8"; 157 function = "gsbi1"; 158 drive-strength = <12>; 159 bias-disable; 160 output-low; 161 }; 162 163 clk-pins { 164 pins = "gpio9"; 165 function = "gsbi1"; 166 drive-strength = <12>; 167 bias-disable; 168 }; 169 }; 170 171 gpio_keys_pin_a: gpio-keys-active-state { 172 pins = "gpio40", "gpio50", "gpio81"; 173 function = "gpio"; 174 drive-strength = <8>; 175 bias-disable; 176 }; 177 178 touchscreen: touchscreen-int-state { 179 pins = "gpio11"; 180 function = "gpio"; 181 output-enable; 182 bias-disable; 183 drive-strength = <2>; 184 }; 185 186 nfc_default: nfc-default-state { 187 irq-pins { 188 pins = "gpio106"; 189 function = "gpio"; 190 drive-strength = <2>; 191 bias-pull-down; 192 }; 193 194 firmware-pins { 195 pins = "gpio92"; 196 function = "gpio"; 197 drive-strength = <2>; 198 bias-disable; 199 }; 200 }; 201}; 202 203&pm8921 { 204 interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>; 205}; 206 207&pm8921_gpio { 208 prox_sensor_int: prox-sensor-int-state { 209 pins = "gpio6"; 210 function = "normal"; 211 input-enable; 212 bias-disable; 213 }; 214 215 nfc_enable: nfc-enable-state { 216 pins = "gpio21"; 217 function = "normal"; 218 bias-disable; 219 qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>; 220 power-source = <PM8921_GPIO_S4>; 221 }; 222}; 223 224&rpm { 225 regulators { 226 compatible = "qcom,rpm-pm8921-regulators"; 227 vin_lvs1_3_6-supply = <&pm8921_s4>; 228 vin_lvs2-supply = <&pm8921_s4>; 229 vin_lvs4_5_7-supply = <&pm8921_s4>; 230 vdd_ncp-supply = <&pm8921_l6>; 231 vdd_l1_l2_l12_l18-supply = <&pm8921_s4>; 232 vdd_l21_l23_l29-supply = <&pm8921_s8>; 233 vdd_l24-supply = <&pm8921_s1>; 234 vdd_l25-supply = <&pm8921_s1>; 235 vdd_l27-supply = <&pm8921_s7>; 236 vdd_l28-supply = <&pm8921_s7>; 237 238 /* Buck SMPS */ 239 pm8921_s1: s1 { 240 regulator-always-on; 241 regulator-min-microvolt = <1225000>; 242 regulator-max-microvolt = <1225000>; 243 qcom,switch-mode-frequency = <3200000>; 244 bias-pull-down; 245 }; 246 247 pm8921_s2: s2 { 248 regulator-min-microvolt = <1300000>; 249 regulator-max-microvolt = <1300000>; 250 qcom,switch-mode-frequency = <1600000>; 251 bias-pull-down; 252 }; 253 254 pm8921_s3: s3 { 255 regulator-min-microvolt = <500000>; 256 regulator-max-microvolt = <1150000>; 257 qcom,switch-mode-frequency = <4800000>; 258 bias-pull-down; 259 }; 260 261 pm8921_s4: s4 { 262 regulator-always-on; 263 regulator-min-microvolt = <1800000>; 264 regulator-max-microvolt = <1800000>; 265 qcom,switch-mode-frequency = <1600000>; 266 bias-pull-down; 267 qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>; 268 }; 269 270 pm8921_s7: s7 { 271 regulator-min-microvolt = <1150000>; 272 regulator-max-microvolt = <1150000>; 273 qcom,switch-mode-frequency = <3200000>; 274 bias-pull-down; 275 }; 276 277 pm8921_s8: s8 { 278 regulator-always-on; 279 regulator-min-microvolt = <2050000>; 280 regulator-max-microvolt = <2050000>; 281 qcom,switch-mode-frequency = <1600000>; 282 bias-pull-down; 283 }; 284 285 /* PMOS LDO */ 286 pm8921_l1: l1 { 287 regulator-always-on; 288 regulator-min-microvolt = <1050000>; 289 regulator-max-microvolt = <1050000>; 290 bias-pull-down; 291 }; 292 293 pm8921_l2: l2 { 294 regulator-min-microvolt = <1200000>; 295 regulator-max-microvolt = <1200000>; 296 bias-pull-down; 297 }; 298 299 pm8921_l3: l3 { 300 regulator-min-microvolt = <3075000>; 301 regulator-max-microvolt = <3300000>; 302 bias-pull-down; 303 }; 304 305 pm8921_l4: l4 { 306 regulator-always-on; 307 regulator-min-microvolt = <1800000>; 308 regulator-max-microvolt = <1800000>; 309 bias-pull-down; 310 }; 311 312 pm8921_l5: l5 { 313 regulator-min-microvolt = <2950000>; 314 regulator-max-microvolt = <2950000>; 315 bias-pull-down; 316 }; 317 318 pm8921_l6: l6 { 319 regulator-min-microvolt = <2950000>; 320 regulator-max-microvolt = <2950000>; 321 bias-pull-down; 322 }; 323 324 pm8921_l7: l7 { 325 regulator-always-on; 326 regulator-min-microvolt = <1850000>; 327 regulator-max-microvolt = <2950000>; 328 bias-pull-down; 329 }; 330 331 pm8921_l8: l8 { 332 regulator-min-microvolt = <3000000>; 333 regulator-max-microvolt = <3100000>; 334 bias-pull-down; 335 }; 336 337 pm8921_l9: l9 { 338 regulator-min-microvolt = <2850000>; 339 regulator-max-microvolt = <2850000>; 340 bias-pull-down; 341 }; 342 343 pm8921_l10: l10 { 344 regulator-min-microvolt = <3000000>; 345 regulator-max-microvolt = <3000000>; 346 bias-pull-down; 347 }; 348 349 pm8921_l11: l11 { 350 regulator-min-microvolt = <2800000>; 351 regulator-max-microvolt = <3300000>; 352 bias-pull-down; 353 }; 354 355 pm8921_l12: l12 { 356 regulator-min-microvolt = <1200000>; 357 regulator-max-microvolt = <1200000>; 358 bias-pull-down; 359 }; 360 361 pm8921_l14: l14 { 362 regulator-min-microvolt = <1800000>; 363 regulator-max-microvolt = <1800000>; 364 bias-pull-down; 365 }; 366 367 pm8921_l15: l15 { 368 regulator-min-microvolt = <1800000>; 369 regulator-max-microvolt = <2950000>; 370 bias-pull-down; 371 }; 372 373 pm8921_l16: l16 { 374 regulator-min-microvolt = <2800000>; 375 regulator-max-microvolt = <3000000>; 376 bias-pull-down; 377 }; 378 379 pm8921_l17: l17 { 380 regulator-min-microvolt = <3300000>; 381 regulator-max-microvolt = <3300000>; 382 bias-pull-down; 383 }; 384 385 pm8921_l18: l18 { 386 regulator-min-microvolt = <1200000>; 387 regulator-max-microvolt = <1500000>; 388 bias-pull-down; 389 }; 390 391 pm8921_l21: l21 { 392 regulator-min-microvolt = <1900000>; 393 regulator-max-microvolt = <1900000>; 394 bias-pull-down; 395 }; 396 397 pm8921_l22: l22 { 398 regulator-min-microvolt = <2750000>; 399 regulator-max-microvolt = <2750000>; 400 bias-pull-down; 401 }; 402 403 pm8921_l23: l23 { 404 regulator-always-on; 405 regulator-min-microvolt = <1800000>; 406 regulator-max-microvolt = <1800000>; 407 bias-pull-down; 408 }; 409 410 pm8921_l24: l24 { 411 regulator-min-microvolt = <750000>; 412 regulator-max-microvolt = <1150000>; 413 bias-pull-down; 414 }; 415 416 pm8921_l25: l25 { 417 regulator-always-on; 418 regulator-min-microvolt = <1225000>; 419 regulator-max-microvolt = <1225000>; 420 bias-pull-down; 421 }; 422 423 /* Low Voltage Switch */ 424 pm8921_lvs1: lvs1 { 425 bias-pull-down; 426 }; 427 428 pm8921_lvs2: lvs2 { 429 bias-pull-down; 430 }; 431 432 pm8921_lvs3: lvs3 { 433 bias-pull-down; 434 }; 435 436 pm8921_lvs4: lvs4 { 437 bias-pull-down; 438 }; 439 440 pm8921_lvs5: lvs5 { 441 bias-pull-down; 442 }; 443 444 pm8921_lvs6: lvs6 { 445 bias-pull-down; 446 }; 447 448 pm8921_lvs7: lvs7 { 449 bias-pull-down; 450 }; 451 452 pm8921_ncp: ncp { 453 regulator-min-microvolt = <1800000>; 454 regulator-max-microvolt = <1800000>; 455 qcom,switch-mode-frequency = <1600000>; 456 }; 457 }; 458}; 459 460&usb_hs1_phy { 461 v3p3-supply = <&pm8921_l3>; 462 v1p8-supply = <&pm8921_l4>; 463}; 464 465&usb1 { 466 dr_mode = "otg"; 467 status = "okay"; 468}; 469 470&gsbi7 { 471 qcom,mode = <GSBI_PROT_I2C>; 472 473 status = "okay"; 474}; 475 476&gsbi7_i2c { 477 status = "okay"; 478 479 nfc@2b { 480 compatible = "nxp,pn544-i2c"; 481 reg = <0x2b>; 482 interrupts-extended = <&tlmm 106 IRQ_TYPE_EDGE_RISING>; 483 enable-gpios = <&pm8921_gpio 21 GPIO_ACTIVE_HIGH>; 484 firmware-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; 485 486 pinctrl-0 = <&nfc_default &nfc_enable>; 487 pinctrl-names = "default"; 488 }; 489}; 490 491&gsbi12 { 492 qcom,mode = <GSBI_PROT_I2C>; 493 494 status = "okay"; 495}; 496 497&gsbi12_i2c { 498 status = "okay"; 499 500 accelerometer@18 { 501 compatible = "bosch,bma254"; 502 reg = <0x18>; 503 vdd-supply = <&pm8921_l9>; 504 vddio-supply = <&pm8921_lvs4>; 505 506 mount-matrix = "-1", "0", "0", 507 "0", "-1", "0", 508 "0", "0", "1"; 509 }; 510 511 magnetometer@2e { 512 compatible = "yamaha,yas532"; 513 reg = <0x2e>; 514 vdd-supply = <&pm8921_l9>; 515 iovdd-supply = <&pm8921_lvs4>; 516 517 /* TODO: Figure out Mount Matrix */ 518 }; 519}; 520