1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Konrad Dybcio <konrad.dybcio@somainline.org>
4 */
5
6/dts-v1/;
7
8/* PMK8350 is configured to use SID6 instead of 0 */
9#define PMK8350_SID 6
10
11#include <dt-bindings/gpio/gpio.h>
12#include "sm6375.dtsi"
13#include "pm6125.dtsi"
14#include "pmk8350.dtsi"
15#include "pmr735a.dtsi"
16
17/* PM6125 PON is used and we can't have duplicate labels */
18/delete-node/ &pmk8350_pon;
19
20/ {
21	model = "Sony Xperia 10 IV";
22	compatible = "sony,pdx225", "qcom,sm6375";
23	chassis-type = "handset";
24
25	chosen {
26		#address-cells = <2>;
27		#size-cells = <2>;
28		ranges;
29
30		framebuffer: framebuffer@85200000 {
31			compatible = "simple-framebuffer";
32			reg = <0 0x85200000 0 0xc00000>;
33
34			width = <1080>;
35			height = <2520>;
36			stride = <(1080 * 4)>;
37			format = "a8r8g8b8";
38			/*
39			 * That's (going to be) a lot of clocks, but it's necessary due
40			 * to unused clk cleanup & no panel driver yet
41			 */
42			clocks = <&gcc GCC_DISP_AHB_CLK>,
43				 <&gcc GCC_DISP_HF_AXI_CLK>,
44				 <&gcc GCC_DISP_THROTTLE_CORE_CLK>,
45				 <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>;
46		};
47	};
48
49	gpio-keys {
50		compatible = "gpio-keys";
51		label = "gpio-keys";
52
53		pinctrl-0 = <&vol_down_n>;
54		pinctrl-names = "default";
55
56		key-volume-down {
57			label = "Volume Down";
58			linux,code = <KEY_VOLUMEDOWN>;
59			gpios = <&pmr735a_gpios 1 GPIO_ACTIVE_LOW>;
60			debounce-interval = <15>;
61			linux,can-disable;
62			wakeup-source;
63		};
64	};
65
66	reserved-memory {
67		cont_splash_mem: memory@85200000 {
68			reg = <0 0x85200000 0 0xc00000>;
69			no-map;
70		};
71
72		ramoops@ffc40000 {
73			compatible = "ramoops";
74			reg = <0 0xffc40000 0 0xb0000>;
75			record-size = <0x10000>;
76			console-size = <0x60000>;
77			ftrace-size = <0x10000>;
78			pmsg-size = <0x20000>;
79			ecc-size = <16>;
80		};
81	};
82
83	touch_avdd: touch-avdd-regulator {
84		compatible = "regulator-fixed";
85		regulator-name = "touch_avdd";
86		gpio = <&tlmm 59 GPIO_ACTIVE_HIGH>;
87		pinctrl-names = "default";
88		pinctrl-0 = <&ts_avdd_default>;
89		enable-active-high;
90	};
91
92	vph_pwr: vph-pwr-regulator {
93		compatible = "regulator-fixed";
94		regulator-name = "vph_pwr";
95		regulator-min-microvolt = <3700000>;
96		regulator-max-microvolt = <3700000>;
97		regulator-always-on;
98		regulator-boot-on;
99	};
100};
101
102&sdc2_off_state {
103	sd-cd-pins {
104		pins = "gpio94";
105		function = "gpio";
106		drive-strength = <2>;
107		bias-disable;
108	};
109};
110
111&sdc2_on_state {
112	sd-cd-pins {
113		pins = "gpio94";
114		function = "gpio";
115		drive-strength = <2>;
116		bias-pull-up;
117	};
118};
119
120&sdhc_2 {
121	status = "okay";
122
123	vmmc-supply = <&pm6125_l22>;
124	vqmmc-supply = <&pm6125_l5>;
125
126	cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
127};
128
129&gpi_dma0 {
130	status = "okay";
131};
132
133&gpi_dma1 {
134	status = "okay";
135};
136
137&i2c8 {
138	clock-frequency = <400000>;
139	status = "okay";
140
141	touchscreen@48 {
142		compatible = "samsung,s6sy761";
143		reg = <0x48>;
144		interrupt-parent = <&tlmm>;
145		interrupts = <22 0x2008>;
146
147		vdd-supply = <&pm6125_l13>;
148		avdd-supply = <&touch_avdd>;
149
150		pinctrl-names = "default";
151		pinctrl-0 = <&ts_int_default>;
152	};
153};
154
155&pmk8350_adc_tm {
156	status = "okay";
157};
158
159&pmk8350_rtc {
160	status = "okay";
161};
162
163&pmr735a_gpios {
164	vol_down_n: vol-down-n-state {
165		pins = "gpio1";
166		function = "normal";
167		power-source = <1>;
168		bias-pull-up;
169		input-enable;
170	};
171};
172
173&pon_pwrkey {
174	status = "okay";
175};
176
177&pon_resin {
178	linux,code = <KEY_VOLUMEUP>;
179	status = "okay";
180};
181
182&qupv3_id_0 {
183	status = "okay";
184};
185
186&qupv3_id_1 {
187	status = "okay";
188};
189
190&remoteproc_adsp {
191	firmware-name = "qcom/sm6375/Sony/murray/adsp.mbn";
192	status = "okay";
193};
194
195&remoteproc_cdsp {
196	firmware-name = "qcom/sm6375/Sony/murray/cdsp.mbn";
197	status = "okay";
198};
199
200&remoteproc_mss {
201	firmware-name = "qcom/sm6375/Sony/murray/modem.mbn";
202	status = "okay";
203};
204
205&rpm_requests {
206	regulators-0 {
207		compatible = "qcom,rpm-pm6125-regulators";
208
209		pm6125_s5: s5 {
210			regulator-min-microvolt = <382000>;
211			regulator-max-microvolt = <1120000>;
212		};
213
214		pm6125_s6: s6 {
215			regulator-min-microvolt = <320000>;
216			regulator-max-microvolt = <1374000>;
217		};
218
219		pm6125_s7: s7 {
220			regulator-min-microvolt = <1574000>;
221			regulator-max-microvolt = <2040000>;
222		};
223
224		/*
225		 * S8 is VDD_GFX
226		 * L1 is VDD_LPI_CX
227		 */
228
229		pm6125_l2: l2 {
230			regulator-min-microvolt = <1170000>;
231			regulator-max-microvolt = <1304000>;
232		};
233
234		pm6125_l3: l3 {
235			regulator-min-microvolt = <1100000>;
236			regulator-max-microvolt = <1300000>;
237		};
238
239		pm6125_l4: l4 {
240			regulator-min-microvolt = <1100000>;
241			regulator-max-microvolt = <1300000>;
242		};
243
244		pm6125_l5: l5 {
245			regulator-min-microvolt = <1650000>;
246			regulator-max-microvolt = <2960000>;
247			regulator-allow-set-load;
248		};
249
250		pm6125_l6: l6 {
251			regulator-min-microvolt = <1080000>;
252			regulator-max-microvolt = <1304000>;
253		};
254
255		pm6125_l7: l7 {
256			regulator-min-microvolt = <880000>;
257			regulator-max-microvolt = <880000>;
258		};
259
260		pm6125_l8: l8 {
261			regulator-min-microvolt = <1100000>;
262			regulator-max-microvolt = <1304000>;
263		};
264
265		pm6125_l9: l9 {
266			regulator-min-microvolt = <1504000>;
267			regulator-max-microvolt = <2000000>;
268		};
269
270		pm6125_l10: l10 {
271			regulator-min-microvolt = <1620000>;
272			regulator-max-microvolt = <1980000>;
273		};
274
275		pm6125_l11: l11 {
276			regulator-min-microvolt = <1620000>;
277			regulator-max-microvolt = <1980000>;
278		};
279
280		pm6125_l12: l12 {
281			regulator-min-microvolt = <1620000>;
282			regulator-max-microvolt = <2000000>;
283		};
284
285		pm6125_l13: l13 {
286			regulator-min-microvolt = <1650000>;
287			regulator-max-microvolt = <1980000>;
288		};
289
290		pm6125_l14: l14 {
291			regulator-min-microvolt = <1700000>;
292			regulator-max-microvolt = <1900000>;
293		};
294
295		pm6125_l15: l15 {
296			regulator-min-microvolt = <1650000>;
297			regulator-max-microvolt = <3544000>;
298		};
299
300		pm6125_l16: l16 {
301			regulator-min-microvolt = <1620000>;
302			regulator-max-microvolt = <1980000>;
303		};
304
305		/* L17 is VDD_LPI_MX */
306
307		pm6125_l18: l18 {
308			regulator-min-microvolt = <830000>;
309			regulator-max-microvolt = <920000>;
310		};
311
312		pm6125_l19: l19 {
313			regulator-min-microvolt = <1624000>;
314			regulator-max-microvolt = <3304000>;
315		};
316
317		pm6125_l20: l20 {
318			regulator-min-microvolt = <1624000>;
319			regulator-max-microvolt = <3304000>;
320		};
321
322		pm6125_l21: l21 {
323			regulator-min-microvolt = <3000000>;
324			regulator-max-microvolt = <3312000>;
325		};
326
327		pm6125_l22: l22 {
328			regulator-min-microvolt = <2704000>;
329			regulator-max-microvolt = <2960000>;
330			regulator-allow-set-load;
331		};
332
333		pm6125_l23: l23 {
334			regulator-min-microvolt = <3000000>;
335			regulator-max-microvolt = <3312000>;
336		};
337
338		pm6125_l24: l24 {
339			regulator-min-microvolt = <2704000>;
340			regulator-max-microvolt = <3544000>;
341		};
342	};
343
344	regulators-1 {
345		compatible = "qcom,rpm-pmr735a-regulators";
346
347		/*
348		 * S1 is VDD_MX
349		 * S2 is VDD_CX
350		 */
351
352		pmr735a_l1: l1 {
353			regulator-min-microvolt = <570000>;
354			regulator-max-microvolt = <650000>;
355		};
356
357		pmr735a_l2: l2 {
358			regulator-min-microvolt = <640000>;
359			regulator-max-microvolt = <640000>;
360		};
361
362		pmr735a_l3: l3 {
363			regulator-min-microvolt = <1000000>;
364			regulator-max-microvolt = <1200000>;
365		};
366
367		pmr735a_l4: l4 {
368			regulator-min-microvolt = <1504000>;
369			regulator-max-microvolt = <2000000>;
370		};
371
372		pmr735a_l5: l5 {
373			regulator-min-microvolt = <751000>;
374			regulator-max-microvolt = <824000>;
375		};
376
377		pmr735a_l6: l6 {
378			regulator-min-microvolt = <504000>;
379			regulator-max-microvolt = <868000>;
380		};
381
382		pmr735a_l7: l7 {
383			regulator-min-microvolt = <2700000>;
384			regulator-max-microvolt = <3544000>;
385		};
386	};
387};
388
389&sdc2_off_state {
390	sd-cd-pins {
391		pins = "gpio94";
392		function = "gpio";
393		drive-strength = <2>;
394		bias-disable;
395	};
396};
397
398&sdc2_on_state {
399	sd-cd-pins {
400		pins = "gpio94";
401		function = "gpio";
402		drive-strength = <2>;
403		bias-pull-up;
404	};
405};
406
407&sdhc_2 {
408	status = "okay";
409
410	vmmc-supply = <&pm6125_l22>;
411	vqmmc-supply = <&pm6125_l5>;
412
413	cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
414};
415
416&tlmm {
417	gpio-reserved-ranges = <13 4>;
418
419	ts_int_default: ts-int-default-state {
420		pins = "gpio22";
421		function = "gpio";
422		drive-strength = <8>;
423		bias-pull-up;
424	};
425
426	ts_avdd_default: ts-avdd-default-state {
427		pins = "gpio59";
428		function = "gpio";
429		drive-strength = <8>;
430		output-low;
431	};
432};
433
434&usb_1 {
435	status = "okay";
436};
437
438&usb_1_dwc3 {
439	dr_mode = "peripheral";
440};
441
442&usb_1_hsphy {
443	vdda-pll-supply = <&pm6125_l7>;
444	vdda18-supply = <&pm6125_l10>;
445	vdda33-supply = <&pmr735a_l7>;
446	status = "okay";
447};
448
449&wifi {
450	vdd-0.8-cx-mx-supply = <&pmr735a_l2>;
451	vdd-1.8-xo-supply = <&pm6125_l16>;
452	vdd-1.3-rfa-supply = <&pm6125_l2>;
453	vdd-3.3-ch0-supply = <&pm6125_l23>;
454	vdd-3.3-ch1-supply = <&pm6125_l21>;
455	status = "okay";
456};
457
458&xo_board_clk {
459	clock-frequency = <19200000>;
460};
461