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