1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2024, Neil Armstrong <[email protected]>
4 */
5/dts-v1/;
6
7#include "sdm450.dtsi"
8#include "pm8953.dtsi"
9#include "pmi8950.dtsi"
10
11/ {
12	model = "Lenovo Smart Tab M10";
13	compatible = "lenovo,tbx605f", "qcom,sdm450";
14	chassis-type = "tablet";
15
16	chosen {
17		#address-cells = <2>;
18		#size-cells = <2>;
19		ranges;
20
21		framebuffer@90001000 {
22			compatible = "simple-framebuffer";
23			reg = <0 0x90001000 0 (1200 * 1920 * 3)>;
24
25			width = <1200>;
26			height = <1920>;
27			stride = <(1200 * 3)>;
28			format = "r8g8b8";
29
30			power-domains = <&gcc MDSS_GDSC>;
31
32			clocks = <&gcc GCC_MDSS_AHB_CLK>,
33				 <&gcc GCC_MDSS_AXI_CLK>,
34				 <&gcc GCC_MDSS_VSYNC_CLK>,
35				 <&gcc GCC_MDSS_MDP_CLK>,
36				 <&gcc GCC_MDSS_BYTE0_CLK>,
37				 <&gcc GCC_MDSS_PCLK0_CLK>,
38				 <&gcc GCC_MDSS_ESC0_CLK>;
39		};
40	};
41
42	reserved-memory {
43		other-ext-region@0 {
44			no-map;
45			reg = <0x00 0x84500000 0x00 0x2300000>;
46		};
47	};
48
49	backlight: gpio-backlight {
50		compatible = "gpio-backlight";
51
52		gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
53
54		default-on;
55
56		pinctrl-names = "default";
57		pinctrl-0 = <&backlight_enable_active>;
58		pinctrl-1 = <&backlight_enable_sleep>;
59	};
60
61	gpio-keys {
62		compatible = "gpio-keys";
63		key-volume-up {
64			label = "volume_up";
65			gpios = <&tlmm 85 GPIO_ACTIVE_LOW>;
66			linux,code = <KEY_VOLUMEUP>;
67		};
68	};
69
70	vph_pwr: vph-pwr-regulator {
71		compatible = "regulator-fixed";
72		regulator-name = "vph_pwr";
73		regulator-always-on;
74		regulator-boot-on;
75	};
76};
77
78&mdss {
79	status = "okay";
80};
81
82&mdss_dsi0 {
83	vdda-supply = <&pm8953_s3>;
84	vddio-supply = <&pm8953_l6>;
85
86	status = "okay";
87
88	panel@0 {
89		compatible = "boe,tv101wum-ll2";
90		reg = <0>;
91
92		vsp-supply = <&lab>;
93		vsn-supply = <&ibb>;
94		reset-gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
95
96		backlight = <&backlight>;
97
98		pinctrl-names = "default";
99		pinctrl-0 = <&panel_reset_active>;
100		pinctrl-1 = <&panel_reset_sleep>;
101
102		port {
103			panel_in: endpoint {
104				remote-endpoint = <&mdss_dsi0_out>;
105			};
106		};
107	};
108};
109
110&mdss_dsi0_out {
111	remote-endpoint = <&panel_in>;
112	data-lanes = <0 1 2 3>;
113};
114
115&mdss_dsi0_phy {
116	vcca-supply = <&pm8953_l3>;
117
118	status = "okay";
119};
120
121&hsusb_phy {
122	vdd-supply = <&pm8953_l3>;
123	vdda-pll-supply = <&pm8953_l7>;
124	vdda-phy-dpdm-supply = <&pm8953_l13>;
125
126	status = "okay";
127};
128
129&i2c_3 {
130	status = "okay";
131
132	touchscreen@38 {
133		compatible = "edt,edt-ft5506";
134		reg = <0x38>;
135		interrupt-parent = <&tlmm>;
136		interrupts = <65 IRQ_TYPE_EDGE_FALLING>;
137		vcc-supply = <&pm8953_l10>;
138
139		pinctrl-names = "default";
140		pinctrl-0 = <&ts_int_active &ts_reset_active>;
141
142		reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
143		touchscreen-size-x = <1200>;
144		touchscreen-size-y = <1920>;
145	};
146};
147
148&ibb {
149	regulator-min-microvolt = <4600000>;
150	regulator-max-microvolt = <6000000>;
151	qcom,discharge-resistor-kohms = <32>;
152};
153
154&lab {
155	regulator-min-microvolt = <4600000>;
156	regulator-max-microvolt = <6000000>;
157	qcom,soft-start-us = <800>;
158};
159
160&pm8953_resin {
161	linux,code = <KEY_VOLUMEDOWN>;
162	status = "okay";
163};
164
165&rpm_requests {
166	regulators {
167		compatible = "qcom,rpm-pm8953-regulators";
168
169		vdd_s1-supply = <&vph_pwr>;
170		vdd_s2-supply = <&vph_pwr>;
171		vdd_s3-supply = <&vph_pwr>;
172		vdd_s4-supply = <&vph_pwr>;
173		vdd_s5-supply = <&vph_pwr>;
174		vdd_s6-supply = <&vph_pwr>;
175		vdd_s7-supply = <&vph_pwr>;
176		vdd_l1-supply = <&pm8953_s3>;
177		vdd_l2_l3-supply = <&pm8953_s3>;
178		vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>;
179		vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>;
180		vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>;
181
182		pm8953_s1: s1 {
183			regulator-min-microvolt = <870000>;
184			regulator-max-microvolt = <1156000>;
185		};
186
187		pm8953_s3: s3 {
188			regulator-min-microvolt = <1224000>;
189			regulator-max-microvolt = <1224000>;
190		};
191
192		pm8953_s4: s4 {
193			regulator-min-microvolt = <1900000>;
194			regulator-max-microvolt = <2050000>;
195		};
196
197		pm8953_l1: l1 {
198			regulator-min-microvolt = <1000000>;
199			regulator-max-microvolt = <1100000>;
200		};
201
202		pm8953_l2: l2 {
203			regulator-min-microvolt = <975000>;
204			regulator-max-microvolt = <1225000>;
205		};
206
207		pm8953_l3: l3 {
208			regulator-min-microvolt = <925000>;
209			regulator-max-microvolt = <925000>;
210		};
211
212		pm8953_l5: l5 {
213			regulator-min-microvolt = <1800000>;
214			regulator-max-microvolt = <1800000>;
215		};
216
217		pm8953_l6: l6 {
218			regulator-min-microvolt = <1800000>;
219			regulator-max-microvolt = <1800000>;
220		};
221
222		pm8953_l7: l7 {
223			regulator-min-microvolt = <1800000>;
224			regulator-max-microvolt = <1900000>;
225		};
226
227		pm8953_l8: l8 {
228			regulator-min-microvolt = <2900000>;
229			regulator-max-microvolt = <2900000>;
230		};
231
232		pm8953_l9: l9 {
233			regulator-min-microvolt = <3000000>;
234			regulator-max-microvolt = <3300000>;
235		};
236
237		pm8953_l10: l10 {
238			regulator-min-microvolt = <2850000>;
239			regulator-max-microvolt = <2850000>;
240		};
241
242		pm8953_l11: l11 {
243			regulator-min-microvolt = <3300000>;
244			regulator-max-microvolt = <3300000>;
245		};
246
247		pm8953_l12: l12 {
248			regulator-min-microvolt = <2950000>;
249			regulator-max-microvolt = <2950000>;
250		};
251
252		pm8953_l13: l13 {
253			regulator-min-microvolt = <3125000>;
254			regulator-max-microvolt = <3125000>;
255		};
256
257		pm8953_l16: l16 {
258			regulator-min-microvolt = <1800000>;
259			regulator-max-microvolt = <1800000>;
260		};
261
262		pm8953_l17: l17 {
263			regulator-min-microvolt = <2850000>;
264			regulator-max-microvolt = <2850000>;
265		};
266
267		pm8953_l19: l19 {
268			regulator-min-microvolt = <1200000>;
269			regulator-max-microvolt = <1350000>;
270		};
271
272		pm8953_l22: l22 {
273			regulator-min-microvolt = <2800000>;
274			regulator-max-microvolt = <2850000>;
275		};
276
277		pm8953_l23: l23 {
278			regulator-min-microvolt = <975000>;
279			regulator-max-microvolt = <1225000>;
280		};
281	};
282};
283
284&sdhc_1 {
285	vmmc-supply = <&pm8953_l8>;
286	vqmmc-supply = <&pm8953_l5>;
287
288	status = "okay";
289};
290
291&sdhc_2 {
292	vmmc-supply = <&pm8953_l11>;
293	vqmmc-supply = <&pm8953_l12>;
294
295	cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
296
297	pinctrl-names = "default", "sleep";
298	pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_off>;
299	pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
300
301	status = "okay";
302};
303
304&tlmm {
305	gpio-reserved-ranges = <0 4>, <135 4>;
306
307	backlight_enable_active: backlight-enable-active-state {
308		pins = "gpio16";
309		function = "gpio";
310		drive-strength = <8>;
311		bias-disable;
312		output-high;
313	};
314
315	backlight_enable_sleep: backlight-enable-sleep-state {
316		pins = "gpio16";
317		function = "gpio";
318		drive-strength = <2>;
319		bias-pull-down;
320	};
321
322	panel_reset_active: panel-reset-active-state {
323		pins = "gpio61";
324		function = "gpio";
325		drive-strength = <8>;
326		bias-disable;
327		output-high;
328	};
329
330	panel_reset_sleep: panel-reset-sleep-state {
331		pins = "gpio61";
332		function = "gpio";
333		drive-strength = <2>;
334		bias-pull-down;
335	};
336
337	ts_int_active: ts-int-active-state {
338		pins = "gpio65";
339		function = "gpio";
340		drive-strength = <8>;
341		bias-pull-up;
342	};
343
344	ts_reset_active: ts-reset-active-state {
345		pins = "gpio64";
346		function = "gpio";
347		drive-strength = <0x08>;
348		bias-pull-up;
349	};
350};
351
352&usb3 {
353	status = "okay";
354};
355
356&usb3_dwc3 {
357	dr_mode = "peripheral";
358};
359
360&wcnss {
361	vddpx-supply = <&pm8953_l5>;
362
363	status = "okay";
364};
365
366&wcnss_iris {
367	compatible = "qcom,wcn3660b";
368
369	vddxo-supply = <&pm8953_l7>;
370	vddrfa-supply = <&pm8953_l19>;
371	vddpa-supply = <&pm8953_l9>;
372	vdddig-supply = <&pm8953_l5>;
373};
374