1// SPDX-License-Identifier: GPL-2.0-only 2 3/dts-v1/; 4 5#include "msm8939-pm8916.dtsi" 6 7#include <dt-bindings/gpio/gpio.h> 8#include <dt-bindings/input/input.h> 9#include <dt-bindings/interrupt-controller/irq.h> 10#include <dt-bindings/leds/common.h> 11#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 12#include <dt-bindings/pinctrl/qcom,pmic-mpp.h> 13 14/ { 15 model = "BQ Aquaris M5 (Longcheer L9100)"; 16 compatible = "longcheer,l9100", "qcom,msm8939"; 17 chassis-type = "handset"; 18 19 aliases { 20 mmc0 = &sdhc_1; /* eMMC */ 21 mmc1 = &sdhc_2; /* SD card */ 22 serial0 = &blsp_uart2; 23 }; 24 25 chosen { 26 stdout-path = "serial0"; 27 }; 28 29 gpio-hall-sensor { 30 compatible = "gpio-keys"; 31 32 pinctrl-0 = <&gpio_hall_sensor_default>; 33 pinctrl-names = "default"; 34 35 label = "GPIO Hall Effect Sensor"; 36 37 event-hall-sensor { 38 label = "Hall Effect Sensor"; 39 gpios = <&tlmm 20 GPIO_ACTIVE_LOW>; 40 linux,input-type = <EV_SW>; 41 linux,code = <SW_LID>; 42 linux,can-disable; 43 }; 44 }; 45 46 gpio-keys { 47 compatible = "gpio-keys"; 48 49 pinctrl-0 = <&gpio_keys_default>; 50 pinctrl-names = "default"; 51 52 label = "GPIO Buttons"; 53 54 button-volume-up { 55 label = "Volume Up"; 56 gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; 57 linux,code = <KEY_VOLUMEUP>; 58 }; 59 }; 60 61 leds { 62 compatible = "gpio-leds"; 63 64 led-0 { 65 gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>; 66 color = <LED_COLOR_ID_WHITE>; 67 default-state = "off"; 68 function = LED_FUNCTION_KBD_BACKLIGHT; 69 70 pinctrl-0 = <&button_backlight_default>; 71 pinctrl-names = "default"; 72 }; 73 }; 74 75 reg_ts_vdd: regulator-vdd-ts { 76 compatible = "regulator-fixed"; 77 regulator-name = "regulator-vdd-ts"; 78 regulator-min-microvolt = <2850000>; 79 regulator-max-microvolt = <2850000>; 80 81 gpio = <&tlmm 78 GPIO_ACTIVE_HIGH>; 82 enable-active-high; 83 84 pinctrl-0 = <&ts_vdd_default>; 85 pinctrl-names = "default"; 86 }; 87 88 backlight { 89 compatible = "pwm-backlight"; 90 pwms = <&pm8916_pwm 0 100000>; 91 brightness-levels = <0 255>; 92 num-interpolated-steps = <255>; 93 default-brightness-level = <128>; 94 enable-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>; 95 96 pinctrl-0 = <&lcd_bl_en_default>; 97 pinctrl-names = "default"; 98 }; 99 100 flash-led-controller { 101 compatible = "ocs,ocp8110"; 102 flash-gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>; 103 enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>; 104 105 pinctrl-0 = <&camera_front_flash_default>; 106 pinctrl-names = "default"; 107 108 led { 109 function = LED_FUNCTION_FLASH; 110 color = <LED_COLOR_ID_WHITE>; 111 flash-max-timeout-us = <250000>; 112 }; 113 }; 114 115 usb_id: usb-id { 116 compatible = "linux,extcon-usb-gpio"; 117 id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; 118 pinctrl-0 = <&usb_id_default &usb_id_switch_default>; 119 pinctrl-names = "default"; 120 }; 121 122}; 123 124&blsp_i2c2 { 125 status = "okay"; 126 127 led-controller@30 { 128 compatible = "kinetic,ktd2026"; 129 reg = <0x30>; 130 #address-cells = <1>; 131 #size-cells = <0>; 132 133 vin-supply = <&pm8916_l17>; 134 vio-supply = <&pm8916_l6>; 135 136 pinctrl-0 = <&status_led_default>; 137 pinctrl-names = "default"; 138 139 multi-led { 140 color = <LED_COLOR_ID_RGB>; 141 function = LED_FUNCTION_STATUS; 142 143 #address-cells = <1>; 144 #size-cells = <0>; 145 146 led@0 { 147 reg = <0>; 148 color = <LED_COLOR_ID_RED>; 149 }; 150 151 led@1 { 152 reg = <1>; 153 color = <LED_COLOR_ID_GREEN>; 154 }; 155 156 led@2 { 157 reg = <2>; 158 color = <LED_COLOR_ID_BLUE>; 159 }; 160 }; 161 }; 162 163 flash-led-controller@53 { 164 compatible = "silergy,sy7802"; 165 reg = <0x53>; 166 167 enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>; 168 169 pinctrl-0 = <&camera_rear_flash_default>; 170 pinctrl-names = "default"; 171 172 #address-cells = <1>; 173 #size-cells = <0>; 174 175 led@0 { 176 reg = <0>; 177 function = LED_FUNCTION_FLASH; 178 color = <LED_COLOR_ID_WHITE>; 179 led-sources = <0>, <1>; 180 }; 181 }; 182}; 183 184&blsp_i2c3 { 185 status = "okay"; 186 187 magnetometer@d { 188 compatible = "asahi-kasei,ak09911"; 189 reg = <0x0d>; 190 191 vdd-supply = <&pm8916_l17>; 192 vid-supply = <&pm8916_l6>; 193 194 reset-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>; 195 196 pinctrl-0 = <&mag_reset_default>; 197 pinctrl-names = "default"; 198 }; 199 200 light-sensor@23 { 201 compatible = "liteon,ltr559"; 202 reg = <0x23>; 203 proximity-near-level = <75>; 204 205 vdd-supply = <&pm8916_l17>; 206 vddio-supply = <&pm8916_l5>; 207 208 interrupts-extended = <&tlmm 113 IRQ_TYPE_EDGE_FALLING>; 209 210 pinctrl-0 = <&light_int_default>; 211 pinctrl-names = "default"; 212 }; 213 214 imu@68 { 215 compatible = "bosch,bmi160"; 216 reg = <0x68>; 217 218 vdd-supply = <&pm8916_l17>; 219 vddio-supply = <&pm8916_l6>; 220 }; 221}; 222 223&blsp_i2c5 { 224 status = "okay"; 225 226 touchscreen@4a { 227 compatible = "atmel,maxtouch"; 228 reg = <0x4a>; 229 230 interrupts-extended = <&tlmm 13 IRQ_TYPE_LEVEL_LOW>; 231 232 reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; 233 234 vdda-supply = <&pm8916_l6>; 235 vdd-supply = <®_ts_vdd>; 236 237 pinctrl-0 = <&ts_int_reset_default>; 238 pinctrl-names = "default"; 239 240 /* Keys listed from right to left */ 241 linux,keycodes = <KEY_APPSELECT KEY_HOMEPAGE KEY_BACK>; 242 }; 243}; 244 245&blsp_uart2 { 246 pinctrl-0 = <&blsp_uart2_console_default>; 247 pinctrl-1 = <&blsp_uart2_console_sleep>; 248 pinctrl-names = "default", "sleep"; 249 status = "okay"; 250}; 251 252&pm8916_gpios { 253 status_led_default: status-led-default-state { 254 pins = "gpio3"; 255 function = PMIC_GPIO_FUNC_NORMAL; 256 power-source = <PM8916_GPIO_VPH>; 257 bias-disable; 258 output-high; 259 }; 260}; 261 262&pm8916_mpps { 263 pwm_out: mpp4-state { 264 pins = "mpp4"; 265 function = "digital"; 266 power-source = <PM8916_MPP_VPH>; 267 output-low; 268 qcom,dtest = <1>; 269 }; 270}; 271 272&pm8916_pwm { 273 pinctrl-0 = <&pwm_out>; 274 pinctrl-names = "default"; 275 status = "okay"; 276}; 277 278&pm8916_resin { 279 linux,code = <KEY_VOLUMEDOWN>; 280 status = "okay"; 281}; 282 283&pm8916_rpm_regulators { 284 pm8916_l17: l17 { 285 regulator-min-microvolt = <2850000>; 286 regulator-max-microvolt = <2850000>; 287 }; 288}; 289 290&pm8916_vib { 291 status = "okay"; 292}; 293 294&sdhc_1 { 295 status = "okay"; 296}; 297 298&sdhc_2 { 299 pinctrl-0 = <&sdc2_default &sdc2_cd_default>; 300 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; 301 pinctrl-names = "default", "sleep"; 302 303 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; 304 305 status = "okay"; 306}; 307 308&usb { 309 extcon = <&usb_id>, <&usb_id>; 310 status = "okay"; 311}; 312 313&usb_hs_phy { 314 extcon = <&usb_id>; 315}; 316 317&wcnss { 318 status = "okay"; 319}; 320 321&wcnss_iris { 322 compatible = "qcom,wcn3620"; 323}; 324 325&wcnss_mem { 326 status = "okay"; 327}; 328 329&tlmm { 330 button_backlight_default: button-backlight-default-state { 331 pins = "gpio17"; 332 function = "gpio"; 333 drive-strength = <2>; 334 bias-disable; 335 }; 336 337 camera_front_flash_default: camera-front-flash-default-state { 338 pins = "gpio8", "gpio49"; 339 function = "gpio"; 340 drive-strength = <2>; 341 bias-disable; 342 }; 343 344 camera_rear_flash_default: camera-rear-flash-default-state { 345 pins = "gpio9", "gpio16", "gpio51"; 346 function = "gpio"; 347 drive-strength = <2>; 348 bias-disable; 349 }; 350 351 gpio_hall_sensor_default: gpio-hall-sensor-default-state { 352 pins = "gpio20"; 353 function = "gpio"; 354 drive-strength = <2>; 355 bias-disable; 356 }; 357 358 gpio_keys_default: gpio-keys-default-state { 359 pins = "gpio107"; 360 function = "gpio"; 361 drive-strength = <2>; 362 bias-pull-up; 363 }; 364 365 lcd_bl_en_default: lcd-bl-en-default-state { 366 pins = "gpio98"; 367 function = "gpio"; 368 drive-strength = <2>; 369 bias-disable; 370 }; 371 372 light_int_default: light-int-default-state { 373 pins = "gpio113"; 374 function = "gpio"; 375 drive-strength = <2>; 376 bias-disable; 377 }; 378 379 mag_reset_default: mag-reset-default-state { 380 pins = "gpio68"; 381 function = "gpio"; 382 drive-strength = <2>; 383 bias-disable; 384 }; 385 386 sdc2_cd_default: sdc2-cd-default-state { 387 pins = "gpio38"; 388 function = "gpio"; 389 drive-strength = <2>; 390 bias-disable; 391 }; 392 393 ts_int_reset_default: ts-int-reset-default-state { 394 pins = "gpio12", "gpio13"; 395 function = "gpio"; 396 drive-strength = <2>; 397 bias-disable; 398 }; 399 400 ts_vdd_default: ts-vdd-default-state { 401 pins = "gpio78"; 402 function = "gpio"; 403 drive-strength = <2>; 404 bias-disable; 405 }; 406 407 usb_id_default: usb-id-default-state { 408 pins = "gpio110"; 409 function = "gpio"; 410 drive-strength = <8>; 411 bias-pull-up; 412 }; 413 414 usb_id_switch_default: usb-id-switch-default-state { 415 pins = "gpio121"; 416 function = "gpio"; 417 drive-strength = <2>; 418 output-high; 419 }; 420}; 421