2019-08-20 03:24:20

by Samuel Holland

[permalink] [raw]
Subject: [PATCH v4 03/10] dt-bindings: mailbox: Add a sunxi message box binding

This mailbox hardware is present in Allwinner sun8i, sun9i, and sun50i
SoCs. Add a device tree binding for it.

Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Samuel Holland <[email protected]>
---
.../mailbox/allwinner,sunxi-msgbox.yaml | 79 +++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mailbox/allwinner,sunxi-msgbox.yaml

diff --git a/Documentation/devicetree/bindings/mailbox/allwinner,sunxi-msgbox.yaml b/Documentation/devicetree/bindings/mailbox/allwinner,sunxi-msgbox.yaml
new file mode 100644
index 000000000000..f34a1909ab2e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/allwinner,sunxi-msgbox.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mailbox/allwinner,sunxi-msgbox.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner sunxi Message Box
+
+maintainers:
+ - Samuel Holland <[email protected]>
+
+description: |
+ The hardware message box on sun6i and newer sunxi SoCs is a two-user mailbox
+ controller containing 8 unidirectional FIFOs. An interrupt is raised for
+ received messages, but software must poll to know when a transmitted message
+ has been acknowledged by the remote user. Each FIFO can hold four 32-bit
+ messages; when a FIFO is full, clients must wait before more transmissions.
+
+ Refer to ./mailbox.txt for generic information about mailbox device-tree
+ bindings.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - allwinner,sun8i-a83t-msgbox
+ - allwinner,sun8i-h3-msgbox
+ - allwinner,sun9i-a80-msgbox
+ - allwinner,sun50i-a64-msgbox
+ - allwinner,sun50i-h6-msgbox
+ - const: allwinner,sun6i-a31-msgbox
+ - items:
+ - const: allwinner,sun6i-a31-msgbox
+
+ reg:
+ items:
+ - description: MMIO register range
+
+ clocks:
+ maxItems: 1
+ description: bus clock
+
+ resets:
+ maxItems: 1
+ description: bus reset
+
+ interrupts:
+ maxItems: 1
+ description: controller interrupt
+
+ '#mbox-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - resets
+ - interrupts
+ - '#mbox-cells'
+
+examples:
+ - |
+ #include <dt-bindings/clock/sun8i-h3-ccu.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/reset/sun8i-h3-ccu.h>
+
+ msgbox: mailbox@1c17000 {
+ compatible = "allwinner,sun8i-h3-msgbox",
+ "allwinner,sun6i-a31-msgbox";
+ reg = <0x01c17000 0x1000>;
+ clocks = <&ccu CLK_BUS_MSGBOX>;
+ resets = <&ccu RST_BUS_MSGBOX>;
+ interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+ #mbox-cells = <1>;
+ };
+
+...
--
2.21.0


2019-08-20 07:16:09

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v4 03/10] dt-bindings: mailbox: Add a sunxi message box binding

Hi,

On Mon, Aug 19, 2019 at 10:23:04PM -0500, Samuel Holland wrote:
> This mailbox hardware is present in Allwinner sun8i, sun9i, and sun50i
> SoCs. Add a device tree binding for it.
>
> Reviewed-by: Rob Herring <[email protected]>
> Signed-off-by: Samuel Holland <[email protected]>
> ---
> .../mailbox/allwinner,sunxi-msgbox.yaml | 79 +++++++++++++++++++
> 1 file changed, 79 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mailbox/allwinner,sunxi-msgbox.yaml

So we merged a bunch of schemas already, with the convention that the
name was the first compatible to use that binding.

That would be allwinner,sun6i-a31-msgbox.yaml in that case

Thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (801.00 B)
signature.asc (235.00 B)
Download all attachments

2019-08-20 13:06:49

by Samuel Holland

[permalink] [raw]
Subject: Re: [PATCH v4 03/10] dt-bindings: mailbox: Add a sunxi message box binding

On 8/20/19 2:14 AM, Maxime Ripard wrote:
> Hi,
>
> On Mon, Aug 19, 2019 at 10:23:04PM -0500, Samuel Holland wrote:
>> This mailbox hardware is present in Allwinner sun8i, sun9i, and sun50i
>> SoCs. Add a device tree binding for it.
>>
>> Reviewed-by: Rob Herring <[email protected]>
>> Signed-off-by: Samuel Holland <[email protected]>
>> ---
>> .../mailbox/allwinner,sunxi-msgbox.yaml | 79 +++++++++++++++++++
>> 1 file changed, 79 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/mailbox/allwinner,sunxi-msgbox.yaml
>
> So we merged a bunch of schemas already, with the convention that the
> name was the first compatible to use that binding.
>
> That would be allwinner,sun6i-a31-msgbox.yaml in that case

Okay, I'll rename the binding and driver (and Kconfig symbol?).

Thanks,
Samuel

2019-08-21 14:52:04

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v4 03/10] dt-bindings: mailbox: Add a sunxi message box binding

On Tue, Aug 20, 2019 at 08:04:26AM -0500, Samuel Holland wrote:
> On 8/20/19 2:14 AM, Maxime Ripard wrote:
> > Hi,
> >
> > On Mon, Aug 19, 2019 at 10:23:04PM -0500, Samuel Holland wrote:
> >> This mailbox hardware is present in Allwinner sun8i, sun9i, and sun50i
> >> SoCs. Add a device tree binding for it.
> >>
> >> Reviewed-by: Rob Herring <[email protected]>
> >> Signed-off-by: Samuel Holland <[email protected]>
> >> ---
> >> .../mailbox/allwinner,sunxi-msgbox.yaml | 79 +++++++++++++++++++
> >> 1 file changed, 79 insertions(+)
> >> create mode 100644 Documentation/devicetree/bindings/mailbox/allwinner,sunxi-msgbox.yaml
> >
> > So we merged a bunch of schemas already, with the convention that the
> > name was the first compatible to use that binding.
> >
> > That would be allwinner,sun6i-a31-msgbox.yaml in that case
>
> Okay, I'll rename the binding and driver (and Kconfig symbol?).

Yep, thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (1.02 kB)
signature.asc (235.00 B)
Download all attachments