Skip to content

Commit a27985f

Browse files
committed
dts: arm: rpi_pico: add SIO block and mailbox device
Add a mailbox (Interprocessor FIFO) node to the RP2040 and RP2350 device trees and a SIO block to hold this and any other future SIO peripherals. This also includes an additional `zephyr,mbox-ipm` node that handles the mailbox for core to core messaging. The device is enabled for the Raspberry Pico Pi 2. Signed-off-by: Ricardo Cañuelo Navarro <[email protected]>
1 parent f3e20c7 commit a27985f

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

boards/raspberrypi/rpi_pico2/rpi_pico2.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
zephyr,flash-controller = &qmi;
2020
zephyr,console = &uart0;
2121
zephyr,shell-uart = &uart0;
22+
zephyr,ipc = &ipc;
2223
};
2324

2425
aliases {

boards/raspberrypi/rpi_pico2/rpi_pico2_rp2350a_m33_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ CONFIG_SERIAL=y
1111
CONFIG_UART_CONSOLE=y
1212
CONFIG_UART_INTERRUPT_DRIVEN=y
1313
CONFIG_USE_DT_CODE_PARTITION=y
14+
CONFIG_MBOX=y

dts/arm/raspberrypi/rpi_pico/rp2040.dtsi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,34 @@
435435
alarms-count = <1>;
436436
status = "disabled";
437437
};
438+
439+
sio: sio@d0000000 {
440+
compatible = "raspberrypi,pico-sio";
441+
reg = <0xd0000000 0x180>;
442+
443+
mbox: mbox {
444+
compatible = "raspberrypi,pico-mbox";
445+
interrupts = <15 RPI_PICO_DEFAULT_IRQ_PRIORITY>,
446+
<16 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
447+
interrupt-names = "mbox0", "mbox1";
448+
fifo-depth = <8>;
449+
#mbox-cells = <0>;
450+
status = "okay";
451+
};
452+
};
453+
454+
ipc: ipc {
455+
/*
456+
* The zephyr,mbox-ipm driver expects two mailbox
457+
* channels, but the mailbox block in the RP2040
458+
* implements a single instance per core. Point the
459+
* two driver channels to the same single mbox.
460+
*/
461+
compatible = "zephyr,mbox-ipm";
462+
mboxes = <&mbox>, <&mbox>;
463+
mbox-names = "tx", "rx";
464+
status = "okay";
465+
};
438466
};
439467

440468
pinctrl: pin-controller {

dts/arm/raspberrypi/rpi_pico/rp2350.dtsi

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,33 @@
453453
interrupt-names = "irq0", "irq1";
454454
status = "disabled";
455455
};
456+
457+
sio: sio@d0000000 {
458+
compatible = "raspberrypi,pico-sio";
459+
reg = <0xd0000000 DT_SIZE_K(80)>;
460+
461+
mbox: mbox {
462+
compatible = "raspberrypi,pico-mbox";
463+
interrupts = <25 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
464+
interrupt-names = "mbox0";
465+
fifo-depth = <4>;
466+
#mbox-cells = <0>;
467+
status = "okay";
468+
};
469+
};
470+
471+
ipc: ipc {
472+
/*
473+
* The zephyr,mbox-ipm driver expects two mailbox
474+
* channels, but the mailbox block in the RP2350
475+
* implements a single instance per core. Point the
476+
* two driver channels to the same single mbox.
477+
*/
478+
compatible = "zephyr,mbox-ipm";
479+
mboxes = <&mbox>, <&mbox>;
480+
mbox-names = "tx", "rx";
481+
status = "okay";
482+
};
456483
};
457484

458485
pinctrl: pin-controller {

0 commit comments

Comments
 (0)