1// SPDX-License-Identifier: GPL-2.0-only 2 3/dts-v1/; 4 5#include "msm8916-pm8916.dtsi" 6#include <dt-bindings/gpio/gpio.h> 7#include <dt-bindings/input/input.h> 8#include <dt-bindings/interrupt-controller/irq.h> 9#include <dt-bindings/leds/common.h> 10 11/ { 12 model = "Longcheer L8150"; 13 compatible = "longcheer,l8150", "qcom,msm8916-v1-qrd/9-v1", "qcom,msm8916"; 14 15 aliases { 16 serial0 = &blsp1_uart2; 17 }; 18 19 chosen { 20 stdout-path = "serial0"; 21 }; 22 23 reserved-memory { 24 // wcnss.mdt is not relocatable, so it must be loaded at 0x8b600000 25 /delete-node/ wcnss@89300000; 26 27 wcnss_mem: wcnss@8b600000 { 28 reg = <0x0 0x8b600000 0x0 0x600000>; 29 no-map; 30 }; 31 }; 32 33 gpio-keys { 34 compatible = "gpio-keys"; 35 36 pinctrl-names = "default"; 37 pinctrl-0 = <&gpio_keys_default>; 38 39 label = "GPIO Buttons"; 40 41 volume-up { 42 label = "Volume Up"; 43 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; 44 linux,code = <KEY_VOLUMEUP>; 45 }; 46 }; 47 48 reg_ctp: regulator-ctp { 49 compatible = "regulator-fixed"; 50 regulator-name = "ctp"; 51 52 regulator-min-microvolt = <2800000>; 53 regulator-max-microvolt = <2800000>; 54 55 gpio = <&msmgpio 17 GPIO_ACTIVE_HIGH>; 56 enable-active-high; 57 58 pinctrl-names = "default"; 59 pinctrl-0 = <&ctp_pwr_en_default>; 60 }; 61 62 flash-led-controller { 63 compatible = "sgmicro,sgm3140"; 64 flash-gpios = <&msmgpio 31 GPIO_ACTIVE_HIGH>; 65 enable-gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>; 66 67 pinctrl-names = "default"; 68 pinctrl-0 = <&camera_flash_default>; 69 70 flash_led: led { 71 function = LED_FUNCTION_FLASH; 72 color = <LED_COLOR_ID_WHITE>; 73 flash-max-timeout-us = <250000>; 74 }; 75 }; 76}; 77 78&blsp_i2c1 { 79 status = "okay"; 80 81 led-controller@45 { 82 compatible = "awinic,aw2013"; 83 reg = <0x45>; 84 #address-cells = <1>; 85 #size-cells = <0>; 86 87 vcc-supply = <&pm8916_l17>; 88 89 led@0 { 90 reg = <0>; 91 led-max-microamp = <5000>; 92 function = LED_FUNCTION_INDICATOR; 93 color = <LED_COLOR_ID_RED>; 94 }; 95 96 led@1 { 97 reg = <1>; 98 led-max-microamp = <5000>; 99 function = LED_FUNCTION_INDICATOR; 100 color = <LED_COLOR_ID_GREEN>; 101 }; 102 103 led@2 { 104 reg = <2>; 105 led-max-microamp = <5000>; 106 function = LED_FUNCTION_INDICATOR; 107 color = <LED_COLOR_ID_BLUE>; 108 }; 109 }; 110}; 111 112&blsp_i2c2 { 113 status = "okay"; 114 115 accelerometer@10 { 116 compatible = "bosch,bmc156_accel"; 117 reg = <0x10>; 118 119 /* 120 * For some reason the interrupt line is usually not connected 121 * to the BMC156. However, there are two pads next to the chip 122 * that can be shorted to make it work if needed. 123 * 124 * interrupt-parent = <&msmgpio>; 125 * interrupts = <116 IRQ_TYPE_EDGE_RISING>; 126 */ 127 128 pinctrl-names = "default"; 129 pinctrl-0 = <&accel_int_default>; 130 131 vdd-supply = <&pm8916_l17>; 132 vddio-supply = <&pm8916_l6>; 133 134 mount-matrix = "0", "1", "0", 135 "-1", "0", "0", 136 "0", "0", "1"; 137 }; 138 139 magnetometer@12 { 140 compatible = "bosch,bmc156_magn"; 141 reg = <0x12>; 142 143 interrupt-parent = <&msmgpio>; 144 interrupts = <113 IRQ_TYPE_EDGE_RISING>; 145 146 pinctrl-names = "default"; 147 pinctrl-0 = <&magn_int_default>; 148 149 vdd-supply = <&pm8916_l17>; 150 vddio-supply = <&pm8916_l6>; 151 }; 152 153 gyroscope@68 { 154 compatible = "bosch,bmg160"; 155 reg = <0x68>; 156 157 interrupt-parent = <&msmgpio>; 158 interrupts = <23 IRQ_TYPE_EDGE_RISING>, 159 <22 IRQ_TYPE_EDGE_RISING>; 160 161 pinctrl-names = "default"; 162 pinctrl-0 = <&gyro_int_default>; 163 164 vdd-supply = <&pm8916_l17>; 165 vddio-supply = <&pm8916_l6>; 166 }; 167}; 168 169&blsp_i2c5 { 170 status = "okay"; 171 172 rmi4@20 { 173 compatible = "syna,rmi4-i2c"; 174 reg = <0x20>; 175 #address-cells = <1>; 176 #size-cells = <0>; 177 178 interrupt-parent = <&msmgpio>; 179 interrupts = <13 IRQ_TYPE_EDGE_FALLING>; 180 181 vdd-supply = <®_ctp>; 182 vio-supply = <&pm8916_l6>; 183 184 pinctrl-names = "default"; 185 pinctrl-0 = <&tp_int_default>; 186 187 syna,startup-delay-ms = <10>; 188 189 rmi4-f01@1 { 190 reg = <0x1>; 191 syna,nosleep-mode = <1>; // Allow sleeping 192 }; 193 194 rmi4-f12@12 { 195 reg = <0x12>; 196 syna,sensor-type = <1>; // Touchscreen 197 }; 198 }; 199}; 200 201&blsp1_uart2 { 202 status = "okay"; 203}; 204 205&pm8916_resin { 206 status = "okay"; 207 linux,code = <KEY_VOLUMEDOWN>; 208}; 209 210&pm8916_usbin { 211 status = "okay"; 212}; 213 214&pm8916_vib { 215 status = "okay"; 216}; 217 218&pronto { 219 status = "okay"; 220}; 221 222&sdhc_1 { 223 status = "okay"; 224 225 pinctrl-names = "default", "sleep"; 226 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; 227 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; 228}; 229 230&sdhc_2 { 231 status = "okay"; 232 233 pinctrl-names = "default", "sleep"; 234 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>; 235 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>; 236 237 non-removable; 238}; 239 240&usb { 241 status = "okay"; 242 dr_mode = "peripheral"; 243 extcon = <&pm8916_usbin>; 244}; 245 246&usb_hs_phy { 247 extcon = <&pm8916_usbin>; 248}; 249 250&smd_rpm_regulators { 251 vdd_l1_l2_l3-supply = <&pm8916_s3>; 252 vdd_l4_l5_l6-supply = <&pm8916_s4>; 253 vdd_l7-supply = <&pm8916_s4>; 254 255 s3 { 256 regulator-min-microvolt = <1200000>; 257 regulator-max-microvolt = <1300000>; 258 }; 259 260 s4 { 261 regulator-min-microvolt = <1800000>; 262 regulator-max-microvolt = <2100000>; 263 }; 264 265 l1 { 266 regulator-min-microvolt = <1225000>; 267 regulator-max-microvolt = <1225000>; 268 }; 269 270 l2 { 271 regulator-min-microvolt = <1200000>; 272 regulator-max-microvolt = <1200000>; 273 }; 274 275 l4 { 276 regulator-min-microvolt = <2050000>; 277 regulator-max-microvolt = <2050000>; 278 }; 279 280 l5 { 281 regulator-min-microvolt = <1800000>; 282 regulator-max-microvolt = <1800000>; 283 }; 284 285 l6 { 286 regulator-min-microvolt = <1800000>; 287 regulator-max-microvolt = <1800000>; 288 }; 289 290 l7 { 291 regulator-min-microvolt = <1800000>; 292 regulator-max-microvolt = <1800000>; 293 }; 294 295 l8 { 296 regulator-min-microvolt = <2850000>; 297 regulator-max-microvolt = <2900000>; 298 }; 299 300 l9 { 301 regulator-min-microvolt = <3300000>; 302 regulator-max-microvolt = <3300000>; 303 }; 304 305 l10 { 306 regulator-min-microvolt = <2700000>; 307 regulator-max-microvolt = <2800000>; 308 }; 309 310 l11 { 311 regulator-min-microvolt = <1800000>; 312 regulator-max-microvolt = <2950000>; 313 regulator-allow-set-load; 314 regulator-system-load = <200000>; 315 }; 316 317 l12 { 318 regulator-min-microvolt = <1800000>; 319 regulator-max-microvolt = <2950000>; 320 }; 321 322 l13 { 323 regulator-min-microvolt = <3075000>; 324 regulator-max-microvolt = <3075000>; 325 }; 326 327 l14 { 328 regulator-min-microvolt = <1800000>; 329 regulator-max-microvolt = <3300000>; 330 }; 331 332 l15 { 333 regulator-min-microvolt = <1800000>; 334 regulator-max-microvolt = <3300000>; 335 }; 336 337 l16 { 338 regulator-min-microvolt = <1800000>; 339 regulator-max-microvolt = <3300000>; 340 }; 341 342 l17 { 343 regulator-min-microvolt = <2850000>; 344 regulator-max-microvolt = <2850000>; 345 }; 346 347 l18 { 348 regulator-min-microvolt = <2700000>; 349 regulator-max-microvolt = <2700000>; 350 }; 351}; 352 353&msmgpio { 354 accel_int_default: accel-int-default { 355 pins = "gpio116"; 356 function = "gpio"; 357 358 drive-strength = <2>; 359 bias-disable; 360 }; 361 362 camera_flash_default: camera-flash-default { 363 pins = "gpio31", "gpio32"; 364 function = "gpio"; 365 366 drive-strength = <2>; 367 bias-disable; 368 }; 369 370 ctp_pwr_en_default: ctp-pwr-en-default { 371 pins = "gpio17"; 372 function = "gpio"; 373 374 drive-strength = <2>; 375 bias-disable; 376 }; 377 378 gpio_keys_default: gpio-keys-default { 379 pins = "gpio107"; 380 function = "gpio"; 381 382 drive-strength = <2>; 383 bias-pull-up; 384 }; 385 386 gyro_int_default: gyro-int-default { 387 pins = "gpio22", "gpio23"; 388 function = "gpio"; 389 390 drive-strength = <2>; 391 bias-disable; 392 }; 393 394 magn_int_default: magn-int-default { 395 pins = "gpio113"; 396 function = "gpio"; 397 398 drive-strength = <2>; 399 bias-disable; 400 }; 401 402 tp_int_default: tp-int-default { 403 pins = "gpio13"; 404 function = "gpio"; 405 406 drive-strength = <2>; 407 bias-disable; 408 }; 409}; 410