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