diff mbox series

[v10,01/13] dt-bindings: media: amphion: add amphion video codec bindings

Message ID 4d5e00bda369a823c55ffcc10863f29179426557.1634095309.git.ming.qian@nxp.com
State Changes Requested, archived
Headers show
Series amphion video decoder/encoder driver | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Ming Qian Oct. 13, 2021, 8:27 a.m. UTC
Add devicetree binding documentation for amphion
Video Processing Unit IP presents on NXP i.MX8Q

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../bindings/media/amphion,vpu.yaml           | 178 ++++++++++++++++++
 1 file changed, 178 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/amphion,vpu.yaml

Comments

Rob Herring (Arm) Oct. 13, 2021, 6:39 p.m. UTC | #1
On Wed, 13 Oct 2021 16:27:17 +0800, Ming Qian wrote:
> Add devicetree binding documentation for amphion
> Video Processing Unit IP presents on NXP i.MX8Q
> 
> Signed-off-by: Ming Qian <ming.qian@nxp.com>
> Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
> Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
>  .../bindings/media/amphion,vpu.yaml           | 178 ++++++++++++++++++
>  1 file changed, 178 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/amphion,vpu.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/amphion,vpu.yaml: patternProperties:^vpu_core@[0-9a-f]+$:properties:compatible:oneOf: [{'const': 'nxp,imx8q-vpu-decoder'}, {'const': 'nxp,imx8q-vpu-encoder'}] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
	hint: Use 'enum' rather than 'oneOf' + 'const' entries
	from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/amphion,vpu.yaml: properties:compatible:oneOf: [{'const': 'nxp,imx8qm-vpu'}, {'const': 'nxp,imx8qxp-vpu'}] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
	hint: Use 'enum' rather than 'oneOf' + 'const' entries
	from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/amphion,vpu.yaml: ignoring, error in schema: patternProperties: ^vpu_core@[0-9a-f]+$: properties: compatible: oneOf
warning: no schema found in file: ./Documentation/devicetree/bindings/media/amphion,vpu.yaml
Documentation/devicetree/bindings/media/amphion,vpu.example.dt.yaml:0:0: /example-0/vpu@2c000000: failed to match any schema with compatible: ['nxp,imx8qm-vpu']
Documentation/devicetree/bindings/media/amphion,vpu.example.dt.yaml:0:0: /example-0/vpu@2c000000/vpu_core@2d080000: failed to match any schema with compatible: ['nxp,imx8q-vpu-decoder']
Documentation/devicetree/bindings/media/amphion,vpu.example.dt.yaml:0:0: /example-0/vpu@2c000000/vpu_core@2d090000: failed to match any schema with compatible: ['nxp,imx8q-vpu-encoder']
Documentation/devicetree/bindings/media/amphion,vpu.example.dt.yaml:0:0: /example-0/vpu@2c000000/vpu_core@2d0a0000: failed to match any schema with compatible: ['nxp,imx8q-vpu-encoder']

