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
11/ {
12	model = "Qualcomm Technologies, Inc. QRB4210 RB2";
13	compatible = "qcom,qrb4210-rb2", "qcom,qrb4210", "qcom,sm4250";
14
15	aliases {
16		serial0 = &uart4;
17	};
18
19	chosen {
20		stdout-path = "serial0:115200n8";
21	};
22
23	hdmi-connector {
24		compatible = "hdmi-connector";
25		type = "a";
26
27		port {
28			hdmi_con: endpoint {
29				remote-endpoint = <&lt9611_out>;
30			};
31		};
32	};
33
34	leds {
35		compatible = "gpio-leds";
36
37		led-bt {
38			label = "blue:bt";
39			function = LED_FUNCTION_BLUETOOTH;
40			color = <LED_COLOR_ID_BLUE>;
41			gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
42			linux,default-trigger = "bluetooth-power";
43			default-state = "off";
44		};
45
46		led-user0 {
47			label = "green:user0";
48			function = LED_FUNCTION_INDICATOR;
49			color = <LED_COLOR_ID_GREEN>;
50			gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
51			linux,default-trigger = "none";
52			default-state = "off";
53			panic-indicator;
54		};
55
56		led-wlan {
57			label = "yellow:wlan";
58			function = LED_FUNCTION_WLAN;
59			color = <LED_COLOR_ID_YELLOW>;
60			gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
61			linux,default-trigger = "phy0tx";
62			default-state = "off";
63		};
64	};
65
66	vreg_hdmi_out_1p2: regulator-hdmi-out-1p2 {
67		compatible = "regulator-fixed";
68		regulator-name = "VREG_HDMI_OUT_1P2";
69		regulator-min-microvolt = <1200000>;
70		regulator-max-microvolt = <1200000>;
71		vin-supply = <&vdc_1v2>;
72		regulator-always-on;
73		regulator-boot-on;
74	};
75
76	lt9611_3v3: regulator-lt9611-3v3 {
77		compatible = "regulator-fixed";
78		regulator-name = "LT9611_3V3";
79		regulator-min-microvolt = <3300000>;
80		regulator-max-microvolt = <3300000>;
81		vin-supply = <&vdc_3v3>;
82		regulator-always-on;
83		regulator-boot-on;
84	};
85
86	/* Main barrel jack input */
87	vdc_12v: regulator-vdc-12v {
88		compatible = "regulator-fixed";
89		regulator-name = "DC_12V";
90		regulator-min-microvolt = <12000000>;
91		regulator-max-microvolt = <12000000>;
92		regulator-always-on;
93		regulator-boot-on;
94	};
95
96	/* 1.2V supply stepped down from the barrel jack input */
97	vdc_1v2: regulator-vdc-1v2 {
98		compatible = "regulator-fixed";
99		regulator-name = "VDC_1V2";
100		regulator-min-microvolt = <1200000>;
101		regulator-max-microvolt = <1200000>;
102		vin-supply = <&vdc_12v>;
103		regulator-always-on;
104		regulator-boot-on;
105	};
106
107	/* 3.3V supply stepped down from the barrel jack input */
108	vdc_3v3: regulator-vdc-3v3 {
109		compatible = "regulator-fixed";
110		regulator-name = "VDC_3V3";
111		regulator-min-microvolt = <3300000>;
112		regulator-max-microvolt = <3300000>;
113		vin-supply = <&vdc_12v>;
114		regulator-always-on;
115		regulator-boot-on;
116	};
117
118	/* 5V supply stepped down from the barrel jack input */
119	vdc_5v: regulator-vdc-5v {
120		compatible = "regulator-fixed";
121		regulator-name = "VDC_5V";
122
123		regulator-min-microvolt = <5000000>;
124		regulator-max-microvolt = <5000000>;
125		regulator-always-on;
126		regulator-boot-on;
127	};
128
129	/* "Battery" voltage for the SoM, stepped down from the barrel jack input */
130	vdc_vbat_som: regulator-vdc-vbat {
131		compatible = "regulator-fixed";
132		regulator-name = "VBAT_SOM";
133		regulator-min-microvolt = <4200000>;
134		regulator-max-microvolt = <4200000>;
135		regulator-always-on;
136		regulator-boot-on;
137	};
138
139	/* PMI632 charger out, supplied by VBAT */
140	vph_pwr: regulator-vph-pwr {
141		compatible = "regulator-fixed";
142		regulator-name = "vph_pwr";
143		regulator-min-microvolt = <3700000>;
144		regulator-max-microvolt = <3700000>;
145		vin-supply = <&vdc_vbat_som>;
146
147		regulator-always-on;
148		regulator-boot-on;
149	};
150};
151
152&gpi_dma0 {
153	status = "okay";
154};
155
156&i2c2 {
157	clock-frequency = <400000>;
158	status = "okay";
159
160	lt9611_codec: hdmi-bridge@2b {
161		compatible = "lontium,lt9611uxc";
162		reg = <0x2b>;
163		interrupts-extended = <&tlmm 46 IRQ_TYPE_EDGE_FALLING>;
164		reset-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>;
165
166		vdd-supply = <&vreg_hdmi_out_1p2>;
167		vcc-supply = <&lt9611_3v3>;
168
169		pinctrl-0 = <&lt9611_irq_pin &lt9611_rst_pin>;
170		pinctrl-names = "default";
171		#sound-dai-cells = <1>;
172
173		ports {
174			#address-cells = <1>;
175			#size-cells = <0>;
176
177			port@0 {
178				reg = <0>;
179
180				lt9611_a: endpoint {
181					remote-endpoint = <&mdss_dsi0_out>;
182				};
183			};
184
185			port@2 {
186				reg = <2>;
187
188				lt9611_out: endpoint {
189					remote-endpoint = <&hdmi_con>;
190				};
191			};
192		};
193	};
194};
195
196&mdss {
197	status = "okay";
198};
199
200&mdss_dsi0 {
201	vdda-supply = <&vreg_l18a_1p232>;
202	status = "okay";
203};
204
205&mdss_dsi0_out {
206	remote-endpoint = <&lt9611_a>;
207	data-lanes = <0 1 2 3>;
208};
209
210&mdss_dsi0_phy {
211	status = "okay";
212};
213
214&qupv3_id_0 {
215	status = "okay";
216};
217
218&rpm_requests {
219	regulators {
220		compatible = "qcom,rpm-pm6125-regulators";
221
222		vdd-s1-supply = <&vph_pwr>;
223		vdd-s2-supply = <&vph_pwr>;
224		vdd-s3-supply = <&vph_pwr>;
225		vdd-s4-supply = <&vph_pwr>;
226		vdd-s5-supply = <&vph_pwr>;
227		vdd-s6-supply = <&vph_pwr>;
228		vdd-s7-supply = <&vph_pwr>;
229		vdd-s8-supply = <&vph_pwr>;
230		vdd-s9-supply = <&vph_pwr>;
231		vdd-s10-supply = <&vph_pwr>;
232
233		vdd-l1-l7-l17-l18-supply = <&vreg_s6a_1p352>;
234		vdd-l2-l3-l4-supply = <&vreg_s6a_1p352>;
235		vdd-l5-l15-l19-l20-l21-l22-supply = <&vph_pwr>;
236		vdd-l6-l8-supply = <&vreg_s5a_0p848>;
237		vdd-l9-l11-supply = <&vreg_s7a_2p04>;
238		vdd-l10-l13-l14-supply = <&vreg_s7a_2p04>;
239		vdd-l12-l16-supply = <&vreg_s7a_2p04>;
240		vdd-l23-l24-supply = <&vph_pwr>;
241
242		vreg_s5a_0p848: s5 {
243			regulator-min-microvolt = <920000>;
244			regulator-max-microvolt = <1128000>;
245		};
246
247		vreg_s6a_1p352: s6 {
248			regulator-min-microvolt = <304000>;
249			regulator-max-microvolt = <1456000>;
250		};
251
252		vreg_s7a_2p04: s7 {
253			regulator-min-microvolt = <1280000>;
254			regulator-max-microvolt = <2080000>;
255		};
256
257		vreg_l1a_1p0: l1 {
258			regulator-min-microvolt = <952000>;
259			regulator-max-microvolt = <1152000>;
260		};
261
262		vreg_l4a_0p9: l4 {
263			regulator-min-microvolt = <488000>;
264			regulator-max-microvolt = <1000000>;
265		};
266
267		vreg_l5a_2p96: l5 {
268			regulator-min-microvolt = <1648000>;
269			regulator-max-microvolt = <3056000>;
270		};
271
272		vreg_l6a_0p6: l6 {
273			regulator-min-microvolt = <576000>;
274			regulator-max-microvolt = <656000>;
275		};
276
277		vreg_l7a_1p256: l7 {
278			regulator-min-microvolt = <1200000>;
279			regulator-max-microvolt = <1304000>;
280		};
281
282		vreg_l8a_0p664: l8 {
283			regulator-min-microvolt = <400000>;
284			regulator-max-microvolt = <728000>;
285		};
286
287		vreg_l9a_1p8: l9 {
288			regulator-min-microvolt = <1800000>;
289			regulator-max-microvolt = <2000000>;
290		};
291
292		vreg_l10a_1p8: l10 {
293			regulator-min-microvolt = <1704000>;
294			regulator-max-microvolt = <1904000>;
295		};
296
297		vreg_l11a_1p8: l11 {
298			regulator-min-microvolt = <1704000>;
299			regulator-max-microvolt = <1952000>;
300		};
301
302		vreg_l12a_1p8: l12 {
303			regulator-min-microvolt = <1624000>;
304			regulator-max-microvolt = <1984000>;
305		};
306
307		vreg_l13a_1p8: l13 {
308			regulator-min-microvolt = <1504000>;
309			regulator-max-microvolt = <1952000>;
310		};
311
312		vreg_l14a_1p8: l14 {
313			regulator-min-microvolt = <1704000>;
314			regulator-max-microvolt = <1904000>;
315		};
316
317		vreg_l15a_3p128: l15 {
318			regulator-min-microvolt = <2920000>;
319			regulator-max-microvolt = <3232000>;
320		};
321
322		vreg_l16a_1p3: l16 {
323			regulator-min-microvolt = <1704000>;
324			regulator-max-microvolt = <1904000>;
325		};
326
327		vreg_l17a_1p3: l17 {
328			regulator-min-microvolt = <1152000>;
329			regulator-max-microvolt = <1384000>;
330		};
331
332		vreg_l18a_1p232: l18 {
333			regulator-min-microvolt = <1104000>;
334			regulator-max-microvolt = <1312000>;
335		};
336
337		vreg_l19a_1p8: l19 {
338			regulator-min-microvolt = <1624000>;
339			regulator-max-microvolt = <3304000>;
340		};
341
342		vreg_l20a_1p8: l20 {
343			regulator-min-microvolt = <1624000>;
344			regulator-max-microvolt = <3304000>;
345		};
346
347		vreg_l21a_2p704: l21 {
348			regulator-min-microvolt = <2400000>;
349			regulator-max-microvolt = <3600000>;
350		};
351
352		vreg_l22a_2p96: l22 {
353			regulator-min-microvolt = <2952000>;
354			regulator-max-microvolt = <3304000>;
355			regulator-system-load = <100000>;
356			regulator-allow-set-load;
357		};
358
359		vreg_l23a_3p3: l23 {
360			regulator-min-microvolt = <3200000>;
361			regulator-max-microvolt = <3400000>;
362		};
363
364		vreg_l24a_2p96: l24 {
365			regulator-min-microvolt = <2704000>;
366			regulator-max-microvolt = <3600000>;
367			regulator-system-load = <100000>;
368			regulator-allow-set-load;
369		};
370	};
371};
372
373&sdhc_1 {
374	vmmc-supply = <&vreg_l24a_2p96>;
375	vqmmc-supply = <&vreg_l11a_1p8>;
376	no-sdio;
377	non-removable;
378
379	status = "okay";
380};
381
382&sdhc_2 {
383	cd-gpios = <&tlmm 88 GPIO_ACTIVE_HIGH>; /* card detect gpio */
384	vmmc-supply = <&vreg_l22a_2p96>;
385	vqmmc-supply = <&vreg_l5a_2p96>;
386	no-sdio;
387
388	status = "okay";
389};
390
391&sleep_clk {
392	clock-frequency = <32000>;
393};
394
395&tlmm {
396	gpio-reserved-ranges = <43 2>, <49 1>, <54 1>,
397			       <56 3>, <61 2>, <64 1>,
398			       <68 1>, <72 8>, <96 1>;
399
400	lt9611_rst_pin: lt9611-rst-state {
401		pins = "gpio41";
402		function = "gpio";
403		input-disable;
404		output-high;
405	};
406
407	lt9611_irq_pin: lt9611-irq-state {
408		pins = "gpio46";
409		function = "gpio";
410		bias-disable;
411	};
412};
413
414&uart4 {
415	status = "okay";
416};
417
418&xo_board {
419	clock-frequency = <19200000>;
420};
421