mailbox: Improve the mbox core then introduce the goog-mba driver
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 2 repliesIn review
- v17 patches 32 repliesSuperseded
Changes in v2 from the cover letter
- Rename binding file to google,lga-mailbox-array.yaml.
- Drop generic "google,mailbox-array" fallback compatible.
- Add "google,tx-payload-words" property for queue-mode TX message size.
- Remove unused labels in DT example.
- Drop "dt-bindings: mailbox: Don't require #mbox-cells to be 1" (handled by deleting old mailbox.txt and updating dt-schema).
- Drop "mailbox: Simplify circular queue math with mod arithmetic" and "mailbox: Add support for mailbox controllers that can queue".
- Expose a mailbox channel per TX queue slot instead of adding has_queue to the mailbox core.
- For queue mode, read google,tx-payload-words from DT instead of detecting TX payload size on the first transfer.
- Match "google,lga-mailbox-array" instead of "google,mailbox-array".
- Move MAINTAINERS entries under GOOGLE TENSOR SoC SUPPORT.
- Use guard(spinlock_irqsave) and scoped_guard(spinlock).
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mailbox: Allow #mbox-cells = <0> without specifying a custom xlatedrivers/ | +7 | 0 replies | |
| 2/4 | mailbox: Find a matching mailbox by fwnode rather than devicedrivers/ include/ | +11 | 0 replies | |
| 3/4 | dt-bindings: mailbox: goog-mba: Add goog-mba mailbox bindingsDocumentation/ | +226 | 2 replies | |
| 4/4 | mailbox: goog-mba: Introduce the goog-mba mailbox driverMAINTAINERS drivers/ drivers/ +4 more | +985 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/4] mailbox: Improve the mbox core then introduce the goog-mba driver
The goal of this series is to land support for the goog-mba (MailBox Array) IP block that's present in Pixel 10 phones.
As can be seen in the device-tree bindings for the goog-mba IP block, the mailbox IP block in Pixel 10 phones is fairly sophisticated. Notably:
* It has hardware features that support queuing, meaning that more than one mailbox message can be pending at a time.
* The "channels" in a given mailbox array aren't homogeneous. Each "channel" in the mailbox array can have a different amount of memory for messages. Really, the "channels" in a mailbox are considered to be full single-channel mailboxes and a grouping of mailboxes is considered a "mailbox array" (hence the IP block being named "mba")
In order to cleanly support goog-mba, improvements are made to the mailbox core to allow #mbox-cells = <0> without a custom xlate and to allow mailbox drivers that have more than one sub-node (fwnode). For TX queue mode, as suggested in v1 review, goog-mba exposes each hardware queue slot as a virtual mailbox channel rather than adding queueing support to the mailbox core.
This is a fairly big rewrite from the downstream MBA driver shipping on Pixel 10 phones, which jumped through some awkward hoops because of the way it got queuing to work. It has been tested on a Pixel 10 Pro XL (Mustang) together with work-in-progress Laguna CPM, pinctrl, PCIe, and RTC drivers.
Link to previous versions:
v1: https://lore.kernel.org/r/[email protected]/
Changes in v2:
- Rename binding file to google,lga-mailbox-array.yaml.
- Drop generic "google,mailbox-array" fallback compatible.
- Add "google,tx-payload-words" property for queue-mode TX message size.
- Remove unused labels in DT example.
- Drop "dt-bindings: mailbox: Don't require #mbox-cells to be 1" (handled by deleting old mailbox.txt and updating dt-schema).
- Drop "mailbox: Simplify circular queue math with mod arithmetic" and "mailbox: Add support for mailbox controllers that can queue".
- Expose a mailbox channel per TX queue slot instead of adding has_queue to the mailbox core.
- For queue mode, read google,tx-payload-words from DT instead of detecting TX payload size on the first transfer.
- Match "google,lga-mailbox-array" instead of "google,mailbox-array".
- Move MAINTAINERS entries under GOOGLE TENSOR SoC SUPPORT.
- Use guard(spinlock_irqsave) and scoped_guard(spinlock).
Douglas Anderson (4):
mailbox: Allow #mbox-cells = <0> without specifying a custom xlate
mailbox: Find a matching mailbox by fwnode rather than device
dt-bindings: mailbox: goog-mba: Add goog-mba mailbox bindings
mailbox: goog-mba: Introduce the goog-mba mailbox driver
.../mailbox/google,lga-mailbox-array.yaml | 226 +++++++ MAINTAINERS | 3 + drivers/mailbox/Kconfig | 8 + drivers/mailbox/Makefile | 2 + drivers/mailbox/goog-mba-priv.h | 130 ++++ drivers/mailbox/goog-mba-trace.h | 183 ++++++ drivers/mailbox/goog-mba.c | 621 ++++++++++++++++++ drivers/mailbox/mailbox.c | 16 +- include/linux/mailbox/goog-mba-message.h | 38 ++ include/linux/mailbox_controller.h | 4 + 10 files changed, 1229 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mailbox/google,lga-mailbox-array.yaml create mode 100644 drivers/mailbox/goog-mba-priv.h create mode 100644 drivers/mailbox/goog-mba-trace.h create mode 100644 drivers/mailbox/goog-mba.c create mode 100644 include/linux/mailbox/goog-mba-message.h
Signature · 1 line
2.56.0.257.gf7497c7d27-goog