Linux 6.7-rc7
[linux-modified.git] / arch / arm64 / boot / dts / qcom / msm8939-longcheer-l9100.dts
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-mpp.h>
12
13 / {
14         model = "BQ Aquaris M5 (Longcheer L9100)";
15         compatible = "longcheer,l9100", "qcom,msm8939";
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         gpio-hall-sensor {
29                 compatible = "gpio-keys";
30
31                 pinctrl-0 = <&gpio_hall_sensor_default>;
32                 pinctrl-names = "default";
33
34                 label = "GPIO Hall Effect Sensor";
35
36                 event-hall-sensor {
37                         label = "Hall Effect Sensor";
38                         gpios = <&tlmm 20 GPIO_ACTIVE_LOW>;
39                         linux,input-type = <EV_SW>;
40                         linux,code = <SW_LID>;
41                         linux,can-disable;
42                 };
43         };
44
45         gpio-keys {
46                 compatible = "gpio-keys";
47
48                 pinctrl-0 = <&gpio_keys_default>;
49                 pinctrl-names = "default";
50
51                 label = "GPIO Buttons";
52
53                 button-volume-up {
54                         label = "Volume Up";
55                         gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
56                         linux,code = <KEY_VOLUMEUP>;
57                 };
58         };
59
60         leds {
61                 compatible = "gpio-leds";
62
63                 led-0 {
64                         gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
65                         color = <LED_COLOR_ID_WHITE>;
66                         default-state = "off";
67                         function = LED_FUNCTION_KBD_BACKLIGHT;
68
69                         pinctrl-0 = <&button_backlight_default>;
70                         pinctrl-names = "default";
71                 };
72         };
73
74         reg_ts_vdd: regulator-vdd-ts {
75                 compatible = "regulator-fixed";
76                 regulator-name = "regulator-vdd-ts";
77                 regulator-min-microvolt = <2850000>;
78                 regulator-max-microvolt = <2850000>;
79
80                 gpio = <&tlmm 78 GPIO_ACTIVE_HIGH>;
81                 enable-active-high;
82
83                 pinctrl-0 = <&ts_vdd_default>;
84                 pinctrl-names = "default";
85         };
86
87         backlight {
88                 compatible = "pwm-backlight";
89                 pwms = <&pm8916_pwm 0 100000>;
90                 brightness-levels = <0 255>;
91                 num-interpolated-steps = <255>;
92                 default-brightness-level = <128>;
93                 enable-gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>;
94
95                 pinctrl-0 = <&lcd_bl_en_default>;
96                 pinctrl-names = "default";
97         };
98
99         flash-led-controller {
100                 compatible = "ocs,ocp8110";
101                 flash-gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
102                 enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
103
104                 pinctrl-0 = <&camera_front_flash_default>;
105                 pinctrl-names = "default";
106
107                 led {
108                         function = LED_FUNCTION_FLASH;
109                         color = <LED_COLOR_ID_WHITE>;
110                         flash-max-timeout-us = <250000>;
111                 };
112         };
113
114         usb_id: usb-id {
115                 compatible = "linux,extcon-usb-gpio";
116                 id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
117                 pinctrl-0 = <&usb_id_default &usb_id_switch_default>;
118                 pinctrl-names = "default";
119         };
120
121 };
122
123 &blsp_i2c3 {
124         status = "okay";
125
126         magnetometer@d {
127                 compatible = "asahi-kasei,ak09911";
128                 reg = <0x0d>;
129
130                 vdd-supply = <&pm8916_l17>;
131                 vid-supply = <&pm8916_l6>;
132
133                 reset-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
134
135                 pinctrl-0 = <&mag_reset_default>;
136                 pinctrl-names = "default";
137         };
138
139         light-sensor@23 {
140                 compatible = "liteon,ltr559";
141                 reg = <0x23>;
142
143                 vdd-supply = <&pm8916_l17>;
144                 vddio-supply = <&pm8916_l5>;
145
146                 interrupts-extended = <&tlmm 113 IRQ_TYPE_EDGE_FALLING>;
147
148                 pinctrl-0 = <&light_int_default>;
149                 pinctrl-names = "default";
150         };
151
152         imu@68 {
153                 compatible = "bosch,bmi160";
154                 reg = <0x68>;
155
156                 vdd-supply = <&pm8916_l17>;
157                 vddio-supply = <&pm8916_l6>;
158         };
159 };
160
161 &blsp_i2c5 {
162         status = "okay";
163
164         touchscreen@4a {
165                 compatible = "atmel,maxtouch";
166                 reg = <0x4a>;
167
168                 interrupts-extended = <&tlmm 13 IRQ_TYPE_LEVEL_LOW>;
169
170                 reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
171
172                 vdda-supply = <&pm8916_l6>;
173                 vdd-supply = <&reg_ts_vdd>;
174
175                 pinctrl-0 = <&ts_int_reset_default>;
176                 pinctrl-names = "default";
177
178                 /* Keys listed from right to left */
179                 linux,keycodes = <KEY_APPSELECT KEY_HOMEPAGE KEY_BACK>;
180         };
181 };
182
183 &blsp_uart2 {
184         status = "okay";
185 };
186
187 &pm8916_mpps {
188         pwm_out: mpp4-state {
189                 pins = "mpp4";
190                 function = "digital";
191                 power-source = <PM8916_MPP_VPH>;
192                 output-low;
193                 qcom,dtest = <1>;
194         };
195 };
196
197 &pm8916_pwm {
198         pinctrl-0 = <&pwm_out>;
199         pinctrl-names = "default";
200         status = "okay";
201 };
202
203 &pm8916_resin {
204         linux,code = <KEY_VOLUMEDOWN>;
205         status = "okay";
206 };
207
208 &pm8916_rpm_regulators {
209         pm8916_l17: l17 {
210                 regulator-min-microvolt = <2850000>;
211                 regulator-max-microvolt = <2850000>;
212         };
213 };
214
215 &pm8916_vib {
216         status = "okay";
217 };
218
219 &sdhc_1 {
220         status = "okay";
221 };
222
223 &sdhc_2 {
224         pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
225         pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
226         pinctrl-names = "default", "sleep";
227
228         cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
229
230         status = "okay";
231 };
232
233 &usb {
234         extcon = <&usb_id>, <&usb_id>;
235         status = "okay";
236 };
237
238 &usb_hs_phy {
239         extcon = <&usb_id>;
240 };
241
242 &wcnss {
243         status = "okay";
244 };
245
246 &wcnss_iris {
247         compatible = "qcom,wcn3620";
248 };
249
250 &tlmm {
251         button_backlight_default: button-backlight-default-state {
252                 pins = "gpio17";
253                 function = "gpio";
254                 drive-strength = <2>;
255                 bias-disable;
256         };
257
258         camera_front_flash_default: camera-front-flash-default-state {
259                 pins = "gpio8", "gpio49";
260                 function = "gpio";
261                 drive-strength = <2>;
262                 bias-disable;
263         };
264
265         gpio_hall_sensor_default: gpio-hall-sensor-default-state {
266                 pins = "gpio20";
267                 function = "gpio";
268                 drive-strength = <2>;
269                 bias-disable;
270         };
271
272         gpio_keys_default: gpio-keys-default-state {
273                 pins = "gpio107";
274                 function = "gpio";
275                 drive-strength = <2>;
276                 bias-pull-up;
277         };
278
279         lcd_bl_en_default: lcd-bl-en-default-state {
280                 pins = "gpio98";
281                 function = "gpio";
282                 drive-strength = <2>;
283                 bias-disable;
284         };
285
286         light_int_default: light-int-default-state {
287                 pins = "gpio113";
288                 function = "gpio";
289                 drive-strength = <2>;
290                 bias-disable;
291         };
292
293         mag_reset_default: mag-reset-default-state {
294                 pins = "gpio68";
295                 function = "gpio";
296                 drive-strength = <2>;
297                 bias-disable;
298         };
299
300         sdc2_cd_default: sdc2-cd-default-state {
301                 pins = "gpio38";
302                 function = "gpio";
303                 drive-strength = <2>;
304                 bias-disable;
305         };
306
307         ts_int_reset_default: ts-int-reset-default-state {
308                 pins = "gpio12", "gpio13";
309                 function = "gpio";
310                 drive-strength = <2>;
311                 bias-disable;
312         };
313
314         ts_vdd_default: ts-vdd-default-state {
315                 pins = "gpio78";
316                 function = "gpio";
317                 drive-strength = <2>;
318                 bias-disable;
319         };
320
321         usb_id_default: usb-id-default-state {
322                 pins = "gpio110";
323                 function = "gpio";
324                 drive-strength = <8>;
325                 bias-pull-up;
326         };
327
328         usb_id_switch_default: usb-id-switch-default-state {
329                 pins = "gpio121";
330                 function = "gpio";
331                 drive-strength = <2>;
332                 output-high;
333         };
334 };