[RESEND,v2,2/4] media: dt-bindings: rockchip: Document RK3399 Video Decoder bindings
diff mbox series

Message ID 20191011093342.3471-3-boris.brezillon@collabora.com
State New
Headers show
Series
  • media: rockchip: Add the rkvdec driver
Related show

Commit Message

Boris Brezillon Oct. 11, 2019, 9:33 a.m. UTC
Document the Rockchip RK3399 Video Decoder bindings.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 .../bindings/media/rockchip,vdec.yaml         | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/rockchip,vdec.yaml

Comments

Rob Herring Oct. 11, 2019, 12:50 p.m. UTC | #1
On Fri, Oct 11, 2019 at 4:33 AM Boris Brezillon
<boris.brezillon@collabora.com> wrote:
>
> Document the Rockchip RK3399 Video Decoder bindings.

You need some more headers for the example (or drop defines):

Error: Documentation/devicetree/bindings/media/rockchip,vdec.example.dts:23.28-29
syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:321: recipe for target
'Documentation/devicetree/bindings/media/rockchip,vdec.example.dt.yaml'
failed
make[1]: *** [Documentation/devicetree/bindings/media/rockchip,vdec.example.dt.yaml]
Error 1
Makefile:1282: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>  .../bindings/media/rockchip,vdec.yaml         | 71 +++++++++++++++++++
>  1 file changed, 71 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/rockchip,vdec.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
> new file mode 100644
> index 000000000000..7167c3d6a389
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
> @@ -0,0 +1,71 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/rockchip,vdec.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Rockchip Video Decoder (VDec) Device Tree Bindings
> +
> +maintainers:
> +  - Heiko Stuebner <heiko@sntech.de>
> +
> +description: |-
> +  The Rockchip rk3399 has a stateless Video Decoder that can decodes H.264,
> +  HEVC an VP9 streams.
> +
> +properties:
> +  compatible:
> +    const: rockchip,rk3399-vdec
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: The Video Decoder AXI interface clock
> +      - description: The Video Decoder AHB interface clock
> +      - description: The Video Decoded CABAC clock
> +      - description: The Video Decoder core clock
> +
> +  clock-names:
> +    items:
> +      - const: aclk
> +      - const: iface
> +      - const: cabac
> +      - const: core
> +
> +  power-domains:
> +    maxItems: 1
> +
> +  iommus:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - power-domains
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    vdec: video-codec@ff660000 {
> +        compatible = "rockchip,rk3399-vdec";
> +        reg = <0x0 0xff660000 0x0 0x400>;
> +        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
> +        clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
> +                 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
> +        clock-names = "aclk", "iface", "cabac", "core";
> +        power-domains = <&power RK3399_PD_VDU>;
> +        iommus = <&vdec_mmu>;
> +    };
> +
> +...
> --
> 2.21.0
>
Boris Brezillon Oct. 11, 2019, 12:56 p.m. UTC | #2
On Fri, 11 Oct 2019 07:50:16 -0500
Rob Herring <robh+dt@kernel.org> wrote:

> On Fri, Oct 11, 2019 at 4:33 AM Boris Brezillon
> <boris.brezillon@collabora.com> wrote:
> >
> > Document the Rockchip RK3399 Video Decoder bindings.  
> 
> You need some more headers for the example (or drop defines):
> 
> Error: Documentation/devicetree/bindings/media/rockchip,vdec.example.dts:23.28-29
> syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:321: recipe for target
> 'Documentation/devicetree/bindings/media/rockchip,vdec.example.dt.yaml'
> failed
> make[1]: *** [Documentation/devicetree/bindings/media/rockchip,vdec.example.dt.yaml]
> Error 1
> Makefile:1282: recipe for target 'dt_binding_check' failed
> make: *** [dt_binding_check] Error 2

Will fix that. BTW, I tried running make dtbs_check and faced a few
errors on other yaml files (which is why I ended up sending the patch
without fully validating the schema). Maybe those have been fixed (I'm
based on the media tree which is based on 5.4-rc1).

Oh, and I also noticed that the generated example has
#address-cells = <1>, #size-cells = <1> in the parent node, while my
example expects <2>. Is there any way I can specify that somewhere, or
should I just tweak the example to use 1 cell instead?

