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