xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/qrb4210-rb2.dts (revision b64c5a0ace59af62eff52bfe110a521dc73c937b)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2023, Linaro Limited
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/leds/common.h>
9#include "sm4250.dtsi"
10#include "pm6125.dtsi"
11
12/ {
13	model = "Qualcomm Technologies, Inc. QRB4210 RB2";
14	compatible = "qcom,qrb4210-rb2", "qcom,qrb4210", "qcom,sm4250";
15
16	aliases {
17		serial0 = &uart4;
18		serial1 = &uart3;
19	};
20
21	chosen {
22		stdout-path = "serial0:115200n8";
23	};
24
25	clocks {
26		clk40M: can-clk {
27			compatible = "fixed-clock";
28			clock-frequency = <40000000>;
29			#clock-cells = <0>;
30		};
31	};
32
33	gpio-keys {
34		compatible = "gpio-keys";
35		label = "gpio-keys";
36
37		pinctrl-0 = <&kypd_vol_up_n>;
38		pinctrl-names = "default";
39
40		key-volume-up {
41			label = "Volume Up";
42			linux,code = <KEY_VOLUMEUP>;
43			gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>;
44			debounce-interval = <15>;
45			linux,can-disable;
46			wakeup-source;
47		};
48	};
49
50	hdmi-connector {
51		compatible = "hdmi-connector";
52		type = "a";
53
54		port {
55			hdmi_con: endpoint {
56				remote-endpoint = <&lt9611_out>;
57			};
58		};
59	};
60
61	leds {
62		compatible = "gpio-leds";
63
64		led-bt {
65			label = "blue:bt";
66			function = LED_FUNCTION_BLUETOOTH;
67			color = <LED_COLOR_ID_BLUE>;
68			gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
69			linux,default-trigger = "bluetooth-power";
70			default-state = "off";
71		};
72
73		led-user0 {
74			label = "green:user0";
75			function = LED_FUNCTION_INDICATOR;
76			color = <LED_COLOR_ID_GREEN>;
77			gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
78			linux,default-trigger = "none";
79			default-state = "off";
80			panic-indicator;
81		};
82
83		led-wlan {
84			label = "yellow:wlan";
85			function = LED_FUNCTION_WLAN;
86			color = <LED_COLOR_ID_YELLOW>;
87			gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
88			linux,default-trigger = "phy0tx";
89			default-state = "off";
90		};
91	};
92
93	vreg_hdmi_out_1p2: regulator-hdmi-out-1p2 {
94		compatible = "regulator-fixed";
95		regulator-name = "VREG_HDMI_OUT_1P2";
96		regulator-min-microvolt = <1200000>;
97		regulator-max-microvolt = <1200000>;
98		vin-supply = <&vdc_1v2>;
99		regulator-always-on;
100		regulator-boot-on;
101	};
102
103	lt9611_3v3: regulator-lt9611-3v3 {
104		compatible = "regulator-fixed";
105		regulator-name = "LT9611_3V3";
106		regulator-min-microvolt = <3300000>;
107		regulator-max-microvolt = <3300000>;
108		vin-supply = <&vdc_3v3>;
109		regulator-always-on;
110		regulator-boot-on;
111	};
112
113	/* Main barrel jack input */
114	vdc_12v: regulator-vdc-12v {
115		compatible = "regulator-fixed";
116		regulator-name = "DC_12V";
117		regulator-min-microvolt = <12000000>;
118		regulator-max-microvolt = <12000000>;
119		regulator-always-on;
120		regulator-boot-on;
121	};
122
123	/* 1.2V supply stepped down from the barrel jack input */
124	vdc_1v2: regulator-vdc-1v2 {
125		compatible = "regulator-fixed";
126		regulator-name = "VDC_1V2";
127		regulator-min-microvolt = <1200000>;
128		regulator-max-microvolt = <1200000>;
129		vin-supply = <&vdc_12v>;
130		regulator-always-on;
131		regulator-boot-on;
132	};
133
134	/* 3.3V supply stepped down from the barrel jack input */
135	vdc_3v3: regulator-vdc-3v3 {
136		compatible = "regulator-fixed";
137		regulator-name = "VDC_3V3";
138		regulator-min-microvolt = <3300000>;
139		regulator-max-microvolt = <3300000>;
140		vin-supply = <&vdc_12v>;
141		regulator-always-on;
142		regulator-boot-on;
143	};
144
145	/* 5V supply stepped down from the barrel jack input */
146	vdc_5v: regulator-vdc-5v {
147		compatible = "regulator-fixed";
148		regulator-name = "VDC_5V";
149
150		regulator-min-microvolt = <5000000>;
151		regulator-max-microvolt = <5000000>;
152		regulator-always-on;
153		regulator-boot-on;
154	};
155
156	/* "Battery" voltage for the SoM, stepped down from the barrel jack input */
157	vdc_vbat_som: regulator-vdc-vbat {
158		compatible = "regulator-fixed";
159		regulator-name = "VBAT_SOM";
160		regulator-min-microvolt = <4200000>;
161		regulator-max-microvolt = <4200000>;
162		regulator-always-on;
163		regulator-boot-on;
164	};
165
166	/* PMI632 charger out, supplied by VBAT */
167	vph_pwr: regulator-vph-pwr {
168		compatible = "regulator-fixed";
169		regulator-name = "vph_pwr";
170		regulator-min-microvolt = <3700000>;
171		regulator-max-microvolt = <3700000>;
172		vin-supply = <&vdc_vbat_som>;
173
174		regulator-always-on;
175		regulator-boot-on;
176	};
177};
178
179&gpi_dma0 {
180	status = "okay";
181};
182
183&gpu {
184	status = "okay";
185
186	zap-shader {
187		firmware-name = "qcom/qrb4210/a610_zap.mbn";
188	};
189};
190
191&i2c2 {
192	clock-frequency = <400000>;
193	status = "okay";
194
195	lt9611_codec: hdmi-bridge@2b {
196		compatible = "lontium,lt9611uxc";
197		reg = <0x2b>;
198		interrupts-extended = <&tlmm 46 IRQ_TYPE_EDGE_FALLING>;
199		reset-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>;
200
201		vdd-supply = <&vreg_hdmi_out_1p2>;
202		vcc-supply = <&lt9611_3v3>;
203
204		pinctrl-0 = <&lt9611_irq_pin &lt9611_rst_pin>;
205		pinctrl-names = "default";
206		#sound-dai-cells = <1>;
207
208		ports {
209			#address-cells = <1>;
210			#size-cells = <0>;
211
212			port@0 {
213				reg = <0>;
214
215				lt9611_a: endpoint {
216					remote-endpoint = <&mdss_dsi0_out>;
217				};
218			};
219
220			port@2 {
221				reg = <2>;
222
223				lt9611_out: endpoint {
224					remote-endpoint = <&hdmi_con>;
225				};
226			};
227		};
228	};
229};
230
231&mdss {
232	status = "okay";
233};
234
235&mdss_dsi0 {
236	vdda-supply = <&vreg_l18a_1p232>;
237	status = "okay";
238};
239
240&mdss_dsi0_out {
241	remote-endpoint = <&lt9611_a>;
242	data-lanes = <0 1 2 3>;
243};
244
245&mdss_dsi0_phy {
246	status = "okay";
247};
248
249&pm6125_gpios {
250	kypd_vol_up_n: kypd-vol-up-n-state {
251		pins = "gpio5";
252		function = "normal";
253		power-source = <0>;
254		bias-pull-up;
255		input-enable;
256	};
257};
258
259&pon_pwrkey {
260	status = "okay";
261};
262
263&pon_resin {
264	linux,code = <KEY_VOLUMEDOWN>;
265	status = "okay";
266};
267
268&qupv3_id_0 {
269	status = "okay";
270};
271
272&remoteproc_adsp {
273	firmware-name = "qcom/qrb4210/adsp.mbn";
274
275	status = "okay";
276};
277
278&remoteproc_cdsp {
279	firmware-name = "qcom/qrb4210/cdsp.mbn";
280
281	status = "okay";
282};
283
284&remoteproc_mpss {
285	firmware-name = "qcom/qrb4210/modem.mbn";
286
287	status = "okay";
288};
289
290&rpm_requests {
291	regulators {
292		compatible = "qcom,rpm-pm6125-regulators";
293
294		vdd-s1-supply = <&vph_pwr>;
295		vdd-s2-supply = <&vph_pwr>;
296		vdd-s3-supply = <&vph_pwr>;
297		vdd-s4-supply = <&vph_pwr>;
298		vdd-s5-supply = <&vph_pwr>;
299		vdd-s6-supply = <&vph_pwr>;
300		vdd-s7-supply = <&vph_pwr>;
301		vdd-s8-supply = <&vph_pwr>;
302		vdd-s9-supply = <&vph_pwr>;
303		vdd-s10-supply = <&vph_pwr>;
304
305		vdd-l1-l7-l17-l18-supply = <&vreg_s6a_1p352>;
306		vdd-l2-l3-l4-supply = <&vreg_s6a_1p352>;
307		vdd-l5-l15-l19-l20-l21-l22-supply = <&vph_pwr>;
308		vdd-l6-l8-supply = <&vreg_s5a_0p848>;
309		vdd-l9-l11-supply = <&vreg_s7a_2p04>;
310		vdd-l10-l13-l14-supply = <&vreg_s7a_2p04>;
311		vdd-l12-l16-supply = <&vreg_s7a_2p04>;
312		vdd-l23-l24-supply = <&vph_pwr>;
313
314		vreg_s5a_0p848: s5 {
315			regulator-min-microvolt = <920000>;
316			regulator-max-microvolt = <1128000>;
317		};
318
319		vreg_s6a_1p352: s6 {
320			regulator-min-microvolt = <304000>;
321			regulator-max-microvolt = <1456000>;
322		};
323
324		vreg_s7a_2p04: s7 {
325			regulator-min-microvolt = <1280000>;
326			regulator-max-microvolt = <2080000>;
327		};
328
329		vreg_l1a_1p0: l1 {
330			regulator-min-microvolt = <952000>;
331			regulator-max-microvolt = <1152000>;
332		};
333
334		vreg_l4a_0p9: l4 {
335			regulator-min-microvolt = <488000>;
336			regulator-max-microvolt = <1000000>;
337		};
338
339		vreg_l5a_2p96: l5 {
340			regulator-min-microvolt = <1648000>;
341			regulator-max-microvolt = <3056000>;
342			regulator-allow-set-load;
343		};
344
345		vreg_l6a_0p6: l6 {
346			regulator-min-microvolt = <576000>;
347			regulator-max-microvolt = <656000>;
348		};
349
350		vreg_l7a_1p256: l7 {
351			regulator-min-microvolt = <1200000>;
352			regulator-max-microvolt = <1304000>;
353		};
354
355		vreg_l8a_0p664: l8 {
356			regulator-min-microvolt = <640000>;
357			regulator-max-microvolt = <640000>;
358		};
359
360		vreg_l9a_1p8: l9 {
361			regulator-min-microvolt = <1800000>;
362			regulator-max-microvolt = <1800000>;
363			regulator-allow-set-load;
364		};
365
366		vreg_l10a_1p8: l10 {
367			regulator-min-microvolt = <1704000>;
368			regulator-max-microvolt = <1904000>;
369		};
370
371		vreg_l11a_1p8: l11 {
372			regulator-min-microvolt = <1704000>;
373			regulator-max-microvolt = <1952000>;
374			regulator-allow-set-load;
375		};
376
377		vreg_l12a_1p8: l12 {
378			regulator-min-microvolt = <1624000>;
379			regulator-max-microvolt = <1984000>;
380		};
381
382		vreg_l13a_1p8: l13 {
383			regulator-min-microvolt = <1504000>;
384			regulator-max-microvolt = <1952000>;
385		};
386
387		vreg_l14a_1p8: l14 {
388			regulator-min-microvolt = <1704000>;
389			regulator-max-microvolt = <1904000>;
390		};
391
392		vreg_l15a_3p128: l15 {
393			regulator-min-microvolt = <2920000>;
394			regulator-max-microvolt = <3232000>;
395		};
396
397		vreg_l16a_1p3: l16 {
398			regulator-min-microvolt = <1704000>;
399			regulator-max-microvolt = <1904000>;
400			regulator-allow-set-load;
401		};
402
403		vreg_l17a_1p3: l17 {
404			regulator-min-microvolt = <1152000>;
405			regulator-max-microvolt = <1384000>;
406			regulator-allow-set-load;
407		};
408
409		vreg_l18a_1p232: l18 {
410			regulator-min-microvolt = <1104000>;
411			regulator-max-microvolt = <1312000>;
412		};
413
414		vreg_l19a_1p8: l19 {
415			regulator-min-microvolt = <1624000>;
416			regulator-max-microvolt = <3304000>;
417		};
418
419		vreg_l20a_1p8: l20 {
420			regulator-min-microvolt = <1624000>;
421			regulator-max-microvolt = <3304000>;
422		};
423
424		vreg_l21a_2p704: l21 {
425			regulator-min-microvolt = <2400000>;
426			regulator-max-microvolt = <3600000>;
427		};
428
429		vreg_l22a_2p96: l22 {
430			regulator-min-microvolt = <2952000>;
431			regulator-max-microvolt = <3304000>;
432			regulator-system-load = <100000>;
433			regulator-allow-set-load;
434		};
435
436		vreg_l23a_3p3: l23 {
437			regulator-min-microvolt = <3312000>;
438			regulator-max-microvolt = <3312000>;
439			regulator-allow-set-load;
440		};
441
442		vreg_l24a_2p96: l24 {
443			regulator-min-microvolt = <2704000>;
444			regulator-max-microvolt = <3600000>;
445			regulator-system-load = <100000>;
446			regulator-allow-set-load;
447		};
448	};
449};
450
451&sdhc_1 {
452	pinctrl-0 = <&sdc1_state_on>;
453	pinctrl-1 = <&sdc1_state_off>;
454	pinctrl-names = "default", "sleep";
455
456	vmmc-supply = <&vreg_l24a_2p96>;
457	vqmmc-supply = <&vreg_l11a_1p8>;
458	no-sdio;
459	non-removable;
460
461	status = "okay";
462};
463
464&sdhc_2 {
465	cd-gpios = <&tlmm 88 GPIO_ACTIVE_LOW>; /* card detect gpio */
466
467	pinctrl-0 = <&sdc2_state_on &sdc2_card_det_n>;
468	pinctrl-1 = <&sdc2_state_off &sdc2_card_det_n>;
469	pinctrl-names = "default", "sleep";
470
471	vmmc-supply = <&vreg_l22a_2p96>;
472	vqmmc-supply = <&vreg_l5a_2p96>;
473	no-sdio;
474
475	status = "okay";
476};
477
478&spi5 {
479	status = "okay";
480
481	can@0 {
482		compatible = "microchip,mcp2518fd";
483		reg = <0>;
484		interrupts-extended = <&tlmm 39 IRQ_TYPE_LEVEL_LOW>;
485		clocks = <&clk40M>;
486		spi-max-frequency = <10000000>;
487		vdd-supply = <&vdc_5v>;
488		xceiver-supply = <&vdc_5v>;
489	};
490};
491
492&sleep_clk {
493	clock-frequency = <32000>;
494};
495
496&tlmm {
497	gpio-reserved-ranges = <43 2>, <49 1>, <54 1>,
498			       <56 3>, <61 2>, <64 1>,
499			       <68 1>, <72 8>, <96 1>;
500
501	uart3_default: uart3-default-state {
502		cts-pins {
503			pins = "gpio8";
504			function = "qup3";
505			drive-strength = <2>;
506			bias-bus-hold;
507		};
508
509		rts-pins {
510			pins = "gpio9";
511			function = "qup3";
512			drive-strength = <2>;
513			bias-disable;
514		};
515
516		tx-pins {
517			pins = "gpio10";
518			function = "qup3";
519			drive-strength = <2>;
520			bias-disable;
521		};
522
523		rx-pins {
524			pins = "gpio11";
525			function = "qup3";
526			drive-strength = <2>;
527			bias-pull-up;
528		};
529	};
530
531	uart3_sleep: uart3-sleep-state {
532		cts-pins {
533			pins = "gpio8";
534			function = "gpio";
535			drive-strength = <2>;
536			bias-bus-hold;
537		};
538
539		rts-pins {
540			pins = "gpio9";
541			function = "gpio";
542			drive-strength = <2>;
543			bias-pull-down;
544		};
545
546		tx-pins {
547			pins = "gpio10";
548			function = "gpio";
549			drive-strength = <2>;
550			bias-pull-up;
551		};
552
553		rx-pins {
554			pins = "gpio11";
555			function = "gpio";
556			drive-strength = <2>;
557			bias-pull-up;
558		};
559	};
560
561	lt9611_rst_pin: lt9611-rst-state {
562		pins = "gpio41";
563		function = "gpio";
564		input-disable;
565		output-high;
566	};
567
568	lt9611_irq_pin: lt9611-irq-state {
569		pins = "gpio46";
570		function = "gpio";
571		bias-disable;
572	};
573
574	sdc2_card_det_n: sd-card-det-n-state {
575		pins = "gpio88";
576		function = "gpio";
577		drive-strength = <2>;
578		bias-pull-up;
579	};
580};
581
582&uart3 {
583	interrupts-extended = <&intc GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
584			      <&tlmm 11 IRQ_TYPE_LEVEL_HIGH>;
585	pinctrl-0 = <&uart3_default>;
586	pinctrl-1 = <&uart3_sleep>;
587	pinctrl-names = "default", "sleep";
588	status = "okay";
589
590	bluetooth {
591		compatible = "qcom,wcn3988-bt";
592
593		vddio-supply = <&vreg_l9a_1p8>;
594		vddxo-supply = <&vreg_l16a_1p3>;
595		vddrf-supply = <&vreg_l17a_1p3>;
596		vddch0-supply = <&vreg_l23a_3p3>;
597		enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
598		max-speed = <3200000>;
599	};
600};
601
602&uart4 {
603	status = "okay";
604};
605
606&usb {
607	status = "okay";
608};
609
610&usb_dwc3 {
611	maximum-speed = "super-speed";
612};
613
614&usb_hsphy {
615	vdd-supply = <&vreg_l4a_0p9>;
616	vdda-pll-supply = <&vreg_l12a_1p8>;
617	vdda-phy-dpdm-supply = <&vreg_l15a_3p128>;
618
619	status = "okay";
620};
621
622&usb_qmpphy {
623	vdda-phy-supply = <&vreg_l4a_0p9>;
624	vdda-pll-supply = <&vreg_l12a_1p8>;
625
626	status = "okay";
627};
628
629&wifi {
630	vdd-0.8-cx-mx-supply = <&vreg_l8a_0p664>;
631	vdd-1.8-xo-supply = <&vreg_l16a_1p3>;
632	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
633	vdd-3.3-ch0-supply = <&vreg_l23a_3p3>;
634	qcom,ath10k-calibration-variant = "Thundercomm_RB2";
635
636	status = "okay";
637};
638
639&xo_board {
640	clock-frequency = <19200000>;
641};
642