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 usb_id: usb-id { 83 compatible = "linux,extcon-usb-gpio"; 84 id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; 85 pinctrl-names = "default"; 86 pinctrl-0 = <&usb_id_default>; 87 }; 88}; 89 90&blsp_i2c2 { 91 status = "okay"; 92 93 led-controller@30 { 94 compatible = "kinetic,ktd2026"; 95 reg = <0x30>; 96 #address-cells = <1>; 97 #size-cells = <0>; 98 99 vin-supply = <&pm8916_l17>; 100 vio-supply = <&pm8916_l6>; 101 102 pinctrl-0 = <&status_led_default>; 103 pinctrl-names = "default"; 104 105 multi-led { 106 color = <LED_COLOR_ID_RGB>; 107 function = LED_FUNCTION_STATUS; 108 109 #address-cells = <1>; 110 #size-cells = <0>; 111 112 led@0 { 113 reg = <0>; 114 color = <LED_COLOR_ID_RED>; 115 }; 116 117 led@1 { 118 reg = <1>; 119 color = <LED_COLOR_ID_GREEN>; 120 }; 121 122 led@2 { 123 reg = <2>; 124 color = <LED_COLOR_ID_BLUE>; 125 }; 126 }; 127 }; 128}; 129 130&blsp_i2c3 { 131 status = "okay"; 132 133 magnetometer@d { 134 compatible = "asahi-kasei,ak09911"; 135 reg = <0x0d>; 136 137 vdd-supply = <&pm8916_l17>; 138 vid-supply = <&pm8916_l6>; 139 140 reset-gpios = <&tlmm 111 GPIO_ACTIVE_LOW>; 141 142 pinctrl-names = "default"; 143 pinctrl-0 = <&mag_reset_default>; 144 }; 145 146 imu@68 { 147 compatible = "bosch,bmi160"; 148 reg = <0x68>; 149 150 vdd-supply = <&pm8916_l17>; 151 vddio-supply = <&pm8916_l6>; 152 153 mount-matrix = "0", "1", "0", 154 "-1", "0", "0", 155 "0", "0", "1"; 156 }; 157}; 158 159&blsp_uart2 { 160 status = "okay"; 161}; 162 163&mpss_mem { 164 reg = <0x0 0x86800000 0x0 0x5000000>; 165}; 166 167&pm8916_codec { 168 qcom,micbias-lvl = <2800>; 169 qcom,mbhc-vthreshold-low = <75 100 120 180 500>; 170 qcom,mbhc-vthreshold-high = <75 100 120 180 500>; 171 qcom,hphl-jack-type-normally-open; 172}; 173 174&pm8916_gpios { 175 status_led_default: status-led-default-state { 176 pins = "gpio3"; 177 function = PMIC_GPIO_FUNC_NORMAL; 178 power-source = <PM8916_GPIO_VPH>; 179 bias-disable; 180 output-high; 181 }; 182}; 183 184&pm8916_resin { 185 status = "okay"; 186 linux,code = <KEY_VOLUMEDOWN>; 187}; 188 189&pm8916_rpm_regulators { 190 pm8916_l17: l17 { 191 regulator-min-microvolt = <2850000>; 192 regulator-max-microvolt = <2850000>; 193 }; 194}; 195 196&pm8916_vib { 197 status = "okay"; 198}; 199 200&sdhc_1 { 201 status = "okay"; 202}; 203 204&sdhc_2 { 205 status = "okay"; 206 207 pinctrl-names = "default", "sleep"; 208 pinctrl-0 = <&sdc2_default &sdc2_cd_default>; 209 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; 210 211 cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; 212}; 213 214&sound { 215 /* 216 * Provide widgets/pin-switches to allow enabling speaker separately. 217 * The hardware does not provide a way to disable the output via the 218 * headphone jack when the speaker is enabled. 219 */ 220 model = "bq-paella"; 221 widgets = 222 "Speaker", "Speaker", 223 "Headphone", "Headphones"; 224 pin-switches = "Speaker"; 225 audio-routing = 226 "Speaker", "Speaker Amp OUT", 227 "Speaker Amp IN", "HPH_R", 228 "Headphones", "HPH_L", 229 "Headphones", "HPH_R", 230 "AMIC1", "MIC BIAS External1", 231 "AMIC2", "MIC BIAS Internal2", 232 "AMIC3", "MIC BIAS External1"; 233 aux-devs = <&speaker_amp>; 234}; 235 236&usb { 237 status = "okay"; 238 extcon = <&usb_id>, <&usb_id>; 239}; 240 241&usb_hs_phy { 242 extcon = <&usb_id>; 243}; 244 245&venus { 246 status = "okay"; 247}; 248 249&venus_mem { 250 status = "okay"; 251}; 252 253&wcnss { 254 status = "okay"; 255}; 256 257&wcnss_iris { 258 compatible = "qcom,wcn3620"; 259}; 260 261&wcnss_mem { 262 status = "okay"; 263}; 264 265&tlmm { 266 button_backlight_default: button-backlight-default-state { 267 pins = "gpio17"; 268 function = "gpio"; 269 270 drive-strength = <2>; 271 bias-disable; 272 }; 273 274 camera_front_flash_default: camera-front-flash-default-state { 275 pins = "gpio49", "gpio119"; 276 function = "gpio"; 277 drive-strength = <2>; 278 bias-disable; 279 }; 280 281 gpio_keys_default: gpio-keys-default-state { 282 pins = "gpio107"; 283 function = "gpio"; 284 285 drive-strength = <2>; 286 bias-pull-up; 287 }; 288 289 mag_reset_default: mag-reset-default-state { 290 pins = "gpio111"; 291 function = "gpio"; 292 293 drive-strength = <2>; 294 bias-disable; 295 }; 296 297 sdc2_cd_default: sdc2-cd-default-state { 298 pins = "gpio38"; 299 function = "gpio"; 300 drive-strength = <2>; 301 bias-disable; 302 }; 303 304 spk_ext_pa_default: spk-ext-pa-default-state { 305 pins = "gpio114"; 306 function = "gpio"; 307 drive-strength = <2>; 308 bias-disable; 309 }; 310 311 usb_id_default: usb-id-default-state { 312 pins = "gpio110"; 313 function = "gpio"; 314 315 drive-strength = <8>; 316 bias-pull-up; 317 }; 318}; 319