Debian Codegraph @

scripts/dtc/include-prefixes/arm64/ti/k3-am62-pocketbeagle2.dts

raw
1 // SPDX-License-Identifier: GPL-2.0-only OR MIT
2 /*
3 * https://www.beagleboard.org/boards/pocketbeagle-2
4 *
5 * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
6 * Copyright (C) 2025 Robert Nelson, BeagleBoard.org Foundation
7 */
8
9 /dts-v1/;
10
11 #include <dt-bindings/leds/common.h>
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/input/input.h>
14 #include "k3-am625.dtsi"
15
16 / {
17 compatible = "beagle,am62-pocketbeagle2", "ti,am625";
18 model = "BeagleBoard.org PocketBeagle2";
19
20 aliases {
21 serial0 = &wkup_uart0;
22 serial1 = &main_uart1;
23 serial2 = &main_uart6;
24 serial3 = &main_uart0;
25 mmc1 = &sdhci1;
26 usb0 = &usb0;
27 usb1 = &usb1;
28 i2c0 = &main_i2c0;
29 i2c2 = &main_i2c2;
30 i2c3 = &wkup_i2c0;
31 };
32
33 chosen {
34 stdout-path = &main_uart6;
35 };
36
37 memory@80000000 {
38 /* 512MB RAM */
39 reg = <0x00000000 0x80000000 0x00000000 0x20000000>;
40 device_type = "memory";
41 bootph-pre-ram;
42 };
43
44 reserved_memory: reserved-memory {
45 #address-cells = <2>;
46 #size-cells = <2>;
47 ranges;
48
49 /* global cma region */
50 linux,cma {
51 compatible = "shared-dma-pool";
52 reusable;
53 size = <0x00 0x8000000>;
54 linux,cma-default;
55 };
56
57 secure_tfa_ddr: tfa@9e780000 {
58 reg = <0x00 0x9e780000 0x00 0x80000>;
59 alignment = <0x1000>;
60 no-map;
61 };
62
63 secure_ddr: optee@9e800000 {
64 reg = <0x00 0x9e800000 0x00 0x01800000>;
65 alignment = <0x1000>;
66 no-map;
67 };
68
69 wkup_r5fss0_core0_dma_memory_region: memory@9da00000 {
70 compatible = "shared-dma-pool";
71 reg = <0x00 0x9da00000 0x00 0x100000>;
72 no-map;
73 };
74
75 wkup_r5fss0_core0_memory_region: memory@9db00000 {
76 compatible = "shared-dma-pool";
77 reg = <0x00 0x9db00000 0x00 0xc00000>;
78 no-map;
79 };
80 };
81
82 vsys_5v0: regulator-1 {
83 compatible = "regulator-fixed";
84 regulator-name = "vsys_5v0";
85 regulator-min-microvolt = <5000000>;
86 regulator-max-microvolt = <5000000>;
87 regulator-always-on;
88 regulator-boot-on;
89 bootph-all;
90 };
91
92 vdd_3v3: regulator-2 {
93 compatible = "regulator-fixed";
94 regulator-name = "vdd_3v3";
95 regulator-min-microvolt = <3300000>;
96 regulator-max-microvolt = <3300000>;
97 vin-supply = <&vsys_5v0>;
98 regulator-always-on;
99 regulator-boot-on;
100 bootph-all;
101 };
102
103 vdd_mmc1: regulator-3 {
104 compatible = "regulator-fixed";
105 regulator-name = "vdd_mmc1";
106 pinctrl-names = "default";
107 pinctrl-0 = <&vdd_3v3_sd_pins_default>;
108 regulator-min-microvolt = <3300000>;
109 regulator-max-microvolt = <3300000>;
110 regulator-boot-on;
111 enable-active-high;
112 regulator-always-on;
113 vin-supply = <&vdd_3v3>;
114 gpio = <&main_gpio0 0 GPIO_ACTIVE_HIGH>;
115 bootph-all;
116 };
117
118 vdd_sd_dv: regulator-4 {
119 compatible = "regulator-gpio";
120 regulator-name = "sd_hs200_switch";
121 pinctrl-names = "default";
122 pinctrl-0 = <&vdd_sd_dv_pins_default>;
123 regulator-min-microvolt = <1800000>;
124 regulator-max-microvolt = <3300000>;
125 regulator-boot-on;
126 vin-supply = <&vdd_3v3>;
127 gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>;
128 states = <1800000 0x0>,
129 <3300000 0x1>;
130 bootph-all;
131 };
132
133 adc_vref: regulator-5 {
134 compatible = "regulator-fixed";
135 regulator-name = "default";
136 regulator-min-microvolt = <3300000>;
137 regulator-max-microvolt = <3300000>;
138 regulator-boot-on;
139 };
140
141 leds {
142 compatible = "gpio-leds";
143 pinctrl-names = "default";
144 pinctrl-0 = <&led_pins_default>;
145 bootph-all;
146
147 led-1 {
148 function = LED_FUNCTION_HEARTBEAT;
149 color = <LED_COLOR_ID_GREEN>;
150 linux,default-trigger = "heartbeat";
151 gpios = <&main_gpio0 6 GPIO_ACTIVE_HIGH>;
152 default-state = "on";
153 bootph-all;
154 };
155
156 led-2 {
157 function = LED_FUNCTION_DISK_ACTIVITY;
158 color = <LED_COLOR_ID_GREEN>;
159 linux,default-trigger = "mmc1";
160 gpios = <&main_gpio0 5 GPIO_ACTIVE_HIGH>;
161 default-state = "on";
162 bootph-all;
163 };
164
165 led-3 {
166 function = LED_FUNCTION_INDICATOR;
167 color = <LED_COLOR_ID_GREEN>;
168 gpios = <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
169 default-state = "off";
170 bootph-all;
171 };
172
173 led-4 {
174 function = LED_FUNCTION_INDICATOR;
175 color = <LED_COLOR_ID_GREEN>;
176 gpios = <&main_gpio0 3 GPIO_ACTIVE_HIGH>;
177 default-state = "off";
178 bootph-all;
179 };
180 };
181 };
182
183 &main_pmx0 {
184 led_pins_default: led-default-pins {
185 pinctrl-single,pins = <
186 AM62X_IOPAD(0x000c, PIN_OUTPUT, 7) /* (E25) OSPI0_D0.GPIO0_3 */
187 AM62X_IOPAD(0x0010, PIN_OUTPUT, 7) /* (G24) OSPI0_D1.GPIO0_4 */
188 AM62X_IOPAD(0x0014, PIN_OUTPUT, 7) /* (F25) OSPI0_D2.GPIO0_5 */
189 AM62X_IOPAD(0x0018, PIN_OUTPUT, 7) /* (F24) OSPI0_D3.GPIO0_6 */
190 >;
191 bootph-all;
192 };
193
194 main_i2c0_pins_default: main-i2c0-default-pins {
195 pinctrl-single,pins = <
196 AM62X_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */
197 AM62X_IOPAD(0x01e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */
198 >;
199 bootph-all;
200 };
201
202 main_i2c2_pins_default: main-i2c2-default-pins {
203 pinctrl-single,pins = <
204 AM62X_IOPAD(0x00b0, PIN_INPUT_PULLUP, 1) /* (K22) GPMC0_CSn2.I2C2_SCL */
205 AM62X_IOPAD(0x00b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */
206 >;
207 bootph-all;
208 };
209
210 main_uart0_pins_default: main-uart0-default-pins {
211 pinctrl-single,pins = <
212 AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14/A13) UART0_RXD */
213 AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14/E11) UART0_TXD */
214 >;
215 bootph-all;
216 };
217
218 main_uart1_pins_default: main-uart1-default-pins {
219 pinctrl-single,pins = <
220 AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19/B18) MCASP0_AXR3.UART1_CTSn */
221 AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19/B17) MCASP0_AXR2.UART1_RTSn */
222 AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19/D15) MCASP0_AFSR.UART1_RXD */
223 AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20/D16) MCASP0_ACLKR.UART1_TXD */
224 >;
225 bootph-all;
226 };
227
228 main_uart6_pins_default: main-uart6-default-pins {
229 pinctrl-single,pins = <
230 AM62X_IOPAD(0x001c, PIN_INPUT, 3) /* (J23) OSPI0_D4.UART6_RXD */
231 AM62X_IOPAD(0x0020, PIN_OUTPUT, 3) /* (J25) OSPI0_D5.UART6_TXD */
232 >;
233 };
234
235 main_mmc1_pins_default: main-mmc1-default-pins {
236 pinctrl-single,pins = <
237 AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
238 AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */
239 AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */
240 AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */
241 AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */
242 AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22/C19) MMC1_DAT3 */
243 AM62X_IOPAD(0x240, PIN_INPUT, 7) /* (D17/C15) MMC1_SDCD.GPIO1_48 */
244 >;
245 bootph-all;
246 };
247
248 vdd_sd_dv_pins_default: vdd-sd-dv-default-pins {
249 pinctrl-single,pins = <
250 AM62X_IOPAD(0x0244, PIN_OUTPUT, 7) /* (P25) GPMC0_CLK.GPIO1_49 */
251 >;
252 bootph-all;
253 };
254
255 pmic_irq_pins_default: pmic-irq-default-pins {
256 pinctrl-single,pins = <
257 AM62X_IOPAD(0x01f4, PIN_INPUT_PULLUP, 0) /* (D16) EXTINTn */
258 >;
259 bootph-all;
260 };
261
262 vdd_3v3_sd_pins_default: vdd-3v3-sd-default-pins {
263 pinctrl-single,pins = <
264 AM62X_IOPAD(0x0000, PIN_OUTPUT, 7) /* (H24) OSPI0_CLK.GPIO0_0 */
265 >;
266 bootph-all;
267 };
268
269 usb1_pins_default: usb1-default-pins {
270 pinctrl-single,pins = <
271 AM62X_IOPAD(0x0258, PIN_INPUT, 0) /* (F18) USB1_DRVVBUS */
272 >;
273 bootph-all;
274 };
275
276 epwm2_pins_default: epwm2-default-pins {
277 pinctrl-single,pins = <
278 AM62X_IOPAD(0x01e8, PIN_OUTPUT, 8) /* (B17) I2C1_SCL.EHRPWM2_A */
279 >;
280 };
281 };
282
283 &epwm2 {
284 status = "okay";
285 pinctrl-names = "default";
286 pinctrl-0 = <&epwm2_pins_default>;
287 };
288
289 &main_uart0 {
290 pinctrl-names = "default";
291 pinctrl-0 = <&main_uart0_pins_default>;
292 bootph-all;
293 status = "okay";
294 };
295
296 &main_uart1 {
297 pinctrl-names = "default";
298 pinctrl-0 = <&main_uart1_pins_default>;
299 bootph-pre-ram;
300 status = "reserved";
301 };
302
303 &main_uart6 {
304 pinctrl-names = "default";
305 pinctrl-0 = <&main_uart6_pins_default>;
306 bootph-all;
307 status = "okay";
308 };
309
310 &main_i2c0 {
311 pinctrl-names = "default";
312 pinctrl-0 = <&main_i2c0_pins_default>;
313 clock-frequency = <400000>;
314 bootph-all;
315 status = "okay";
316
317 ad7291: adc@20 {
318 /* Emulated with MSPM0L1105 */
319 compatible = "adi,ad7291";
320 reg = <0x20>;
321 vref-supply = <&adc_vref>;
322 };
323
324 eeprom: eeprom@50 {
325 /* Emulated with MSPM0L1105 */
326 compatible = "atmel,24c32";
327 reg = <0x50>;
328 };
329 };
330
331 &main_i2c2 {
332 pinctrl-names = "default";
333 pinctrl-0 = <&main_i2c2_pins_default>;
334 clock-frequency = <400000>;
335 bootph-all;
336 status = "okay";
337 };
338
339 &mcu_pmx0 {
340 wkup_uart0_pins_default: wkup-uart0-default-pins {
341 pinctrl-single,pins = <
342 AM62X_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C6/A7) WKUP_UART0_CTSn */
343 AM62X_MCU_IOPAD(0x030, PIN_OUTPUT, 0) /* (A4/B4) WKUP_UART0_RTSn */
344 AM62X_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (B4/B5) WKUP_UART0_RXD */
345 AM62X_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (C5/C6) WKUP_UART0_TXD */
346 >;
347 bootph-all;
348 };
349
350 wkup_i2c0_pins_default: wkup-i2c0-default-pins {
351 pinctrl-single,pins = <
352 AM62X_MCU_IOPAD(0x004c, PIN_INPUT_PULLUP, 0) /* (B9) WKUP_I2C0_SCL */
353 AM62X_MCU_IOPAD(0x0050, PIN_INPUT_PULLUP, 0) /* (A9) WKUP_I2C0_SDA */
354 >;
355 bootph-all;
356 };
357 };
358
359 &sdhci1 {
360 /* SD/MMC */
361 vmmc-supply = <&vdd_mmc1>;
362 vqmmc-supply = <&vdd_sd_dv>;
363 pinctrl-names = "default";
364 pinctrl-0 = <&main_mmc1_pins_default>;
365 disable-wp;
366 cd-gpios = <&main_gpio1 48 GPIO_ACTIVE_LOW>;
367 cd-debounce-delay-ms = <100>;
368 bootph-all;
369 ti,fails-without-test-cd;
370 status = "okay";
371 };
372
373 &usbss0 {
374 bootph-all;
375 ti,vbus-divider;
376 status = "okay";
377 };
378
379 &usb0 {
380 /* This is a Type-C socket, but wired as USB 2.0 */
381 dr_mode = "peripheral";
382 bootph-all;
383 };
384
385 &usbss1 {
386 ti,vbus-divider;
387 status = "okay";
388 };
389
390 &usb1 {
391 /*
392 * Default set here is compatible with original PocketBeagle,
393 * Expansion boards assumed this was pre-setup as host.
394 */
395 dr_mode = "host";
396 pinctrl-names = "default";
397 pinctrl-0 = <&usb1_pins_default>;
398 };
399
400 &wkup_uart0 {
401 /* WKUP UART0 is used by Device Manager firmware */
402 pinctrl-names = "default";
403 pinctrl-0 = <&wkup_uart0_pins_default>;
404 bootph-all;
405 status = "reserved";
406 };
407
408 &wkup_i2c0 {
409 pinctrl-names = "default";
410 pinctrl-0 = <&wkup_i2c0_pins_default>;
411 clock-frequency = <100000>;
412 bootph-all;
413 status = "okay";
414
415 tps65219: pmic@30 {
416 compatible = "ti,tps65219";
417 reg = <0x30>;
418 buck1-supply = <&vsys_5v0>;
419 buck2-supply = <&vsys_5v0>;
420 buck3-supply = <&vsys_5v0>;
421 ldo1-supply = <&vdd_3v3>;
422 ldo2-supply = <&buck2_reg>;
423 ldo3-supply = <&vdd_3v3>;
424 ldo4-supply = <&vdd_3v3>;
425
426 pinctrl-names = "default";
427 pinctrl-0 = <&pmic_irq_pins_default>;
428 interrupt-parent = <&gic500>;
429 interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
430 interrupt-controller;
431 #interrupt-cells = <1>;
432
433 bootph-all;
434 system-power-controller;
435 ti,power-button;
436
437 regulators {
438 buck1_reg: buck1 {
439 regulator-name = "VDD_CORE";
440 regulator-min-microvolt = <850000>;
441 regulator-max-microvolt = <850000>;
442 regulator-boot-on;
443 regulator-always-on;
444 };
445
446 buck2_reg: buck2 {
447 regulator-name = "VDD_1V8";
448 regulator-min-microvolt = <1800000>;
449 regulator-max-microvolt = <1800000>;
450 regulator-boot-on;
451 regulator-always-on;
452 };
453
454 buck3_reg: buck3 {
455 regulator-name = "VDD_1V2";
456 regulator-min-microvolt = <1200000>;
457 regulator-max-microvolt = <1200000>;
458 regulator-boot-on;
459 regulator-always-on;
460 };
461
462 ldo1_reg: ldo1 {
463 /*
464 * Regulator is left as is unused, vdd_sd
465 * is controlled via GPIO with bypass config
466 * as per the NVM configuration
467 */
468 regulator-name = "VDD_SD_3V3";
469 regulator-min-microvolt = <3300000>;
470 regulator-max-microvolt = <3300000>;
471 regulator-allow-bypass;
472 regulator-boot-on;
473 regulator-always-on;
474 };
475
476 ldo2_reg: ldo2 {
477 regulator-name = "VDDA_0V85";
478 regulator-min-microvolt = <850000>;
479 regulator-max-microvolt = <850000>;
480 regulator-boot-on;
481 regulator-always-on;
482 };
483
484 ldo3_reg: ldo3 {
485 regulator-name = "VDDA_1V8";
486 regulator-min-microvolt = <1800000>;
487 regulator-max-microvolt = <1800000>;
488 regulator-boot-on;
489 regulator-always-on;
490 };
491
492 ldo4_reg: ldo4 {
493 regulator-name = "VDD_2V5";
494 regulator-min-microvolt = <2500000>;
495 regulator-max-microvolt = <2500000>;
496 regulator-boot-on;
497 regulator-always-on;
498 };
499 };
500 };
501 };
502
503 #include "k3-am62-ti-ipc-firmware.dtsi"