* [PATCH] media: dt-bindings: convert CODA VPU bindings to yaml
@ 2020-09-22 12:00 Philipp Zabel
2020-09-22 16:16 ` Rob Herring
2020-09-22 16:21 ` Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Philipp Zabel @ 2020-09-22 12:00 UTC (permalink / raw)
To: linux-media; +Cc: Rob Herring, devicetree, kernel
Convert to YAML, add missing "fsl,imx6dl-vpu", "cnm,coda960"
compatible, and specify the power-domain property for i.MX6.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
.../devicetree/bindings/media/coda.txt | 31 -----
.../devicetree/bindings/media/coda.yaml | 109 ++++++++++++++++++
MAINTAINERS | 2 +-
3 files changed, 110 insertions(+), 32 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/media/coda.txt
create mode 100644 Documentation/devicetree/bindings/media/coda.yaml
diff --git a/Documentation/devicetree/bindings/media/coda.txt b/Documentation/devicetree/bindings/media/coda.txt
deleted file mode 100644
index 90eb74cc1993..000000000000
--- a/Documentation/devicetree/bindings/media/coda.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Chips&Media Coda multi-standard codec IP
-========================================
-
-Coda codec IPs are present in i.MX SoCs in various versions,
-called VPU (Video Processing Unit).
-
-Required properties:
-- compatible : should be "fsl,<chip>-src" for i.MX SoCs:
- (a) "fsl,imx27-vpu" for CodaDx6 present in i.MX27
- (b) "fsl,imx51-vpu" for CodaHx4 present in i.MX51
- (c) "fsl,imx53-vpu" for CODA7541 present in i.MX53
- (d) "fsl,imx6q-vpu" for CODA960 present in i.MX6q
-- reg: should be register base and length as documented in the
- SoC reference manual
-- interrupts : Should contain the VPU interrupt. For CODA960,
- a second interrupt is needed for the MJPEG unit.
-- clocks : Should contain the ahb and per clocks, in the order
- determined by the clock-names property.
-- clock-names : Should be "ahb", "per"
-- iram : phandle pointing to the SRAM device node
-
-Example:
-
-vpu: vpu@63ff4000 {
- compatible = "fsl,imx53-vpu";
- reg = <0x63ff4000 0x1000>;
- interrupts = <9>;
- clocks = <&clks 63>, <&clks 63>;
- clock-names = "ahb", "per";
- iram = <&ocram>;
-};
diff --git a/Documentation/devicetree/bindings/media/coda.yaml b/Documentation/devicetree/bindings/media/coda.yaml
new file mode 100644
index 000000000000..c32415b46761
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/coda.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/coda.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Chips&Media Coda multi-standard codec IP
+
+maintainers:
+ - Philipp Zabel <p.zabel@pengutronix.de>
+
+description: |-
+ Coda codec IPs are present in i.MX SoCs in various versions,
+ called VPU (Video Processing Unit).
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - const: fsl,imx27-vpu
+ - const: cnm,codadx6
+ - items:
+ - const: fsl,imx51-vpu
+ - const: cnm,codahx4
+ - items:
+ - const: fsl,imx53-vpu
+ - const: cnm,coda7541
+ - items:
+ - enum:
+ - fsl,imx6dl-vpu
+ - fsl,imx6q-vpu
+ - const: cnm,coda960
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: PER clock
+ - description: AHB interface clock
+
+ clock-names:
+ items:
+ - const: per
+ - const: ahb
+
+ resets:
+ maxItems: 1
+
+ iram:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: phandle pointing to the SRAM device node
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: cnm,coda960
+ then:
+ properties:
+ interrupts:
+ items:
+ - description: BIT processor interrupt
+ - description: JPEG unit interrupt
+
+ interrupt-names:
+ items:
+ - const: bit
+ - const: jpeg
+ else:
+ properties:
+ interrupts:
+ items:
+ - description: BIT processor interrupt
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx6dl-vpu
+ - fsl,imx6q-vpu
+ then:
+ properties:
+ power-domains:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: phandle pointing to the PU power domain
+ maxItems: 1
+
+examples:
+ - |
+ vpu: video-codec@63ff4000 {
+ compatible = "fsl,imx53-vpu", "cnm,coda7541";
+ reg = <0x63ff4000 0x1000>;
+ interrupts = <9>;
+ clocks = <&clks 63>, <&clks 63>;
+ clock-names = "ahb", "per";
+ iram = <&ocram>;
+ };
+
diff --git a/MAINTAINERS b/MAINTAINERS
index d3126fc2cca2..01be39a3265e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4332,7 +4332,7 @@ CODA V4L2 MEM2MEM DRIVER
M: Philipp Zabel <p.zabel@pengutronix.de>
L: linux-media@vger.kernel.org
S: Maintained
-F: Documentation/devicetree/bindings/media/coda.txt
+F: Documentation/devicetree/bindings/media/coda.yaml
F: drivers/media/platform/coda/
CODE OF CONDUCT
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: dt-bindings: convert CODA VPU bindings to yaml
2020-09-22 12:00 [PATCH] media: dt-bindings: convert CODA VPU bindings to yaml Philipp Zabel
@ 2020-09-22 16:16 ` Rob Herring
2020-09-22 16:21 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-09-22 16:16 UTC (permalink / raw)
To: Philipp Zabel; +Cc: linux-media, kernel, Rob Herring, devicetree
On Tue, 22 Sep 2020 14:00:07 +0200, Philipp Zabel wrote:
> Convert to YAML, add missing "fsl,imx6dl-vpu", "cnm,coda960"
> compatible, and specify the power-domain property for i.MX6.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> .../devicetree/bindings/media/coda.txt | 31 -----
> .../devicetree/bindings/media/coda.yaml | 109 ++++++++++++++++++
> MAINTAINERS | 2 +-
> 3 files changed, 110 insertions(+), 32 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/media/coda.txt
> create mode 100644 Documentation/devicetree/bindings/media/coda.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/coda.example.dt.yaml: video-codec@63ff4000: clock-names:0: 'per' was expected
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/coda.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/coda.example.dt.yaml: video-codec@63ff4000: clock-names:1: 'ahb' was expected
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/coda.yaml
See https://patchwork.ozlabs.org/patch/1369025
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:
pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: dt-bindings: convert CODA VPU bindings to yaml
2020-09-22 12:00 [PATCH] media: dt-bindings: convert CODA VPU bindings to yaml Philipp Zabel
2020-09-22 16:16 ` Rob Herring
@ 2020-09-22 16:21 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-09-22 16:21 UTC (permalink / raw)
To: Philipp Zabel; +Cc: linux-media, devicetree, kernel
On Tue, Sep 22, 2020 at 02:00:07PM +0200, Philipp Zabel wrote:
> Convert to YAML, add missing "fsl,imx6dl-vpu", "cnm,coda960"
Seems like a lot more cnm compatible additions than what's mentioned
here. I'm okay with some changes in the conversion which were
inconsistencies or errors, but just enumerate them here.
> compatible, and specify the power-domain property for i.MX6.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> .../devicetree/bindings/media/coda.txt | 31 -----
> .../devicetree/bindings/media/coda.yaml | 109 ++++++++++++++++++
> MAINTAINERS | 2 +-
> 3 files changed, 110 insertions(+), 32 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/media/coda.txt
> create mode 100644 Documentation/devicetree/bindings/media/coda.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/coda.txt b/Documentation/devicetree/bindings/media/coda.txt
> deleted file mode 100644
> index 90eb74cc1993..000000000000
> --- a/Documentation/devicetree/bindings/media/coda.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -Chips&Media Coda multi-standard codec IP
> -========================================
> -
> -Coda codec IPs are present in i.MX SoCs in various versions,
> -called VPU (Video Processing Unit).
> -
> -Required properties:
> -- compatible : should be "fsl,<chip>-src" for i.MX SoCs:
> - (a) "fsl,imx27-vpu" for CodaDx6 present in i.MX27
> - (b) "fsl,imx51-vpu" for CodaHx4 present in i.MX51
> - (c) "fsl,imx53-vpu" for CODA7541 present in i.MX53
> - (d) "fsl,imx6q-vpu" for CODA960 present in i.MX6q
> -- reg: should be register base and length as documented in the
> - SoC reference manual
> -- interrupts : Should contain the VPU interrupt. For CODA960,
> - a second interrupt is needed for the MJPEG unit.
> -- clocks : Should contain the ahb and per clocks, in the order
> - determined by the clock-names property.
> -- clock-names : Should be "ahb", "per"
> -- iram : phandle pointing to the SRAM device node
> -
> -Example:
> -
> -vpu: vpu@63ff4000 {
> - compatible = "fsl,imx53-vpu";
> - reg = <0x63ff4000 0x1000>;
> - interrupts = <9>;
> - clocks = <&clks 63>, <&clks 63>;
> - clock-names = "ahb", "per";
> - iram = <&ocram>;
> -};
> diff --git a/Documentation/devicetree/bindings/media/coda.yaml b/Documentation/devicetree/bindings/media/coda.yaml
> new file mode 100644
> index 000000000000..c32415b46761
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/coda.yaml
> @@ -0,0 +1,109 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/coda.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Chips&Media Coda multi-standard codec IP
> +
> +maintainers:
> + - Philipp Zabel <p.zabel@pengutronix.de>
> +
> +description: |-
> + Coda codec IPs are present in i.MX SoCs in various versions,
> + called VPU (Video Processing Unit).
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - const: fsl,imx27-vpu
> + - const: cnm,codadx6
> + - items:
> + - const: fsl,imx51-vpu
> + - const: cnm,codahx4
> + - items:
> + - const: fsl,imx53-vpu
> + - const: cnm,coda7541
> + - items:
> + - enum:
> + - fsl,imx6dl-vpu
> + - fsl,imx6q-vpu
> + - const: cnm,coda960
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + items:
> + - description: PER clock
> + - description: AHB interface clock
> +
> + clock-names:
> + items:
> + - const: per
> + - const: ahb
> +
> + resets:
> + maxItems: 1
> +
> + iram:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: phandle pointing to the SRAM device node
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: cnm,coda960
> + then:
> + properties:
> + interrupts:
> + items:
> + - description: BIT processor interrupt
> + - description: JPEG unit interrupt
> +
> + interrupt-names:
> + items:
> + - const: bit
> + - const: jpeg
> + else:
> + properties:
> + interrupts:
> + items:
> + - description: BIT processor interrupt
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - fsl,imx6dl-vpu
> + - fsl,imx6q-vpu
> + then:
> + properties:
> + power-domains:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: phandle pointing to the PU power domain
> + maxItems: 1
> +
> +examples:
> + - |
> + vpu: video-codec@63ff4000 {
> + compatible = "fsl,imx53-vpu", "cnm,coda7541";
> + reg = <0x63ff4000 0x1000>;
> + interrupts = <9>;
> + clocks = <&clks 63>, <&clks 63>;
> + clock-names = "ahb", "per";
> + iram = <&ocram>;
> + };
> +
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d3126fc2cca2..01be39a3265e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4332,7 +4332,7 @@ CODA V4L2 MEM2MEM DRIVER
> M: Philipp Zabel <p.zabel@pengutronix.de>
> L: linux-media@vger.kernel.org
> S: Maintained
> -F: Documentation/devicetree/bindings/media/coda.txt
> +F: Documentation/devicetree/bindings/media/coda.yaml
> F: drivers/media/platform/coda/
>
> CODE OF CONDUCT
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-22 16:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 12:00 [PATCH] media: dt-bindings: convert CODA VPU bindings to yaml Philipp Zabel
2020-09-22 16:16 ` Rob Herring
2020-09-22 16:21 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).