This series adds a mailbox controller for the AMD programmable-logic (PL)
Mailbox soft IP and uses it to add RPMsg support to the AMD MicroBlaze/V
BRAM remoteproc driver, so that a soft processor in the PL can communicate
with Linux over virtio-rpmsg.
Patches 1-2 fix the existing BRAM remoteproc driver:
- Pass the device name to rproc_mem_entry_init() through a constant format
string instead of using it as the format.
- Drive the reset GPIO with gpiod_direction_output() so a start still
produces a reset pulse after the PL has been reconfigured, which restores
the AXI GPIO to its default direction.
Patches 3-4 add the binding and the mailbox-framework controller for the
PL Mailbox IP. The controller exposes independent TX and RX channels. Its
interface clock is enabled only while a channel is started. RX uses the
receive-threshold interrupt and delivers up to one FIFO depth of words per
message, with the depth taken from the device tree. TX completion is
reported by mailbox-core polling of the send-threshold status bit.
Patches 5-6 extend the BRAM remoteproc binding and driver with optional
mailbox channels and named reserved-memory regions for the vrings and the
shared RPMsg buffer pool. The driver registers the carveouts, exposes the
loaded resource table, requests the mailbox channels only while the remote
processor clock is enabled, sends virtqueue notification IDs through the
mailbox framework, and defers received notifications to process context.
Without mailboxes the driver keeps supporting load, start and stop only.
The series applies to v7.3-rc7 and uses the remoteproc wc-ioremap and
optional resource-table helpers merged for v7.3-rc1.
Ben Levinsky (6):
remoteproc: amd_mbv_bram: Bound device name formatting
remoteproc: amd_mbv_bram: Restore reset GPIO direction after PL
reconfig
dt-bindings: mailbox: Add AMD PL Mailbox IP
mailbox: Add AMD PL Mailbox soft IP controller
dt-bindings: remoteproc: Add RPMsg resources to AMD BRAM rproc
remoteproc: amd_mbv_bram: Add RPMsg support
.../mailbox/amd,zynqmp-pl-mbox-2.1.yaml | 74 ++++
.../bindings/remoteproc/amd,bram-rproc.yaml | 31 ++
MAINTAINERS | 7 +
drivers/mailbox/Kconfig | 10 +
drivers/mailbox/Makefile | 1 +
drivers/mailbox/amd-pl-mailbox.c | 369 ++++++++++++++++++
drivers/remoteproc/Kconfig | 6 +-
drivers/remoteproc/amd_mbv_bram_rproc.c | 256 +++++++++++-
8 files changed, 748 insertions(+), 6 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mailbox/amd,zynqmp-pl-mbox-2.1.yaml
create mode 100644 drivers/mailbox/amd-pl-mailbox.c
base-commit: 0fcb05b72344f40806cbe810de8872f1698bf053
--
2.34.1