diff mbox series

[1/3] media: dt-bindings: media: Add i.MX8MP DW100 binding

Message ID 20220304202813.2560202-2-xavier.roumegue@oss.nxp.com
State Changes Requested, archived
Headers show
Series i.MX8MP DW100 dewarper driver | expand

Checks

Context Check Description
robh/patch-applied success
robh/checkpatch success
robh/dtbs-check success
robh/dt-meta-schema fail build log

Commit Message

Xavier Roumegue March 4, 2022, 8:28 p.m. UTC
Add DT binding documentation for the Vivante DW100 dewarper engine found
on NXP i.MX8MP SoC

Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
---
 .../devicetree/bindings/media/nxp,dw100.yaml  | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/nxp,dw100.yaml

Comments

Laurent Pinchart March 4, 2022, 8:36 p.m. UTC | #1
Hi Xavier,

Thank you for the patch.

On Fri, Mar 04, 2022 at 09:28:11PM +0100, Xavier Roumegue wrote:
> Add DT binding documentation for the Vivante DW100 dewarper engine found
> on NXP i.MX8MP SoC
> 
> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
> ---
>  .../devicetree/bindings/media/nxp,dw100.yaml  | 74 +++++++++++++++++++
>  1 file changed, 74 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/nxp,dw100.yaml
> 
> diff --git a/Documentation/devicetree/bindings/media/nxp,dw100.yaml b/Documentation/devicetree/bindings/media/nxp,dw100.yaml
> new file mode 100644
> index 000000000000..0cea4bb03c5d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/nxp,dw100.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/nxp,dw100.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP i.MX8MP DW100 Dewarper core
> +
> +maintainers:
> +  - Xavier Roumegue <xavier.roumegue@oss.nxp.com>
> +
> +description: |-
> +  The Dewarp Engine provides high-performance dewarp processing for the
> +  correction of the distortion that is introduced in images produced by fisheye
> +  and wide angle lenses. It is implemented with a line/tile-cache based
> +  architecture. With configurable address mapping look up tables and per tile
> +  processing, it successfully generates a corrected output image.
> +  The engine can be used to perform scaling, cropping and pixel format
> +  conversion.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - nxp,dw100
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 2
> +    items:
> +      - description: The AXI clock
> +      - description: The AHB clock
> +
> +  clock-names:
> +    minItems: 2
> +    items:
> +      - const: axi
> +      - const: ahb
> +
> +  power-domains:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - power-domains
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx8mp-clock.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/power/imx8mp-power.h>
> +
> +    dewarp: dwe@32e30000 {
> +            compatible = "nxp,dw100";
> +            reg = <0x32e30000 0x10000>;
> +            interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
> +            clocks = <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
> +                    <&clk IMX8MP_CLK_MEDIA_APB_ROOT>;

One more space of indentation here.

> +            clock-names = "axi", "ahb";
> +            assigned-clocks = <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
> +                    <&clk IMX8MP_CLK_MEDIA_APB_ROOT>;
> +            assigned-clock-rates = <500000000>, <200000000>;

I'd drop the assigned-clocks property, as I think it would make more
sense to add them to the media-blk-ctrl node than to individual devices
in the mediamix power domain.

With these small issues fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +            power-domains = <&media_blk_ctrl IMX8MP_MEDIABLK_PD_DWE>;
> +    };
Rob Herring (Arm) March 4, 2022, 9:26 p.m. UTC | #2
On Fri, 04 Mar 2022 21:28:11 +0100, Xavier Roumegue wrote:
> Add DT binding documentation for the Vivante DW100 dewarper engine found
> on NXP i.MX8MP SoC
> 
> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
> ---
>  .../devicetree/bindings/media/nxp,dw100.yaml  | 74 +++++++++++++++++++
>  1 file changed, 74 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/nxp,dw100.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,dw100.yaml: properties:clocks: 'oneOf' conditional failed, one must be fixed:
	[{'description': 'The AXI clock'}, {'description': 'The AHB clock'}] is too long
	[{'description': 'The AXI clock'}, {'description': 'The AHB clock'}] is too short
	False schema does not allow 2
	1 was expected
	hint: "minItems" is only needed if less than the "items" list length
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,dw100.yaml: properties:clock-names: 'oneOf' conditional failed, one must be fixed:
	[{'const': 'axi'}, {'const': 'ahb'}] is too long
	[{'const': 'axi'}, {'const': 'ahb'}] is too short
	False schema does not allow 2
	1 was expected
	hint: "minItems" is only needed if less than the "items" list length
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,dw100.yaml: ignoring, error in schema: properties: clocks
Documentation/devicetree/bindings/media/nxp,dw100.example.dts:25:18: fatal error: dt-bindings/power/imx8mp-power.h: No such file or directory
   25 |         #include <dt-bindings/power/imx8mp-power.h>
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:378: Documentation/devicetree/bindings/media/nxp,dw100.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1398: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1601439

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/nxp,dw100.yaml b/Documentation/devicetree/bindings/media/nxp,dw100.yaml
new file mode 100644
index 000000000000..0cea4bb03c5d
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/nxp,dw100.yaml
@@ -0,0 +1,74 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/nxp,dw100.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX8MP DW100 Dewarper core
+
+maintainers:
+  - Xavier Roumegue <xavier.roumegue@oss.nxp.com>
+
+description: |-
+  The Dewarp Engine provides high-performance dewarp processing for the
+  correction of the distortion that is introduced in images produced by fisheye
+  and wide angle lenses. It is implemented with a line/tile-cache based
+  architecture. With configurable address mapping look up tables and per tile
+  processing, it successfully generates a corrected output image.
+  The engine can be used to perform scaling, cropping and pixel format
+  conversion.
+
+properties:
+  compatible:
+    enum:
+      - nxp,dw100
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 2
+    items:
+      - description: The AXI clock
+      - description: The AHB clock
+
+  clock-names:
+    minItems: 2
+    items:
+      - const: axi
+      - const: ahb
+
+  power-domains:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - power-domains
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx8mp-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/imx8mp-power.h>
+
+    dewarp: dwe@32e30000 {
+            compatible = "nxp,dw100";
+            reg = <0x32e30000 0x10000>;
+            interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
+                    <&clk IMX8MP_CLK_MEDIA_APB_ROOT>;
+            clock-names = "axi", "ahb";
+            assigned-clocks = <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
+                    <&clk IMX8MP_CLK_MEDIA_APB_ROOT>;
+            assigned-clock-rates = <500000000>, <200000000>;
+            power-domains = <&media_blk_ctrl IMX8MP_MEDIABLK_PD_DWE>;
+    };