1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2022, Matti Lehtimäki <matti.lehtimaki@gmail.com> 4 * Copyright (c) 2023, Bryant Mairs <bryant@mai.rs> 5 */ 6 7/dts-v1/; 8 9#include <dt-bindings/input/input.h> 10#include <dt-bindings/power/summit,smb347-charger.h> 11#include "qcom-msm8226.dtsi" 12#include "pm8226.dtsi" 13 14/delete-node/ &adsp_region; 15/delete-node/ &mba_region; 16/delete-node/ &mpss_region; 17/delete-node/ &smem_region; 18 19/ { 20 model = "Samsung Galaxy Tab 4 8.0 Wi-Fi"; 21 compatible = "samsung,milletwifi", "qcom,apq8026"; 22 chassis-type = "tablet"; 23 24 aliases { 25 display0 = &framebuffer0; 26 mmc0 = &sdhc_1; /* SDC1 eMMC slot */ 27 mmc1 = &sdhc_2; /* SDC2 SD card slot */ 28 }; 29 30 chosen { 31 #address-cells = <1>; 32 #size-cells = <1>; 33 ranges; 34 35 stdout-path = "display0"; 36 37 framebuffer0: framebuffer@3200000 { 38 compatible = "simple-framebuffer"; 39 reg = <0x03200000 0x800000>; 40 width = <800>; 41 height = <1280>; 42 stride = <(800 * 3)>; 43 format = "r8g8b8"; 44 }; 45 }; 46 47 gpio-hall-sensor { 48 compatible = "gpio-keys"; 49 50 event-hall-sensor { 51 label = "Cover"; 52 gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; 53 linux,input-type = <EV_SW>; 54 linux,code = <SW_LID>; 55 debounce-interval = <15>; 56 linux,can-disable; 57 wakeup-source; 58 }; 59 }; 60 61 gpio-keys { 62 compatible = "gpio-keys"; 63 autorepeat; 64 65 key-home { 66 label = "Home"; 67 gpios = <&tlmm 108 GPIO_ACTIVE_LOW>; 68 linux,code = <KEY_HOMEPAGE>; 69 debounce-interval = <15>; 70 }; 71 72 key-volume-down { 73 label = "Volume Down"; 74 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; 75 linux,code = <KEY_VOLUMEDOWN>; 76 debounce-interval = <15>; 77 }; 78 79 key-volume-up { 80 label = "Volume Up"; 81 gpios = <&tlmm 106 GPIO_ACTIVE_LOW>; 82 linux,code = <KEY_VOLUMEUP>; 83 debounce-interval = <15>; 84 }; 85 }; 86 87 i2c-backlight { 88 compatible = "i2c-gpio"; 89 sda-gpios = <&tlmm 20 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 90 scl-gpios = <&tlmm 21 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 91 92 pinctrl-0 = <&backlight_i2c_default_state>; 93 pinctrl-names = "default"; 94 95 i2c-gpio,delay-us = <4>; 96 97 #address-cells = <1>; 98 #size-cells = <0>; 99 100 backlight@2c { 101 compatible = "ti,lp8556"; 102 reg = <0x2c>; 103 enable-supply = <®_backlight_vddio>; 104 105 dev-ctrl = /bits/ 8 <0x80>; 106 init-brt = /bits/ 8 <0x3f>; 107 108 /* 109 * Change transition duration: 200ms, Change 110 * transition strength: heavy, PWM hysteresis: 111 * 1-bit w/ 8-bit resolution 112 */ 113 rom-a3h { 114 rom-addr = /bits/ 8 <0xa3>; 115 rom-val = /bits/ 8 <0x5e>; 116 }; 117 118 /* 119 * PWM phase configuration: 3-phase/3 drivers 120 * (0, 120deg, 240deg, -, -, -), 121 * PWM frequency: 9616Hz (10-bit) 122 */ 123 rom-a5h { 124 rom-addr = /bits/ 8 <0xa5>; 125 rom-val = /bits/ 8 <0x34>; 126 }; 127 128 /* 129 * Enable LED drivers 2 & 3, Boot inductor 130 * current limit: 1.5A/2.6A 131 */ 132 rom-a7h { 133 rom-addr = /bits/ 8 <0xa7>; 134 rom-val = /bits/ 8 <0xfa>; 135 }; 136 }; 137 }; 138 139 reg_backlight_vddio: regulator-backlight-vddio { 140 compatible = "regulator-fixed"; 141 regulator-name = "backlight_vddio"; 142 regulator-min-microvolt = <1800000>; 143 regulator-max-microvolt = <1800000>; 144 145 gpio = <&tlmm 74 GPIO_ACTIVE_HIGH>; 146 enable-active-high; 147 148 pinctrl-0 = <&backlight_vddio_default_state>; 149 pinctrl-names = "default"; 150 }; 151 152 reg_tsp_1p8v: regulator-tsp-1p8v { 153 compatible = "regulator-fixed"; 154 regulator-name = "tsp_1p8v"; 155 regulator-min-microvolt = <1800000>; 156 regulator-max-microvolt = <1800000>; 157 158 gpio = <&tlmm 114 GPIO_ACTIVE_HIGH>; 159 enable-active-high; 160 161 pinctrl-0 = <&tsp_en1_default_state>; 162 pinctrl-names = "default"; 163 }; 164 165 reg_tsp_3p3v: regulator-tsp-3p3v { 166 compatible = "regulator-fixed"; 167 regulator-name = "tsp_3p3v"; 168 regulator-min-microvolt = <3300000>; 169 regulator-max-microvolt = <3300000>; 170 171 gpio = <&tlmm 31 GPIO_ACTIVE_HIGH>; 172 enable-active-high; 173 174 pinctrl-0 = <&tsp_en_default_state>; 175 pinctrl-names = "default"; 176 }; 177 178 reserved-memory { 179 #address-cells = <1>; 180 #size-cells = <1>; 181 ranges; 182 183 framebuffer@3200000 { 184 reg = <0x03200000 0x800000>; 185 no-map; 186 }; 187 188 mpss_region: mpss@8400000 { 189 reg = <0x08400000 0x1f00000>; 190 no-map; 191 }; 192 193 mba_region: mba@a300000 { 194 reg = <0x0a300000 0x100000>; 195 no-map; 196 }; 197 198 reserved@cb00000 { 199 reg = <0x0cb00000 0x700000>; 200 no-map; 201 }; 202 203 wcnss_region: wcnss@d200000 { 204 reg = <0x0d200000 0x700000>; 205 no-map; 206 }; 207 208 adsp_region: adsp@d900000 { 209 reg = <0x0d900000 0x1800000>; 210 no-map; 211 }; 212 213 venus@f100000 { 214 reg = <0x0f100000 0x500000>; 215 no-map; 216 }; 217 218 smem_region: smem@fa00000 { 219 reg = <0x0fa00000 0x100000>; 220 no-map; 221 }; 222 223 reserved@fb00000 { 224 reg = <0x0fb00000 0x260000>; 225 no-map; 226 }; 227 228 rfsa@fd60000 { 229 reg = <0x0fd60000 0x20000>; 230 no-map; 231 }; 232 233 rmtfs@fd80000 { 234 compatible = "qcom,rmtfs-mem"; 235 reg = <0x0fd80000 0x180000>; 236 no-map; 237 238 qcom,client-id = <1>; 239 }; 240 }; 241}; 242 243&blsp1_i2c2 { 244 status = "okay"; 245 246 accelerometer@1d { 247 compatible = "st,lis2hh12"; 248 reg = <0x1d>; 249 250 interrupts-extended = <&tlmm 54 IRQ_TYPE_LEVEL_HIGH>; 251 252 pinctrl-0 = <&accel_int_default_state>; 253 pinctrl-names = "default"; 254 255 vdd-supply = <&pm8226_l19>; 256 vddio-supply = <&pm8226_lvs1>; 257 258 mount-matrix = "0", "1", "0", 259 "-1", "0", "0", 260 "0", "0", "1"; 261 262 st,drdy-int-pin = <1>; 263 }; 264}; 265 266&blsp1_i2c3 { 267 status = "okay"; 268 269 charger@6a { 270 compatible = "summit,smb358"; 271 reg = <0x6a>; 272 273 interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_FALLING>; 274 275 pinctrl-0 = <&charger_int_default_state>; 276 pinctrl-names = "default"; 277 278 summit,enable-usb-charging; 279 summit,enable-charge-control = <SMB3XX_CHG_ENABLE_SW>; 280 summit,fast-voltage-threshold-microvolt = <3000000>; 281 summit,chip-temperature-threshold-celsius = <130>; 282 summit,usb-current-limit-microamp = <1500000>; 283 }; 284}; 285 286&blsp1_i2c4 { 287 status = "okay"; 288 289 muic: usb-switch@25 { 290 compatible = "siliconmitus,sm5502-muic"; 291 reg = <0x25>; 292 293 interrupts-extended = <&tlmm 67 IRQ_TYPE_EDGE_FALLING>; 294 295 pinctrl-0 = <&muic_int_default_state>; 296 pinctrl-names = "default"; 297 }; 298}; 299 300&blsp1_i2c5 { 301 status = "okay"; 302 303 touchscreen@48 { 304 compatible = "melfas,mms252", "melfas,mms114"; 305 reg = <0x48>; 306 interrupts-extended = <&tlmm 17 IRQ_TYPE_EDGE_FALLING>; 307 touchscreen-size-x = <800>; 308 touchscreen-size-y = <1280>; 309 avdd-supply = <®_tsp_3p3v>; 310 vdd-supply = <®_tsp_1p8v>; 311 linux,keycodes = <KEY_APPSELECT KEY_BACK>; 312 313 pinctrl-0 = <&tsp_int_rst_default_state>; 314 pinctrl-names = "default"; 315 }; 316}; 317 318&rpm_requests { 319 regulators { 320 compatible = "qcom,rpm-pm8226-regulators"; 321 322 pm8226_s3: s3 { 323 regulator-min-microvolt = <1200000>; 324 regulator-max-microvolt = <1300000>; 325 }; 326 327 pm8226_s4: s4 { 328 regulator-min-microvolt = <1800000>; 329 regulator-max-microvolt = <1800000>; 330 }; 331 332 pm8226_s5: s5 { 333 regulator-min-microvolt = <1150000>; 334 regulator-max-microvolt = <1150000>; 335 }; 336 337 pm8226_l1: l1 { 338 regulator-min-microvolt = <1225000>; 339 regulator-max-microvolt = <1225000>; 340 }; 341 342 pm8226_l2: l2 { 343 regulator-min-microvolt = <1200000>; 344 regulator-max-microvolt = <1200000>; 345 }; 346 347 pm8226_l3: l3 { 348 regulator-min-microvolt = <750000>; 349 regulator-max-microvolt = <1337500>; 350 regulator-always-on; 351 }; 352 353 pm8226_l4: l4 { 354 regulator-min-microvolt = <1200000>; 355 regulator-max-microvolt = <1200000>; 356 }; 357 358 pm8226_l5: l5 { 359 regulator-min-microvolt = <1200000>; 360 regulator-max-microvolt = <1200000>; 361 }; 362 363 pm8226_l6: l6 { 364 regulator-min-microvolt = <1800000>; 365 regulator-max-microvolt = <1800000>; 366 regulator-always-on; 367 }; 368 369 pm8226_l7: l7 { 370 regulator-min-microvolt = <1850000>; 371 regulator-max-microvolt = <1850000>; 372 }; 373 374 pm8226_l8: l8 { 375 regulator-min-microvolt = <1800000>; 376 regulator-max-microvolt = <1800000>; 377 regulator-always-on; 378 }; 379 380 pm8226_l9: l9 { 381 regulator-min-microvolt = <2050000>; 382 regulator-max-microvolt = <2050000>; 383 }; 384 385 pm8226_l10: l10 { 386 regulator-min-microvolt = <1800000>; 387 regulator-max-microvolt = <1800000>; 388 }; 389 390 pm8226_l12: l12 { 391 regulator-min-microvolt = <1800000>; 392 regulator-max-microvolt = <1800000>; 393 }; 394 395 pm8226_l14: l14 { 396 regulator-min-microvolt = <2750000>; 397 regulator-max-microvolt = <2750000>; 398 }; 399 400 pm8226_l15: l15 { 401 regulator-min-microvolt = <1800000>; 402 regulator-max-microvolt = <3300000>; 403 }; 404 405 pm8226_l16: l16 { 406 regulator-min-microvolt = <3000000>; 407 regulator-max-microvolt = <3350000>; 408 }; 409 410 pm8226_l17: l17 { 411 regulator-min-microvolt = <2950000>; 412 regulator-max-microvolt = <2950000>; 413 414 regulator-system-load = <200000>; 415 regulator-allow-set-load; 416 regulator-always-on; 417 }; 418 419 pm8226_l18: l18 { 420 regulator-min-microvolt = <2950000>; 421 regulator-max-microvolt = <2950000>; 422 }; 423 424 pm8226_l19: l19 { 425 regulator-min-microvolt = <2850000>; 426 regulator-max-microvolt = <3000000>; 427 }; 428 429 pm8226_l20: l20 { 430 regulator-min-microvolt = <3075000>; 431 regulator-max-microvolt = <3075000>; 432 }; 433 434 pm8226_l21: l21 { 435 regulator-min-microvolt = <1800000>; 436 regulator-max-microvolt = <2950000>; 437 }; 438 439 pm8226_l22: l22 { 440 regulator-min-microvolt = <1800000>; 441 regulator-max-microvolt = <3000000>; 442 }; 443 444 pm8226_l23: l23 { 445 regulator-min-microvolt = <1800000>; 446 regulator-max-microvolt = <3300000>; 447 }; 448 449 pm8226_l24: l24 { 450 regulator-min-microvolt = <1300000>; 451 regulator-max-microvolt = <1350000>; 452 }; 453 454 pm8226_l25: l25 { 455 regulator-min-microvolt = <1775000>; 456 regulator-max-microvolt = <2125000>; 457 }; 458 459 pm8226_l26: l26 { 460 regulator-min-microvolt = <1225000>; 461 regulator-max-microvolt = <1300000>; 462 }; 463 464 pm8226_l27: l27 { 465 regulator-min-microvolt = <1800000>; 466 regulator-max-microvolt = <1800000>; 467 }; 468 469 pm8226_l28: l28 { 470 regulator-min-microvolt = <1800000>; 471 regulator-max-microvolt = <2950000>; 472 }; 473 474 pm8226_lvs1: lvs1 {}; 475 }; 476}; 477 478&sdhc_1 { 479 vmmc-supply = <&pm8226_l17>; 480 vqmmc-supply = <&pm8226_l6>; 481 482 bus-width = <8>; 483 non-removable; 484 485 status = "okay"; 486}; 487 488&sdhc_2 { 489 vmmc-supply = <&pm8226_l18>; 490 vqmmc-supply = <&pm8226_l21>; 491 492 bus-width = <4>; 493 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; 494 495 pinctrl-0 = <&sdhc2_default_state>, <&sdc2_cd_default_state>; 496 pinctrl-names = "default"; 497 498 status = "okay"; 499}; 500 501&tlmm { 502 accel_int_default_state: accel-int-default-state { 503 pins = "gpio54"; 504 function = "gpio"; 505 drive-strength = <2>; 506 bias-disable; 507 }; 508 509 backlight_i2c_default_state: backlight-i2c-default-state { 510 pins = "gpio20", "gpio21"; 511 function = "gpio"; 512 drive-strength = <2>; 513 bias-disable; 514 }; 515 516 backlight_vddio_default_state: backlight-vddio-default-state { 517 pins = "gpio74"; 518 function = "gpio"; 519 drive-strength = <2>; 520 bias-disable; 521 }; 522 523 charger_int_default_state: charger-int-default-state { 524 pins = "gpio115"; 525 function = "gpio"; 526 drive-strength = <2>; 527 bias-disable; 528 }; 529 530 muic_int_default_state: muic-int-default-state { 531 pins = "gpio67"; 532 function = "gpio"; 533 drive-strength = <2>; 534 bias-disable; 535 }; 536 537 sdc2_cd_default_state: sdc2-cd-default-state { 538 pins = "gpio38"; 539 function = "gpio"; 540 drive-strength = <2>; 541 bias-disable; 542 }; 543 544 tsp_en_default_state: tsp-en-default-state { 545 pins = "gpio31"; 546 function = "gpio"; 547 drive-strength = <2>; 548 bias-disable; 549 }; 550 551 tsp_en1_default_state: tsp-en1-default-state { 552 pins = "gpio114"; 553 function = "gpio"; 554 drive-strength = <2>; 555 bias-disable; 556 }; 557 558 tsp_int_rst_default_state: tsp-int-rst-default-state { 559 pins = "gpio17"; 560 function = "gpio"; 561 drive-strength = <10>; 562 bias-pull-up; 563 }; 564}; 565 566&usb { 567 extcon = <&muic>, <&muic>; 568 status = "okay"; 569}; 570 571&usb_hs_phy { 572 extcon = <&muic>; 573 v1p8-supply = <&pm8226_l10>; 574 v3p3-supply = <&pm8226_l20>; 575}; 576