doc reference errors (make refcheckdocs):

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

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.
Ming Qian Oct. 14, 2021, 2:14 a.m. UTC | #2
> -----Original Message-----
> From: Rob Herring [mailto:robh@kernel.org]
> Sent: Thursday, October 14, 2021 2:40 AM
> To: Ming Qian <ming.qian@nxp.com>
> Cc: shawnguo@kernel.org; Aisheng Dong <aisheng.dong@nxp.com>;
> s.hauer@pengutronix.de; robh+dt@kernel.org; festevam@gmail.com;
> hverkuil-cisco@xs4all.nl; dl-linux-imx <linux-imx@nxp.com>;
> mchehab@kernel.org; linux-media@vger.kernel.org; kernel@pengutronix.de;
> linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: [EXT] Re: [PATCH v10 01/13] dt-bindings: media: amphion: add
> amphion video codec bindings
> 
> Caution: EXT Email
> 
> On Wed, 13 Oct 2021 16:27:17 +0800, Ming Qian wrote:
> > Add devicetree binding documentation for amphion Video Processing Unit
> > IP presents on NXP i.MX8Q
> >
> > Signed-off-by: Ming Qian <ming.qian@nxp.com>
> > Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
> > Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
> > ---
> >  .../bindings/media/amphion,vpu.yaml           | 178
> ++++++++++++++++++
> >  1 file changed, 178 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/media/amphion,vpu.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
> /amphion,vpu.yaml:
> patternProperties:^vpu_core@[0-9a-f]+$:properties:compatible:oneOf:
> [{'const': 'nxp,imx8q-vpu-decoder'}, {'const': 'nxp,imx8q-vpu-encoder'}] should
> not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required':
> ['const']}}
>         hint: Use 'enum' rather than 'oneOf' + 'const' entries
>         from schema $id:
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetr
> ee.org%2Fmeta-schemas%2Fkeywords.yaml%23&amp;data=04%7C01%7Cmin
> g.qian%40nxp.com%7Ce295945bcfb243ca9b6d08d98e78da87%7C686ea1d3b
> c2b4c6fa92cd99c5c301635%7C0%7C0%7C637697471988904558%7CUnkno
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha
> WwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fOAy2B6rSge9vUFFMXg1CWuDD
> UVqapcDxEMH0DOIcbI%3D&amp;reserved=0
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media
> /amphion,vpu.yaml: properties:compatible:oneOf: [{'const':
> 'nxp,imx8qm-vpu'}, {'const': 'nxp,imx8qxp-vpu'}] should not be valid under
> {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
>         hint: Use 'enum' rather than 'oneOf' + 'const' entries
>         from schema $id:
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetr
> ee.org%2Fmeta-schemas%2Fkeywords.yaml%23&amp;data=04%7C01%7Cmin
> g.qian%40nxp.com%7Ce295945bcfb243ca9b6d08d98e78da87%7C686ea1d3b
> c2b4c6fa92cd99c5c301635%7C0%7C0%7C637697471988904558%7CUnkno
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha
> WwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fOAy2B6rSge9vUFFMXg1CWuDD
> UVqapcDxEMH0DOIcbI%3D&amp;reserved=0
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media
> /amphion,vpu.yaml: ignoring, error in schema: patternProperties:
> ^vpu_core@[0-9a-f]+$: properties: compatible: oneOf
> warning: no schema found in
> file: ./Documentation/devicetree/bindings/media/amphion,vpu.yaml
> Documentation/devicetree/bindings/media/amphion,vpu.example.dt.yaml:0:0:
> /example-0/vpu@2c000000: failed to match any schema with compatible:
> ['nxp,imx8qm-vpu']
> Documentation/devicetree/bindings/media/amphion,vpu.example.dt.yaml:0:0:
> /example-0/vpu@2c000000/vpu_core@2d080000: failed to match any
> schema with compatible: ['nxp,imx8q-vpu-decoder']
> Documentation/devicetree/bindings/media/amphion,vpu.example.dt.yaml:0:0:
> /example-0/vpu@2c000000/vpu_core@2d090000: failed to match any
> schema with compatible: ['nxp,imx8q-vpu-encoder']
> Documentation/devicetree/bindings/media/amphion,vpu.example.dt.yaml:0:0:
> /example-0/vpu@2c000000/vpu_core@2d0a0000: failed to match any
> schema with compatible: ['nxp,imx8q-vpu-encoder']
> 
> doc reference errors (make refcheckdocs):
> 
> See
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw
> ork.ozlabs.org%2Fpatch%2F1540273&amp;data=04%7C01%7Cming.qian%40n
> xp.com%7Ce295945bcfb243ca9b6d08d98e78da87%7C686ea1d3bc2b4c6fa92
> cd99c5c301635%7C0%7C0%7C637697471988904558%7CUnknown%7CTWF
> pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVC
> I6Mn0%3D%7C1000&amp;sdata=VZB1wJBe3b4WMHdhPVqlqZDoNRcui2mk0
> VYAN4NbXDU%3D&amp;reserved=0
> 
> 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.

I meet the error after upgrade dtschema, I'll fix it and submit again
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/amphion,vpu.yaml b/Documentation/devicetree/bindings/media/amphion,vpu.yaml
new file mode 100644
index 000000000000..6d06b945bc8a
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/amphion,vpu.yaml
@@ -0,0 +1,178 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/amphion,vpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amphion VPU codec IP
+
+maintainers:
+  - Ming Qian <ming.qian@nxp.com>
+  - Shijie Qin <shijie.qin@nxp.com>
+
+description: |-
+  The Amphion MXC video encoder(Windsor) and decoder(Malone) accelerators present
+  on NXP i.MX8Q SoCs.
+
+properties:
+  $nodename:
+    pattern: "^vpu@[0-9a-f]+$"
+
+  compatible:
+    oneOf:
+      - const: nxp,imx8qm-vpu
+      - const: nxp,imx8qxp-vpu
+
+  reg:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^mailbox@[0-9a-f]+$":
+    description:
+      Each vpu encoder or decoder correspond a MU, which used for communication
+      between driver and firmware. Implement via mailbox on driver.
+    $ref: ../mailbox/fsl,mu.yaml#
+
+
+  "^vpu_core@[0-9a-f]+$":
+    description:
+      Each core correspond a decoder or encoder, need to configure them
+      separately. NXP i.MX8QM SoC has one decoder and two encoder, i.MX8QXP SoC
+      has one decoder and one encoder.
+    type: object
+
+    properties:
+      compatible:
+        oneOf:
+          - const: nxp,imx8q-vpu-decoder
+          - const: nxp,imx8q-vpu-encoder
+
+      reg:
+        maxItems: 1
+
+      power-domains:
+        maxItems: 1
+
+      mbox-names:
+        items:
+          - const: tx0
+          - const: tx1
+          - const: rx
+
+      mboxes:
+        description:
+          List of phandle of 2 MU channels for tx, 1 MU channel for rx.
+        maxItems: 3
+
+      memory-region:
+        description:
+          Phandle to the reserved memory nodes to be associated with the
+          remoteproc device. The reserved memory nodes should be carveout nodes,
+          and should be defined as per the bindings in
+          Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
+        items:
+          - description: region reserved for firmware image sections.
+          - description: region used for RPC shared memory between firmware and
+                         driver.
+
+    required:
+      - compatible
+      - reg
+      - power-domains
+      - mbox-names
+      - mboxes
+      - memory-region
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - power-domains
+
+additionalProperties: false
+
+examples:
+  # Device node example for i.MX8QM platform:
+  - |
+    #include <dt-bindings/firmware/imx/rsrc.h>
+
+    vpu: vpu@2c000000 {
+      compatible = "nxp,imx8qm-vpu";
+      ranges = <0x2c000000 0x2c000000 0x2000000>;
+      reg = <0x2c000000 0x1000000>;
+      #address-cells = <1>;
+      #size-cells = <1>;
+      power-domains = <&pd IMX_SC_R_VPU>;
+
+      mu_m0: mailbox@2d000000 {
+        compatible = "fsl,imx6sx-mu";
+        reg = <0x2d000000 0x20000>;
+        interrupts = <0 472 4>;
+        #mbox-cells = <2>;
+        power-domains = <&pd IMX_SC_R_VPU_MU_0>;
+      };
+
+      mu1_m0: mailbox@2d020000 {
+        compatible = "fsl,imx6sx-mu";
+        reg = <0x2d020000 0x20000>;
+        interrupts = <0 473 4>;
+        #mbox-cells = <2>;
+        power-domains = <&pd IMX_SC_R_VPU_MU_1>;
+      };
+
+      mu2_m0: mailbox@2d040000 {
+        compatible = "fsl,imx6sx-mu";
+        reg = <0x2d040000 0x20000>;
+        interrupts = <0 474 4>;
+        #mbox-cells = <2>;
+        power-domains = <&pd IMX_SC_R_VPU_MU_2>;
+      };
+
+      vpu_core0: vpu_core@2d080000 {
+        compatible = "nxp,imx8q-vpu-decoder";
+        reg = <0x2d080000 0x10000>;
+        power-domains = <&pd IMX_SC_R_VPU_DEC_0>;
+        mbox-names = "tx0", "tx1", "rx";
+        mboxes = <&mu_m0 0 0>,
+                 <&mu_m0 0 1>,
+                 <&mu_m0 1 0>;
+        memory-region = <&decoder_boot>, <&decoder_rpc>;
+      };
+
+      vpu_core1: vpu_core@2d090000 {
+        compatible = "nxp,imx8q-vpu-encoder";
+        reg = <0x2d090000 0x10000>;
+        power-domains = <&pd IMX_SC_R_VPU_ENC_0>;
+        mbox-names = "tx0", "tx1", "rx";
+        mboxes = <&mu1_m0 0 0>,
+                 <&mu1_m0 0 1>,
+                 <&mu1_m0 1 0>;
+        memory-region = <&encoder1_boot>, <&encoder1_rpc>;
+      };
+
+      vpu_core2: vpu_core@2d0a0000 {
+        reg = <0x2d0a0000 0x10000>;
+        compatible = "nxp,imx8q-vpu-encoder";
+        power-domains = <&pd IMX_SC_R_VPU_ENC_1>;
+        mbox-names = "tx0", "tx1", "rx";
+        mboxes = <&mu2_m0 0 0>,
+                 <&mu2_m0 0 1>,
+                 <&mu2_m0 1 0>;
+        memory-region = <&encoder2_boot>, <&encoder2_rpc>;
+      };
+    };
+
+...