Linux 6.7-rc7
[linux-modified.git] / arch / arm64 / boot / dts / qcom / msm8916-longcheer-l8150.dts
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         chassis-type = "handset";
15
16         aliases {
17                 mmc0 = &sdhc_1; /* eMMC */
18                 mmc1 = &sdhc_2; /* SD card */
19                 serial0 = &blsp_uart2;
20         };
21
22         chosen {
23                 stdout-path = "serial0";
24         };
25
26         /*
27          * For some reason, the signed wcnss firmware is not relocatable.
28          * It must be loaded at 0x8b600000. All other firmware is relocatable,
29          * so place wcnss at the fixed address and then all other firmware
30          * regions will be automatically allocated at a fitting place.
31          */
32         reserved-memory {
33                 /delete-node/ wcnss;
34
35                 wcnss_mem: wcnss@8b600000 {
36                         reg = <0x0 0x8b600000 0x0 0x600000>;
37                         no-map;
38                 };
39         };
40
41         gpio-keys {
42                 compatible = "gpio-keys";
43
44                 pinctrl-names = "default";
45                 pinctrl-0 = <&gpio_keys_default>;
46
47                 label = "GPIO Buttons";
48
49                 button-volume-up {
50                         label = "Volume Up";
51                         gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
52                         linux,code = <KEY_VOLUMEUP>;
53                 };
54         };
55
56         reg_ctp: regulator-ctp {
57                 compatible = "regulator-fixed";
58                 regulator-name = "ctp";
59
60                 regulator-min-microvolt = <2800000>;
61                 regulator-max-microvolt = <2800000>;
62
63                 gpio = <&tlmm 17 GPIO_ACTIVE_HIGH>;
64                 enable-active-high;
65
66                 pinctrl-names = "default";
67                 pinctrl-0 = <&ctp_pwr_en_default>;
68         };
69
70         flash-led-controller {
71                 compatible = "sgmicro,sgm3140";
72                 flash-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
73                 enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
74
75                 pinctrl-names = "default";
76                 pinctrl-0 = <&camera_flash_default>;
77
78                 flash_led: led {
79                         function = LED_FUNCTION_FLASH;
80                         color = <LED_COLOR_ID_WHITE>;
81                         flash-max-timeout-us = <250000>;
82                 };
83         };
84 };
85
86 &blsp_i2c1 {
87         status = "okay";
88
89         led-controller@45 {
90                 compatible = "awinic,aw2013";
91                 reg = <0x45>;
92                 #address-cells = <1>;
93                 #size-cells = <0>;
94
95                 vcc-supply = <&pm8916_l17>;
96
97                 led@0 {
98                         reg = <0>;
99                         led-max-microamp = <5000>;
100                         function = LED_FUNCTION_INDICATOR;
101                         color = <LED_COLOR_ID_RED>;
102                 };
103
104                 led@1 {
105                         reg = <1>;
106                         led-max-microamp = <5000>;
107                         function = LED_FUNCTION_INDICATOR;
108                         color = <LED_COLOR_ID_GREEN>;
109                 };
110
111                 led@2 {
112                         reg = <2>;
113                         led-max-microamp = <5000>;
114                         function = LED_FUNCTION_INDICATOR;
115                         color = <LED_COLOR_ID_BLUE>;
116                 };
117         };
118 };
119
120 &blsp_i2c2 {
121         status = "okay";
122
123         accelerometer@10 {
124                 compatible = "bosch,bmc156_accel";
125                 reg = <0x10>;
126
127                 /*
128                  * For some reason the interrupt line is usually not connected
129                  * to the BMC156. However, there are two pads next to the chip
130                  * that can be shorted to make it work if needed.
131                  *
132                  * interrupt-parent = <&tlmm>;
133                  * interrupts = <116 IRQ_TYPE_EDGE_RISING>;
134                  */
135
136                 pinctrl-names = "default";
137                 pinctrl-0 = <&accel_int_default>;
138
139                 vdd-supply = <&pm8916_l17>;
140                 vddio-supply = <&pm8916_l6>;
141
142                 mount-matrix = "0", "1", "0",
143                               "-1", "0", "0",
144                                "0", "0", "1";
145         };
146
147         magnetometer@12 {
148                 compatible = "bosch,bmc156_magn";
149                 reg = <0x12>;
150
151                 interrupt-parent = <&tlmm>;
152                 interrupts = <113 IRQ_TYPE_EDGE_RISING>;
153
154                 pinctrl-names = "default";
155                 pinctrl-0 = <&magn_int_default>;
156
157                 vdd-supply = <&pm8916_l17>;
158                 vddio-supply = <&pm8916_l6>;
159         };
160
161         light-sensor@23 {
162                 compatible = "liteon,ltr559";
163                 reg = <0x23>;
164                 proximity-near-level = <75>;
165
166                 interrupt-parent = <&tlmm>;
167                 interrupts = <115 IRQ_TYPE_EDGE_FALLING>;
168
169                 pinctrl-names = "default";
170                 pinctrl-0 = <&light_int_default>;
171
172                 vdd-supply = <&pm8916_l17>;
173                 vddio-supply = <&pm8916_l6>;
174         };
175
176         gyroscope@68 {
177                 compatible = "bosch,bmg160";
178                 reg = <0x68>;
179
180                 interrupt-parent = <&tlmm>;
181                 interrupts = <23 IRQ_TYPE_EDGE_RISING>,
182                              <22 IRQ_TYPE_EDGE_RISING>;
183
184                 pinctrl-names = "default";
185                 pinctrl-0 = <&gyro_int_default>;
186
187                 vdd-supply = <&pm8916_l17>;
188                 vddio-supply = <&pm8916_l6>;
189         };
190 };
191
192 &blsp_i2c5 {
193         status = "okay";
194
195         rmi4@20 {
196                 compatible = "syna,rmi4-i2c";
197                 reg = <0x20>;
198                 #address-cells = <1>;
199                 #size-cells = <0>;
200
201                 interrupt-parent = <&tlmm>;
202                 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
203
204                 vdd-supply = <&reg_ctp>;
205                 vio-supply = <&pm8916_l6>;
206
207                 pinctrl-names = "default";
208                 pinctrl-0 = <&tp_int_default>;
209
210                 syna,startup-delay-ms = <10>;
211
212                 rmi4-f01@1 {
213                         reg = <0x1>;
214                         syna,nosleep-mode = <1>; /* Allow sleeping */
215                 };
216
217                 rmi4-f12@12 {
218                         reg = <0x12>;
219                         syna,sensor-type = <1>; /* Touchscreen */
220                 };
221         };
222 };
223
224 &blsp_uart2 {
225         status = "okay";
226 };
227
228 &pm8916_resin {
229         status = "okay";
230         linux,code = <KEY_VOLUMEDOWN>;
231 };
232
233 &pm8916_rpm_regulators {
234         pm8916_l17: l17 {
235                 regulator-min-microvolt = <2850000>;
236                 regulator-max-microvolt = <2850000>;
237         };
238 };
239
240 &pm8916_usbin {
241         status = "okay";
242 };
243
244 &pm8916_vib {
245         status = "okay";
246 };
247
248 &sdhc_1 {
249         status = "okay";
250 };
251
252 &sdhc_2 {
253         status = "okay";
254         non-removable;
255 };
256
257 &usb {
258         status = "okay";
259         dr_mode = "peripheral";
260         extcon = <&pm8916_usbin>;
261 };
262
263 &usb_hs_phy {
264         extcon = <&pm8916_usbin>;
265 };
266
267 &venus {
268         status = "okay";
269 };
270
271 &venus_mem {
272         status = "okay";
273 };
274
275 &wcnss {
276         status = "okay";
277 };
278
279 &wcnss_iris {
280         compatible = "qcom,wcn3620";
281 };
282
283 &wcnss_mem {
284         status = "okay";
285 };
286
287 &tlmm {
288         accel_int_default: accel-int-default-state {
289                 pins = "gpio116";
290                 function = "gpio";
291
292                 drive-strength = <2>;
293                 bias-disable;
294         };
295
296         camera_flash_default: camera-flash-default-state {
297                 pins = "gpio31", "gpio32";
298                 function = "gpio";
299
300                 drive-strength = <2>;
301                 bias-disable;
302         };
303
304         ctp_pwr_en_default: ctp-pwr-en-default-state {
305                 pins = "gpio17";
306                 function = "gpio";
307
308                 drive-strength = <2>;
309                 bias-disable;
310         };
311
312         gpio_keys_default: gpio-keys-default-state {
313                 pins = "gpio107";
314                 function = "gpio";
315
316                 drive-strength = <2>;
317                 bias-pull-up;
318         };
319
320         gyro_int_default: gyro-int-default-state {
321                 pins = "gpio22", "gpio23";
322                 function = "gpio";
323
324                 drive-strength = <2>;
325                 bias-disable;
326         };
327
328         light_int_default: light-int-default-state {
329                 pins = "gpio115";
330                 function = "gpio";
331
332                 drive-strength = <2>;
333                 bias-disable;
334         };
335
336         magn_int_default: magn-int-default-state {
337                 pins = "gpio113";
338                 function = "gpio";
339
340                 drive-strength = <2>;
341                 bias-disable;
342         };
343
344         tp_int_default: tp-int-default-state {
345                 pins = "gpio13";
346                 function = "gpio";
347
348                 drive-strength = <2>;
349                 bias-disable;
350         };
351 };