| 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/interrupt-controller/irq.h> |
| 11 |
#include <dt-bindings/leds/common.h> |
| 12 |
|
| 13 |
/ { |
| 14 |
model = "Longcheer L8150"; |
| 15 |
compatible = "longcheer,l8150", "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 |
/* |
| 29 |
* For some reason, the signed wcnss firmware is not relocatable. |
| 30 |
* It must be loaded at 0x8b600000. Unfortunately, this also means that |
| 31 |
* mpss_mem does not fit when loaded to the typical address at 0x86800000. |
| 32 |
* |
| 33 |
* Load wcnss_mem to the fixed address and relocate mpss_mem to the next |
| 34 |
* working higher address. For some reason the modem firmware does not |
| 35 |
* boot when placed at 0x8a800000 to 0x8e800000. |
| 36 |
*/ |
| 37 |
reserved-memory { |
| 38 |
/delete-node/ mpss@86800000; |
| 39 |
/delete-node/ wcnss; |
| 40 |
|
| 41 |
wcnss_mem: wcnss@8b600000 { |
| 42 |
reg = <0x0 0x8b600000 0x0 0x600000>; |
| 43 |
no-map; |
| 44 |
}; |
| 45 |
|
| 46 |
mpss_mem: mpss@8e800000 { |
| 47 |
reg = <0x0 0x8e800000 0x0 0x5000000>; |
| 48 |
no-map; |
| 49 |
}; |
| 50 |
}; |
| 51 |
|
| 52 |
battery: battery { |
| 53 |
compatible = "simple-battery"; |
| 54 |
voltage-min-design-microvolt = <3400000>; |
| 55 |
voltage-max-design-microvolt = <4350000>; |
| 56 |
energy-full-design-microwatt-hours = <9500000>; |
| 57 |
charge-full-design-microamp-hours = <2500000>; |
| 58 |
|
| 59 |
ocv-capacity-celsius = <25>; |
| 60 |
ocv-capacity-table-0 = <4330000 100>, <4265000 95>, |
| 61 |
<4208000 90>, <4153000 85>, <4100000 80>, <4049000 75>, |
| 62 |
<4001000 70>, <3962000 65>, <3919000 60>, <3872000 55>, |
| 63 |
<3839000 50>, <3817000 45>, <3798000 40>, <3783000 35>, |
| 64 |
<3767000 30>, <3747000 25>, <3729000 20>, <3709000 16>, |
| 65 |
<3688000 13>, <3681000 11>, <3680000 10>, <3679000 9>, |
| 66 |
<3677000 8>, <3674000 7>, <3666000 6>, <3641000 5>, |
| 67 |
<3597000 4>, <3537000 3>, <3457000 2>, <3336000 1>, |
| 68 |
<3000000 0>; |
| 69 |
}; |
| 70 |
|
| 71 |
gpio-keys { |
| 72 |
compatible = "gpio-keys"; |
| 73 |
|
| 74 |
pinctrl-names = "default"; |
| 75 |
pinctrl-0 = <&gpio_keys_default>; |
| 76 |
|
| 77 |
label = "GPIO Buttons"; |
| 78 |
|
| 79 |
button-volume-up { |
| 80 |
label = "Volume Up"; |
| 81 |
gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; |
| 82 |
linux,code = <KEY_VOLUMEUP>; |
| 83 |
}; |
| 84 |
}; |
| 85 |
|
| 86 |
reg_ctp: regulator-ctp { |
| 87 |
compatible = "regulator-fixed"; |
| 88 |
regulator-name = "ctp"; |
| 89 |
|
| 90 |
regulator-min-microvolt = <2800000>; |
| 91 |
regulator-max-microvolt = <2800000>; |
| 92 |
|
| 93 |
gpio = <&tlmm 17 GPIO_ACTIVE_HIGH>; |
| 94 |
enable-active-high; |
| 95 |
|
| 96 |
pinctrl-names = "default"; |
| 97 |
pinctrl-0 = <&ctp_pwr_en_default>; |
| 98 |
}; |
| 99 |
|
| 100 |
flash-led-controller { |
| 101 |
compatible = "sgmicro,sgm3140"; |
| 102 |
flash-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; |
| 103 |
enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; |
| 104 |
|
| 105 |
pinctrl-names = "default"; |
| 106 |
pinctrl-0 = <&camera_flash_default>; |
| 107 |
|
| 108 |
flash_led: led { |
| 109 |
function = LED_FUNCTION_FLASH; |
| 110 |
color = <LED_COLOR_ID_WHITE>; |
| 111 |
flash-max-timeout-us = <250000>; |
| 112 |
}; |
| 113 |
}; |
| 114 |
}; |
| 115 |
|
| 116 |
&blsp_i2c1 { |
| 117 |
status = "okay"; |
| 118 |
|
| 119 |
led-controller@45 { |
| 120 |
compatible = "awinic,aw2013"; |
| 121 |
reg = <0x45>; |
| 122 |
#address-cells = <1>; |
| 123 |
#size-cells = <0>; |
| 124 |
|
| 125 |
vcc-supply = <&pm8916_l17>; |
| 126 |
vio-supply = <&pm8916_l6>; |
| 127 |
|
| 128 |
led@0 { |
| 129 |
reg = <0>; |
| 130 |
led-max-microamp = <5000>; |
| 131 |
function = LED_FUNCTION_INDICATOR; |
| 132 |
color = <LED_COLOR_ID_RED>; |
| 133 |
}; |
| 134 |
|
| 135 |
led@1 { |
| 136 |
reg = <1>; |
| 137 |
led-max-microamp = <5000>; |
| 138 |
function = LED_FUNCTION_INDICATOR; |
| 139 |
color = <LED_COLOR_ID_GREEN>; |
| 140 |
}; |
| 141 |
|
| 142 |
led@2 { |
| 143 |
reg = <2>; |
| 144 |
led-max-microamp = <5000>; |
| 145 |
function = LED_FUNCTION_INDICATOR; |
| 146 |
color = <LED_COLOR_ID_BLUE>; |
| 147 |
}; |
| 148 |
}; |
| 149 |
}; |
| 150 |
|
| 151 |
&blsp_i2c2 { |
| 152 |
status = "okay"; |
| 153 |
|
| 154 |
accelerometer@10 { |
| 155 |
compatible = "bosch,bmc156_accel"; |
| 156 |
reg = <0x10>; |
| 157 |
|
| 158 |
/* |
| 159 |
* For some reason the interrupt line is usually not connected |
| 160 |
* to the BMC156. However, there are two pads next to the chip |
| 161 |
* that can be shorted to make it work if needed. |
| 162 |
* |
| 163 |
* interrupt-parent = <&tlmm>; |
| 164 |
* interrupts = <116 IRQ_TYPE_EDGE_RISING>; |
| 165 |
*/ |
| 166 |
|
| 167 |
pinctrl-names = "default"; |
| 168 |
pinctrl-0 = <&accel_int_default>; |
| 169 |
|
| 170 |
vdd-supply = <&pm8916_l17>; |
| 171 |
vddio-supply = <&pm8916_l6>; |
| 172 |
|
| 173 |
mount-matrix = "0", "1", "0", |
| 174 |
"-1", "0", "0", |
| 175 |
"0", "0", "1"; |
| 176 |
}; |
| 177 |
|
| 178 |
magnetometer@12 { |
| 179 |
compatible = "bosch,bmc156_magn"; |
| 180 |
reg = <0x12>; |
| 181 |
|
| 182 |
interrupt-parent = <&tlmm>; |
| 183 |
interrupts = <113 IRQ_TYPE_EDGE_RISING>; |
| 184 |
|
| 185 |
pinctrl-names = "default"; |
| 186 |
pinctrl-0 = <&magn_int_default>; |
| 187 |
|
| 188 |
vdd-supply = <&pm8916_l17>; |
| 189 |
vddio-supply = <&pm8916_l6>; |
| 190 |
}; |
| 191 |
|
| 192 |
light-sensor@23 { |
| 193 |
compatible = "liteon,ltr559"; |
| 194 |
reg = <0x23>; |
| 195 |
proximity-near-level = <75>; |
| 196 |
|
| 197 |
interrupt-parent = <&tlmm>; |
| 198 |
interrupts = <115 IRQ_TYPE_EDGE_FALLING>; |
| 199 |
|
| 200 |
pinctrl-names = "default"; |
| 201 |
pinctrl-0 = <&light_int_default>; |
| 202 |
|
| 203 |
vdd-supply = <&pm8916_l17>; |
| 204 |
vddio-supply = <&pm8916_l6>; |
| 205 |
}; |
| 206 |
|
| 207 |
gyroscope@68 { |
| 208 |
compatible = "bosch,bmg160"; |
| 209 |
reg = <0x68>; |
| 210 |
|
| 211 |
interrupt-parent = <&tlmm>; |
| 212 |
interrupts = <23 IRQ_TYPE_EDGE_RISING>, |
| 213 |
<22 IRQ_TYPE_EDGE_RISING>; |
| 214 |
|
| 215 |
pinctrl-names = "default"; |
| 216 |
pinctrl-0 = <&gyro_int_default>; |
| 217 |
|
| 218 |
vdd-supply = <&pm8916_l17>; |
| 219 |
vddio-supply = <&pm8916_l6>; |
| 220 |
}; |
| 221 |
}; |
| 222 |
|
| 223 |
&blsp_i2c5 { |
| 224 |
status = "okay"; |
| 225 |
|
| 226 |
rmi4@20 { |
| 227 |
compatible = "syna,rmi4-i2c"; |
| 228 |
reg = <0x20>; |
| 229 |
#address-cells = <1>; |
| 230 |
#size-cells = <0>; |
| 231 |
|
| 232 |
interrupt-parent = <&tlmm>; |
| 233 |
interrupts = <13 IRQ_TYPE_EDGE_FALLING>; |
| 234 |
|
| 235 |
vdd-supply = <®_ctp>; |
| 236 |
vio-supply = <&pm8916_l6>; |
| 237 |
|
| 238 |
pinctrl-names = "default"; |
| 239 |
pinctrl-0 = <&tp_int_default>; |
| 240 |
|
| 241 |
syna,startup-delay-ms = <10>; |
| 242 |
|
| 243 |
rmi4-f01@1 { |
| 244 |
reg = <0x1>; |
| 245 |
syna,nosleep-mode = <1>; /* Allow sleeping */ |
| 246 |
}; |
| 247 |
|
| 248 |
rmi4-f12@12 { |
| 249 |
reg = <0x12>; |
| 250 |
syna,sensor-type = <1>; /* Touchscreen */ |
| 251 |
}; |
| 252 |
}; |
| 253 |
}; |
| 254 |
|
| 255 |
&blsp_uart2 { |
| 256 |
status = "okay"; |
| 257 |
pinctrl-0 = <&blsp_uart2_console_default>; |
| 258 |
pinctrl-1 = <&blsp_uart2_console_sleep>; |
| 259 |
pinctrl-names = "default", "sleep"; |
| 260 |
}; |
| 261 |
|
| 262 |
&pm8916_bms { |
| 263 |
status = "okay"; |
| 264 |
|
| 265 |
monitored-battery = <&battery>; |
| 266 |
power-supplies = <&pm8916_charger>; |
| 267 |
}; |
| 268 |
|
| 269 |
&pm8916_charger { |
| 270 |
status = "okay"; |
| 271 |
|
| 272 |
monitored-battery = <&battery>; |
| 273 |
|
| 274 |
qcom,fast-charge-safe-current = <900000>; |
| 275 |
qcom,fast-charge-safe-voltage = <4300000>; |
| 276 |
}; |
| 277 |
|
| 278 |
&pm8916_codec { |
| 279 |
qcom,micbias-lvl = <2800>; |
| 280 |
qcom,mbhc-vthreshold-low = <75 150 237 450 500>; |
| 281 |
qcom,mbhc-vthreshold-high = <75 150 237 450 500>; |
| 282 |
qcom,hphl-jack-type-normally-open; |
| 283 |
}; |
| 284 |
|
| 285 |
&pm8916_resin { |
| 286 |
status = "okay"; |
| 287 |
linux,code = <KEY_VOLUMEDOWN>; |
| 288 |
}; |
| 289 |
|
| 290 |
&pm8916_rpm_regulators { |
| 291 |
pm8916_l17: l17 { |
| 292 |
regulator-min-microvolt = <2850000>; |
| 293 |
regulator-max-microvolt = <2850000>; |
| 294 |
}; |
| 295 |
}; |
| 296 |
|
| 297 |
&pm8916_vib { |
| 298 |
status = "okay"; |
| 299 |
}; |
| 300 |
|
| 301 |
&sdhc_1 { |
| 302 |
status = "okay"; |
| 303 |
}; |
| 304 |
|
| 305 |
&sdhc_2 { |
| 306 |
status = "okay"; |
| 307 |
non-removable; |
| 308 |
}; |
| 309 |
|
| 310 |
&sound { |
| 311 |
audio-routing = |
| 312 |
"AMIC1", "MIC BIAS Internal1", |
| 313 |
"AMIC2", "MIC BIAS Internal2", |
| 314 |
"AMIC3", "MIC BIAS Internal3"; |
| 315 |
}; |
| 316 |
|
| 317 |
&usb { |
| 318 |
status = "okay"; |
| 319 |
dr_mode = "peripheral"; |
| 320 |
extcon = <&pm8916_charger>; |
| 321 |
}; |
| 322 |
|
| 323 |
&usb_hs_phy { |
| 324 |
extcon = <&pm8916_charger>; |
| 325 |
}; |
| 326 |
|
| 327 |
&venus { |
| 328 |
status = "okay"; |
| 329 |
}; |
| 330 |
|
| 331 |
&venus_mem { |
| 332 |
status = "okay"; |
| 333 |
}; |
| 334 |
|
| 335 |
&wcnss { |
| 336 |
status = "okay"; |
| 337 |
}; |
| 338 |
|
| 339 |
&wcnss_iris { |
| 340 |
compatible = "qcom,wcn3620"; |
| 341 |
}; |
| 342 |
|
| 343 |
&wcnss_mem { |
| 344 |
status = "okay"; |
| 345 |
}; |
| 346 |
|
| 347 |
&tlmm { |
| 348 |
accel_int_default: accel-int-default-state { |
| 349 |
pins = "gpio116"; |
| 350 |
function = "gpio"; |
| 351 |
|
| 352 |
drive-strength = <2>; |
| 353 |
bias-disable; |
| 354 |
}; |
| 355 |
|
| 356 |
camera_flash_default: camera-flash-default-state { |
| 357 |
pins = "gpio31", "gpio32"; |
| 358 |
function = "gpio"; |
| 359 |
|
| 360 |
drive-strength = <2>; |
| 361 |
bias-disable; |
| 362 |
}; |
| 363 |
|
| 364 |
ctp_pwr_en_default: ctp-pwr-en-default-state { |
| 365 |
pins = "gpio17"; |
| 366 |
function = "gpio"; |
| 367 |
|
| 368 |
drive-strength = <2>; |
| 369 |
bias-disable; |
| 370 |
}; |
| 371 |
|
| 372 |
gpio_keys_default: gpio-keys-default-state { |
| 373 |
pins = "gpio107"; |
| 374 |
function = "gpio"; |
| 375 |
|
| 376 |
drive-strength = <2>; |
| 377 |
bias-pull-up; |
| 378 |
}; |
| 379 |
|
| 380 |
gyro_int_default: gyro-int-default-state { |
| 381 |
pins = "gpio22", "gpio23"; |
| 382 |
function = "gpio"; |
| 383 |
|
| 384 |
drive-strength = <2>; |
| 385 |
bias-disable; |
| 386 |
}; |
| 387 |
|
| 388 |
light_int_default: light-int-default-state { |
| 389 |
pins = "gpio115"; |
| 390 |
function = "gpio"; |
| 391 |
|
| 392 |
drive-strength = <2>; |
| 393 |
bias-disable; |
| 394 |
}; |
| 395 |
|
| 396 |
magn_int_default: magn-int-default-state { |
| 397 |
pins = "gpio113"; |
| 398 |
function = "gpio"; |
| 399 |
|
| 400 |
drive-strength = <2>; |
| 401 |
bias-disable; |
| 402 |
}; |
| 403 |
|
| 404 |
tp_int_default: tp-int-default-state { |
| 405 |
pins = "gpio13"; |
| 406 |
function = "gpio"; |
| 407 |
|
| 408 |
drive-strength = <2>; |
| 409 |
bias-disable; |
| 410 |
}; |
| 411 |
}; |