GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm / boot / dts / qcom-apq8026-lg-lenok.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3  * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
4  */
5
6 /dts-v1/;
7
8 #include "qcom-msm8226.dtsi"
9 #include "qcom-pm8226.dtsi"
10
11 /delete-node/ &adsp_region;
12
13 / {
14         model = "LG G Watch R";
15         compatible = "lg,lenok", "qcom,apq8026";
16         qcom,board-id = <132 0x0a>;
17         qcom,msm-id = <199 0x20000>;
18
19         aliases {
20                 serial0 = &blsp1_uart3;
21                 serial1 = &blsp1_uart4;
22         };
23
24         chosen {
25                 stdout-path = "serial0:115200n8";
26         };
27
28         reserved-memory {
29                 sbl_region: sbl@2f00000 {
30                         reg = <0x02f00000 0x100000>;
31                         no-map;
32                 };
33
34                 external_image_region: external-image@3100000 {
35                         reg = <0x03100000 0x200000>;
36                         no-map;
37                 };
38
39                 adsp_region: adsp@3300000 {
40                         reg = <0x03300000 0x1400000>;
41                         no-map;
42                 };
43         };
44
45         vreg_wlan: wlan-regulator {
46                 compatible = "regulator-fixed";
47
48                 regulator-name = "wl-reg";
49                 regulator-min-microvolt = <2950000>;
50                 regulator-max-microvolt = <2950000>;
51
52                 gpio = <&tlmm 46 GPIO_ACTIVE_HIGH>;
53                 enable-active-high;
54
55                 pinctrl-names = "default";
56                 pinctrl-0 = <&wlan_regulator_default_state>;
57         };
58 };
59
60 &adsp {
61         status = "okay";
62 };
63
64 &blsp1_i2c1 {
65         status = "okay";
66
67         fuel-gauge@55 {
68                 compatible = "ti,bq27421";
69                 reg = <0x55>;
70         };
71 };
72
73 &blsp1_i2c5 {
74         status = "okay";
75         clock-frequency = <384000>;
76
77         touchscreen@20 {
78                 compatible = "syna,rmi4-i2c";
79                 reg = <0x20>;
80
81                 interrupts-extended = <&tlmm 17 IRQ_TYPE_EDGE_FALLING>;
82                 vdd-supply = <&pm8226_l15>;
83                 vio-supply = <&pm8226_l22>;
84
85                 pinctrl-names = "default";
86                 pinctrl-0 = <&touch_pins>;
87
88                 #address-cells = <1>;
89                 #size-cells = <0>;
90
91                 rmi4-f01@1 {
92                         reg = <0x1>;
93                         syna,nosleep-mode = <1>;
94                 };
95
96                 rmi4-f12@12 {
97                         reg = <0x12>;
98                         syna,sensor-type = <1>;
99                 };
100         };
101 };
102
103 &blsp1_uart3 {
104         status = "okay";
105 };
106
107 &blsp1_uart4 {
108         status = "okay";
109
110         pinctrl-names = "default";
111         pinctrl-0 = <&blsp1_uart4_default_state>;
112
113         bluetooth {
114                 compatible = "brcm,bcm43430a0-bt";
115
116                 max-speed = <3000000>;
117
118                 pinctrl-names = "default";
119                 pinctrl-0 = <&bluetooth_default_state>;
120
121                 host-wakeup-gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>;
122                 device-wakeup-gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
123                 shutdown-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
124         };
125 };
126
127 &rpm_requests {
128         pm8226-regulators {
129                 compatible = "qcom,rpm-pm8226-regulators";
130
131                 pm8226_s3: s3 {
132                         regulator-min-microvolt = <1200000>;
133                         regulator-max-microvolt = <1350000>;
134                 };
135                 pm8226_s4: s4 {
136                         regulator-min-microvolt = <1800000>;
137                         regulator-max-microvolt = <2200000>;
138                 };
139                 pm8226_s5: s5 {
140                         regulator-min-microvolt = <1150000>;
141                         regulator-max-microvolt = <1150000>;
142                 };
143
144                 pm8226_l1: l1 {
145                         regulator-min-microvolt = <1225000>;
146                         regulator-max-microvolt = <1225000>;
147                 };
148                 pm8226_l2: l2 {
149                         regulator-min-microvolt = <1200000>;
150                         regulator-max-microvolt = <1200000>;
151                 };
152                 pm8226_l3: l3 {
153                         regulator-min-microvolt = <750000>;
154                         regulator-max-microvolt = <1337500>;
155                 };
156                 pm8226_l4: l4 {
157                         regulator-min-microvolt = <1200000>;
158                         regulator-max-microvolt = <1200000>;
159                 };
160                 pm8226_l5: l5 {
161                         regulator-min-microvolt = <1200000>;
162                         regulator-max-microvolt = <1200000>;
163                 };
164                 pm8226_l6: l6 {
165                         regulator-min-microvolt = <1800000>;
166                         regulator-max-microvolt = <1800000>;
167                 };
168                 pm8226_l7: l7 {
169                         regulator-min-microvolt = <1850000>;
170                         regulator-max-microvolt = <1850000>;
171                 };
172                 pm8226_l8: l8 {
173                         regulator-min-microvolt = <1800000>;
174                         regulator-max-microvolt = <1800000>;
175                 };
176                 pm8226_l9: l9 {
177                         regulator-min-microvolt = <2050000>;
178                         regulator-max-microvolt = <2050000>;
179                 };
180                 pm8226_l10: l10 {
181                         regulator-min-microvolt = <1800000>;
182                         regulator-max-microvolt = <1800000>;
183                 };
184                 pm8226_l12: l12 {
185                         regulator-min-microvolt = <1800000>;
186                         regulator-max-microvolt = <1800000>;
187                 };
188                 pm8226_l14: l14 {
189                         regulator-min-microvolt = <2750000>;
190                         regulator-max-microvolt = <2750000>;
191                 };
192                 pm8226_l15: l15 {
193                         regulator-min-microvolt = <3300000>;
194                         regulator-max-microvolt = <3300000>;
195                 };
196                 pm8226_l16: l16 {
197                         regulator-min-microvolt = <3000000>;
198                         regulator-max-microvolt = <3350000>;
199                 };
200                 pm8226_l17: l17 {
201                         regulator-min-microvolt = <2950000>;
202                         regulator-max-microvolt = <2950000>;
203                 };
204                 pm8226_l18: l18 {
205                         regulator-min-microvolt = <3000000>;
206                         regulator-max-microvolt = <3300000>;
207                 };
208                 pm8226_l19: l19 {
209                         regulator-min-microvolt = <3000000>;
210                         regulator-max-microvolt = <3000000>;
211                 };
212                 pm8226_l20: l20 {
213                         regulator-min-microvolt = <3075000>;
214                         regulator-max-microvolt = <3075000>;
215                 };
216                 pm8226_l21: l21 {
217                         regulator-min-microvolt = <1800000>;
218                         regulator-max-microvolt = <2950000>;
219                 };
220                 pm8226_l22: l22 {
221                         regulator-min-microvolt = <1800000>;
222                         regulator-max-microvolt = <1800000>;
223                 };
224                 pm8226_l23: l23 {
225                         regulator-min-microvolt = <1800000>;
226                         regulator-max-microvolt = <2950000>;
227                 };
228                 pm8226_l24: l24 {
229                         regulator-min-microvolt = <1300000>;
230                         regulator-max-microvolt = <1350000>;
231                 };
232                 pm8226_l25: l25 {
233                         regulator-min-microvolt = <1775000>;
234                         regulator-max-microvolt = <2125000>;
235                 };
236                 pm8226_l26: l26 {
237                         regulator-min-microvolt = <1225000>;
238                         regulator-max-microvolt = <1225000>;
239                 };
240                 pm8226_l27: l27 {
241                         regulator-min-microvolt = <2050000>;
242                         regulator-max-microvolt = <2050000>;
243                 };
244                 pm8226_l28: l28 {
245                         regulator-min-microvolt = <2700000>;
246                         regulator-max-microvolt = <3000000>;
247                 };
248
249                 pm8226_lvs1: lvs1 {};
250         };
251 };
252
253 &sdhc_1 {
254         status = "okay";
255
256         vmmc-supply = <&pm8226_l17>;
257         vqmmc-supply = <&pm8226_l6>;
258
259         bus-width = <8>;
260         non-removable;
261 };
262
263 &sdhc_3 {
264         status = "okay";
265
266         max-frequency = <100000000>;
267         non-removable;
268
269         vmmc-supply = <&vreg_wlan>;
270         vqmmc-supply = <&pm8226_l6>;
271
272         #address-cells = <1>;
273         #size-cells = <0>;
274
275         wifi@1 {
276                 compatible = "brcm,bcm43430a0-fmac", "brcm,bcm4329-fmac";
277                 reg = <1>;
278
279                 interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_FALLING>;
280                 interrupt-names = "host-wake";
281
282                 pinctrl-names = "default";
283                 pinctrl-0 = <&wlan_hostwake_default_state>;
284         };
285 };
286
287 &smbb {
288         qcom,fast-charge-safe-current = <450000>;
289         qcom,fast-charge-current-limit = <400000>;
290         qcom,fast-charge-safe-voltage = <4350000>;
291         qcom,fast-charge-high-threshold-voltage = <4350000>;
292         qcom,auto-recharge-threshold-voltage = <4240000>;
293         qcom,minimum-input-voltage = <4450000>;
294 };
295
296 &tlmm {
297         blsp1_uart4_default_state: blsp1-uart4-default-state {
298                 pins = "gpio12", "gpio13", "gpio14", "gpio15";
299                 function = "blsp_uart4";
300                 drive-strength = <8>;
301                 bias-disable;
302         };
303
304         bluetooth_default_state: bluetooth-default-state {
305                 pins = "gpio47", "gpio48";
306                 function = "gpio";
307                 drive-strength = <2>;
308                 bias-disable;
309                 input-enable;
310         };
311
312         touch_pins: touch {
313                 irq {
314                         pins = "gpio17";
315                         function = "gpio";
316
317                         drive-strength = <8>;
318                         bias-pull-down;
319                         input-enable;
320                 };
321
322                 reset {
323                         pins = "gpio16";
324                         function = "gpio";
325
326                         drive-strength = <8>;
327                         bias-disable;
328                         output-high;
329                 };
330         };
331
332         wlan_hostwake_default_state: wlan-hostwake-default-state {
333                 pins = "gpio37";
334                 function = "gpio";
335                 drive-strength = <2>;
336                 bias-disable;
337                 input-enable;
338         };
339
340         wlan_regulator_default_state: wlan-regulator-default-state {
341                 pins = "gpio46";
342                 function = "gpio";
343                 drive-strength = <2>;
344                 bias-pull-up;
345         };
346 };
347
348 &usb {
349         status = "okay";
350         extcon = <&smbb>;
351         dr_mode = "peripheral";
352 };
353
354 &usb_hs_phy {
355         extcon = <&smbb>;
356         v1p8-supply = <&pm8226_l10>;
357         v3p3-supply = <&pm8226_l20>;
358 };