diff mbox series

[v2,3/5] media: dt-bindings: media: Add binding for the Raspberry Pi HEVC decoder

Message ID 20250206-media-rpi-hevc-dec-v2-3-69353c8805b2@raspberrypi.com (mailing list archive)
State New
Headers show
Series Raspberry Pi HEVC decoder driver | expand

Commit Message

Dave Stevenson Feb. 6, 2025, 6:02 p.m. UTC
Adds a binding for the HEVC decoder found on the BCM2711 / Raspberry Pi 4,
and BCM2712 / Raspberry Pi 5.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 .../bindings/media/raspberrypi,hevc-dec.yaml       | 67 ++++++++++++++++++++++
 1 file changed, 67 insertions(+)

Comments

Rob Herring (Arm) Feb. 11, 2025, 10:20 p.m. UTC | #1
On Thu, Feb 06, 2025 at 06:02:36PM +0000, Dave Stevenson wrote:
> Adds a binding for the HEVC decoder found on the BCM2711 / Raspberry Pi 4,
> and BCM2712 / Raspberry Pi 5.
> 
> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
>  .../bindings/media/raspberrypi,hevc-dec.yaml       | 67 ++++++++++++++++++++++
>  1 file changed, 67 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml b/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml
> new file mode 100644
> index 000000000000..06db7004c765
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/raspberrypi,hevc-dec.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Raspberry Pi HEVC Decoder
> +
> +maintainers:
> +  - John Cox <john.cox@raspberrypi.com>
> +  - Dom Cobley <dom@raspberrypi.com>
> +  - Dave Stevenson <dave.stevenson@raspberrypi.com>
> +  - Raspberry Pi internal review list <kernel-list@raspberrypi.com>
> +
> +description:
> +  The Raspberry Pi HEVC decoder is a hardware video decode accelerator block
> +  found in the BCM2711 and BCM2712 processors used on Raspberry Pi 4 and 5
> +  boards respectively.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - raspberrypi,hevc-dec

SoC specific compatible please. If they are 'the same' then 2712 can 
fallback to 2711.

> +
> +  reg:
> +    items:
> +      - description: The HEVC main register region
> +      - description: The Interrupt control register region
> +
> +  reg-names:
> +    items:
> +      - const: hevc
> +      - const: intc
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: The HEVC block clock
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - interrupts
> +  - clocks
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    video-codec@7eb10000 {
> +        compatible = "raspberrypi,hevc-dec";
> +        reg = <0x7eb00000 0x10000>, /* HEVC */
> +              <0x7eb10000 0x1000>;  /* INTC */
> +        reg-names = "hevc",
> +                    "intc";
> +
> +        interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
> +
> +        clocks = <&clk 0>;
> +    };
> +
> +...
> 
> -- 
> 2.34.1
>
Dave Stevenson Feb. 12, 2025, 3:29 p.m. UTC | #2
Hi Rob

On Tue, 11 Feb 2025 at 22:20, Rob Herring <robh@kernel.org> wrote:
>
> On Thu, Feb 06, 2025 at 06:02:36PM +0000, Dave Stevenson wrote:
> > Adds a binding for the HEVC decoder found on the BCM2711 / Raspberry Pi 4,
> > and BCM2712 / Raspberry Pi 5.
> >
> > Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> > ---
> >  .../bindings/media/raspberrypi,hevc-dec.yaml       | 67 ++++++++++++++++++++++
> >  1 file changed, 67 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml b/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml
> > new file mode 100644
> > index 000000000000..06db7004c765
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml
> > @@ -0,0 +1,67 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/raspberrypi,hevc-dec.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Raspberry Pi HEVC Decoder
> > +
> > +maintainers:
> > +  - John Cox <john.cox@raspberrypi.com>
> > +  - Dom Cobley <dom@raspberrypi.com>
> > +  - Dave Stevenson <dave.stevenson@raspberrypi.com>
> > +  - Raspberry Pi internal review list <kernel-list@raspberrypi.com>
> > +
> > +description:
> > +  The Raspberry Pi HEVC decoder is a hardware video decode accelerator block
> > +  found in the BCM2711 and BCM2712 processors used on Raspberry Pi 4 and 5
> > +  boards respectively.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - raspberrypi,hevc-dec
>
> SoC specific compatible please. If they are 'the same' then 2712 can
> fallback to 2711.

Can I just make sure I understand your request before I respin?
This is a Raspberry Pi IP block that has been added to the Broadcom
SoCs. It's the same situation as for PiSP Backend which is documented
in bindings/media/raspberrypi,pisbe.yaml

Based on that I'm interpreting your comment as wanting:

properties:
  compatible:
    items:
      - enum:
          - brcm,bcm2711-hevc-dec
          - brcm,bcm2712-hevc-dec
      - const: raspberrypi,hevc-dec

Is that right?

Thanks
  Dave

> > +
> > +  reg:
> > +    items:
> > +      - description: The HEVC main register region
> > +      - description: The Interrupt control register region
> > +
> > +  reg-names:
> > +    items:
> > +      - const: hevc
> > +      - const: intc
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    items:
> > +      - description: The HEVC block clock
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - reg-names
> > +  - interrupts
> > +  - clocks
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +
> > +    video-codec@7eb10000 {
> > +        compatible = "raspberrypi,hevc-dec";
> > +        reg = <0x7eb00000 0x10000>, /* HEVC */
> > +              <0x7eb10000 0x1000>;  /* INTC */
> > +        reg-names = "hevc",
> > +                    "intc";
> > +
> > +        interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
> > +
> > +        clocks = <&clk 0>;
> > +    };
> > +
> > +...
> >
> > --
> > 2.34.1
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml b/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml
new file mode 100644
index 000000000000..06db7004c765
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/raspberrypi,hevc-dec.yaml
@@ -0,0 +1,67 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/raspberrypi,hevc-dec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Raspberry Pi HEVC Decoder
+
+maintainers:
+  - John Cox <john.cox@raspberrypi.com>
+  - Dom Cobley <dom@raspberrypi.com>
+  - Dave Stevenson <dave.stevenson@raspberrypi.com>
+  - Raspberry Pi internal review list <kernel-list@raspberrypi.com>
+
+description:
+  The Raspberry Pi HEVC decoder is a hardware video decode accelerator block
+  found in the BCM2711 and BCM2712 processors used on Raspberry Pi 4 and 5
+  boards respectively.
+
+properties:
+  compatible:
+    enum:
+      - raspberrypi,hevc-dec
+
+  reg:
+    items:
+      - description: The HEVC main register region
+      - description: The Interrupt control register region
+
+  reg-names:
+    items:
+      - const: hevc
+      - const: intc
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: The HEVC block clock
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    video-codec@7eb10000 {
+        compatible = "raspberrypi,hevc-dec";
+        reg = <0x7eb00000 0x10000>, /* HEVC */
+              <0x7eb10000 0x1000>;  /* INTC */
+        reg-names = "hevc",
+                    "intc";
+
+        interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+
+        clocks = <&clk 0>;
+    };
+
+...