Add devicetree YAML binding for brcmstb bcm74110 mailbox used
for communicating with a co-processor.
Signed-off-by: Justin Chen <justin.chen@broadcom.com>
---
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 | 70 +++++++++++++++++++
1 file changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml
diff --git a/Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml b/Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml
new file mode 100644
index 000000000000..8c3dfffa515f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml
@@ -0,0 +1,70 @@
+# 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 <justin.chen@broadcom.com>
+ - Florian Fainelli <florian.fainelli@broadcom.com>
+
+description: Broadcom mailbox hardware first introduced with 74110
+
+properties:
+ compatible:
+ enum:
+ - brcm,bcm74110-mbox
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 2
+
+ "#mbox-cells":
+ const: 2
+ description:
+ The first cell is channel type and second cell is shared memory slot
+
+ brcm,tx:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Mailbox transmit doorbell
+
+ brcm,rx:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Mailbox receive doorbell
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - "#mbox-cells"
+ - brcm,tx
+ - brcm,rx
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ brcm_mailbox: brcm_mailbox@a552000 {
+ #mbox-cells = <0x2>;
+ brcm,rx = <0x7>;
+ brcm,tx = <0x6>;
+ compatible = "brcm,bcm74110-mbox";
+ reg = <0xa552000 0x1104>;
+ interrupts = <0x0 0x67 0x4>, /* DQM 7 */
+ <0x0 0x66 0x4>; /* DQM 6 */
+ };
+
+ scmi {
+ compatible = "arm,scmi";
+ mboxes = <&brcm_mailbox 0x2 0x0>;
+ mbox-names = "tx";
+ shmem = <&PMCMBOX>;
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+ };
--
2.34.1
On Wed, Apr 02, 2025 at 03:36:18PM -0700, Justin Chen wrote:
> diff --git a/Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml b/Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml
> new file mode 100644
> index 000000000000..8c3dfffa515f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mailbox/brcm,bcm74110-mbox.yaml
> @@ -0,0 +1,70 @@
> +# 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
> +
A nit, subject: drop second/last, redundant "devicetree binding for". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
> +maintainers:
> + - Justin Chen <justin.chen@broadcom.com>
> + - Florian Fainelli <florian.fainelli@broadcom.com>
> +
> +description: Broadcom mailbox hardware first introduced with 74110
> +
> +properties:
> + compatible:
> + enum:
> + - brcm,bcm74110-mbox
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 2
This changed... You need now list items instead.
> +
> + "#mbox-cells":
> + const: 2
> + description:
> + The first cell is channel type and second cell is shared memory slot
> +
> + brcm,tx:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Mailbox transmit doorbell
> +
> + brcm,rx:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Mailbox receive doorbell
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - "#mbox-cells"
> + - brcm,tx
> + - brcm,rx
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
... and where do you use it?
> +
> + brcm_mailbox: brcm_mailbox@a552000 {
Only partially improved.
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + #mbox-cells = <0x2>;
> + brcm,rx = <0x7>;
> + brcm,tx = <0x6>;
> + compatible = "brcm,bcm74110-mbox";
Nothing improved. Didi you read the DTS coding style?
> + reg = <0xa552000 0x1104>;
> + interrupts = <0x0 0x67 0x4>, /* DQM 7 */
> + <0x0 0x66 0x4>; /* DQM 6 */
Looks like standard flags, so use proper defines.
> + };
> +
> + scmi {
Drop the node, not related.
Best regards,
Krzysztof
© 2016 - 2026 Red Hat, Inc.