[PATCH RFC 3/3] dt-bindings: mailbox: mtk,vcp-mbox: add mtk vcp-mbox document

Jjian Zhou posted 3 patches 11 months, 1 week ago
There is a newer version of this series
[PATCH RFC 3/3] dt-bindings: mailbox: mtk,vcp-mbox: add mtk vcp-mbox document
Posted by Jjian Zhou 11 months, 1 week ago
This patch adds document for mediatek vcp mbox.

Signed-off-by: Jjian Zhou <jjian.zhou@mediatek.com>
---
 .../bindings/mailbox/mtk,vcp-mbox.yaml        | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml

diff --git a/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml b/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
new file mode 100644
index 000000000000..d5afe295af14
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mailbox/mtk,vcp-mbox.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Video Companion Processor (VCP) mailbox
+
+maintainers:
+  - Jjian Zhou <Jjian.Zhou@mediatek.com>
+
+description: |
+  The MTK VCP mailbox enables the SoC to communicate with the VCP by passing
+  messages through 64 32-bit wide registers. It has 32 interrupt vectors in
+  either direction for signalling purposes.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt8196-vcp-mbox
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  "#mbox-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#mbox-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    vcp_mailbox0: mailbox@31b80000 {
+        compatible = "mediatek,mt8196-vcp-mbox";
+        reg = <0x31b80000 0x1000>;
+        interrupts = <GIC_SPI 789 IRQ_TYPE_LEVEL_HIGH 0>;
+        #mbox-cells = <0>;
+    };
-- 
2.45.2
Re: [PATCH RFC 3/3] dt-bindings: mailbox: mtk,vcp-mbox: add mtk vcp-mbox document
Posted by Rob Herring 11 months, 1 week ago
On Wed, Mar 05, 2025 at 04:20:40PM +0800, Jjian Zhou wrote:
> This patch adds document for mediatek vcp mbox.
> 
> Signed-off-by: Jjian Zhou <jjian.zhou@mediatek.com>
> ---
>  .../bindings/mailbox/mtk,vcp-mbox.yaml        | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml b/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> new file mode 100644
> index 000000000000..d5afe295af14
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mailbox/mtk,vcp-mbox.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek Video Companion Processor (VCP) mailbox
> +
> +maintainers:
> +  - Jjian Zhou <Jjian.Zhou@mediatek.com>
> +
> +description: |

Don't need '|' if no formatting

> +  The MTK VCP mailbox enables the SoC to communicate with the VCP by passing
> +  messages through 64 32-bit wide registers. It has 32 interrupt vectors in
> +  either direction for signalling purposes.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - mediatek,mt8196-vcp-mbox
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  "#mbox-cells":
> +    const: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - "#mbox-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    vcp_mailbox0: mailbox@31b80000 {
> +        compatible = "mediatek,mt8196-vcp-mbox";
> +        reg = <0x31b80000 0x1000>;
> +        interrupts = <GIC_SPI 789 IRQ_TYPE_LEVEL_HIGH 0>;
> +        #mbox-cells = <0>;
> +    };
> -- 
> 2.45.2
>
Re: [PATCH RFC 3/3] dt-bindings: mailbox: mtk,vcp-mbox: add mtk vcp-mbox document
Posted by Jjian Zhou (周建) 11 months, 1 week ago
On Wed, 2025-03-05 at 10:46 -0600, Rob Herring wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On Wed, Mar 05, 2025 at 04:20:40PM +0800, Jjian Zhou wrote:
> > This patch adds document for mediatek vcp mbox.
> > 
> > Signed-off-by: Jjian Zhou <jjian.zhou@mediatek.com>
> > ---
> >  .../bindings/mailbox/mtk,vcp-mbox.yaml        | 49
> > +++++++++++++++++++
> >  1 file changed, 49 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/mailbox/mtk,vcp-
> > mbox.yaml b/Documentation/devicetree/bindings/mailbox/mtk,vcp-
> > mbox.yaml
> > new file mode 100644
> > index 000000000000..d5afe295af14
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> > @@ -0,0 +1,49 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: 
> > https://urldefense.com/v3/__http://devicetree.org/schemas/mailbox/mtk,vcp-mbox.yaml*__;Iw!!CTRNKA9wMg0ARbw!htNQU7pv2prgWsEynW_fNKiBzXFsvuzVqq3plpilj-I6ntUDcorXT7c-aSh8ulpfXX4MyEaMLa_NNu15$
> > +$schema: 
> > https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!htNQU7pv2prgWsEynW_fNKiBzXFsvuzVqq3plpilj-I6ntUDcorXT7c-aSh8ulpfXX4MyEaMLfOSittN$
> > +
> > +title: MediaTek Video Companion Processor (VCP) mailbox
> > +
> > +maintainers:
> > +  - Jjian Zhou <Jjian.Zhou@mediatek.com>
> > +
> > +description: |
> 
> Don't need '|' if no formatting
  I will remove it in version-two. Thanks for your help.
