| 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 |
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> |
| 12 |
|
| 13 |
/ { |
| 14 |
model = "BQ Aquaris X5 (Longcheer L8910)"; |
| 15 |
compatible = "longcheer,l8910", "qcom,msm8916"; |
| 16 |
chassis-type = "handset"; |
| 17 |
|
| 18 |
aliases { |
| 19 |
mmc0 = &sdhc_1; /* eMMC */ |
| 20 |
mmc1 = &sdhc_2; /* SD card */ |
| 21 |
serial0 = &blsp_uart2; |
| 22 |
}; |
| 23 |
|
| 24 |
chosen { |
| 25 |
stdout-path = "serial0"; |
| 26 |
}; |
| 27 |
|
| 28 |
speaker_amp: audio-amplifier { |
| 29 |
compatible = "awinic,aw8738"; |
| 30 |
mode-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>; |
| 31 |
awinic,mode = <5>; |
| 32 |
sound-name-prefix = "Speaker Amp"; |
| 33 |
|
| 34 |
pinctrl-0 = <&spk_ext_pa_default>; |
| 35 |
pinctrl-names = "default"; |
| 36 |
}; |
| 37 |
|
| 38 |
flash-led-controller { |
| 39 |
compatible = "ocs,ocp8110"; |
| 40 |
enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>; |
| 41 |
flash-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>; |
| 42 |
|
| 43 |
pinctrl-0 = <&camera_front_flash_default>; |
| 44 |
pinctrl-names = "default"; |
| 45 |
|
| 46 |
flash_led: led { |
| 47 |
function = LED_FUNCTION_FLASH; |
| 48 |
color = <LED_COLOR_ID_WHITE>; |
| 49 |
flash-max-timeout-us = <250000>; |
| 50 |
}; |
| 51 |
}; |
| 52 |
|
| 53 |
gpio-keys { |
| 54 |
compatible = "gpio-keys"; |
| 55 |
|
| 56 |
pinctrl-names = "default"; |
| 57 |
pinctrl-0 = <&gpio_keys_default>; |
| 58 |
|
| 59 |
label = "GPIO Buttons"; |
| 60 |
|
| 61 |
button-volume-up { |
| 62 |
label = "Volume Up"; |
| 63 |
gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; |
| 64 |
linux,code = <KEY_VOLUMEUP>; |
| 65 |
}; |
| 66 |
}; |
| 67 |
|
| 68 |
leds { |
| 69 |
compatible = "gpio-leds"; |
| 70 |
|
| 71 |
led-0 { |
| 72 |
gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>; |
| 73 |
color = <LED_COLOR_ID_WHITE>; |
| 74 |
default-state = "off"; |
| 75 |
function = LED_FUNCTION_KBD_BACKLIGHT; |
| 76 |
|
| 77 |
pinctrl-names = "default"; |
| 78 |
pinctrl-0 = <&button_backlight_default>; |
| 79 |
}; |
| 80 |
}; |
| 81 |
|
| 82 |
reg_ts_vcca: regulator-vcca-ts { |
| 83 |
compatible = "regulator-fixed"; |
| 84 |
regulator-name = "regulator-vcca-ts"; |
| 85 |
regulator-min-microvolt = <3300000>; |
| 86 |
regulator-max-microvolt = <3300000>; |
| 87 |
|
| 88 |
gpio = <&tlmm 78 GPIO_ACTIVE_HIGH>; |
| 89 |
enable-active-high; |
| 90 |
|
| 91 |
pinctrl-0 = <&ts_vcca_default>; |
| 92 |
pinctrl-names = "default"; |
| 93 |
}; |
| 94 |
|
| 95 |
usb_id: usb-id { |
| 96 |
compatible = "linux,extcon-usb-gpio"; |
| 97 |
id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; |
| 98 |
pinctrl-names = "default"; |
| 99 |
pinctrl-0 = <&usb_id_default>; |
| 100 |
}; |
| 101 |
}; |
| 102 |
|
| 103 |
&blsp_i2c2 { |
| 104 |
status = "okay"; |
| 105 |
|
| 106 |
led-controller@30 { |
| 107 |
compatible = "kinetic,ktd2026"; |
| 108 |
reg = <0x30>; |
| 109 |
#address-cells = <1>; |
| 110 |
#size-cells = <0>; |
| 111 |
|
| 112 |
vin-supply = <&pm8916_l17>; |
| 113 |
vio-supply = <&pm8916_l6>; |
| 114 |
|
| 115 |
pinctrl-0 = <&status_led_default>; |
| 116 |
pinctrl-names = "default"; |
| 117 |
|
| 118 |
multi-led { |
| 119 |
color = <LED_COLOR_ID_RGB>; |
| 120 |
function = LED_FUNCTION_STATUS; |
| 121 |
|
| 122 |
#address-cells = <1>; |
| 123 |
#size-cells = <0>; |
| 124 |
|
| 125 |
led@0 { |
| 126 |
reg = <0>; |
| 127 |
color = <LED_COLOR_ID_RED>; |
| 128 |
}; |
| 129 |
|
| 130 |
led@1 { |
| 131 |
reg = <1>; |
| 132 |
color = <LED_COLOR_ID_GREEN>; |
| 133 |
}; |
| 134 |
|
| 135 |
led@2 { |
| 136 |
reg = <2>; |
| 137 |
color = <LED_COLOR_ID_BLUE>; |
| 138 |
}; |
| 139 |
}; |
| 140 |
}; |
| 141 |
|
| 142 |
flash-led-controller@53 { |
| 143 |
compatible = "silergy,sy7802"; |
| 144 |
reg = <0x53>; |
| 145 |
|
| 146 |
enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>; |
| 147 |
|
| 148 |
pinctrl-0 = <&camera_rear_flash_default>; |
| 149 |
pinctrl-names = "default"; |
| 150 |
|
| 151 |
#address-cells = <1>; |
| 152 |
#size-cells = <0>; |
| 153 |
|
| 154 |
led@0 { |
| 155 |
reg = <0>; |
| 156 |
function = LED_FUNCTION_FLASH; |
| 157 |
color = <LED_COLOR_ID_WHITE>; |
| 158 |
led-sources = <0>, <1>; |
| 159 |
}; |
| 160 |
}; |
| 161 |
}; |
| 162 |
|
| 163 |
&blsp_i2c3 { |
| 164 |
status = "okay"; |
| 165 |
|
| 166 |
magnetometer@d { |
| 167 |
compatible = "asahi-kasei,ak09911"; |
| 168 |
reg = <0x0d>; |
| 169 |
|
| 170 |
vdd-supply = <&pm8916_l17>; |
| 171 |
vid-supply = <&pm8916_l6>; |
| 172 |
|
| 173 |
reset-gpios = <&tlmm 111 GPIO_ACTIVE_LOW>; |
| 174 |
|
| 175 |
pinctrl-names = "default"; |
| 176 |
pinctrl-0 = <&mag_reset_default>; |
| 177 |
}; |
| 178 |
|
| 179 |
imu@68 { |
| 180 |
compatible = "bosch,bmi160"; |
| 181 |
reg = <0x68>; |
| 182 |
|
| 183 |
vdd-supply = <&pm8916_l17>; |
| 184 |
vddio-supply = <&pm8916_l6>; |
| 185 |
|
| 186 |
mount-matrix = "0", "1", "0", |
| 187 |
"-1", "0", "0", |
| 188 |
"0", "0", "1"; |
| 189 |
}; |
| 190 |
}; |
| 191 |
|
| 192 |
&blsp_i2c5 { |
| 193 |
status = "okay"; |
| 194 |
|
| 195 |
touchscreen@48 { |
| 196 |
compatible = "himax,hx8527e", "himax,hx852es"; |
| 197 |
reg = <0x48>; |
| 198 |
|
| 199 |
interrupts-extended = <&tlmm 13 IRQ_TYPE_LEVEL_LOW>; |
| 200 |
reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; |
| 201 |
vcca-supply = <®_ts_vcca>; |
| 202 |
vccd-supply = <&pm8916_l6>; |
| 203 |
|
| 204 |
pinctrl-0 = <&ts_int_reset_default>; |
| 205 |
pinctrl-names = "default"; |
| 206 |
|
| 207 |
linux,keycodes = <KEY_BACK KEY_HOMEPAGE KEY_APPSELECT>; |
| 208 |
}; |
| 209 |
}; |
| 210 |
|
| 211 |
&blsp_uart2 { |
| 212 |
status = "okay"; |
| 213 |
pinctrl-0 = <&blsp_uart2_console_default>; |
| 214 |
pinctrl-1 = <&blsp_uart2_console_sleep>; |
| 215 |
pinctrl-names = "default", "sleep"; |
| 216 |
}; |
| 217 |
|
| 218 |
&mpss_mem { |
| 219 |
reg = <0x0 0x86800000 0x0 0x5000000>; |
| 220 |
}; |
| 221 |
|
| 222 |
&pm8916_codec { |
| 223 |
qcom,micbias-lvl = <2800>; |
| 224 |
qcom,mbhc-vthreshold-low = <75 100 120 180 500>; |
| 225 |
qcom,mbhc-vthreshold-high = <75 100 120 180 500>; |
| 226 |
qcom,hphl-jack-type-normally-open; |
| 227 |
}; |
| 228 |
|
| 229 |
&pm8916_gpios { |
| 230 |
status_led_default: status-led-default-state { |
| 231 |
pins = "gpio3"; |
| 232 |
function = PMIC_GPIO_FUNC_NORMAL; |
| 233 |
power-source = <PM8916_GPIO_VPH>; |
| 234 |
bias-disable; |
| 235 |
output-high; |
| 236 |
}; |
| 237 |
}; |
| 238 |
|
| 239 |
&pm8916_resin { |
| 240 |
status = "okay"; |
| 241 |
linux,code = <KEY_VOLUMEDOWN>; |
| 242 |
}; |
| 243 |
|
| 244 |
&pm8916_rpm_regulators { |
| 245 |
pm8916_l17: l17 { |
| 246 |
regulator-min-microvolt = <2850000>; |
| 247 |
regulator-max-microvolt = <2850000>; |
| 248 |
}; |
| 249 |
}; |
| 250 |
|
| 251 |
&pm8916_vib { |
| 252 |
status = "okay"; |
| 253 |
}; |
| 254 |
|
| 255 |
&sdhc_1 { |
| 256 |
status = "okay"; |
| 257 |
}; |
| 258 |
|
| 259 |
&sdhc_2 { |
| 260 |
status = "okay"; |
| 261 |
|
| 262 |
pinctrl-names = "default", "sleep"; |
| 263 |
pinctrl-0 = <&sdc2_default &sdc2_cd_default>; |
| 264 |
pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; |
| 265 |
|
| 266 |
cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; |
| 267 |
}; |
| 268 |
|
| 269 |
&sound { |
| 270 |
/* |
| 271 |
* Provide widgets/pin-switches to allow enabling speaker separately. |
| 272 |
* The hardware does not provide a way to disable the output via the |
| 273 |
* headphone jack when the speaker is enabled. |
| 274 |
*/ |
| 275 |
model = "bq-paella"; |
| 276 |
widgets = |
| 277 |
"Speaker", "Speaker", |
| 278 |
"Headphone", "Headphones"; |
| 279 |
pin-switches = "Speaker"; |
| 280 |
audio-routing = |
| 281 |
"Speaker", "Speaker Amp OUT", |
| 282 |
"Speaker Amp IN", "HPH_R", |
| 283 |
"Headphones", "HPH_L", |
| 284 |
"Headphones", "HPH_R", |
| 285 |
"AMIC1", "MIC BIAS External1", |
| 286 |
"AMIC2", "MIC BIAS Internal2", |
| 287 |
"AMIC3", "MIC BIAS External1"; |
| 288 |
aux-devs = <&speaker_amp>; |
| 289 |
}; |
| 290 |
|
| 291 |
&usb { |
| 292 |
status = "okay"; |
| 293 |
extcon = <&usb_id>, <&usb_id>; |
| 294 |
}; |
| 295 |
|
| 296 |
&usb_hs_phy { |
| 297 |
extcon = <&usb_id>; |
| 298 |
}; |
| 299 |
|
| 300 |
&venus { |
| 301 |
status = "okay"; |
| 302 |
}; |
| 303 |
|
| 304 |
&venus_mem { |
| 305 |
status = "okay"; |
| 306 |
}; |
| 307 |
|
| 308 |
&wcnss { |
| 309 |
status = "okay"; |
| 310 |
}; |
| 311 |
|
| 312 |
&wcnss_iris { |
| 313 |
compatible = "qcom,wcn3620"; |
| 314 |
}; |
| 315 |
|
| 316 |
&wcnss_mem { |
| 317 |
status = "okay"; |
| 318 |
}; |
| 319 |
|
| 320 |
&tlmm { |
| 321 |
button_backlight_default: button-backlight-default-state { |
| 322 |
pins = "gpio17"; |
| 323 |
function = "gpio"; |
| 324 |
|
| 325 |
drive-strength = <2>; |
| 326 |
bias-disable; |
| 327 |
}; |
| 328 |
|
| 329 |
camera_front_flash_default: camera-front-flash-default-state { |
| 330 |
pins = "gpio49", "gpio119"; |
| 331 |
function = "gpio"; |
| 332 |
drive-strength = <2>; |
| 333 |
bias-disable; |
| 334 |
}; |
| 335 |
|
| 336 |
camera_rear_flash_default: camera-rear-flash-default-state { |
| 337 |
pins = "gpio9", "gpio16", "gpio117"; |
| 338 |
function = "gpio"; |
| 339 |
drive-strength = <2>; |
| 340 |
bias-disable; |
| 341 |
}; |
| 342 |
|
| 343 |
gpio_keys_default: gpio-keys-default-state { |
| 344 |
pins = "gpio107"; |
| 345 |
function = "gpio"; |
| 346 |
|
| 347 |
drive-strength = <2>; |
| 348 |
bias-pull-up; |
| 349 |
}; |
| 350 |
|
| 351 |
mag_reset_default: mag-reset-default-state { |
| 352 |
pins = "gpio111"; |
| 353 |
function = "gpio"; |
| 354 |
|
| 355 |
drive-strength = <2>; |
| 356 |
bias-disable; |
| 357 |
}; |
| 358 |
|
| 359 |
sdc2_cd_default: sdc2-cd-default-state { |
| 360 |
pins = "gpio38"; |
| 361 |
function = "gpio"; |
| 362 |
drive-strength = <2>; |
| 363 |
bias-disable; |
| 364 |
}; |
| 365 |
|
| 366 |
spk_ext_pa_default: spk-ext-pa-default-state { |
| 367 |
pins = "gpio114"; |
| 368 |
function = "gpio"; |
| 369 |
drive-strength = <2>; |
| 370 |
bias-disable; |
| 371 |
}; |
| 372 |
|
| 373 |
ts_int_reset_default: ts-int-reset-default-state { |
| 374 |
pins = "gpio12", "gpio13"; |
| 375 |
function = "gpio"; |
| 376 |
drive-strength = <2>; |
| 377 |
bias-disable; |
| 378 |
}; |
| 379 |
|
| 380 |
ts_vcca_default: ts-vcca-default-state { |
| 381 |
pins = "gpio78"; |
| 382 |
function = "gpio"; |
| 383 |
drive-strength = <2>; |
| 384 |
bias-disable; |
| 385 |
}; |
| 386 |
|
| 387 |
usb_id_default: usb-id-default-state { |
| 388 |
pins = "gpio110"; |
| 389 |
function = "gpio"; |
| 390 |
|
| 391 |
drive-strength = <8>; |
| 392 |
bias-pull-up; |
| 393 |
}; |
| 394 |
}; |