Linux 6.7-rc7
[linux-modified.git] / arch / arm64 / boot / dts / qcom / qrb2210-rb1.dts
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         gpio-keys {
27                 compatible = "gpio-keys";
28                 label = "gpio-keys";
29
30                 pinctrl-0 = <&key_volp_n>;
31                 pinctrl-names = "default";
32
33                 key-volume-up {
34                         label = "Volume Up";
35                         linux,code = <KEY_VOLUMEUP>;
36                         gpios = <&tlmm 96 GPIO_ACTIVE_LOW>;
37                         debounce-interval = <15>;
38                         linux,can-disable;
39                         wakeup-source;
40                 };
41         };
42
43         leds {
44                 compatible = "gpio-leds";
45
46                 led-bt {
47                         label = "blue:bt";
48                         function = LED_FUNCTION_BLUETOOTH;
49                         color = <LED_COLOR_ID_BLUE>;
50                         gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
51                         linux,default-trigger = "bluetooth-power";
52                         default-state = "off";
53                 };
54
55                 led-user0 {
56                         label = "green:user0";
57                         function = LED_FUNCTION_INDICATOR;
58                         color = <LED_COLOR_ID_GREEN>;
59                         gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
60                         linux,default-trigger = "none";
61                         default-state = "off";
62                         panic-indicator;
63                 };
64
65                 led-wlan {
66                         label = "yellow:wlan";
67                         function = LED_FUNCTION_WLAN;
68                         color = <LED_COLOR_ID_YELLOW>;
69                         gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
70                         linux,default-trigger = "phy0tx";
71                         default-state = "off";
72                 };
73         };
74
75         vreg_hdmi_out_1p2: regulator-hdmi-out-1p2 {
76                 compatible = "regulator-fixed";
77                 regulator-name = "VREG_HDMI_OUT_1P2";
78                 regulator-min-microvolt = <1200000>;
79                 regulator-max-microvolt = <1200000>;
80                 vin-supply = <&vdc_1v2>;
81                 regulator-always-on;
82                 regulator-boot-on;
83         };
84
85         lt9611_3v3: regulator-lt9611-3v3 {
86                 compatible = "regulator-fixed";
87                 regulator-name = "LT9611_3V3";
88                 regulator-min-microvolt = <3300000>;
89                 regulator-max-microvolt = <3300000>;
90                 vin-supply = <&vdc_3v3>;
91                 regulator-always-on;
92                 regulator-boot-on;
93         };
94
95         /* Main barrel jack input */
96         vdc_12v: regulator-vdc-12v {
97                 compatible = "regulator-fixed";
98                 regulator-name = "DC_12V";
99                 regulator-min-microvolt = <12000000>;
100                 regulator-max-microvolt = <12000000>;
101                 regulator-always-on;
102                 regulator-boot-on;
103         };
104
105         /* 1.2V supply stepped down from the barrel jack input */
106         vdc_1v2: regulator-vdc-1v2 {
107                 compatible = "regulator-fixed";
108                 regulator-name = "VDC_1V2";
109                 regulator-min-microvolt = <1200000>;
110                 regulator-max-microvolt = <1200000>;
111                 vin-supply = <&vdc_12v>;
112                 regulator-always-on;
113                 regulator-boot-on;
114         };
115
116         /* 3.3V supply stepped down from the barrel jack input */
117         vdc_3v3: regulator-vdc-3v3 {
118                 compatible = "regulator-fixed";
119                 regulator-name = "VDC_3V3";
120                 regulator-min-microvolt = <3300000>;
121                 regulator-max-microvolt = <3300000>;
122                 vin-supply = <&vdc_12v>;
123                 regulator-always-on;
124                 regulator-boot-on;
125         };
126
127         /* 5V supply stepped down from the barrel jack input */
128         vdc_5v: regulator-vdc-5v {
129                 compatible = "regulator-fixed";
130                 regulator-name = "VDC_5V";
131
132                 regulator-min-microvolt = <5000000>;
133                 regulator-max-microvolt = <5000000>;
134                 regulator-always-on;
135                 regulator-boot-on;
136         };
137
138         /* "Battery" voltage for the SoM, stepped down from the barrel jack input */
139         vdc_vbat_som: regulator-vdc-vbat {
140                 compatible = "regulator-fixed";
141                 regulator-name = "VBAT_SOM";
142                 regulator-min-microvolt = <4200000>;
143                 regulator-max-microvolt = <4200000>;
144                 regulator-always-on;
145                 regulator-boot-on;
146         };
147
148         /* PM2250 charger out, supplied by VBAT */
149         vph_pwr: regulator-vph-pwr {
150                 compatible = "regulator-fixed";
151                 regulator-name = "vph_pwr";
152                 regulator-min-microvolt = <3700000>;
153                 regulator-max-microvolt = <3700000>;
154                 vin-supply = <&vdc_vbat_som>;
155
156                 regulator-always-on;
157                 regulator-boot-on;
158         };
159 };
160
161 &pm2250_resin {
162         linux,code = <KEY_VOLUMEDOWN>;
163         status = "okay";
164 };
165
166 &qupv3_id_0 {
167         status = "okay";
168 };
169
170 &remoteproc_adsp {
171         firmware-name = "/*(DEBLOBBED)*/";
172         status = "okay";
173 };
174
175 &remoteproc_mpss {
176         firmware-name = "/*(DEBLOBBED)*/";
177         status = "okay";
178 };
179
180 &rpm_requests {
181         regulators {
182                 compatible = "qcom,rpm-pm2250-regulators";
183                 vdd_s3-supply = <&vph_pwr>;
184                 vdd_s4-supply = <&vph_pwr>;
185                 vdd_l1_l2_l3_l5_l6_l7_l8_l9_l10_l11_l12-supply = <&pm2250_s3>;
186                 vdd_l4_l17_l18_l19_l20_l21_l22-supply = <&vph_pwr>;
187                 vdd_l13_l14_l15_l16-supply = <&pm2250_s4>;
188
189                 /*
190                  * S1 - VDD_APC
191                  * S2 - VDD_CX
192                  */
193
194                 pm2250_s3: s3 {
195                         /* 0.4V-1.6625V -> 1.3V (Power tree requirements) */
196                         regulator-min-microvolt = <1352000>;
197                         regulator-max-microvolt = <1352000>;
198                         regulator-boot-on;
199                 };
200
201                 pm2250_s4: s4 {
202                         /* 1.2V-2.35V -> 2.05V (Power tree requirements) */
203                         regulator-min-microvolt = <2072000>;
204                         regulator-max-microvolt = <2072000>;
205                         regulator-boot-on;
206                 };
207
208                 /* L1 - VDD_MX */
209
210                 pm2250_l2: l2 {
211                         /* LPDDR4X VDD2 */
212                         regulator-min-microvolt = <1136000>;
213                         regulator-max-microvolt = <1136000>;
214                         regulator-always-on;
215                         regulator-boot-on;
216                 };
217
218                 pm2250_l3: l3 {
219                         /* LPDDR4X VDDQ */
220                         regulator-min-microvolt = <616000>;
221                         regulator-max-microvolt = <616000>;
222                         regulator-always-on;
223                         regulator-boot-on;
224                 };
225
226                 pm2250_l4: l4 {
227                         /* max = 3.05V -> max = 2.7 to disable 3V signaling (SDHCI2) */
228                         regulator-min-microvolt = <1800000>;
229                         regulator-max-microvolt = <2700000>;
230                         regulator-allow-set-load;
231                 };
232
233                 pm2250_l5: l5 {
234                         /* CSI/DSI */
235                         regulator-min-microvolt = <1232000>;
236                         regulator-max-microvolt = <1232000>;
237                         regulator-allow-set-load;
238                         regulator-boot-on;
239                 };
240
241                 pm2250_l6: l6 {
242                         /* DRAM PLL */
243                         regulator-min-microvolt = <928000>;
244                         regulator-max-microvolt = <928000>;
245                         regulator-always-on;
246                         regulator-boot-on;
247                 };
248
249                 pm2250_l7: l7 {
250                         /* Wi-Fi CX/MX */
251                         regulator-min-microvolt = <664000>;
252                         regulator-max-microvolt = <664000>;
253                 };
254
255                 /*
256                  * L8 - VDD_LPI_CX
257                  * L9 - VDD_LPI_MX
258                  */
259
260                 pm2250_l10: l10 {
261                         /* Wi-Fi RFA */
262                         regulator-min-microvolt = <1304000>;
263                         regulator-max-microvolt = <1304000>;
264                 };
265
266                 pm2250_l11: l11 {
267                         /* GPS RF1 */
268                         regulator-min-microvolt = <1000000>;
269                         regulator-max-microvolt = <1000000>;
270                         regulator-boot-on;
271                 };
272
273                 pm2250_l12: l12 {
274                         /* USB PHYs */
275                         regulator-min-microvolt = <928000>;
276                         regulator-max-microvolt = <928000>;
277                         regulator-allow-set-load;
278                         regulator-boot-on;
279                 };
280
281                 pm2250_l13: l13 {
282                         /* USB/QFPROM/PLLs */
283                         regulator-min-microvolt = <1800000>;
284                         regulator-max-microvolt = <1800000>;
285                         regulator-allow-set-load;
286                         regulator-boot-on;
287                 };
288
289                 pm2250_l14: l14 {
290                         /* SDHCI1 VQMMC */
291                         regulator-min-microvolt = <1800000>;
292                         regulator-max-microvolt = <1800000>;
293                         regulator-allow-set-load;
294                         /* Broken hardware, never turn it off! */
295                         regulator-always-on;
296                 };
297
298                 pm2250_l15: l15 {
299                         /* WCD/DSI/BT VDDIO */
300                         regulator-min-microvolt = <1800000>;
301                         regulator-max-microvolt = <1800000>;
302                         regulator-allow-set-load;
303                         regulator-always-on;
304                         regulator-boot-on;
305                 };
306
307                 pm2250_l16: l16 {
308                         /* GPS RF2 */
309                         regulator-min-microvolt = <1800000>;
310                         regulator-max-microvolt = <1800000>;
311                         regulator-boot-on;
312                 };
313
314                 pm2250_l17: l17 {
315                         regulator-min-microvolt = <3000000>;
316                         regulator-max-microvolt = <3000000>;
317                 };
318
319                 pm2250_l18: l18 {
320                         /* VDD_PXn */
321                         regulator-min-microvolt = <1800000>;
322                         regulator-max-microvolt = <1800000>;
323                 };
324
325                 pm2250_l19: l19 {
326                         /* VDD_PXn */
327                         regulator-min-microvolt = <1800000>;
328                         regulator-max-microvolt = <1800000>;
329                 };
330
331                 pm2250_l20: l20 {
332                         /* SDHCI1 VMMC */
333                         regulator-min-microvolt = <2400000>;
334                         regulator-max-microvolt = <3600000>;
335                         regulator-allow-set-load;
336                 };
337
338                 pm2250_l21: l21 {
339                         /* SDHCI2 VMMC */
340                         regulator-min-microvolt = <2960000>;
341                         regulator-max-microvolt = <3300000>;
342                         regulator-allow-set-load;
343                         regulator-boot-on;
344                 };
345
346                 pm2250_l22: l22 {
347                         /* Wi-Fi */
348                         regulator-min-microvolt = <3312000>;
349                         regulator-max-microvolt = <3312000>;
350                 };
351         };
352 };
353
354 &sdhc_1 {
355         vmmc-supply = <&pm2250_l20>;
356         vqmmc-supply = <&pm2250_l14>;
357         pinctrl-0 = <&sdc1_state_on>;
358         pinctrl-1 = <&sdc1_state_off>;
359         pinctrl-names = "default", "sleep";
360         non-removable;
361         supports-cqe;
362         no-sdio;
363         no-sd;
364         status = "okay";
365 };
366
367 &sdhc_2 {
368         vmmc-supply = <&pm2250_l21>;
369         vqmmc-supply = <&pm2250_l4>;
370         cd-gpios = <&tlmm 88 GPIO_ACTIVE_LOW>;
371         pinctrl-0 = <&sdc2_state_on &sd_det_in_on>;
372         pinctrl-1 = <&sdc2_state_off &sd_det_in_off>;
373         pinctrl-names = "default", "sleep";
374         no-sdio;
375         no-mmc;
376         status = "okay";
377 };
378
379 &tlmm {
380         sd_det_in_on: sd-det-in-on-state {
381                 pins = "gpio88";
382                 function = "gpio";
383                 drive-strength = <2>;
384                 bias-pull-up;
385         };
386
387         sd_det_in_off: sd-det-in-off-state {
388                 pins = "gpio88";
389                 function = "gpio";
390                 drive-strength = <2>;
391                 bias-disable;
392         };
393
394         key_volp_n: key-volp-n-state {
395                 pins = "gpio96";
396                 function = "gpio";
397                 bias-pull-up;
398                 output-disable;
399         };
400 };
401
402 /* UART connected to the Micro-USB port via a FTDI chip */
403 &uart4 {
404         compatible = "qcom,geni-debug-uart";
405         status = "okay";
406 };
407
408 &usb {
409         status = "okay";
410 };
411
412 &usb_qmpphy {
413         vdda-phy-supply = <&pm2250_l12>;
414         vdda-pll-supply = <&pm2250_l13>;
415         status = "okay";
416 };
417
418 &usb_hsphy {
419         vdd-supply = <&pm2250_l12>;
420         vdda-pll-supply = <&pm2250_l13>;
421         vdda-phy-dpdm-supply = <&pm2250_l21>;
422         status = "okay";
423 };
424
425 &wifi {
426         vdd-0.8-cx-mx-supply = <&pm2250_l7>;
427         vdd-1.8-xo-supply = <&pm2250_l13>;
428         vdd-1.3-rfa-supply = <&pm2250_l10>;
429         vdd-3.3-ch0-supply = <&pm2250_l22>;
430         status = "okay";
431 };
432
433 &xo_board {
434         clock-frequency = <38400000>;
435 };