• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, Linaro Ltd.
4 * Copyright (c) 2020, Konrad Dybcio <konrad.dybcio@somainline.org>
5 * Copyright (c) 2020, AngeloGioacchino Del Regno
6 *                     <angelogioacchino.delregno@somainline.org>
7 */
8
9/dts-v1/;
10
11#include "sdm660.dtsi"
12#include "pm660.dtsi"
13#include "pm660l.dtsi"
14
15/ {
16	model = "Inforce 6560 Single Board Computer";
17	compatible = "inforce,ifc6560", "qcom,sda660";
18	chassis-type = "embedded"; /* SBC */
19
20	aliases {
21		serial0 = &blsp1_uart2;
22		serial1 = &blsp2_uart1;
23	};
24
25	chosen {
26		stdout-path = "serial0:115200n8";
27	};
28
29	gpio-keys {
30		compatible = "gpio-keys";
31
32		key-volup {
33			label = "Volume Up";
34			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
35			linux,code = <KEY_VOLUMEUP>;
36			debounce-interval = <15>;
37		};
38	};
39
40	/*
41	 * Until we hook up type-c detection, we
42	 * have to stick with this. But it works.
43	 */
44	extcon_usb: extcon-usb {
45		compatible = "linux,extcon-usb-gpio";
46		id-gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
47	};
48
49	hdmi-out {
50		compatible = "hdmi-connector";
51		type = "a";
52
53		port {
54			hdmi_con: endpoint {
55				remote-endpoint = <&adv7533_out>;
56			};
57		};
58	};
59
60	vph_pwr: vph-pwr-regulator {
61		compatible = "regulator-fixed";
62		regulator-name = "vph_pwr";
63		regulator-min-microvolt = <3800000>;
64		regulator-max-microvolt = <3800000>;
65
66		regulator-always-on;
67		regulator-boot-on;
68	};
69
70	v3p3_bck_bst: v3p3-bck-bst-regulator {
71		compatible = "regulator-fixed";
72		regulator-name = "v3p3_bck_bst";
73
74		regulator-min-microvolt = <3300000>;
75		regulator-max-microvolt = <3300000>;
76
77		vin-supply = <&vph_pwr>;
78	};
79
80	v1p2_ldo: v1p2-ldo-regulator {
81		compatible = "regulator-fixed";
82		regulator-name = "v1p2_ldo";
83
84		regulator-min-microvolt = <1200000>;
85		regulator-max-microvolt = <1200000>;
86
87		vin-supply = <&vph_pwr>;
88	};
89
90	v5p0_boost: v5p0-boost-regulator {
91		compatible = "regulator-fixed";
92		regulator-name = "v5p0_boost";
93
94		regulator-min-microvolt = <5000000>;
95		regulator-max-microvolt = <5000000>;
96
97		vin-supply = <&vph_pwr>;
98	};
99
100	/*
101	 * this is also used for APC1 CPU power, touching it resets the board
102	 */
103	vreg_l10a_1p8: vreg-l10a-regulator {
104		compatible = "regulator-fixed";
105		regulator-name = "vreg_l10a_1p8";
106		regulator-min-microvolt = <1804000>;
107		regulator-max-microvolt = <1804000>;
108		regulator-always-on;
109		regulator-boot-on;
110	};
111};
112
113&adsp_pil {
114	firmware-name = "qcom/sda660/adsp.mbn";
115};
116
117&blsp_i2c6 {
118	status = "okay";
119
120	adv7533: hdmi@39 {
121		compatible = "adi,adv7535";
122		reg = <0x39>, <0x66>;
123		reg-names = "main", "edid";
124
125		interrupt-parent = <&pm660l_gpios>;
126		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
127
128		clocks = <&rpmcc RPM_SMD_BB_CLK2>;
129		clock-names = "cec";
130		/*
131		 * Limit to 3 lanes to prevent the bridge from changing amount
132		 * of lanes in the fly. MSM DSI host doesn't like that.
133		 */
134		adi,dsi-lanes = <3>;
135		avdd-supply = <&vreg_l13a_1p8>;
136		dvdd-supply = <&vreg_l13a_1p8>;
137		pvdd-supply = <&vreg_l13a_1p8>;
138		a2vdd-supply = <&vreg_l13a_1p8>;
139		v3p3-supply = <&v3p3_bck_bst>;
140
141		ports {
142			#address-cells = <1>;
143			#size-cells = <0>;
144
145			port@0 {
146				reg = <0>;
147
148				adv7533_in: endpoint {
149					remote-endpoint = <&mdss_dsi0_out>;
150				};
151			};
152
153			port@1 {
154				reg = <1>;
155
156				adv7533_out: endpoint {
157					remote-endpoint = <&hdmi_con>;
158				};
159			};
160		};
161	};
162};
163
164&blsp1_dma {
165	/*
166	 * The board will lock up if we toggle the BLSP clock, unless the
167	 * BAM DMA interconnects support is in place.
168	 */
169	/delete-property/ clocks;
170	/delete-property/ clock-names;
171};
172
173&blsp1_uart2 {
174	status = "okay";
175};
176
177&blsp2_dma {
178	/*
179	 * The board will lock up if we toggle the BLSP clock, unless the
180	 * BAM DMA interconnects support is in place.
181	 */
182	/delete-property/ clocks;
183	/delete-property/ clock-names;
184};
185
186&blsp2_uart1 {
187	status = "okay";
188
189	bluetooth {
190		compatible = "qcom,wcn3990-bt";
191
192		vddio-supply = <&vreg_l13a_1p8>;
193		vddxo-supply = <&vreg_l9a_1p8>;
194		vddrf-supply = <&vreg_l6a_1p3>;
195		vddch0-supply = <&vreg_l19a_3p3>;
196		max-speed = <3200000>;
197	};
198};
199
200&mdss {
201	status = "okay";
202};
203
204&mdss_dsi0 {
205	status = "okay";
206	vdda-supply = <&vreg_l1a_1p225>;
207};
208
209&mdss_dsi0_out {
210	remote-endpoint = <&adv7533_in>;
211	data-lanes = <0 1 2 3>;
212};
213
214&mdss_dsi0_phy {
215	status = "okay";
216	vcca-supply = <&vreg_l1b_0p925>;
217};
218
219&mmss_smmu {
220	status = "okay";
221};
222
223&pon_pwrkey {
224	status = "okay";
225};
226
227&pon_resin {
228	status = "okay";
229
230	linux,code = <KEY_VOLUMEUP>;
231};
232
233&qusb2phy0 {
234	status = "okay";
235
236	vdd-supply = <&vreg_l1b_0p925>;
237	vdda-pll-supply = <&vreg_l10a_1p8>;
238	vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
239};
240
241&qusb2phy1 {
242	status = "okay";
243
244	vdd-supply = <&vreg_l1b_0p925>;
245	vdda-pll-supply = <&vreg_l10a_1p8>;
246	vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
247};
248
249&rpm_requests {
250	regulators-0 {
251		compatible = "qcom,rpm-pm660-regulators";
252
253		vdd_s1-supply = <&vph_pwr>;
254		vdd_s2-supply = <&vph_pwr>;
255		vdd_s3-supply = <&vph_pwr>;
256		vdd_s4-supply = <&vph_pwr>;
257		vdd_s5-supply = <&vph_pwr>;
258		vdd_s6-supply = <&vph_pwr>;
259
260		vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
261		vdd_l2_l3-supply = <&vreg_s2b_1p05>;
262		vdd_l5-supply = <&vreg_s2b_1p05>;
263		vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
264		vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
265
266		vreg_s4a_2p04: s4 {
267			regulator-min-microvolt = <1805000>;
268			regulator-max-microvolt = <2040000>;
269			regulator-enable-ramp-delay = <200>;
270			regulator-ramp-delay = <0>;
271			regulator-always-on;
272		};
273
274		vreg_s5a_1p35: s5 {
275			regulator-min-microvolt = <1224000>;
276			regulator-max-microvolt = <1350000>;
277			regulator-enable-ramp-delay = <200>;
278			regulator-ramp-delay = <0>;
279		};
280
281		vreg_l1a_1p225: l1 {
282			regulator-min-microvolt = <1150000>;
283			regulator-max-microvolt = <1250000>;
284			regulator-enable-ramp-delay = <250>;
285			regulator-allow-set-load;
286		};
287
288		vreg_l6a_1p3: l6 {
289			regulator-min-microvolt = <1304000>;
290			regulator-max-microvolt = <1368000>;
291			regulator-enable-ramp-delay = <250>;
292			regulator-ramp-delay = <0>;
293			regulator-allow-set-load;
294		};
295
296		vreg_l8a_1p8: l8 {
297			regulator-min-microvolt = <1800000>;
298			regulator-max-microvolt = <1800000>;
299			regulator-enable-ramp-delay = <250>;
300			regulator-ramp-delay = <0>;
301			regulator-system-load = <325000>;
302			regulator-allow-set-load;
303		};
304
305		vreg_l9a_1p8: l9 {
306			regulator-min-microvolt = <1804000>;
307			regulator-max-microvolt = <1896000>;
308			regulator-enable-ramp-delay = <250>;
309			regulator-ramp-delay = <0>;
310			regulator-allow-set-load;
311		};
312
313		vreg_l13a_1p8: l13 {
314			/* This gives power to the LPDDR4: never turn it off! */
315			regulator-min-microvolt = <1800000>;
316			regulator-max-microvolt = <1944000>;
317			regulator-enable-ramp-delay = <250>;
318			regulator-ramp-delay = <0>;
319			regulator-always-on;
320			regulator-boot-on;
321		};
322
323		vreg_l19a_3p3: l19 {
324			regulator-min-microvolt = <3312000>;
325			regulator-max-microvolt = <3400000>;
326			regulator-enable-ramp-delay = <250>;
327			regulator-ramp-delay = <0>;
328			regulator-allow-set-load;
329		};
330	};
331
332	regulators-1 {
333		compatible = "qcom,rpm-pm660l-regulators";
334
335		vdd_s1-supply = <&vph_pwr>;
336		vdd_s2-supply = <&vph_pwr>;
337		vdd_s3_s4-supply = <&vph_pwr>;
338		vdd_s5-supply = <&vph_pwr>;
339		vdd_s6-supply = <&vph_pwr>;
340
341		vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
342		vdd_l2-supply = <&vreg_bob>;
343		vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
344		vdd_l4_l6-supply = <&vreg_bob>;
345		vdd_bob-supply = <&vph_pwr>;
346
347		vreg_s2b_1p05: s2 {
348			regulator-min-microvolt = <1050000>;
349			regulator-max-microvolt = <1050000>;
350			regulator-enable-ramp-delay = <200>;
351			regulator-ramp-delay = <0>;
352		};
353
354		vreg_l1b_0p925: l1 {
355			regulator-min-microvolt = <800000>;
356			regulator-max-microvolt = <925000>;
357			regulator-enable-ramp-delay = <250>;
358			regulator-allow-set-load;
359		};
360
361		vreg_l2b_2p95: l2 {
362			regulator-min-microvolt = <1648000>;
363			regulator-max-microvolt = <3100000>;
364			regulator-enable-ramp-delay = <250>;
365			regulator-ramp-delay = <0>;
366			regulator-allow-set-load;
367		};
368
369		vreg_l4b_2p95: l4 {
370			regulator-min-microvolt = <2944000>;
371			regulator-max-microvolt = <2952000>;
372			regulator-enable-ramp-delay = <250>;
373			regulator-ramp-delay = <0>;
374
375			regulator-min-microamp = <200>;
376			regulator-max-microamp = <600000>;
377			regulator-system-load = <570000>;
378			regulator-allow-set-load;
379		};
380
381		/*
382		 * Downstream specifies a range of 1721-3600mV,
383		 * but the only assigned consumers are SDHCI2 VMMC
384		 * and Coresight QPDI that both request pinned 2.95V.
385		 * Tighten the range to 1.8-3.328 (closest to 3.3) to
386		 * make the mmc driver happy.
387		 */
388		vreg_l5b_2p95: l5 {
389			regulator-min-microvolt = <1800000>;
390			regulator-max-microvolt = <3328000>;
391			regulator-enable-ramp-delay = <250>;
392			regulator-system-load = <800000>;
393			regulator-ramp-delay = <0>;
394			regulator-allow-set-load;
395		};
396
397		vreg_l7b_3p125: l7 {
398			regulator-min-microvolt = <2700000>;
399			regulator-max-microvolt = <3125000>;
400			regulator-enable-ramp-delay = <250>;
401		};
402
403		vreg_l8b_3p3: l8 {
404			regulator-min-microvolt = <2800000>;
405			regulator-max-microvolt = <3400000>;
406			regulator-enable-ramp-delay = <250>;
407			regulator-ramp-delay = <0>;
408		};
409
410		vreg_bob: bob {
411			regulator-min-microvolt = <3300000>;
412			regulator-max-microvolt = <3624000>;
413			regulator-enable-ramp-delay = <500>;
414			regulator-ramp-delay = <0>;
415		};
416	};
417};
418
419&sdc2_state_on {
420	sd-cd-pins {
421		pins = "gpio54";
422		function = "gpio";
423		bias-pull-up;
424		drive-strength = <2>;
425	};
426};
427
428&sdc2_state_off {
429	sd-cd-pins {
430		pins = "gpio54";
431		function = "gpio";
432		bias-disable;
433		drive-strength = <2>;
434	};
435};
436
437&sdhc_1 {
438	status = "okay";
439	supports-cqe;
440
441	vmmc-supply = <&vreg_l4b_2p95>;
442	vqmmc-supply = <&vreg_l8a_1p8>;
443
444	mmc-ddr-1_8v;
445	mmc-hs400-1_8v;
446	mmc-hs400-enhanced-strobe;
447};
448
449&sdhc_2 {
450	status = "okay";
451
452	vmmc-supply = <&vreg_l5b_2p95>;
453	vqmmc-supply = <&vreg_l2b_2p95>;
454
455	cd-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
456	no-sdio;
457	no-mmc;
458};
459
460&tlmm {
461	gpio-reserved-ranges = <0 4>, <8 4>;
462};
463
464&usb2 {
465	status = "okay";
466};
467
468&usb2_dwc3 {
469	dr_mode = "host";
470};
471
472&usb3 {
473	status = "okay";
474};
475
476&usb3_dwc3 {
477	dr_mode = "peripheral";
478	extcon = <&extcon_usb>;
479};
480
481&usb3_qmpphy {
482	vdda-phy-supply = <&vreg_l1b_0p925>;
483	vdda-pll-supply = <&vreg_l10a_1p8>;
484	status = "okay";
485};
486