mailbox: Add Broadcom STB mailbox driver
Subsystems (3)
v2 cover mailbox: Add Broadcom STB mailbox driver
Patchset Summary:
Adds a simple mailbox driver for the use of the ARM SCMI drivers.
v2:
Commit "mailbox: Add Broadcom STB mailbox driver" -- Remove the Kconfig dependency on SMP (Florian) Commit "mailbox: Add Broadcom STB mailbox driver" -- Drop label,unit address; changed title,description (RobH)
v1:
-- Original submission.
Jim Quinlan (2):
dt-bindings: Add bindings for BrcmSTB SCMI mailbox driver
mailbox: Add Broadcom STB mailbox driver
.../bindings/mailbox/brcm,brcmstb-mbox.yaml | 39 ++++ drivers/mailbox/Kconfig | 12 ++ drivers/mailbox/Makefile | 2 + drivers/mailbox/brcmstb-mailbox.c | 173 ++++++++++++++++++ 4 files changed, 226 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/brcm,brcmstb-mbox.yaml create mode 100644 drivers/mailbox/brcmstb-mailbox.c
Signature · 1 line
2.17.1
PATCH v2 1/2 dt-bindings: Add bindings for BrcmSTB SCMI mailbox driver
Bindings are added. Only one interrupt is needed because we do not yet employ the SCMI p2a channel.
--- .../bindings/mailbox/brcm,brcmstb-mbox.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/brcm,brcmstb-mbox.yaml
Documentation/devicetree/bindings/mailbox/brcm,brcmstb-mbox.yaml new file +39 -0
@@ -0,0 +1,39 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$schema: "http://devicetree.org/meta-schemas/core.yaml#" +$id: http://devicetree.org/schemas/mailbox/brcm,brcmstb-mbox.yaml# + +title: Broadcom STB mailbox driver bindings + +maintainers: + - Jim Quinlan <[email protected]> + +properties: + compatible: + enum: + - brcm,brcmstb-mbox + + interrupts: + items: + - description: a2p return interrupt, indicates SCMI msg completion. + + "#mbox-cells": + const: 1 + +required: + - compatible + - interrupts + - "#mbox-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + mailbox { + compatible = "brcm,brcmstb-mailbox"; + #mbox-cells = <1>; + interrupts = <GIC_SPI 0xc6 IRQ_TYPE_LEVEL_HIGH>; + }; +...
Signature · 1 line
2.17.1
PATCH v2 2/2 mailbox: Add Broadcom STB mailbox driver
In reply to Jim QuinlanThis is a simple mailbox driver to be used by the SCMI protocol stack. It only implements the agent-to-platform channel; we may implement the platform-to-agent channel in the future. An unusual aspect of this driver is how the completion of an SCMI message is indicated. An SCMI message is initiated with an ARM SMC call, but the return of this call does not indicate the execution or completion of the message. Rather, the message's completion is signaled by an interrupt.
--- drivers/mailbox/Kconfig | 12 +++ drivers/mailbox/Makefile | 2 + drivers/mailbox/brcmstb-mailbox.c | 173 ++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+) create mode 100644 drivers/mailbox/brcmstb-mailbox.c
drivers/mailbox/Kconfig +12 -0
@@ -254,4 +254,16 @@ config QCOM_IPCC acts as an interrupt controller for receiving interrupts from clients. Say Y here if you want to build this driver. +config BRCMSTB_MBOX + tristate "Broadcom STB Mailbox" + depends on ARM64 || ARM + depends on ARM_SCMI_PROTOCOL && ARCH_BRCMSTB + default ARM_SCMI_PROTOCOL && ARCH_BRCMSTB + help + Mailbox implementation of the Broadcom STB for the sole purposes + of SCMI communication. This is used by the SCMI drivers to + communicate with FW that runs in EL3. This mailbox only implements + the agent-to-platform channgel of SCMI but may be augmented in + the future to add the platform-to-agent channel. + endif
drivers/mailbox/Makefile +2 -0
@@ -54,3 +54,5 @@ obj-$(CONFIG_SUN6I_MSGBOX) += sun6i-msgbox.o obj-$(CONFIG_SPRD_MBOX) += sprd-mailbox.o obj-$(CONFIG_QCOM_IPCC) += qcom-ipcc.o + +obj-$(CONFIG_BRCMSTB_MBOX) += brcmstb-mailbox.o
drivers/mailbox/brcmstb-mailbox.c new file +173 -0
173 lines not on this page · raw message
Signature · 1 line
2.17.1
Hi,
drivers/mailbox/Kconfig config QCOM_IPCC · line 256
Quoted 8 lines · Jim Quinlan
drivers/mailbox/Kconfig +0
-0@@ -254,4 +254,16 @@ config QCOM_IPCC acts as an interrupt controller for receiving interrupts from clients. Say Y here if you want to build this driver.
coding-style.rst says:
Lines under a ``config`` definition
are indented with one tab, while help text is indented an additional two spaces.
so please fix up the "help" line and the next 2 lines under it.
drivers/mailbox/Kconfig config QCOM_IPCC · line 266
Quoted 10 lines
drivers/mailbox/Kconfig +10
-0+config BRCMSTB_MBOX + tristate "Broadcom STB Mailbox" + depends on ARM64 || ARM + depends on ARM_SCMI_PROTOCOL && ARCH_BRCMSTB + default ARM_SCMI_PROTOCOL && ARCH_BRCMSTB + help + Mailbox implementation of the Broadcom STB for the sole purposes + of SCMI communication. This is used by the SCMI drivers to + communicate with FW that runs in EL3. This mailbox only implements + the agent-to-platform channgel of SCMI but may be augmented in
channel
drivers/mailbox/Kconfig config QCOM_IPCC · line 269
Quoted 3 lines
drivers/mailbox/Kconfig +2
-0+ the future to add the platform-to-agent channel. + endif
thanks.
Signature · 1 line
~Randy