xref: /linux/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts (revision db4a3f0fbedb0398f77b9047e8b8bb2b49f355bb)
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (c) 2023, Linaro Ltd
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/leds/common.h>
10#include "qcm2290.dtsi"
11#include "pm4125.dtsi"
12
13/ {
14	model = "Qualcomm Technologies, Inc. Robotics RB1";
15	compatible = "qcom,qrb2210-rb1", "qcom,qrb2210", "qcom,qcm2290";
16
17	aliases {
18		serial0 = &uart4;
19		serial1 = &uart3;
20		sdhc1 = &sdhc_1;
21		sdhc2 = &sdhc_2;
22	};
23
24	chosen {
25		stdout-path = "serial0:115200n8";
26	};
27
28	clocks {
29		clk40m: can-clk {
30			compatible = "fixed-clock";
31			clock-frequency = <40000000>;
32			#clock-cells = <0>;
33		};
34	};
35
36	gpio-keys {
37		compatible = "gpio-keys";
38		label = "gpio-keys";
39
40		pinctrl-0 = <&key_volp_n>;
41		pinctrl-names = "default";
42
43		key-volume-up {
44			label = "Volume Up";
45			linux,code = <KEY_VOLUMEUP>;
46			gpios = <&tlmm 96 GPIO_ACTIVE_LOW>;
47			debounce-interval = <15>;
48			linux,can-disable;
49			wakeup-source;
50		};
51	};
52
53	hdmi-connector {
54		compatible = "hdmi-connector";
55		type = "a";
56
57		port {
58			hdmi_con: endpoint {
59				remote-endpoint = <&lt9611_out>;
60			};
61		};
62	};
63
64	i2c2_gpio: i2c {
65		compatible = "i2c-gpio";
66
67		sda-gpios = <&tlmm 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
68		scl-gpios = <&tlmm 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
69		#address-cells = <1>;
70		#size-cells = <0>;
71
72		status = "disabled";
73	};
74
75	leds {
76		compatible = "gpio-leds";
77
78		led-bt {
79			label = "blue:bt";
80			function = LED_FUNCTION_BLUETOOTH;
81			color = <LED_COLOR_ID_BLUE>;
82			gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
83			linux,default-trigger = "bluetooth-power";
84			default-state = "off";
85		};
86
87		led-user0 {
88			label = "green:user0";
89			function = LED_FUNCTION_INDICATOR;
90			color = <LED_COLOR_ID_GREEN>;
91			gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
92			linux,default-trigger = "none";
93			default-state = "off";
94			panic-indicator;
95		};
96
97		led-wlan {
98			label = "yellow:wlan";
99			function = LED_FUNCTION_WLAN;
100			color = <LED_COLOR_ID_YELLOW>;
101			gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
102			linux,default-trigger = "phy0tx";
103			default-state = "off";
104		};
105	};
106
107	vreg_hdmi_out_1p2: regulator-hdmi-out-1p2 {
108		compatible = "regulator-fixed";
109		regulator-name = "VREG_HDMI_OUT_1P2";
110		regulator-min-microvolt = <1200000>;
111		regulator-max-microvolt = <1200000>;
112		vin-supply = <&vdc_1v2>;
113		regulator-always-on;
114		regulator-boot-on;
115	};
116
117	lt9611_3v3: regulator-lt9611-3v3 {
118		compatible = "regulator-fixed";
119		regulator-name = "LT9611_3V3";
120		regulator-min-microvolt = <3300000>;
121		regulator-max-microvolt = <3300000>;
122		vin-supply = <&vdc_3v3>;
123		regulator-always-on;
124		regulator-boot-on;
125	};
126
127	/* Main barrel jack input */
128	vdc_12v: regulator-vdc-12v {
129		compatible = "regulator-fixed";
130		regulator-name = "DC_12V";
131		regulator-min-microvolt = <12000000>;
132		regulator-max-microvolt = <12000000>;
133		regulator-always-on;
134		regulator-boot-on;
135	};
136
137	/* 1.2V supply stepped down from the barrel jack input */
138	vdc_1v2: regulator-vdc-1v2 {
139		compatible = "regulator-fixed";
140		regulator-name = "VDC_1V2";
141		regulator-min-microvolt = <1200000>;
142		regulator-max-microvolt = <1200000>;
143		vin-supply = <&vdc_12v>;
144		regulator-always-on;
145		regulator-boot-on;
146	};
147
148	/* 3.3V supply stepped down from the barrel jack input */
149	vdc_3v3: regulator-vdc-3v3 {
150		compatible = "regulator-fixed";
151		regulator-name = "VDC_3V3";
152		regulator-min-microvolt = <3300000>;
153		regulator-max-microvolt = <3300000>;
154		vin-supply = <&vdc_12v>;
155		regulator-always-on;
156		regulator-boot-on;
157	};
158
159	/* 5V supply stepped down from the barrel jack input */
160	vdc_5v: regulator-vdc-5v {
161		compatible = "regulator-fixed";
162		regulator-name = "VDC_5V";
163
164		regulator-min-microvolt = <5000000>;
165		regulator-max-microvolt = <5000000>;
166		regulator-always-on;
167		regulator-boot-on;
168	};
169
170	/* "Battery" voltage for the SoM, stepped down from the barrel jack input */
171	vdc_vbat_som: regulator-vdc-vbat {
172		compatible = "regulator-fixed";
173		regulator-name = "VBAT_SOM";
174		regulator-min-microvolt = <4200000>;
175		regulator-max-microvolt = <4200000>;
176		regulator-always-on;
177		regulator-boot-on;
178	};
179
180	/* PM2250 charger out, supplied by VBAT */
181	vph_pwr: regulator-vph-pwr {
182		compatible = "regulator-fixed";
183		regulator-name = "vph_pwr";
184		regulator-min-microvolt = <3700000>;
185		regulator-max-microvolt = <3700000>;
186		vin-supply = <&vdc_vbat_som>;
187
188		regulator-always-on;
189		regulator-boot-on;
190	};
191};
192
193&cpu_pd0 {
194	/delete-property/ power-domains;
195};
196
197&cpu_pd1 {
198	/delete-property/ power-domains;
199};
200
201&cpu_pd2 {
202	/delete-property/ power-domains;
203};
204
205&cpu_pd3 {
206	/delete-property/ power-domains;
207};
208
209/delete-node/ &cluster_pd;
210
211&gpi_dma0 {
212	status = "okay";
213};
214
215&gpu {
216	status = "okay";
217
218	zap-shader {
219		firmware-name = "qcom/qcm2290/a702_zap.mbn";
220	};
221};
222
223&i2c2_gpio {
224	clock-frequency = <400000>;
225	status = "okay";
226
227	lt9611_codec: hdmi-bridge@2b {
228		compatible = "lontium,lt9611uxc";
229		reg = <0x2b>;
230		interrupts-extended = <&tlmm 46 IRQ_TYPE_EDGE_FALLING>;
231		reset-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>;
232
233		vdd-supply = <&vreg_hdmi_out_1p2>;
234		vcc-supply = <&lt9611_3v3>;
235
236		pinctrl-0 = <&lt9611_irq_pin &lt9611_rst_pin>;
237		pinctrl-names = "default";
238		#sound-dai-cells = <1>;
239
240		ports {
241			#address-cells = <1>;
242			#size-cells = <0>;
243
244			port@0 {
245				reg = <0>;
246
247				lt9611_a: endpoint {
248					remote-endpoint = <&mdss_dsi0_out>;
249				};
250			};
251
252			port@2 {
253				reg = <2>;
254
255				lt9611_out: endpoint {
256					remote-endpoint = <&hdmi_con>;
257				};
258			};
259		};
260	};
261};
262
263&mdss {
264	status = "okay";
265};
266
267&mdss_dsi0 {
268	vdda-supply = <&pm4125_l5>;
269	status = "okay";
270};
271
272&mdss_dsi0_out {
273	remote-endpoint = <&lt9611_a>;
274	data-lanes = <0 1 2 3>;
275};
276
277&mdss_dsi0_phy {
278	status = "okay";
279};
280
281&pm4125_resin {
282	linux,code = <KEY_VOLUMEDOWN>;
283	status = "okay";
284};
285
286&pm4125_typec {
287	status = "okay";
288
289	connector {
290		compatible = "usb-c-connector";
291
292		power-role = "dual";
293		data-role = "dual";
294		self-powered;
295
296		typec-power-opmode = "default";
297		pd-disable;
298
299		ports {
300			#address-cells = <1>;
301			#size-cells = <0>;
302
303			port@0 {
304				reg = <0>;
305				pm4125_hs_in: endpoint {
306					remote-endpoint = <&usb_dwc3_hs>;
307				};
308			};
309
310			port@1 {
311				reg = <1>;
312				pm4125_ss_in: endpoint {
313					remote-endpoint = <&usb_qmpphy_out>;
314				};
315			};
316		};
317	};
318};
319
320&pm4125_vbus {
321	regulator-min-microamp = <500000>;
322	regulator-max-microamp = <500000>;
323	status = "okay";
324};
325
326&qupv3_id_0 {
327	status = "okay";
328};
329
330&remoteproc_adsp {
331	firmware-name = "qcom/qcm2290/adsp.mbn";
332	status = "okay";
333};
334
335&remoteproc_mpss {
336	firmware-name = "qcom/qcm2290/modem.mbn";
337	status = "okay";
338};
339
340&rpm_requests {
341	regulators {
342		compatible = "qcom,rpm-pm2250-regulators";
343		vdd_s3-supply = <&vph_pwr>;
344		vdd_s4-supply = <&vph_pwr>;
345		vdd_l1_l2_l3_l5_l6_l7_l8_l9_l10_l11_l12-supply = <&pm4125_s3>;
346		vdd_l4_l17_l18_l19_l20_l21_l22-supply = <&vph_pwr>;
347		vdd_l13_l14_l15_l16-supply = <&pm4125_s4>;
348
349		/*
350		 * S1 - VDD_APC
351		 * S2 - VDD_CX
352		 */
353
354		pm4125_s3: s3 {
355			/* 0.4V-1.6625V -> 1.3V (Power tree requirements) */
356			regulator-min-microvolt = <1352000>;
357			regulator-max-microvolt = <1352000>;
358			regulator-boot-on;
359		};
360
361		pm4125_s4: s4 {
362			/* 1.2V-2.35V -> 2.05V (Power tree requirements) */
363			regulator-min-microvolt = <2072000>;
364			regulator-max-microvolt = <2072000>;
365			regulator-boot-on;
366		};
367
368		/* L1 - VDD_MX */
369
370		pm4125_l2: l2 {
371			/* LPDDR4X VDD2 */
372			regulator-min-microvolt = <1136000>;
373			regulator-max-microvolt = <1136000>;
374			regulator-always-on;
375			regulator-boot-on;
376		};
377
378		pm4125_l3: l3 {
379			/* LPDDR4X VDDQ */
380			regulator-min-microvolt = <616000>;
381			regulator-max-microvolt = <616000>;
382			regulator-always-on;
383			regulator-boot-on;
384		};
385
386		pm4125_l4: l4 {
387			/* max = 3.05V -> max = 2.7 to disable 3V signaling (SDHCI2) */
388			regulator-min-microvolt = <1800000>;
389			regulator-max-microvolt = <2700000>;
390			regulator-allow-set-load;
391		};
392
393		pm4125_l5: l5 {
394			/* CSI/DSI */
395			regulator-min-microvolt = <1232000>;
396			regulator-max-microvolt = <1232000>;
397			regulator-allow-set-load;
398			regulator-boot-on;
399		};
400
401		pm4125_l6: l6 {
402			/* DRAM PLL */
403			regulator-min-microvolt = <928000>;
404			regulator-max-microvolt = <928000>;
405			regulator-always-on;
406			regulator-boot-on;
407		};
408
409		pm4125_l7: l7 {
410			/* Wi-Fi CX/MX */
411			regulator-min-microvolt = <664000>;
412			regulator-max-microvolt = <664000>;
413		};
414
415		/*
416		 * L8 - VDD_LPI_CX
417		 * L9 - VDD_LPI_MX
418		 */
419
420		pm4125_l10: l10 {
421			/* Wi-Fi RFA */
422			regulator-min-microvolt = <1304000>;
423			regulator-max-microvolt = <1304000>;
424		};
425
426		pm4125_l11: l11 {
427			/* GPS RF1 */
428			regulator-min-microvolt = <1000000>;
429			regulator-max-microvolt = <1000000>;
430			regulator-boot-on;
431		};
432
433		pm4125_l12: l12 {
434			/* USB PHYs */
435			regulator-min-microvolt = <928000>;
436			regulator-max-microvolt = <928000>;
437			regulator-allow-set-load;
438			regulator-boot-on;
439		};
440
441		pm4125_l13: l13 {
442			/* USB/QFPROM/PLLs */
443			regulator-min-microvolt = <1800000>;
444			regulator-max-microvolt = <1800000>;
445			regulator-allow-set-load;
446			regulator-boot-on;
447		};
448
449		pm4125_l14: l14 {
450			/* SDHCI1 VQMMC */
451			regulator-min-microvolt = <1800000>;
452			regulator-max-microvolt = <1800000>;
453			regulator-allow-set-load;
454			/* Broken hardware, never turn it off! */
455			regulator-always-on;
456		};
457
458		pm4125_l15: l15 {
459			/* WCD/DSI/BT VDDIO */
460			regulator-min-microvolt = <1800000>;
461			regulator-max-microvolt = <1800000>;
462			regulator-allow-set-load;
463			regulator-always-on;
464			regulator-boot-on;
465		};
466
467		pm4125_l16: l16 {
468			/* GPS RF2 */
469			regulator-min-microvolt = <1800000>;
470			regulator-max-microvolt = <1800000>;
471			regulator-boot-on;
472		};
473
474		pm4125_l17: l17 {
475			regulator-min-microvolt = <3000000>;
476			regulator-max-microvolt = <3000000>;
477		};
478
479		pm4125_l18: l18 {
480			/* VDD_PXn */
481			regulator-min-microvolt = <1800000>;
482			regulator-max-microvolt = <1800000>;
483		};
484
485		pm4125_l19: l19 {
486			/* VDD_PXn */
487			regulator-min-microvolt = <1800000>;
488			regulator-max-microvolt = <1800000>;
489		};
490
491		pm4125_l20: l20 {
492			/* SDHCI1 VMMC */
493			regulator-min-microvolt = <2400000>;
494			regulator-max-microvolt = <3600000>;
495			regulator-allow-set-load;
496		};
497
498		pm4125_l21: l21 {
499			/* SDHCI2 VMMC */
500			regulator-min-microvolt = <2960000>;
501			regulator-max-microvolt = <3300000>;
502			regulator-allow-set-load;
503			regulator-boot-on;
504		};
505
506		pm4125_l22: l22 {
507			/* Wi-Fi */
508			regulator-min-microvolt = <3312000>;
509			regulator-max-microvolt = <3312000>;
510		};
511	};
512};
513
514&sdhc_1 {
515	vmmc-supply = <&pm4125_l20>;
516	vqmmc-supply = <&pm4125_l14>;
517	pinctrl-0 = <&sdc1_state_on>;
518	pinctrl-1 = <&sdc1_state_off>;
519	pinctrl-names = "default", "sleep";
520	non-removable;
521	supports-cqe;
522	no-sdio;
523	no-sd;
524	status = "okay";
525};
526
527&sdhc_2 {
528	vmmc-supply = <&pm4125_l21>;
529	vqmmc-supply = <&pm4125_l4>;
530	cd-gpios = <&tlmm 88 GPIO_ACTIVE_LOW>;
531	pinctrl-0 = <&sdc2_state_on &sd_det_in_on>;
532	pinctrl-1 = <&sdc2_state_off &sd_det_in_off>;
533	pinctrl-names = "default", "sleep";
534	no-sdio;
535	no-mmc;
536	status = "okay";
537};
538
539&spi5 {
540	status = "okay";
541
542	can@0 {
543		compatible = "microchip,mcp2518fd";
544		reg = <0>;
545		interrupts-extended = <&tlmm 39 IRQ_TYPE_LEVEL_LOW>;
546		clocks = <&clk40m>;
547		spi-max-frequency = <10000000>;
548		vdd-supply = <&vdc_5v>;
549		xceiver-supply = <&vdc_5v>;
550	};
551};
552
553&tlmm {
554	uart3_default: uart3-default-state {
555		cts-pins {
556			pins = "gpio8";
557			function = "qup3";
558			drive-strength = <2>;
559			bias-bus-hold;
560		};
561
562		rts-pins {
563			pins = "gpio9";
564			function = "qup3";
565			drive-strength = <2>;
566			bias-disable;
567		};
568
569		tx-pins {
570			pins = "gpio10";
571			function = "qup3";
572			drive-strength = <2>;
573			bias-disable;
574		};
575
576		rx-pins {
577			pins = "gpio11";
578			function = "qup3";
579			drive-strength = <2>;
580			bias-pull-up;
581		};
582	};
583
584	uart3_sleep: uart3-sleep-state {
585		cts-pins {
586			pins = "gpio8";
587			function = "gpio";
588			drive-strength = <2>;
589			bias-bus-hold;
590		};
591
592		rts-pins {
593			pins = "gpio9";
594			function = "gpio";
595			drive-strength = <2>;
596			bias-pull-down;
597		};
598
599		tx-pins {
600			pins = "gpio10";
601			function = "gpio";
602			drive-strength = <2>;
603			bias-pull-up;
604		};
605
606		rx-pins {
607			pins = "gpio11";
608			function = "gpio";
609			drive-strength = <2>;
610			bias-pull-up;
611		};
612	};
613
614	lt9611_rst_pin: lt9611-rst-state {
615		pins = "gpio41";
616		function = "gpio";
617		input-disable;
618		output-high;
619	};
620
621	lt9611_irq_pin: lt9611-irq-state {
622		pins = "gpio46";
623		function = "gpio";
624		bias-disable;
625	};
626
627	sd_det_in_on: sd-det-in-on-state {
628		pins = "gpio88";
629		function = "gpio";
630		drive-strength = <2>;
631		bias-pull-up;
632	};
633
634	sd_det_in_off: sd-det-in-off-state {
635		pins = "gpio88";
636		function = "gpio";
637		drive-strength = <2>;
638		bias-disable;
639	};
640
641	key_volp_n: key-volp-n-state {
642		pins = "gpio96";
643		function = "gpio";
644		bias-pull-up;
645		output-disable;
646	};
647};
648
649&uart3 {
650	/delete-property/ interrupts;
651	interrupts-extended = <&intc GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
652			      <&tlmm 11 IRQ_TYPE_LEVEL_HIGH>;
653	pinctrl-0 = <&uart3_default>;
654	pinctrl-1 = <&uart3_sleep>;
655	pinctrl-names = "default", "sleep";
656
657	status = "okay";
658
659	bluetooth {
660		compatible = "qcom,wcn3950-bt";
661
662		vddio-supply = <&pm4125_l15>;
663		vddxo-supply = <&pm4125_l13>;
664		vddrf-supply = <&pm4125_l10>;
665		vddch0-supply = <&pm4125_l22>;
666		enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
667		max-speed = <3200000>;
668	};
669};
670
671/* UART connected to the Micro-USB port via a FTDI chip */
672&uart4 {
673	compatible = "qcom,geni-debug-uart";
674	status = "okay";
675};
676
677&usb {
678	status = "okay";
679};
680
681&usb_dwc3_hs {
682	remote-endpoint = <&pm4125_hs_in>;
683};
684
685&usb_hsphy {
686	vdd-supply = <&pm4125_l12>;
687	vdda-pll-supply = <&pm4125_l13>;
688	vdda-phy-dpdm-supply = <&pm4125_l21>;
689	status = "okay";
690};
691
692&usb_qmpphy {
693	vdda-phy-supply = <&pm4125_l12>;
694	vdda-pll-supply = <&pm4125_l13>;
695	status = "okay";
696};
697
698&usb_qmpphy_out {
699	remote-endpoint = <&pm4125_ss_in>;
700};
701
702&venus {
703	status = "okay";
704};
705
706&wifi {
707	vdd-0.8-cx-mx-supply = <&pm4125_l7>;
708	vdd-1.8-xo-supply = <&pm4125_l13>;
709	vdd-1.3-rfa-supply = <&pm4125_l10>;
710	vdd-3.3-ch0-supply = <&pm4125_l22>;
711	qcom,calibration-variant = "Thundercomm_RB1";
712	firmware-name = "qcm2290";
713	status = "okay";
714};
715
716&xo_board {
717	clock-frequency = <38400000>;
718};
719