xref: /linux/scripts/dtc/include-prefixes/arm64/qcom/msm8917-xiaomi-wingtech.dtsi (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (c) 2023, Barnabas Czeman
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/arm/qcom,ids.h>
9#include <dt-bindings/gpio/gpio.h>
10#include "msm8917.dtsi"
11#include "pm8937.dtsi"
12
13/delete-node/ &qseecom_mem;
14
15/ {
16	chassis-type = "handset";
17
18	qcom,msm-id = <QCOM_ID_MSM8917 0>;
19
20	pwm_backlight: backlight {
21		compatible = "pwm-backlight";
22		pwms = <&pm8937_pwm 0 100000>;
23		brightness-levels = <0 255>;
24		num-interpolated-steps = <255>;
25		default-brightness-level = <128>;
26	};
27
28	chosen {
29		#address-cells = <2>;
30		#size-cells = <2>;
31		ranges;
32
33		framebuffer {
34			compatible = "simple-framebuffer";
35			memory-region = <&framebuffer_mem>;
36			width = <720>;
37			height = <1280>;
38			stride = <(720 * 3)>;
39			format = "r8g8b8";
40
41			clocks = <&gcc GCC_MDSS_AHB_CLK>,
42				 <&gcc GCC_MDSS_AXI_CLK>,
43				 <&gcc GCC_MDSS_VSYNC_CLK>,
44				 <&gcc GCC_MDSS_MDP_CLK>,
45				 <&gcc GCC_MDSS_BYTE0_CLK>,
46				 <&gcc GCC_MDSS_PCLK0_CLK>,
47				 <&gcc GCC_MDSS_ESC0_CLK>;
48			power-domains = <&gcc MDSS_GDSC>;
49		};
50	};
51
52	gpio-keys {
53		compatible = "gpio-keys";
54
55		pinctrl-0 = <&gpio_keys_default>;
56		pinctrl-names = "default";
57
58		key-volup {
59			label = "Volume Up";
60			linux,code = <KEY_VOLUMEUP>;
61			gpios = <&tlmm 91 GPIO_ACTIVE_LOW>;
62			debounce-interval = <15>;
63		};
64	};
65
66	vph_pwr: regulator-vph-pwr {
67		compatible = "regulator-fixed";
68		regulator-name = "vph_pwr";
69		regulator-min-microvolt = <3700000>;
70		regulator-max-microvolt = <3700000>;
71		regulator-always-on;
72		regulator-boot-on;
73	};
74
75	reserved-memory {
76		qseecom_mem: qseecom@84a00000 {
77			reg = <0x0 0x84a00000 0x0 0x1900000>;
78			no-map;
79		};
80
81		framebuffer_mem: memory@90001000 {
82			reg = <0x0 0x90001000 0x0 (720 * 1280 * 3)>;
83			no-map;
84		};
85	};
86};
87
88&blsp1_i2c3 {
89	status = "okay";
90
91	edt_ft5306: touchscreen@38 {
92		compatible = "edt,edt-ft5306";
93		reg = <0x38>;
94		interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>;
95		reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
96		pinctrl-0 = <&tsp_int_rst_default>;
97		pinctrl-names = "default";
98		vcc-supply = <&pm8937_l10>;
99		iovcc-supply = <&pm8937_l5>;
100		touchscreen-size-x = <720>;
101		touchscreen-size-y = <1280>;
102
103		status = "disabled";
104	};
105
106	goodix_gt911: touchscreen@5d {
107		compatible = "goodix,gt911";
108		reg = <0x5d>;
109		interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>;
110		irq-gpios = <&tlmm 65 GPIO_ACTIVE_HIGH>;
111		reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
112		pinctrl-0 = <&tsp_int_rst_default>;
113		pinctrl-names = "default";
114		AVDD28-supply = <&pm8937_l10>;
115		VDDIO-supply = <&pm8937_l5>;
116		touchscreen-size-x = <720>;
117		touchscreen-size-y = <1280>;
118
119		status = "disabled";
120	};
121};
122
123&pm8937_gpios {
124	pwm_enable_default: pwm-enable-default-state {
125		pins = "gpio8";
126		function = "dtest2";
127		output-low;
128		bias-disable;
129		qcom,drive-strength = <2>;
130	};
131};
132
133&pm8937_pwm {
134	pinctrl-0 = <&pwm_enable_default>;
135	pinctrl-names = "default";
136
137	status = "okay";
138};
139
140&pm8937_resin {
141	linux,code = <KEY_VOLUMEDOWN>;
142
143	status = "okay";
144};
145
146&rpm_requests {
147	regulators-0 {
148		compatible = "qcom,rpm-pm8937-regulators";
149
150		vdd_s1-supply = <&vph_pwr>;
151		vdd_s2-supply = <&vph_pwr>;
152		vdd_s3-supply = <&vph_pwr>;
153		vdd_s4-supply = <&vph_pwr>;
154
155		vdd_l1_l19-supply = <&pm8937_s3>;
156		vdd_l2_l23-supply = <&pm8937_s3>;
157		vdd_l3-supply = <&pm8937_s3>;
158		vdd_l4_l5_l6_l7_l16-supply = <&pm8937_s4>;
159		vdd_l8_l11_l12_l17_l22-supply = <&vph_pwr>;
160		vdd_l9_l10_l13_l14_l15_l18-supply = <&vph_pwr>;
161
162		pm8937_s1: s1 {
163			regulator-min-microvolt = <1000000>;
164			regulator-max-microvolt = <1225000>;
165		};
166
167		pm8937_s3: s3 {
168			regulator-min-microvolt = <1300000>;
169			regulator-max-microvolt = <1300000>;
170		};
171
172		pm8937_s4: s4 {
173			regulator-min-microvolt = <2050000>;
174			regulator-max-microvolt = <2050000>;
175		};
176
177		pm8937_l2: l2 {
178			regulator-min-microvolt = <1200000>;
179			regulator-max-microvolt = <1200000>;
180		};
181
182		pm8937_l5: l5 {
183			regulator-min-microvolt = <1800000>;
184			regulator-max-microvolt = <1800000>;
185		};
186
187		pm8937_l6: l6 {
188			regulator-min-microvolt = <1800000>;
189			regulator-max-microvolt = <1800000>;
190		};
191
192		pm8937_l7: l7 {
193			regulator-min-microvolt = <1800000>;
194			regulator-max-microvolt = <1800000>;
195		};
196
197		pm8937_l8: l8 {
198			regulator-min-microvolt = <2850000>;
199			regulator-max-microvolt = <2900000>;
200		};
201
202		pm8937_l9: l9 {
203			regulator-min-microvolt = <3000000>;
204			regulator-max-microvolt = <3300000>;
205		};
206
207		pm8937_l10: l10 {
208			regulator-min-microvolt = <2800000>;
209			regulator-max-microvolt = <3000000>;
210		};
211
212		pm8937_l11: l11 {
213			regulator-min-microvolt = <2950000>;
214			regulator-max-microvolt = <2950000>;
215			regulator-allow-set-load;
216			regulator-system-load = <200000>;
217		};
218
219		pm8937_l12: l12 {
220			regulator-min-microvolt = <1800000>;
221			regulator-max-microvolt = <2950000>;
222		};
223
224		pm8937_l13: l13 {
225			regulator-min-microvolt = <3075000>;
226			regulator-max-microvolt = <3075000>;
227		};
228
229		pm8937_l14: l14 {
230			regulator-min-microvolt = <1800000>;
231			regulator-max-microvolt = <3300000>;
232		};
233
234		pm8937_l15: l15 {
235			regulator-min-microvolt = <1800000>;
236			regulator-max-microvolt = <3300000>;
237		};
238
239		pm8937_l16: l16 {
240			regulator-min-microvolt = <1800000>;
241			regulator-max-microvolt = <1800000>;
242		};
243
244		pm8937_l17: l17 {
245			regulator-min-microvolt = <2800000>;
246			regulator-max-microvolt = <2900000>;
247		};
248
249		pm8937_l19: l19 {
250			regulator-min-microvolt = <1225000>;
251			regulator-max-microvolt = <1350000>;
252		};
253
254		pm8937_l22: l22 {
255			regulator-min-microvolt = <2800000>;
256			regulator-max-microvolt = <2800000>;
257		};
258
259		pm8937_l23: l23 {
260			regulator-min-microvolt = <1200000>;
261			regulator-max-microvolt = <1200000>;
262		};
263	};
264};
265
266&sdhc_1 {
267	vmmc-supply = <&pm8937_l8>;
268	vqmmc-supply = <&pm8937_l5>;
269
270	status = "okay";
271};
272
273&sdhc_2 {
274	cd-gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
275	vmmc-supply = <&pm8937_l11>;
276	vqmmc-supply = <&pm8937_l12>;
277	pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
278	pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
279	pinctrl-names = "default", "sleep";
280
281	status = "okay";
282};
283
284&sleep_clk {
285	clock-frequency = <32768>;
286};
287
288&tlmm {
289	gpio_keys_default: gpio-keys-default-state {
290		pins = "gpio91";
291		function = "gpio";
292		drive-strength = <2>;
293		bias-pull-up;
294	};
295
296	sdc2_cd_default: sdc2-cd-default-state {
297		pins = "gpio67";
298		function = "gpio";
299		drive-strength = <2>;
300		bias-disable;
301	};
302
303	tsp_int_rst_default: tsp-int-rst-default-state {
304		pins = "gpio64", "gpio65";
305		function = "gpio";
306		drive-strength = <8>;
307		bias-pull-up;
308	};
309};
310
311&wcnss {
312	vddpx-supply = <&pm8937_l5>;
313
314	status = "okay";
315};
316
317&wcnss_iris {
318	compatible = "qcom,wcn3620";
319	vddxo-supply = <&pm8937_l7>;
320	vddrfa-supply = <&pm8937_l19>;
321	vddpa-supply = <&pm8937_l9>;
322	vdddig-supply = <&pm8937_l5>;
323};
324
325&wcnss_mem {
326	status = "okay";
327};
328
329&xo_board {
330	clock-frequency = <19200000>;
331};
332