| 1 |
// SPDX-License-Identifier: GPL-2.0-only |
| 2 |
|
| 3 |
/dts-v1/; |
| 4 |
|
| 5 |
#include "msm8916-pm8916.dtsi" |
| 6 |
#include "msm8916-modem-qdsp6.dtsi" |
| 7 |
|
| 8 |
#include <dt-bindings/gpio/gpio.h> |
| 9 |
#include <dt-bindings/input/input.h> |
| 10 |
#include <dt-bindings/leds/common.h> |
| 11 |
|
| 12 |
/ { |
| 13 |
model = "Alcatel OneTouch Idol 3 (4.7)"; |
| 14 |
compatible = "alcatel,idol347", "qcom,msm8916"; |
| 15 |
chassis-type = "handset"; |
| 16 |
|
| 17 |
aliases { |
| 18 |
mmc0 = &sdhc_1; /* eMMC */ |
| 19 |
mmc1 = &sdhc_2; /* SD card */ |
| 20 |
serial0 = &blsp_uart2; |
| 21 |
}; |
| 22 |
|
| 23 |
chosen { |
| 24 |
stdout-path = "serial0"; |
| 25 |
}; |
| 26 |
|
| 27 |
reserved-memory { |
| 28 |
/delete-node/ reserved@86680000; |
| 29 |
/delete-node/ rmtfs@86700000; |
| 30 |
|
| 31 |
rmtfs: rmtfs@86680000 { |
| 32 |
compatible = "qcom,rmtfs-mem"; |
| 33 |
reg = <0x0 0x86680000 0x0 0x160000>; |
| 34 |
no-map; |
| 35 |
|
| 36 |
qcom,client-id = <1>; |
| 37 |
}; |
| 38 |
}; |
| 39 |
|
| 40 |
gpio-keys { |
| 41 |
compatible = "gpio-keys"; |
| 42 |
|
| 43 |
pinctrl-names = "default"; |
| 44 |
pinctrl-0 = <&gpio_keys_default>; |
| 45 |
|
| 46 |
label = "GPIO Buttons"; |
| 47 |
|
| 48 |
button-volume-up { |
| 49 |
label = "Volume Up"; |
| 50 |
gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; |
| 51 |
linux,code = <KEY_VOLUMEUP>; |
| 52 |
}; |
| 53 |
}; |
| 54 |
|
| 55 |
gpio-leds { |
| 56 |
compatible = "gpio-leds"; |
| 57 |
|
| 58 |
pinctrl-names = "default"; |
| 59 |
pinctrl-0 = <&gpio_leds_default>; |
| 60 |
|
| 61 |
led-0 { |
| 62 |
gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; |
| 63 |
linux,default-trigger = "torch"; |
| 64 |
function = LED_FUNCTION_TORCH; |
| 65 |
}; |
| 66 |
}; |
| 67 |
|
| 68 |
reg_headphones_avdd: regulator-headphones-avdd { |
| 69 |
compatible = "regulator-fixed"; |
| 70 |
regulator-name = "headphones_avdd"; |
| 71 |
regulator-min-microvolt = <1800000>; |
| 72 |
regulator-max-microvolt = <1800000>; |
| 73 |
gpio = <&tlmm 121 GPIO_ACTIVE_HIGH>; |
| 74 |
enable-active-high; |
| 75 |
pinctrl-0 = <&headphones_avdd_default>; |
| 76 |
pinctrl-names = "default"; |
| 77 |
}; |
| 78 |
|
| 79 |
usb_id: usb-id { |
| 80 |
compatible = "linux,extcon-usb-gpio"; |
| 81 |
id-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>; |
| 82 |
pinctrl-names = "default"; |
| 83 |
pinctrl-0 = <&usb_id_default>; |
| 84 |
}; |
| 85 |
}; |
| 86 |
|
| 87 |
&blsp_i2c3 { |
| 88 |
status = "okay"; |
| 89 |
|
| 90 |
headphones: audio-codec@10 { |
| 91 |
compatible = "asahi-kasei,ak4375"; |
| 92 |
reg = <0x10>; |
| 93 |
avdd-supply = <®_headphones_avdd>; |
| 94 |
tvdd-supply = <&pm8916_l6>; |
| 95 |
pdn-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>; |
| 96 |
pinctrl-0 = <&headphones_pdn_default>; |
| 97 |
pinctrl-names = "default"; |
| 98 |
#sound-dai-cells = <0>; |
| 99 |
}; |
| 100 |
|
| 101 |
speaker_codec_top: audio-codec@34 { |
| 102 |
compatible = "nxp,tfa9897"; |
| 103 |
reg = <0x34>; |
| 104 |
vddd-supply = <&pm8916_l6>; |
| 105 |
rcv-gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; |
| 106 |
pinctrl-0 = <&speaker_top_default>; |
| 107 |
pinctrl-names = "default"; |
| 108 |
sound-name-prefix = "Speaker Top"; |
| 109 |
#sound-dai-cells = <0>; |
| 110 |
}; |
| 111 |
|
| 112 |
speaker_codec_bottom: audio-codec@36 { |
| 113 |
compatible = "nxp,tfa9897"; |
| 114 |
reg = <0x36>; |
| 115 |
vddd-supply = <&pm8916_l6>; |
| 116 |
rcv-gpios = <&tlmm 111 GPIO_ACTIVE_HIGH>; |
| 117 |
pinctrl-0 = <&speaker_bottom_default>; |
| 118 |
pinctrl-names = "default"; |
| 119 |
sound-name-prefix = "Speaker Bottom"; |
| 120 |
#sound-dai-cells = <0>; |
| 121 |
}; |
| 122 |
}; |
| 123 |
|
| 124 |
&blsp_i2c4 { |
| 125 |
status = "okay"; |
| 126 |
|
| 127 |
touchscreen@26 { |
| 128 |
compatible = "mstar,msg2638"; |
| 129 |
reg = <0x26>; |
| 130 |
interrupt-parent = <&tlmm>; |
| 131 |
interrupts = <13 IRQ_TYPE_EDGE_FALLING>; |
| 132 |
reset-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; |
| 133 |
pinctrl-names = "default"; |
| 134 |
pinctrl-0 = <&ts_int_reset_default>; |
| 135 |
vdd-supply = <&pm8916_l17>; |
| 136 |
vddio-supply = <&pm8916_l5>; |
| 137 |
touchscreen-size-x = <2048>; |
| 138 |
touchscreen-size-y = <2048>; |
| 139 |
}; |
| 140 |
}; |
| 141 |
|
| 142 |
&blsp_i2c5 { |
| 143 |
status = "okay"; |
| 144 |
|
| 145 |
magnetometer@c { |
| 146 |
compatible = "asahi-kasei,ak09911"; |
| 147 |
reg = <0x0c>; |
| 148 |
vdd-supply = <&pm8916_l17>; |
| 149 |
vid-supply = <&pm8916_l6>; |
| 150 |
reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>; |
| 151 |
pinctrl-names = "default"; |
| 152 |
pinctrl-0 = <&mag_reset_default>; |
| 153 |
mount-matrix = "0", "1", "0", |
| 154 |
"-1", "0", "0", |
| 155 |
"0", "0", "1"; |
| 156 |
}; |
| 157 |
|
| 158 |
accelerometer@f { |
| 159 |
compatible = "kionix,kxtj21009"; |
| 160 |
reg = <0x0f>; |
| 161 |
vdd-supply = <&pm8916_l17>; |
| 162 |
vddio-supply = <&pm8916_l6>; |
| 163 |
interrupt-parent = <&tlmm>; |
| 164 |
interrupts = <31 IRQ_TYPE_EDGE_RISING>; |
| 165 |
pinctrl-names = "default"; |
| 166 |
pinctrl-0 = <&accel_int_default>; |
| 167 |
mount-matrix = "-1", "0", "0", |
| 168 |
"0", "1", "0", |
| 169 |
"0", "0", "-1"; |
| 170 |
}; |
| 171 |
|
| 172 |
proximity@48 { |
| 173 |
compatible = "sensortek,stk3310"; |
| 174 |
reg = <0x48>; |
| 175 |
interrupt-parent = <&tlmm>; |
| 176 |
interrupts = <12 IRQ_TYPE_EDGE_FALLING>; |
| 177 |
pinctrl-names = "default"; |
| 178 |
pinctrl-0 = <&proximity_int_default>; |
| 179 |
}; |
| 180 |
|
| 181 |
gyroscope@68 { |
| 182 |
compatible = "bosch,bmg160"; |
| 183 |
reg = <0x68>; |
| 184 |
vdd-supply = <&pm8916_l17>; |
| 185 |
vddio-supply = <&pm8916_l6>; |
| 186 |
interrupt-parent = <&tlmm>; |
| 187 |
interrupts = <97 IRQ_TYPE_EDGE_RISING>, |
| 188 |
<98 IRQ_TYPE_EDGE_RISING>; |
| 189 |
pinctrl-names = "default"; |
| 190 |
pinctrl-0 = <&gyro_int_default>; |
| 191 |
}; |
| 192 |
}; |
| 193 |
|
| 194 |
&blsp_i2c6 { |
| 195 |
status = "okay"; |
| 196 |
|
| 197 |
led-controller@68 { |
| 198 |
compatible = "si-en,sn3190"; |
| 199 |
reg = <0x68>; |
| 200 |
shutdown-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; |
| 201 |
pinctrl-names = "default"; |
| 202 |
pinctrl-0 = <&led_enable_default &led_shutdown_default>; |
| 203 |
#address-cells = <1>; |
| 204 |
#size-cells = <0>; |
| 205 |
|
| 206 |
led@1 { |
| 207 |
reg = <1>; |
| 208 |
led-max-microamp = <5000>; |
| 209 |
function = LED_FUNCTION_INDICATOR; |
| 210 |
color = <LED_COLOR_ID_WHITE>; |
| 211 |
}; |
| 212 |
}; |
| 213 |
}; |
| 214 |
|
| 215 |
&blsp_uart2 { |
| 216 |
status = "okay"; |
| 217 |
pinctrl-0 = <&blsp_uart2_console_default>; |
| 218 |
pinctrl-1 = <&blsp_uart2_console_sleep>; |
| 219 |
pinctrl-names = "default", "sleep"; |
| 220 |
}; |
| 221 |
|
| 222 |
&mpss_mem { |
| 223 |
reg = <0x0 0x86800000 0x0 0x5000000>; |
| 224 |
}; |
| 225 |
|
| 226 |
&pm8916_codec { |
| 227 |
qcom,micbias1-ext-cap; |
| 228 |
qcom,micbias-lvl = <2800>; |
| 229 |
qcom,mbhc-vthreshold-low = <75 100 120 180 500>; |
| 230 |
qcom,mbhc-vthreshold-high = <75 100 120 180 500>; |
| 231 |
qcom,hphl-jack-type-normally-open; |
| 232 |
}; |
| 233 |
|
| 234 |
&pm8916_resin { |
| 235 |
status = "okay"; |
| 236 |
linux,code = <KEY_VOLUMEDOWN>; |
| 237 |
}; |
| 238 |
|
| 239 |
&pm8916_rpm_regulators { |
| 240 |
pm8916_l17: l17 { |
| 241 |
regulator-min-microvolt = <2850000>; |
| 242 |
regulator-max-microvolt = <2850000>; |
| 243 |
}; |
| 244 |
}; |
| 245 |
|
| 246 |
&pm8916_vib { |
| 247 |
status = "okay"; |
| 248 |
}; |
| 249 |
|
| 250 |
&q6afedai { |
| 251 |
dai@18 { |
| 252 |
reg = <SECONDARY_MI2S_RX>; |
| 253 |
qcom,sd-lines = <0>; |
| 254 |
}; |
| 255 |
dai@22 { |
| 256 |
reg = <QUATERNARY_MI2S_RX>; |
| 257 |
qcom,sd-lines = <0>; |
| 258 |
}; |
| 259 |
}; |
| 260 |
|
| 261 |
&sdhc_1 { |
| 262 |
status = "okay"; |
| 263 |
}; |
| 264 |
|
| 265 |
&sdhc_2 { |
| 266 |
status = "okay"; |
| 267 |
|
| 268 |
pinctrl-names = "default", "sleep"; |
| 269 |
pinctrl-0 = <&sdc2_default &sdc2_cd_default>; |
| 270 |
pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; |
| 271 |
|
| 272 |
cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; |
| 273 |
}; |
| 274 |
|
| 275 |
&sound { |
| 276 |
/* Add pin switches for speakers to allow disabling them individually */ |
| 277 |
model = "alcatel-idol3"; |
| 278 |
widgets = |
| 279 |
"Speaker", "Speaker Top", |
| 280 |
"Speaker", "Speaker Bottom"; |
| 281 |
pin-switches = "Speaker Top", "Speaker Bottom"; |
| 282 |
audio-routing = |
| 283 |
"Speaker Top", "Speaker Top OUT", |
| 284 |
"Speaker Bottom", "Speaker Bottom OUT", |
| 285 |
"AMIC1", "MIC BIAS External1", |
| 286 |
"AMIC2", "MIC BIAS Internal2", |
| 287 |
"AMIC3", "MIC BIAS External1"; |
| 288 |
|
| 289 |
pinctrl-0 = <&cdc_pdm_default &pri_mi2s_default &pri_mi2s_ws_default &sec_mi2s_default>; |
| 290 |
pinctrl-1 = <&cdc_pdm_sleep &pri_mi2s_sleep &pri_mi2s_ws_sleep &sec_mi2s_sleep>; |
| 291 |
pinctrl-names = "default", "sleep"; |
| 292 |
|
| 293 |
sound_link_backend2: backend2-dai-link { |
| 294 |
link-name = "Quaternary MI2S"; |
| 295 |
|
| 296 |
cpu { |
| 297 |
sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; |
| 298 |
}; |
| 299 |
platform { |
| 300 |
sound-dai = <&q6routing>; |
| 301 |
}; |
| 302 |
codec { |
| 303 |
sound-dai = <&speaker_codec_top>, <&speaker_codec_bottom>; |
| 304 |
}; |
| 305 |
}; |
| 306 |
}; |
| 307 |
|
| 308 |
&sound_link_backend0 { |
| 309 |
/* Primary MI2S is not used, replace with Secondary MI2S for headphones */ |
| 310 |
link-name = "Secondary MI2S"; |
| 311 |
|
| 312 |
cpu { |
| 313 |
sound-dai = <&q6afedai SECONDARY_MI2S_RX>; |
| 314 |
}; |
| 315 |
platform { |
| 316 |
sound-dai = <&q6routing>; |
| 317 |
}; |
| 318 |
codec { |
| 319 |
sound-dai = <&headphones>; |
| 320 |
}; |
| 321 |
}; |
| 322 |
|
| 323 |
&usb { |
| 324 |
status = "okay"; |
| 325 |
extcon = <&usb_id>, <&usb_id>; |
| 326 |
}; |
| 327 |
|
| 328 |
&usb_hs_phy { |
| 329 |
extcon = <&usb_id>; |
| 330 |
}; |
| 331 |
|
| 332 |
&venus { |
| 333 |
status = "okay"; |
| 334 |
}; |
| 335 |
|
| 336 |
&venus_mem { |
| 337 |
status = "okay"; |
| 338 |
}; |
| 339 |
|
| 340 |
&wcnss { |
| 341 |
status = "okay"; |
| 342 |
}; |
| 343 |
|
| 344 |
&wcnss_iris { |
| 345 |
compatible = "qcom,wcn3620"; |
| 346 |
}; |
| 347 |
|
| 348 |
&wcnss_mem { |
| 349 |
status = "okay"; |
| 350 |
}; |
| 351 |
|
| 352 |
/* Only some of the pins are used */ |
| 353 |
&pri_mi2s_default { |
| 354 |
pins = "gpio113", "gpio115"; |
| 355 |
}; |
| 356 |
|
| 357 |
&pri_mi2s_sleep { |
| 358 |
pins = "gpio113", "gpio115"; |
| 359 |
}; |
| 360 |
|
| 361 |
&tlmm { |
| 362 |
accel_int_default: accel-int-default-state { |
| 363 |
pins = "gpio31"; |
| 364 |
function = "gpio"; |
| 365 |
|
| 366 |
drive-strength = <2>; |
| 367 |
bias-disable; |
| 368 |
}; |
| 369 |
|
| 370 |
gpio_keys_default: gpio-keys-default-state { |
| 371 |
pins = "gpio107"; |
| 372 |
function = "gpio"; |
| 373 |
|
| 374 |
drive-strength = <2>; |
| 375 |
bias-pull-up; |
| 376 |
}; |
| 377 |
|
| 378 |
gpio_leds_default: gpio-leds-default-state { |
| 379 |
pins = "gpio32"; |
| 380 |
function = "gpio"; |
| 381 |
|
| 382 |
drive-strength = <2>; |
| 383 |
bias-disable; |
| 384 |
}; |
| 385 |
|
| 386 |
gyro_int_default: gyro-int-default-state { |
| 387 |
pins = "gpio97", "gpio98"; |
| 388 |
function = "gpio"; |
| 389 |
|
| 390 |
drive-strength = <2>; |
| 391 |
bias-disable; |
| 392 |
}; |
| 393 |
|
| 394 |
headphones_avdd_default: headphones-avdd-default-state { |
| 395 |
pins = "gpio121"; |
| 396 |
function = "gpio"; |
| 397 |
drive-strength = <2>; |
| 398 |
bias-disable; |
| 399 |
}; |
| 400 |
|
| 401 |
headphones_pdn_default: headphones-pdn-default-state { |
| 402 |
pins = "gpio114"; |
| 403 |
function = "gpio"; |
| 404 |
drive-strength = <2>; |
| 405 |
bias-disable; |
| 406 |
}; |
| 407 |
|
| 408 |
/* |
| 409 |
* The OEM wired an additional GPIO to be asserted so that |
| 410 |
* the si-en,sn3190 LED IC works. Since this GPIO is not |
| 411 |
* part of the IC datasheet nor supported by the driver, |
| 412 |
* force it asserted here. |
| 413 |
*/ |
| 414 |
led_enable_default: led-enable-default-state { |
| 415 |
pins = "gpio102"; |
| 416 |
function = "gpio"; |
| 417 |
|
| 418 |
drive-strength = <2>; |
| 419 |
bias-disable; |
| 420 |
output-high; |
| 421 |
}; |
| 422 |
|
| 423 |
led_shutdown_default: led-shutdown-default-state { |
| 424 |
pins = "gpio89"; |
| 425 |
function = "gpio"; |
| 426 |
|
| 427 |
drive-strength = <2>; |
| 428 |
bias-disable; |
| 429 |
}; |
| 430 |
|
| 431 |
mag_reset_default: mag-reset-default-state { |
| 432 |
pins = "gpio8"; |
| 433 |
function = "gpio"; |
| 434 |
|
| 435 |
drive-strength = <2>; |
| 436 |
bias-disable; |
| 437 |
}; |
| 438 |
|
| 439 |
proximity_int_default: proximity-int-default-state { |
| 440 |
pins = "gpio12"; |
| 441 |
function = "gpio"; |
| 442 |
|
| 443 |
drive-strength = <6>; |
| 444 |
bias-pull-up; |
| 445 |
}; |
| 446 |
|
| 447 |
sdc2_cd_default: sdc2-cd-default-state { |
| 448 |
pins = "gpio38"; |
| 449 |
function = "gpio"; |
| 450 |
drive-strength = <2>; |
| 451 |
bias-disable; |
| 452 |
}; |
| 453 |
|
| 454 |
speaker_bottom_default: speaker-bottom-default-state { |
| 455 |
pins = "gpio111"; |
| 456 |
function = "gpio"; |
| 457 |
drive-strength = <2>; |
| 458 |
bias-disable; |
| 459 |
}; |
| 460 |
|
| 461 |
speaker_top_default: speaker-top-default-state { |
| 462 |
pins = "gpio50"; |
| 463 |
function = "gpio"; |
| 464 |
drive-strength = <2>; |
| 465 |
bias-disable; |
| 466 |
}; |
| 467 |
|
| 468 |
ts_int_reset_default: ts-int-reset-default-state { |
| 469 |
pins = "gpio13", "gpio100"; |
| 470 |
function = "gpio"; |
| 471 |
|
| 472 |
drive-strength = <2>; |
| 473 |
bias-disable; |
| 474 |
}; |
| 475 |
|
| 476 |
usb_id_default: usb-id-default-state { |
| 477 |
pins = "gpio69"; |
| 478 |
function = "gpio"; |
| 479 |
|
| 480 |
drive-strength = <8>; |
| 481 |
bias-pull-up; |
| 482 |
}; |
| 483 |
}; |