xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/qrb2210-rb1.dts (revision db33c6f3ae9d1231087710068ee4ea5398aacca7)
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/leds/common.h>
9#include "qcm2290.dtsi"
10#include "pm2250.dtsi"
11
12/ {
13	model = "Qualcomm Technologies, Inc. Robotics RB1";
14	compatible = "qcom,qrb2210-rb1", "qcom,qrb2210", "qcom,qcm2290";
15
16	aliases {
17		serial0 = &uart4;
18		sdhc1 = &sdhc_1;
19		sdhc2 = &sdhc_2;
20	};
21
22	chosen {
23		stdout-path = "serial0:115200n8";
24	};
25
26	clocks {
27		clk40M: can-clk {
28			compatible = "fixed-clock";
29			clock-frequency = <40000000>;
30			#clock-cells = <0>;
31		};
32	};
33
34	gpio-keys {
35		compatible = "gpio-keys";
36		label = "gpio-keys";
37
38		pinctrl-0 = <&key_volp_n>;
39		pinctrl-names = "default";
40
41		key-volume-up {
42			label = "Volume Up";
43			linux,code = <KEY_VOLUMEUP>;
44			gpios = <&tlmm 96 GPIO_ACTIVE_LOW>;
45			debounce-interval = <15>;
46			linux,can-disable;
47			wakeup-source;
48		};
49	};
50
51	hdmi-connector {
52		compatible = "hdmi-connector";
53		type = "a";
54
55		port {
56			hdmi_con: endpoint {
57				remote-endpoint = <&lt9611_out>;
58			};
59		};
60	};
61
62	leds {
63		compatible = "gpio-leds";
64
65		led-bt {
66			label = "blue:bt";
67			function = LED_FUNCTION_BLUETOOTH;
68			color = <LED_COLOR_ID_BLUE>;
69			gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
70			linux,default-trigger = "bluetooth-power";
71			default-state = "off";
72		};
73
74		led-user0 {
75			label = "green:user0";
76			function = LED_FUNCTION_INDICATOR;
77			color = <LED_COLOR_ID_GREEN>;
78			gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
79			linux,default-trigger = "none";
80			default-state = "off";
81			panic-indicator;
82		};
83
84		led-wlan {
85			label = "yellow:wlan";
86			function = LED_FUNCTION_WLAN;
87			color = <LED_COLOR_ID_YELLOW>;
88			gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
89			linux,default-trigger = "phy0tx";
90			default-state = "off";
91		};
92	};
93
94	vreg_hdmi_out_1p2: regulator-hdmi-out-1p2 {
95		compatible = "regulator-fixed";
96		regulator-name = "VREG_HDMI_OUT_1P2";
97		regulator-min-microvolt = <1200000>;
98		regulator-max-microvolt = <1200000>;
99		vin-supply = <&vdc_1v2>;
100		regulator-always-on;
101		regulator-boot-on;
102	};
103
104	lt9611_3v3: regulator-lt9611-3v3 {
105		compatible = "regulator-fixed";
106		regulator-name = "LT9611_3V3";
107		regulator-min-microvolt = <3300000>;
108		regulator-max-microvolt = <3300000>;
109		vin-supply = <&vdc_3v3>;
110		regulator-always-on;
111		regulator-boot-on;
112	};
113
114	/* Main barrel jack input */
115	vdc_12v: regulator-vdc-12v {
116		compatible = "regulator-fixed";
117		regulator-name = "DC_12V";
118		regulator-min-microvolt = <12000000>;
119		regulator-max-microvolt = <12000000>;
120		regulator-always-on;
121		regulator-boot-on;
122	};
123
124	/* 1.2V supply stepped down from the barrel jack input */
125	vdc_1v2: regulator-vdc-1v2 {
126		compatible = "regulator-fixed";
127		regulator-name = "VDC_1V2";
128		regulator-min-microvolt = <1200000>;
129		regulator-max-microvolt = <1200000>;
130		vin-supply = <&vdc_12v>;
131		regulator-always-on;
132		regulator-boot-on;
133	};
134
135	/* 3.3V supply stepped down from the barrel jack input */
136	vdc_3v3: regulator-vdc-3v3 {
137		compatible = "regulator-fixed";
138		regulator-name = "VDC_3V3";
139		regulator-min-microvolt = <3300000>;
140		regulator-max-microvolt = <3300000>;
141		vin-supply = <&vdc_12v>;
142		regulator-always-on;
143		regulator-boot-on;
144	};
145
146	/* 5V supply stepped down from the barrel jack input */
147	vdc_5v: regulator-vdc-5v {
148		compatible = "regulator-fixed";
149		regulator-name = "VDC_5V";
150
151		regulator-min-microvolt = <5000000>;
152		regulator-max-microvolt = <5000000>;
153		regulator-always-on;
154		regulator-boot-on;
155	};
156
157	/* "Battery" voltage for the SoM, stepped down from the barrel jack input */
158	vdc_vbat_som: regulator-vdc-vbat {
159		compatible = "regulator-fixed";
160		regulator-name = "VBAT_SOM";
161		regulator-min-microvolt = <4200000>;
162		regulator-max-microvolt = <4200000>;
163		regulator-always-on;
164		regulator-boot-on;
165	};
166
167	/* PM2250 charger out, supplied by VBAT */
168	vph_pwr: regulator-vph-pwr {
169		compatible = "regulator-fixed";
170		regulator-name = "vph_pwr";
171		regulator-min-microvolt = <3700000>;
172		regulator-max-microvolt = <3700000>;
173		vin-supply = <&vdc_vbat_som>;
174
175		regulator-always-on;
176		regulator-boot-on;
177	};
178};
179
180&gpi_dma0 {
181	status = "okay";
182};
183
184&i2c2 {
185	clock-frequency = <400000>;
186	status = "okay";
187
188	lt9611_codec: hdmi-bridge@2b {
189		compatible = "lontium,lt9611uxc";
190		reg = <0x2b>;
191		interrupts-extended = <&tlmm 46 IRQ_TYPE_EDGE_FALLING>;
192		reset-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>;
193
194		vdd-supply = <&vreg_hdmi_out_1p2>;
195		vcc-supply = <&lt9611_3v3>;
196
197		pinctrl-0 = <&lt9611_irq_pin &lt9611_rst_pin>;
198		pinctrl-names = "default";
199		#sound-dai-cells = <1>;
200
201		ports {
202			#address-cells = <1>;
203			#size-cells = <0>;
204
205			port@0 {
206				reg = <0>;
207
208				lt9611_a: endpoint {
209					remote-endpoint = <&mdss_dsi0_out>;
210				};
211			};
212
213			port@2 {
214				reg = <2>;
215
216				lt9611_out: endpoint {
217					remote-endpoint = <&hdmi_con>;
218				};
219			};
220		};
221	};
222};
223
224&mdss {
225	status = "okay";
226};
227
228&mdss_dsi0 {
229	vdda-supply = <&pm2250_l5>;
230	status = "okay";
231};
232
233&mdss_dsi0_out {
234	remote-endpoint = <&lt9611_a>;
235	data-lanes = <0 1 2 3>;
236};
237
238&mdss_dsi0_phy {
239	status = "okay";
240};
241
242&pm2250_resin {
243	linux,code = <KEY_VOLUMEDOWN>;
244	status = "okay";
245};
246
247&qupv3_id_0 {
248	status = "okay";
249};
250
251&remoteproc_adsp {
252	firmware-name = "qcom/qcm2290/adsp.mbn";
253	status = "okay";
254};
255
256&remoteproc_mpss {
257	firmware-name = "qcom/qcm2290/modem.mbn";
258	status = "okay";
259};
260
261&rpm_requests {
262	regulators {
263		compatible = "qcom,rpm-pm2250-regulators";
264		vdd_s3-supply = <&vph_pwr>;
265		vdd_s4-supply = <&vph_pwr>;
266		vdd_l1_l2_l3_l5_l6_l7_l8_l9_l10_l11_l12-supply = <&pm2250_s3>;
267		vdd_l4_l17_l18_l19_l20_l21_l22-supply = <&vph_pwr>;
268		vdd_l13_l14_l15_l16-supply = <&pm2250_s4>;
269
270		/*
271		 * S1 - VDD_APC
272		 * S2 - VDD_CX
273		 */
274
275		pm2250_s3: s3 {
276			/* 0.4V-1.6625V -> 1.3V (Power tree requirements) */
277			regulator-min-microvolt = <1352000>;
278			regulator-max-microvolt = <1352000>;
279			regulator-boot-on;
280		};
281
282		pm2250_s4: s4 {
283			/* 1.2V-2.35V -> 2.05V (Power tree requirements) */
284			regulator-min-microvolt = <2072000>;
285			regulator-max-microvolt = <2072000>;
286			regulator-boot-on;
287		};
288
289		/* L1 - VDD_MX */
290
291		pm2250_l2: l2 {
292			/* LPDDR4X VDD2 */
293			regulator-min-microvolt = <1136000>;
294			regulator-max-microvolt = <1136000>;
295			regulator-always-on;
296			regulator-boot-on;
297		};
298
299		pm2250_l3: l3 {
300			/* LPDDR4X VDDQ */
301			regulator-min-microvolt = <616000>;
302			regulator-max-microvolt = <616000>;
303			regulator-always-on;
304			regulator-boot-on;
305		};
306
307		pm2250_l4: l4 {
308			/* max = 3.05V -> max = 2.7 to disable 3V signaling (SDHCI2) */
309			regulator-min-microvolt = <1800000>;
310			regulator-max-microvolt = <2700000>;
311			regulator-allow-set-load;
312		};
313
314		pm2250_l5: l5 {
315			/* CSI/DSI */
316			regulator-min-microvolt = <1232000>;
317			regulator-max-microvolt = <1232000>;
318			regulator-allow-set-load;
319			regulator-boot-on;
320		};
321
322		pm2250_l6: l6 {
323			/* DRAM PLL */
324			regulator-min-microvolt = <928000>;
325			regulator-max-microvolt = <928000>;
326			regulator-always-on;
327			regulator-boot-on;
328		};
329
330		pm2250_l7: l7 {
331			/* Wi-Fi CX/MX */
332			regulator-min-microvolt = <664000>;
333			regulator-max-microvolt = <664000>;
334		};
335
336		/*
337		 * L8 - VDD_LPI_CX
338		 * L9 - VDD_LPI_MX
339		 */
340
341		pm2250_l10: l10 {
342			/* Wi-Fi RFA */
343			regulator-min-microvolt = <1304000>;
344			regulator-max-microvolt = <1304000>;
345		};
346
347		pm2250_l11: l11 {
348			/* GPS RF1 */
349			regulator-min-microvolt = <1000000>;
350			regulator-max-microvolt = <1000000>;
351			regulator-boot-on;
352		};
353
354		pm2250_l12: l12 {
355			/* USB PHYs */
356			regulator-min-microvolt = <928000>;
357			regulator-max-microvolt = <928000>;
358			regulator-allow-set-load;
359			regulator-boot-on;
360		};
361
362		pm2250_l13: l13 {
363			/* USB/QFPROM/PLLs */
364			regulator-min-microvolt = <1800000>;
365			regulator-max-microvolt = <1800000>;
366			regulator-allow-set-load;
367			regulator-boot-on;
368		};
369
370		pm2250_l14: l14 {
371			/* SDHCI1 VQMMC */
372			regulator-min-microvolt = <1800000>;
373			regulator-max-microvolt = <1800000>;
374			regulator-allow-set-load;
375			/* Broken hardware, never turn it off! */
376			regulator-always-on;
377		};
378
379		pm2250_l15: l15 {
380			/* WCD/DSI/BT VDDIO */
381			regulator-min-microvolt = <1800000>;
382			regulator-max-microvolt = <1800000>;
383			regulator-allow-set-load;
384			regulator-always-on;
385			regulator-boot-on;
386		};
387
388		pm2250_l16: l16 {
389			/* GPS RF2 */
390			regulator-min-microvolt = <1800000>;
391			regulator-max-microvolt = <1800000>;
392			regulator-boot-on;
393		};
394
395		pm2250_l17: l17 {
396			regulator-min-microvolt = <3000000>;
397			regulator-max-microvolt = <3000000>;
398		};
399
400		pm2250_l18: l18 {
401			/* VDD_PXn */
402			regulator-min-microvolt = <1800000>;
403			regulator-max-microvolt = <1800000>;
404		};
405
406		pm2250_l19: l19 {
407			/* VDD_PXn */
408			regulator-min-microvolt = <1800000>;
409			regulator-max-microvolt = <1800000>;
410		};
411
412		pm2250_l20: l20 {
413			/* SDHCI1 VMMC */
414			regulator-min-microvolt = <2400000>;
415			regulator-max-microvolt = <3600000>;
416			regulator-allow-set-load;
417		};
418
419		pm2250_l21: l21 {
420			/* SDHCI2 VMMC */
421			regulator-min-microvolt = <2960000>;
422			regulator-max-microvolt = <3300000>;
423			regulator-allow-set-load;
424			regulator-boot-on;
425		};
426
427		pm2250_l22: l22 {
428			/* Wi-Fi */
429			regulator-min-microvolt = <3312000>;
430			regulator-max-microvolt = <3312000>;
431		};
432	};
433};
434
435&sdhc_1 {
436	vmmc-supply = <&pm2250_l20>;
437	vqmmc-supply = <&pm2250_l14>;
438	pinctrl-0 = <&sdc1_state_on>;
439	pinctrl-1 = <&sdc1_state_off>;
440	pinctrl-names = "default", "sleep";
441	non-removable;
442	supports-cqe;
443	no-sdio;
444	no-sd;
445	status = "okay";
446};
447
448&sdhc_2 {
449	vmmc-supply = <&pm2250_l21>;
450	vqmmc-supply = <&pm2250_l4>;
451	cd-gpios = <&tlmm 88 GPIO_ACTIVE_LOW>;
452	pinctrl-0 = <&sdc2_state_on &sd_det_in_on>;
453	pinctrl-1 = <&sdc2_state_off &sd_det_in_off>;
454	pinctrl-names = "default", "sleep";
455	no-sdio;
456	no-mmc;
457	status = "okay";
458};
459
460&spi5 {
461	status = "okay";
462
463	can@0 {
464		compatible = "microchip,mcp2518fd";
465		reg = <0>;
466		interrupts-extended = <&tlmm 39 IRQ_TYPE_LEVEL_LOW>;
467		clocks = <&clk40M>;
468		spi-max-frequency = <10000000>;
469		vdd-supply = <&vdc_5v>;
470		xceiver-supply = <&vdc_5v>;
471	};
472};
473
474&tlmm {
475	lt9611_rst_pin: lt9611-rst-state {
476		pins = "gpio41";
477		function = "gpio";
478		input-disable;
479		output-high;
480	};
481
482	lt9611_irq_pin: lt9611-irq-state {
483		pins = "gpio46";
484		function = "gpio";
485		bias-disable;
486	};
487
488	sd_det_in_on: sd-det-in-on-state {
489		pins = "gpio88";
490		function = "gpio";
491		drive-strength = <2>;
492		bias-pull-up;
493	};
494
495	sd_det_in_off: sd-det-in-off-state {
496		pins = "gpio88";
497		function = "gpio";
498		drive-strength = <2>;
499		bias-disable;
500	};
501
502	key_volp_n: key-volp-n-state {
503		pins = "gpio96";
504		function = "gpio";
505		bias-pull-up;
506		output-disable;
507	};
508};
509
510/* UART connected to the Micro-USB port via a FTDI chip */
511&uart4 {
512	compatible = "qcom,geni-debug-uart";
513	status = "okay";
514};
515
516&usb {
517	status = "okay";
518};
519
520&usb_qmpphy {
521	vdda-phy-supply = <&pm2250_l12>;
522	vdda-pll-supply = <&pm2250_l13>;
523	status = "okay";
524};
525
526&usb_dwc3 {
527	dr_mode = "host";
528};
529
530&usb_hsphy {
531	vdd-supply = <&pm2250_l12>;
532	vdda-pll-supply = <&pm2250_l13>;
533	vdda-phy-dpdm-supply = <&pm2250_l21>;
534	status = "okay";
535};
536
537&wifi {
538	vdd-0.8-cx-mx-supply = <&pm2250_l7>;
539	vdd-1.8-xo-supply = <&pm2250_l13>;
540	vdd-1.3-rfa-supply = <&pm2250_l10>;
541	vdd-3.3-ch0-supply = <&pm2250_l22>;
542	qcom,ath10k-calibration-variant = "Thundercomm_RB1";
543	status = "okay";
544};
545
546&xo_board {
547	clock-frequency = <38400000>;
548};
549