From: Ben Levinsky <ben.levinsky@amd.com>
To: <jassisinghbrar@gmail.com>, <andersson@kernel.org>,
<mathieu.poirier@linaro.org>, <robh@kernel.org>,
<krzk+dt@kernel.org>, <conor+dt@kernel.org>
Cc: <michal.simek@amd.com>, <tanmay.shah@amd.com>,
<ben.levinsky@amd.com>, <linux-remoteproc@vger.kernel.org>,
<devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v2 0/6] Add AMD PL Mailbox and RPMsg support for the AMD BRAM remoteproc
Date: Wed, 4 Nov 2026 21:18:56 -0800 [thread overview]
Message-ID: <20261105051902.1646651-1-ben.levinsky@amd.com> (raw)
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 a
threaded receive-threshold interrupt that drains the FIFO, with the FIFO
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 at probe time, 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 is based on mainline during the v7.4 merge window and uses the
remoteproc wc-ioremap and optional resource-table helpers merged for
v7.3-rc1.
Changes in v2:
- dt-bindings: mailbox:
- Use the single compatible "amd,pl-mailbox-2.1". The Mailbox is a soft
IP core in programmable logic, not a SoC block, so like other PL soft
IP bindings the compatible names the IP core and its version instead
of a SoC. "pl" distinguishes it from the IPI mailbox hardware.
- Rename amd,mbox-pl-fifo-len to amd,pl-mailbox-depth, and explain that
the depth is chosen per IP instance at synthesis time and cannot be
read from the registers.
- Add the MAINTAINERS entry together with the binding.
- mailbox:
- Match only amd,pl-mailbox-2.1.
- Depend on ARCH_ZYNQMP || COMPILE_TEST.
- Do not access the FIFO when the mailbox core submits a queued message
after the transmit channel has started to shut down.
- Handle the receive interrupt in a threaded handler that acknowledges
the event first and then drains the FIFO until it is empty, so a full
FIFO can no longer stall reception.
- Add a file header with the driver description and copyright.
- dt-bindings: remoteproc: drop the redundant dependentRequired block.
- remoteproc:
- Keep the existing dependencies and add "depends on MAILBOX" instead
of selecting user-visible symbols. Name the PL Mailbox controller and
the virtio RPMsg bus in the help text.
- Request the mailbox channels at probe time, so a missing controller
defers the probe, and release them on unbind.
- Free the mailbox channels before cancelling the receive work, so a
late notification cannot queue it again.
v1: https://lore.kernel.org/r/20261014213426.2957480-1-ben.levinsky@amd.com
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
.../bindings/mailbox/amd,pl-mailbox-2.1.yaml | 73 ++++
.../bindings/remoteproc/amd,bram-rproc.yaml | 21 +
MAINTAINERS | 7 +
drivers/mailbox/Kconfig | 11 +
drivers/mailbox/Makefile | 1 +
drivers/mailbox/amd-pl-mailbox.c | 378 ++++++++++++++++++
drivers/remoteproc/Kconfig | 5 +
drivers/remoteproc/amd_mbv_bram_rproc.c | 270 ++++++++++++-
8 files changed, 761 insertions(+), 5 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mailbox/amd,pl-mailbox-2.1.yaml
create mode 100644 drivers/mailbox/amd-pl-mailbox.c
base-commit: 6b4b543fa18757297ac756a6fe6e64f506b7844a
--
2.34.1
next reply other threads:[~2026-11-05 5:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 5:18 Ben Levinsky [this message]
2026-11-05 5:18 ` [PATCH v2 1/6] remoteproc: amd_mbv_bram: Bound device name formatting Ben Levinsky
2026-11-05 5:18 ` [PATCH v2 2/6] remoteproc: amd_mbv_bram: Restore reset GPIO direction after PL reconfig Ben Levinsky
2026-11-05 5:18 ` [PATCH v2 3/6] dt-bindings: mailbox: Add AMD PL Mailbox IP Ben Levinsky
2026-11-05 5:19 ` [PATCH v2 4/6] mailbox: Add AMD PL Mailbox soft IP controller Ben Levinsky
2026-11-05 5:19 ` [PATCH v2 5/6] dt-bindings: remoteproc: Add RPMsg resources to AMD BRAM rproc Ben Levinsky
2026-11-05 5:19 ` [PATCH v2 6/6] remoteproc: amd_mbv_bram: Add RPMsg support Ben Levinsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261105051902.1646651-1-ben.levinsky@amd.com \
--to=ben.levinsky@amd.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jassisinghbrar@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=michal.simek@amd.com \
--cc=robh@kernel.org \
--cc=tanmay.shah@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®