1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2019 Stephan Gerhold 4 */ 5 6/dts-v1/; 7 8#include "msm8916-pm8916.dtsi" 9#include "msm8916-modem-qdsp6.dtsi" 10 11#include <dt-bindings/gpio/gpio.h> 12#include <dt-bindings/input/input.h> 13#include <dt-bindings/interrupt-controller/irq.h> 14 15/* 16 * NOTE: The original firmware from Samsung can only boot ARM32 kernels. 17 * Unfortunately, the firmware is signed and cannot be replaced easily. 18 * There seems to be no way to boot ARM64 kernels on this device at the moment, 19 * even though the hardware would support it. 20 * 21 * However, it is possible to use this device tree by compiling an ARM32 kernel 22 * instead. For clarity and build testing this device tree is maintained next 23 * to the other MSM8916 device trees. However, it is actually used through 24 * arch/arm/boot/dts/qcom-msm8916-samsung-serranove.dts 25 */ 26 27/ { 28 model = "Samsung Galaxy S4 Mini Value Edition"; 29 compatible = "samsung,serranove", "qcom,msm8916"; 30 chassis-type = "handset"; 31 32 aliases { 33 mmc0 = &sdhc_1; /* eMMC */ 34 mmc1 = &sdhc_2; /* SD card */ 35 serial0 = &blsp_uart2; 36 }; 37 38 chosen { 39 stdout-path = "serial0"; 40 }; 41 42 reserved-memory { 43 /* Additional memory used by Samsung firmware modifications */ 44 tz-apps@85500000 { 45 reg = <0x0 0x85500000 0x0 0xb00000>; 46 no-map; 47 }; 48 }; 49 50 gpio-keys { 51 compatible = "gpio-keys"; 52 53 pinctrl-names = "default"; 54 pinctrl-0 = <&gpio_keys_default>; 55 56 label = "GPIO Buttons"; 57 58 button-volume-up { 59 label = "Volume Up"; 60 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; 61 linux,code = <KEY_VOLUMEUP>; 62 }; 63 64 button-home { 65 label = "Home"; 66 gpios = <&tlmm 109 GPIO_ACTIVE_LOW>; 67 linux,code = <KEY_HOMEPAGE>; 68 }; 69 }; 70 71 gpio-hall-sensor { 72 compatible = "gpio-keys"; 73 74 pinctrl-names = "default"; 75 pinctrl-0 = <&gpio_hall_sensor_default>; 76 77 label = "GPIO Hall Effect Sensor"; 78 79 event-hall-sensor { 80 label = "Hall Effect Sensor"; 81 gpios = <&tlmm 52 GPIO_ACTIVE_LOW>; 82 linux,input-type = <EV_SW>; 83 linux,code = <SW_LID>; 84 linux,can-disable; 85 }; 86 }; 87 88 reg_vdd_tsp: regulator-vdd-tsp { 89 compatible = "regulator-fixed"; 90 regulator-name = "vdd_tsp"; 91 regulator-min-microvolt = <3300000>; 92 regulator-max-microvolt = <3300000>; 93 94 gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>; 95 enable-active-high; 96 97 pinctrl-names = "default"; 98 pinctrl-0 = <&tsp_en_default>; 99 }; 100 101 reg_touch_key: regulator-touch-key { 102 compatible = "regulator-fixed"; 103 regulator-name = "touch_key"; 104 regulator-min-microvolt = <2800000>; 105 regulator-max-microvolt = <2800000>; 106 107 gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>; 108 enable-active-high; 109 110 pinctrl-names = "default"; 111 pinctrl-0 = <&tkey_en_default>; 112 }; 113 114 reg_key_led: regulator-key-led { 115 compatible = "regulator-fixed"; 116 regulator-name = "key_led"; 117 regulator-min-microvolt = <3300000>; 118 regulator-max-microvolt = <3300000>; 119 120 gpio = <&tlmm 60 GPIO_ACTIVE_HIGH>; 121 enable-active-high; 122 123 pinctrl-names = "default"; 124 pinctrl-0 = <&tkey_led_en_default>; 125 }; 126 127 i2c-muic { 128 compatible = "i2c-gpio"; 129 sda-gpios = <&tlmm 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 130 scl-gpios = <&tlmm 106 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 131 132 pinctrl-names = "default"; 133 pinctrl-0 = <&muic_i2c_default>; 134 135 #address-cells = <1>; 136 #size-cells = <0>; 137 138 muic: extcon@14 { 139 compatible = "siliconmitus,sm5504-muic"; 140 reg = <0x14>; 141 142 interrupt-parent = <&tlmm>; 143 interrupts = <12 IRQ_TYPE_EDGE_FALLING>; 144 145 pinctrl-names = "default"; 146 pinctrl-0 = <&muic_irq_default>; 147 148 usb_con: connector { 149 compatible = "usb-b-connector"; 150 label = "micro-USB"; 151 type = "micro"; 152 }; 153 }; 154 }; 155 156 i2c-tkey { 157 compatible = "i2c-gpio"; 158 sda-gpios = <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 159 scl-gpios = <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 160 161 pinctrl-names = "default"; 162 pinctrl-0 = <&tkey_i2c_default>; 163 164 #address-cells = <1>; 165 #size-cells = <0>; 166 167 touchkey@20 { 168 compatible = "coreriver,tc360-touchkey"; 169 reg = <0x20>; 170 171 interrupt-parent = <&tlmm>; 172 interrupts = <98 IRQ_TYPE_EDGE_FALLING>; 173 174 vcc-supply = <®_touch_key>; 175 vdd-supply = <®_key_led>; 176 vddio-supply = <&pm8916_l6>; 177 178 linux,keycodes = <KEY_APPSELECT KEY_BACK>; 179 180 pinctrl-names = "default"; 181 pinctrl-0 = <&tkey_default>; 182 }; 183 }; 184 185 i2c-nfc { 186 compatible = "i2c-gpio"; 187 sda-gpios = <&tlmm 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 188 scl-gpios = <&tlmm 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 189 190 pinctrl-names = "default"; 191 pinctrl-0 = <&nfc_i2c_default>; 192 193 #address-cells = <1>; 194 #size-cells = <0>; 195 196 nfc@2b { 197 compatible = "nxp,pn547", "nxp,nxp-nci-i2c"; 198 reg = <0x2b>; 199 200 interrupt-parent = <&tlmm>; 201 interrupts = <21 IRQ_TYPE_EDGE_RISING>; 202 203 enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>; 204 firmware-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>; 205 206 pinctrl-names = "default"; 207 pinctrl-0 = <&nfc_default>; 208 }; 209 }; 210 211 battery: battery { 212 compatible = "simple-battery"; 213 precharge-current-microamp = <450000>; 214 constant-charge-current-max-microamp = <1000000>; 215 charge-term-current-microamp = <150000>; 216 precharge-upper-limit-microvolt = <3500000>; 217 constant-charge-voltage-max-microvolt = <4350000>; 218 }; 219}; 220 221&blsp_i2c2 { 222 status = "okay"; 223 224 imu@6b { 225 compatible = "st,lsm6ds3"; 226 reg = <0x6b>; 227 228 interrupt-parent = <&tlmm>; 229 interrupts = <115 IRQ_TYPE_EDGE_RISING>; 230 231 pinctrl-names = "default"; 232 pinctrl-0 = <&imu_irq_default>; 233 }; 234 235 magnetometer@2e { 236 compatible = "yamaha,yas537"; 237 reg = <0x2e>; 238 239 mount-matrix = "0", "1", "0", 240 "1", "0", "0", 241 "0", "0", "-1"; 242 }; 243}; 244 245&blsp_i2c4 { 246 status = "okay"; 247 248 fuel-gauge@35 { 249 compatible = "richtek,rt5033-battery"; 250 reg = <0x35>; 251 252 interrupt-parent = <&tlmm>; 253 interrupts = <121 IRQ_TYPE_EDGE_FALLING>; 254 255 pinctrl-names = "default"; 256 pinctrl-0 = <&fg_alert_default>; 257 258 power-supplies = <&rt5033_charger>; 259 }; 260}; 261 262&blsp_i2c5 { 263 status = "okay"; 264 265 touchscreen@20 { 266 compatible = "zinitix,bt541"; 267 reg = <0x20>; 268 269 interrupt-parent = <&tlmm>; 270 interrupts = <13 IRQ_TYPE_EDGE_FALLING>; 271 272 touchscreen-size-x = <540>; 273 touchscreen-size-y = <960>; 274 275 vdd-supply = <®_vdd_tsp>; 276 vddo-supply = <&pm8916_l6>; 277 278 pinctrl-names = "default"; 279 pinctrl-0 = <&tsp_irq_default>; 280 }; 281}; 282 283&blsp_i2c6 { 284 status = "okay"; 285 286 pmic@34 { 287 compatible = "richtek,rt5033"; 288 reg = <0x34>; 289 290 interrupt-parent = <&tlmm>; 291 interrupts = <62 IRQ_TYPE_EDGE_FALLING>; 292 293 pinctrl-names = "default"; 294 pinctrl-0 = <&pmic_int_default>; 295 296 regulators { 297 rt5033_reg_safe_ldo: SAFE_LDO { 298 regulator-min-microvolt = <4900000>; 299 regulator-max-microvolt = <4900000>; 300 regulator-always-on; 301 }; 302 rt5033_reg_ldo: LDO { 303 regulator-min-microvolt = <2800000>; 304 regulator-max-microvolt = <2800000>; 305 }; 306 rt5033_reg_buck: BUCK { 307 regulator-min-microvolt = <1200000>; 308 regulator-max-microvolt = <1200000>; 309 }; 310 }; 311 312 rt5033_charger: charger { 313 compatible = "richtek,rt5033-charger"; 314 monitored-battery = <&battery>; 315 richtek,usb-connector = <&usb_con>; 316 }; 317 }; 318}; 319 320&blsp_uart2 { 321 status = "okay"; 322 pinctrl-0 = <&blsp_uart2_console_default>; 323 pinctrl-1 = <&blsp_uart2_console_sleep>; 324 pinctrl-names = "default", "sleep"; 325}; 326 327&gpu { 328 status = "okay"; 329}; 330 331&mdss { 332 status = "okay"; 333}; 334 335&mdss_dsi0 { 336 pinctrl-names = "default", "sleep"; 337 pinctrl-0 = <&mdss_default>; 338 pinctrl-1 = <&mdss_sleep>; 339 340 panel@0 { 341 compatible = "samsung,s6e88a0-ams427ap24"; 342 reg = <0>; 343 344 vdd3-supply = <&pm8916_l17>; 345 vci-supply = <&pm8916_l6>; 346 reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; 347 flip-horizontal; 348 349 port { 350 panel_in: endpoint { 351 remote-endpoint = <&mdss_dsi0_out>; 352 }; 353 }; 354 }; 355}; 356 357&mdss_dsi0_out { 358 data-lanes = <0 1>; 359 remote-endpoint = <&panel_in>; 360}; 361 362&mpss_mem { 363 reg = <0x0 0x86800000 0x0 0x5a00000>; 364}; 365 366&pm8916_resin { 367 status = "okay"; 368 linux,code = <KEY_VOLUMEDOWN>; 369}; 370 371&pm8916_rpm_regulators { 372 pm8916_l17: l17 { 373 regulator-min-microvolt = <2850000>; 374 regulator-max-microvolt = <2850000>; 375 }; 376}; 377 378&pm8916_vib { 379 status = "okay"; 380}; 381 382&sdhc_1 { 383 status = "okay"; 384}; 385 386&sdhc_2 { 387 status = "okay"; 388 non-removable; 389 390 /* 391 * FIXME: Disable UHS-I modes since tuning fails with: 392 * 393 * sdhci_msm 7864900.sdhci: mmc1: No tuning point found 394 * mmc1: tuning execution failed: -5 395 * mmc1: error -5 whilst initialising SD card 396 * 397 * This is the quirk used on downstream, which suggests this is 398 * a hardware limitation. However, probing a card using DDR50 works 399 * (without tuning), so maybe only tuning is broken? 400 */ 401 no-1-8-v; 402}; 403 404&sound { 405 audio-routing = 406 "AMIC1", "MIC BIAS External1", 407 "AMIC2", "MIC BIAS Internal2", 408 "AMIC3", "MIC BIAS External1"; 409}; 410 411&usb { 412 status = "okay"; 413 extcon = <&muic>, <&muic>; 414}; 415 416&usb_hs_phy { 417 extcon = <&muic>; 418}; 419 420&venus { 421 status = "okay"; 422}; 423 424&venus_mem { 425 status = "okay"; 426}; 427 428&wcnss { 429 status = "okay"; 430}; 431 432&wcnss_iris { 433 compatible = "qcom,wcn3660b"; 434}; 435 436&wcnss_mem { 437 status = "okay"; 438}; 439 440&tlmm { 441 fg_alert_default: fg-alert-default-state { 442 pins = "gpio121"; 443 function = "gpio"; 444 445 drive-strength = <2>; 446 bias-disable; 447 }; 448 449 gpio_keys_default: gpio-keys-default-state { 450 pins = "gpio107", "gpio109"; 451 function = "gpio"; 452 453 drive-strength = <2>; 454 bias-pull-up; 455 }; 456 457 gpio_hall_sensor_default: gpio-hall-sensor-default-state { 458 pins = "gpio52"; 459 function = "gpio"; 460 461 drive-strength = <2>; 462 bias-disable; 463 }; 464 465 imu_irq_default: imu-irq-default-state { 466 pins = "gpio115"; 467 function = "gpio"; 468 469 drive-strength = <2>; 470 bias-disable; 471 }; 472 473 mdss_default: mdss-default-state { 474 pins = "gpio25"; 475 function = "gpio"; 476 477 drive-strength = <8>; 478 bias-disable; 479 }; 480 481 mdss_sleep: mdss-sleep-state { 482 pins = "gpio25"; 483 function = "gpio"; 484 485 drive-strength = <2>; 486 bias-pull-down; 487 }; 488 489 muic_i2c_default: muic-i2c-default-state { 490 pins = "gpio105", "gpio106"; 491 function = "gpio"; 492 493 drive-strength = <2>; 494 bias-disable; 495 }; 496 497 muic_irq_default: muic-irq-default-state { 498 pins = "gpio12"; 499 function = "gpio"; 500 501 drive-strength = <2>; 502 bias-disable; 503 }; 504 505 nfc_default: nfc-default-state { 506 nfc-pins { 507 pins = "gpio20", "gpio49"; 508 function = "gpio"; 509 510 drive-strength = <2>; 511 bias-disable; 512 }; 513 irq-pins { 514 pins = "gpio21"; 515 function = "gpio"; 516 517 drive-strength = <2>; 518 bias-pull-down; 519 }; 520 }; 521 522 nfc_i2c_default: nfc-i2c-default-state { 523 pins = "gpio0", "gpio1"; 524 function = "gpio"; 525 526 drive-strength = <2>; 527 bias-disable; 528 }; 529 530 pmic_int_default: pmic-int-default-state { 531 pins = "gpio62"; 532 function = "gpio"; 533 534 drive-strength = <2>; 535 bias-disable; 536 }; 537 538 tkey_default: tkey-default-state { 539 pins = "gpio98"; 540 function = "gpio"; 541 542 drive-strength = <2>; 543 bias-disable; 544 }; 545 546 tkey_en_default: tkey-en-default-state { 547 pins = "gpio86"; 548 function = "gpio"; 549 550 drive-strength = <2>; 551 bias-disable; 552 }; 553 554 tkey_i2c_default: tkey-i2c-default-state { 555 pins = "gpio16", "gpio17"; 556 function = "gpio"; 557 558 drive-strength = <2>; 559 bias-disable; 560 }; 561 562 tkey_led_en_default: tkey-led-en-default-state { 563 pins = "gpio60"; 564 function = "gpio"; 565 566 drive-strength = <2>; 567 bias-disable; 568 }; 569 570 tsp_en_default: tsp-en-default-state { 571 pins = "gpio73"; 572 function = "gpio"; 573 574 drive-strength = <2>; 575 bias-disable; 576 }; 577 578 tsp_irq_default: tsp-irq-default-state { 579 pins = "gpio13"; 580 function = "gpio"; 581 582 drive-strength = <2>; 583 bias-disable; 584 }; 585}; 586