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/leds/common.h> 9 10/ { 11 model = "Alcatel OneTouch Idol 3 (4.7)"; 12 compatible = "alcatel,idol347", "qcom,msm8916"; 13 chassis-type = "handset"; 14 15 aliases { 16 serial0 = &blsp1_uart2; 17 }; 18 19 chosen { 20 stdout-path = "serial0"; 21 }; 22 23 gpio-keys { 24 compatible = "gpio-keys"; 25 26 pinctrl-names = "default"; 27 pinctrl-0 = <&gpio_keys_default>; 28 29 label = "GPIO Buttons"; 30 31 button-volume-up { 32 label = "Volume Up"; 33 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; 34 linux,code = <KEY_VOLUMEUP>; 35 }; 36 }; 37 38 gpio-leds { 39 compatible = "gpio-leds"; 40 41 pinctrl-names = "default"; 42 pinctrl-0 = <&gpio_leds_default>; 43 44 led-0 { 45 gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>; 46 linux,default-trigger = "torch"; 47 function = LED_FUNCTION_TORCH; 48 }; 49 }; 50 51 usb_id: usb-id { 52 compatible = "linux,extcon-usb-gpio"; 53 id-gpio = <&msmgpio 69 GPIO_ACTIVE_HIGH>; 54 pinctrl-names = "default"; 55 pinctrl-0 = <&usb_id_default>; 56 }; 57}; 58 59&blsp1_uart2 { 60 status = "okay"; 61}; 62 63&blsp_i2c4 { 64 status = "okay"; 65 66 touchscreen@26 { 67 compatible = "mstar,msg2638"; 68 reg = <0x26>; 69 interrupt-parent = <&msmgpio>; 70 interrupts = <13 IRQ_TYPE_EDGE_FALLING>; 71 reset-gpios = <&msmgpio 100 GPIO_ACTIVE_LOW>; 72 pinctrl-names = "default"; 73 pinctrl-0 = <&ts_int_reset_default>; 74 vdd-supply = <&pm8916_l17>; 75 vddio-supply = <&pm8916_l5>; 76 touchscreen-size-x = <2048>; 77 touchscreen-size-y = <2048>; 78 }; 79}; 80 81&blsp_i2c5 { 82 status = "okay"; 83 84 magnetometer@c { 85 compatible = "asahi-kasei,ak09911"; 86 reg = <0x0c>; 87 vdd-supply = <&pm8916_l17>; 88 vid-supply = <&pm8916_l6>; 89 reset-gpios = <&msmgpio 8 GPIO_ACTIVE_LOW>; 90 pinctrl-names = "default"; 91 pinctrl-0 = <&mag_reset_default>; 92 mount-matrix = "0", "1", "0", 93 "-1", "0", "0", 94 "0", "0", "1"; 95 }; 96 97 accelerometer@f { 98 compatible = "kionix,kxtj21009"; 99 reg = <0x0f>; 100 vdd-supply = <&pm8916_l17>; 101 vddio-supply = <&pm8916_l6>; 102 interrupt-parent = <&msmgpio>; 103 interrupts = <31 IRQ_TYPE_EDGE_RISING>; 104 pinctrl-names = "default"; 105 pinctrl-0 = <&accel_int_default>; 106 mount-matrix = "-1", "0", "0", 107 "0", "1", "0", 108 "0", "0", "-1"; 109 }; 110 111 proximity@48 { 112 compatible = "sensortek,stk3310"; 113 reg = <0x48>; 114 interrupt-parent = <&msmgpio>; 115 interrupts = <12 IRQ_TYPE_EDGE_FALLING>; 116 pinctrl-names = "default"; 117 pinctrl-0 = <&proximity_int_default>; 118 }; 119 120 gyroscope@68 { 121 compatible = "bosch,bmg160"; 122 reg = <0x68>; 123 vdd-supply = <&pm8916_l17>; 124 vddio-supply = <&pm8916_l6>; 125 interrupt-parent = <&msmgpio>; 126 interrupts = <97 IRQ_TYPE_EDGE_RISING>, 127 <98 IRQ_TYPE_EDGE_RISING>; 128 pinctrl-names = "default"; 129 pinctrl-0 = <&gyro_int_default>; 130 }; 131}; 132 133&blsp_i2c6 { 134 status = "okay"; 135 136 led-controller@68 { 137 compatible = "si-en,sn3190"; 138 reg = <0x68>; 139 shutdown-gpios = <&msmgpio 89 GPIO_ACTIVE_HIGH>; 140 pinctrl-names = "default"; 141 pinctrl-0 = <&led_enable_default &led_shutdown_default>; 142 #address-cells = <1>; 143 #size-cells = <0>; 144 145 led@1 { 146 reg = <1>; 147 led-max-microamp = <5000>; 148 function = LED_FUNCTION_INDICATOR; 149 color = <LED_COLOR_ID_WHITE>; 150 }; 151 }; 152}; 153 154&pm8916_resin { 155 status = "okay"; 156 linux,code = <KEY_VOLUMEDOWN>; 157}; 158 159&pm8916_vib { 160 status = "okay"; 161}; 162 163&sdhc_1 { 164 status = "okay"; 165 166 pinctrl-names = "default", "sleep"; 167 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; 168 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; 169}; 170 171&sdhc_2 { 172 status = "okay"; 173 174 pinctrl-names = "default", "sleep"; 175 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; 176 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; 177 178 cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>; 179}; 180 181&usb { 182 status = "okay"; 183 extcon = <&usb_id>, <&usb_id>; 184}; 185 186&usb_hs_phy { 187 extcon = <&usb_id>; 188}; 189 190&wcnss { 191 status = "okay"; 192}; 193 194&wcnss_iris { 195 compatible = "qcom,wcn3620"; 196}; 197 198&smd_rpm_regulators { 199 vdd_l1_l2_l3-supply = <&pm8916_s3>; 200 vdd_l4_l5_l6-supply = <&pm8916_s4>; 201 vdd_l7-supply = <&pm8916_s4>; 202 203 s3 { 204 regulator-min-microvolt = <1200000>; 205 regulator-max-microvolt = <1300000>; 206 }; 207 208 s4 { 209 regulator-min-microvolt = <1800000>; 210 regulator-max-microvolt = <2100000>; 211 }; 212 213 l1 { 214 regulator-min-microvolt = <1225000>; 215 regulator-max-microvolt = <1225000>; 216 }; 217 218 l2 { 219 regulator-min-microvolt = <1200000>; 220 regulator-max-microvolt = <1200000>; 221 }; 222 223 l4 { 224 regulator-min-microvolt = <2050000>; 225 regulator-max-microvolt = <2050000>; 226 }; 227 228 l5 { 229 regulator-min-microvolt = <1800000>; 230 regulator-max-microvolt = <1800000>; 231 }; 232 233 l6 { 234 regulator-min-microvolt = <1800000>; 235 regulator-max-microvolt = <1800000>; 236 }; 237 238 l7 { 239 regulator-min-microvolt = <1800000>; 240 regulator-max-microvolt = <1800000>; 241 }; 242 243 l8 { 244 regulator-min-microvolt = <2850000>; 245 regulator-max-microvolt = <2900000>; 246 }; 247 248 l9 { 249 regulator-min-microvolt = <3300000>; 250 regulator-max-microvolt = <3300000>; 251 }; 252 253 l10 { 254 regulator-min-microvolt = <2700000>; 255 regulator-max-microvolt = <2800000>; 256 }; 257 258 l11 { 259 regulator-min-microvolt = <1800000>; 260 regulator-max-microvolt = <2950000>; 261 regulator-allow-set-load; 262 regulator-system-load = <200000>; 263 }; 264 265 l12 { 266 regulator-min-microvolt = <1800000>; 267 regulator-max-microvolt = <2950000>; 268 }; 269 270 l13 { 271 regulator-min-microvolt = <3075000>; 272 regulator-max-microvolt = <3075000>; 273 }; 274 275 l14 { 276 regulator-min-microvolt = <1800000>; 277 regulator-max-microvolt = <3300000>; 278 }; 279 280 l15 { 281 regulator-min-microvolt = <1800000>; 282 regulator-max-microvolt = <3300000>; 283 }; 284 285 l16 { 286 regulator-min-microvolt = <1800000>; 287 regulator-max-microvolt = <3300000>; 288 }; 289 290 l17 { 291 regulator-min-microvolt = <2850000>; 292 regulator-max-microvolt = <2850000>; 293 }; 294 295 l18 { 296 regulator-min-microvolt = <2700000>; 297 regulator-max-microvolt = <2700000>; 298 }; 299}; 300 301&msmgpio { 302 accel_int_default: accel-int-default-state { 303 pins = "gpio31"; 304 function = "gpio"; 305 306 drive-strength = <2>; 307 bias-disable; 308 }; 309 310 gpio_keys_default: gpio-keys-default-state { 311 pins = "gpio107"; 312 function = "gpio"; 313 314 drive-strength = <2>; 315 bias-pull-up; 316 }; 317 318 gpio_leds_default: gpio-leds-default-state { 319 pins = "gpio32"; 320 function = "gpio"; 321 322 drive-strength = <2>; 323 bias-disable; 324 }; 325 326 gyro_int_default: gyro-int-default-state { 327 pins = "gpio97", "gpio98"; 328 function = "gpio"; 329 330 drive-strength = <2>; 331 bias-disable; 332 }; 333 334 /* 335 * The OEM wired an additional GPIO to be asserted so that 336 * the si-en,sn3190 LED IC works. Since this GPIO is not 337 * part of the IC datasheet nor supported by the driver, 338 * force it asserted here. 339 */ 340 led_enable_default: led-enable-default-state { 341 pins = "gpio102"; 342 function = "gpio"; 343 344 drive-strength = <2>; 345 bias-disable; 346 output-high; 347 }; 348 349 led_shutdown_default: led-shutdown-default-state { 350 pins = "gpio89"; 351 function = "gpio"; 352 353 drive-strength = <2>; 354 bias-disable; 355 }; 356 357 mag_reset_default: mag-reset-default-state { 358 pins = "gpio8"; 359 function = "gpio"; 360 361 drive-strength = <2>; 362 bias-disable; 363 }; 364 365 proximity_int_default: proximity-int-default-state { 366 pins = "gpio12"; 367 function = "gpio"; 368 369 drive-strength = <6>; 370 bias-pull-up; 371 }; 372 373 ts_int_reset_default: ts-int-reset-default-state { 374 pins = "gpio13", "gpio100"; 375 function = "gpio"; 376 377 drive-strength = <2>; 378 bias-disable; 379 }; 380 381 usb_id_default: usb-id-default-state { 382 pins = "gpio69"; 383 function = "gpio"; 384 385 drive-strength = <8>; 386 bias-pull-up; 387 }; 388}; 389