mailbox: Add support for bcm74110
Subsystems (2)
v5 cover mailbox: Add support for bcm74110
The bcm74110 mailbox driver is used to communicate with a co-processor for various power management and firmware related tasks.
Justin Chen (2):
dt-bindings: mailbox: Add support for bcm74110
mailbox: Add support for bcm74110
.../bindings/mailbox/brcm,bcm74110-mbox.yaml | 64 ++ drivers/mailbox/Kconfig | 10 + drivers/mailbox/Makefile | 2 + drivers/mailbox/bcm74110-mailbox.c | 656 ++++++++++++++++++ 4 files changed, 732 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml create mode 100644 drivers/mailbox/bcm74110-mailbox.c
Signature · 1 line
2.34.1
PATCH v5 1/2 dt-bindings: mailbox: Add support for bcm74110
Add devicetree YAML binding for brcmstb bcm74110 mailbox used for communicating with a co-processor.
---
v5
No changes
v4
Dropped minItems from interrupts
v3
Added list for interrupts.
Corrected dts example. Fixed ordering and naming.
v2
Renamed brcm,brcm_{tx|rx} to brcm,{tx|rx}. Removed brcm,shmem node. Not necessary to keep in dt. Fixed example and added scmi node.
.../bindings/mailbox/brcm,bcm74110-mbox.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml
Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml new file +64 -0
@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/brcm,bcm74110-mbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM74110 Mailbox + +maintainers: + - Justin Chen <[email protected]> + - Florian Fainelli <[email protected]> + +description: Broadcom mailbox hardware first introduced with 74110 + +properties: + compatible: + enum: + - brcm,bcm74110-mbox + + reg: + maxItems: 1 + + interrupts: + items: + - description: RX doorbell and watermark interrupts + - description: TX doorbell and watermark interrupts + + "#mbox-cells": + const: 2 + description: + The first cell is channel type and second cell is shared memory slot + + brcm,rx: + $ref: /schemas/types.yaml#/definitions/uint32 + description: RX Mailbox number + + brcm,tx: + $ref: /schemas/types.yaml#/definitions/uint32 + description: TX Mailbox number + +required: + - compatible + - reg + - interrupts + - "#mbox-cells" + - brcm,rx + - brcm,tx + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + mailbox@a552000 { + compatible = "brcm,bcm74110-mbox"; + reg = <0xa552000 0x1104>; + interrupts = <GIC_SPI 0x67 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 0x66 IRQ_TYPE_LEVEL_HIGH>; + #mbox-cells = <0x2>; + brcm,rx = <0x7>; + brcm,tx = <0x6>; + };
Signature · 1 line
2.34.1
Re: [PATCH v5 1/2] dt-bindings: mailbox: Add support for bcm74110
Quoted 5 lines · Justin Chen
Add devicetree YAML binding for brcmstb bcm74110 mailbox used for communicating with a co-processor.
Reviewed-by Krzysztof Kozlowski <[email protected]>Signed-off-by Justin Chen <[email protected]>
Signature · 1 line
Florian
PATCH v5 2/2 mailbox: Add support for bcm74110
In reply to Justin ChenThe bcm74110 mailbox driver is used to communicate with a co-processor for various power management and firmware related tasks.
---
v5
Add <linux/slab.h> header to fix compile error
v3/v4
No changes
v2
Fixed minor formatting issues
Fixed error check of platform_get_irq()
Removed offsetted base iomem vars. Instead we just offset directly from base.
Removed shmem variable. Hardcode it instead.
drivers/mailbox/Kconfig | 10 + drivers/mailbox/Makefile | 2 + drivers/mailbox/bcm74110-mailbox.c | 656 +++++++++++++++++++++++++++++ 3 files changed, 668 insertions(+) create mode 100644 drivers/mailbox/bcm74110-mailbox.c
drivers/mailbox/Kconfig +10 -0
@@ -340,4 +340,14 @@ config THEAD_TH1520_MBOX kernel is running, and E902 core used for power management among other things. +config BCM74110_MAILBOX + tristate "Brcmstb BCM74110 Mailbox" + depends on ARCH_BRCMSTB || COMPILE_TEST + default ARCH_BRCMSTB + help + Broadcom STB mailbox driver present starting with brcmstb bcm74110 + SoCs. The mailbox is a communication channel between the host + processor and coprocessor that handles various power management task + and more. + endif
drivers/mailbox/Makefile +2 -0
@@ -72,3 +72,5 @@ obj-$(CONFIG_QCOM_CPUCP_MBOX) += qcom-cpucp-mbox.o obj-$(CONFIG_QCOM_IPCC) += qcom-ipcc.o obj-$(CONFIG_THEAD_TH1520_MBOX) += mailbox-th1520.o + +obj-$(CONFIG_BCM74110_MAILBOX) += bcm74110-mailbox.o
drivers/mailbox/bcm74110-mailbox.c new file +656 -0
656 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 5 lines · Justin Chen
The bcm74110 mailbox driver is used to communicate with a co-processor for various power management and firmware related tasks.
Signed-off-by Justin Chen <[email protected]>
Signature · 1 line
Florian