> 
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > ---
> >  .../bindings/media/rockchip,vdec.yaml         | 71 +++++++++++++++++++
> >  1 file changed, 71 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/media/rockchip,vdec.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
> > new file mode 100644
> > index 000000000000..7167c3d6a389
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
> > @@ -0,0 +1,71 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/rockchip,vdec.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Rockchip Video Decoder (VDec) Device Tree Bindings
> > +
> > +maintainers:
> > +  - Heiko Stuebner <heiko@sntech.de>
> > +
> > +description: |-
> > +  The Rockchip rk3399 has a stateless Video Decoder that can decodes H.264,
> > +  HEVC an VP9 streams.
> > +
> > +properties:
> > +  compatible:
> > +    const: rockchip,rk3399-vdec
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    items:
> > +      - description: The Video Decoder AXI interface clock
> > +      - description: The Video Decoder AHB interface clock
> > +      - description: The Video Decoded CABAC clock
> > +      - description: The Video Decoder core clock
> > +
> > +  clock-names:
> > +    items:
> > +      - const: aclk
> > +      - const: iface
> > +      - const: cabac
> > +      - const: core
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  iommus:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - clocks
> > +  - clock-names
> > +  - power-domains
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +
> > +    vdec: video-codec@ff660000 {
> > +        compatible = "rockchip,rk3399-vdec";
> > +        reg = <0x0 0xff660000 0x0 0x400>;
> > +        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
> > +        clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
> > +                 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
> > +        clock-names = "aclk", "iface", "cabac", "core";
> > +        power-domains = <&power RK3399_PD_VDU>;
> > +        iommus = <&vdec_mmu>;
> > +    };
> > +
> > +...
> > --
> > 2.21.0
> >
Rob Herring Oct. 11, 2019, 5:37 p.m. UTC | #3
On Fri, Oct 11, 2019 at 7:56 AM Boris Brezillon
<boris.brezillon@collabora.com> wrote:
>
> On Fri, 11 Oct 2019 07:50:16 -0500
> Rob Herring <robh+dt@kernel.org> wrote:
>
> > On Fri, Oct 11, 2019 at 4:33 AM Boris Brezillon
> > <boris.brezillon@collabora.com> wrote:
> > >
> > > Document the Rockchip RK3399 Video Decoder bindings.
> >
> > You need some more headers for the example (or drop defines):
> >
> > Error: Documentation/devicetree/bindings/media/rockchip,vdec.example.dts:23.28-29
> > syntax error
> > FATAL ERROR: Unable to parse input tree
> > scripts/Makefile.lib:321: recipe for target
> > 'Documentation/devicetree/bindings/media/rockchip,vdec.example.dt.yaml'
> > failed
> > make[1]: *** [Documentation/devicetree/bindings/media/rockchip,vdec.example.dt.yaml]
> > Error 1
> > Makefile:1282: recipe for target 'dt_binding_check' failed
> > make: *** [dt_binding_check] Error 2
>
> Will fix that. BTW, I tried running make dtbs_check and faced a few
> errors on other yaml files (which is why I ended up sending the patch
> without fully validating the schema). Maybe those have been fixed (I'm
> based on the media tree which is based on 5.4-rc1).

Several fixes went into -rc2, but there's 2 fixes not in -rc2 (but are in next).

> Oh, and I also noticed that the generated example has
> #address-cells = <1>, #size-cells = <1> in the parent node, while my
> example expects <2>. Is there any way I can specify that somewhere, or
> should I just tweak the example to use 1 cell instead?

I think you can override it just adding '#address-cells = <2>;' or
tweak the example.

Rob

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
new file mode 100644
index 000000000000..7167c3d6a389
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
@@ -0,0 +1,71 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/rockchip,vdec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Video Decoder (VDec) Device Tree Bindings
+
+maintainers:
+  - Heiko Stuebner <heiko@sntech.de>
+
+description: |-
+  The Rockchip rk3399 has a stateless Video Decoder that can decodes H.264,
+  HEVC an VP9 streams.
+
+properties:
+  compatible:
+    const: rockchip,rk3399-vdec
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: The Video Decoder AXI interface clock
+      - description: The Video Decoder AHB interface clock
+      - description: The Video Decoded CABAC clock
+      - description: The Video Decoder core clock
+
+  clock-names:
+    items:
+      - const: aclk
+      - const: iface
+      - const: cabac
+      - const: core
+
+  power-domains:
+    maxItems: 1
+
+  iommus:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - power-domains
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    vdec: video-codec@ff660000 {
+        compatible = "rockchip,rk3399-vdec";
+        reg = <0x0 0xff660000 0x0 0x400>;
+        interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
+        clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
+                 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
+        clock-names = "aclk", "iface", "cabac", "core";
+        power-domains = <&power RK3399_PD_VDU>;
+        iommus = <&vdec_mmu>;
+    };
+
+...