> 
> > +  The MTK VCP mailbox enables the SoC to communicate with the VCP
> > by passing
> > +  messages through 64 32-bit wide registers. It has 32 interrupt
> > vectors in
> > +  either direction for signalling purposes.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - mediatek,mt8196-vcp-mbox
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  "#mbox-cells":
> > +    const: 0
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - "#mbox-cells"
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > +    vcp_mailbox0: mailbox@31b80000 {
> > +        compatible = "mediatek,mt8196-vcp-mbox";
> > +        reg = <0x31b80000 0x1000>;
> > +        interrupts = <GIC_SPI 789 IRQ_TYPE_LEVEL_HIGH 0>;
> > +        #mbox-cells = <0>;
> > +    };
> > --
> > 2.45.2
> > 
Re: [PATCH RFC 3/3] dt-bindings: mailbox: mtk,vcp-mbox: add mtk vcp-mbox document
Posted by Conor Dooley 11 months, 1 week ago
On Wed, Mar 05, 2025 at 04:20:40PM +0800, Jjian Zhou wrote:
> This patch adds document for mediatek vcp mbox.
> 
> Signed-off-by: Jjian Zhou <jjian.zhou@mediatek.com>
> ---
>  .../bindings/mailbox/mtk,vcp-mbox.yaml        | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml b/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> new file mode 100644
> index 000000000000..d5afe295af14
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml

When you go !RFC, filename matching compatible please.

> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mailbox/mtk,vcp-mbox.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek Video Companion Processor (VCP) mailbox
> +
> +maintainers:
> +  - Jjian Zhou <Jjian.Zhou@mediatek.com>
> +
> +description: |
> +  The MTK VCP mailbox enables the SoC to communicate with the VCP by passing
> +  messages through 64 32-bit wide registers. It has 32 interrupt vectors in
> +  either direction for signalling purposes.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - mediatek,mt8196-vcp-mbox
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  "#mbox-cells":
> +    const: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - "#mbox-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    vcp_mailbox0: mailbox@31b80000 {

label here is unused, please drop it.

Cheers,
Conor.

> +        compatible = "mediatek,mt8196-vcp-mbox";
> +        reg = <0x31b80000 0x1000>;
> +        interrupts = <GIC_SPI 789 IRQ_TYPE_LEVEL_HIGH 0>;
> +        #mbox-cells = <0>;
> +    };
> -- 
> 2.45.2
> 
Re: [PATCH RFC 3/3] dt-bindings: mailbox: mtk,vcp-mbox: add mtk vcp-mbox document
Posted by Jjian Zhou (周建) 11 months, 1 week ago
On Wed, 2025-03-05 at 16:31 +0000, Conor Dooley wrote:
> On Wed, Mar 05, 2025 at 04:20:40PM +0800, Jjian Zhou wrote:
> > This patch adds document for mediatek vcp mbox.
> > 
> > Signed-off-by: Jjian Zhou <jjian.zhou@mediatek.com>
> > ---
> >  .../bindings/mailbox/mtk,vcp-mbox.yaml        | 49
> > +++++++++++++++++++
> >  1 file changed, 49 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/mailbox/mtk,vcp-
> > mbox.yaml b/Documentation/devicetree/bindings/mailbox/mtk,vcp-
> > mbox.yaml
> > new file mode 100644
> > index 000000000000..d5afe295af14
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mailbox/mtk,vcp-mbox.yaml
> 
> When you go !RFC, filename matching compatible please.
  I will rename the yaml file to mtk,mt8196-vcp-mbox.yaml.
  Thanks for your review.
> 
> > @@ -0,0 +1,49 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mailbox/mtk,vcp-mbox.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: MediaTek Video Companion Processor (VCP) mailbox
> > +
> > +maintainers:
> > +  - Jjian Zhou <Jjian.Zhou@mediatek.com>
> > +
> > +description: |
> > +  The MTK VCP mailbox enables the SoC to communicate with the VCP
> > by passing
> > +  messages through 64 32-bit wide registers. It has 32 interrupt
> > vectors in
> > +  either direction for signalling purposes.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - mediatek,mt8196-vcp-mbox
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  "#mbox-cells":
> > +    const: 0
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - "#mbox-cells"
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > +    vcp_mailbox0: mailbox@31b80000 {
> 
> label here is unused, please drop it.
> 
> Cheers,
> Conor.

   OK. I will drop it in version-two.
> 
> > +        compatible = "mediatek,mt8196-vcp-mbox";
> > +        reg = <0x31b80000 0x1000>;
> > +        interrupts = <GIC_SPI 789 IRQ_TYPE_LEVEL_HIGH 0>;
> > +        #mbox-cells = <0>;
> > +    };
> > -- 
> > 2.45.2
> >