diff mbox series

[2/2] media: dt-bindings: media: venus: Add sdm660 DT schema

Message ID 20210115185252.333562-3-angelogioacchino.delregno@somainline.org
State New
Headers show
Series SDM630/660 Venus hardware video decoder/encoder | expand

Commit Message

AngeloGioacchino Del Regno Jan. 15, 2021, 6:52 p.m. UTC
Add new qcom,sdm660-venus DT binding schema.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
---
 .../bindings/media/qcom,sdm660-venus.yaml     | 164 ++++++++++++++++++
 1 file changed, 164 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml

base-commit: 012bd807cf654b992cdc4db7eab85c1e95f9d571
prerequisite-patch-id: 734bdefdb043a8f91a48916246cc9a36fb5966e5
prerequisite-patch-id: 999517c02973237996492a41ed5bfc2990083932
prerequisite-patch-id: a48910425fac61948a7a26bec4d40d63e3368569
prerequisite-patch-id: b1a1a4216eed0d04dd16e6e8e1053dee185d06d8
prerequisite-patch-id: dff12be2631cc21ef1c3c930fba49d979f5055fe

Comments

AngeloGioacchino Del Regno Jan. 18, 2021, 5:48 p.m. UTC | #1
Il 18/01/21 18:21, Stanimir Varbanov ha scritto:
> 

> 

> On 1/17/21 9:23 PM, AngeloGioacchino Del Regno wrote:

>> Il 17/01/21 16:45, Rob Herring ha scritto:

>>> On Fri, 15 Jan 2021 19:52:52 +0100, AngeloGioacchino Del Regno wrote:

>>>> Add new qcom,sdm660-venus DT binding schema.

>>>>

>>>> Signed-off-by: AngeloGioacchino Del Regno

>>>> <angelogioacchino.delregno@somainline.org>

>>>> ---

>>>>    .../bindings/media/qcom,sdm660-venus.yaml     | 164 ++++++++++++++++++

>>>>    1 file changed, 164 insertions(+)

>>>>    create mode 100644

>>>> Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml

>>>>

>>>> base-commit: 012bd807cf654b992cdc4db7eab85c1e95f9d571

>>>> prerequisite-patch-id: 734bdefdb043a8f91a48916246cc9a36fb5966e5

>>>> prerequisite-patch-id: 999517c02973237996492a41ed5bfc2990083932

>>>> prerequisite-patch-id: a48910425fac61948a7a26bec4d40d63e3368569

>>>> prerequisite-patch-id: b1a1a4216eed0d04dd16e6e8e1053dee185d06d8

>>>> prerequisite-patch-id: dff12be2631cc21ef1c3c930fba49d979f5055fe

>>>>

>>>

>>> My bot found errors running 'make dt_binding_check' on your patch:

>>>

>>> yamllint warnings/errors:

>>>

>>> dtschema/dtc warnings/errors:

>>> Documentation/devicetree/bindings/media/qcom,sdm660-venus.example.dts:20:18:

>>> fatal error: dt-bindings/clock/qcom,mmcc-sdm660.h: No such file or

>>> directory

>>>      20 |         #include <dt-bindings/clock/qcom,mmcc-sdm660.h>

>>>         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>>> compilation terminated.

>>> make[1]: *** [scripts/Makefile.lib:344:

>>> Documentation/devicetree/bindings/media/qcom,sdm660-venus.example.dt.yaml]

>>> Error 1

>>> make[1]: *** Waiting for unfinished jobs....

>>> make: *** [Makefile:1370: dt_binding_check] Error 2

>>>

>>> See https://patchwork.ozlabs.org/patch/1427279

>>>

>>> 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.

>>>

>>

>> Yes, because this depends on the commits that are mentioned in the tags.

>> Is there any better way to add a dependency on another patch series?

>>

> 

> What is the status of mmcc-sdm660 clk driver? I guess we have to

> postpone this until clock driver is ready for merge?

> 


I have sent it already, the driver is waiting for review...

By the way, this is not the only driver that I've sent that is getting
postponed because of that and I knew that this one would've had the same
destiny, but I thought to send everything "before I forget" pieces here
and there.

Of course I understand that everyone's time is limited, this is not a
rant at all!

Thanks for your review!

>> - Angelo

>
Rob Herring (Arm) Jan. 19, 2021, 11:17 p.m. UTC | #2
On Fri, Jan 15, 2021 at 07:52:52PM +0100, AngeloGioacchino Del Regno wrote:
> Add new qcom,sdm660-venus DT binding schema.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
> ---
>  .../bindings/media/qcom,sdm660-venus.yaml     | 164 ++++++++++++++++++
>  1 file changed, 164 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml
> 
> base-commit: 012bd807cf654b992cdc4db7eab85c1e95f9d571
> prerequisite-patch-id: 734bdefdb043a8f91a48916246cc9a36fb5966e5
> prerequisite-patch-id: 999517c02973237996492a41ed5bfc2990083932
> prerequisite-patch-id: a48910425fac61948a7a26bec4d40d63e3368569
> prerequisite-patch-id: b1a1a4216eed0d04dd16e6e8e1053dee185d06d8
> prerequisite-patch-id: dff12be2631cc21ef1c3c930fba49d979f5055fe
> 
> diff --git a/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml
> new file mode 100644
> index 000000000000..e7568d4007af
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml
> @@ -0,0 +1,164 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/media/qcom,sdm660-venus.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Qualcomm Venus video encode and decode accelerators
> +
> +maintainers:
> +  - Stanimir Varbanov <stanimir.varbanov@linaro.org>
> +
> +description: |
> +  The Venus IP is a video encode and decode accelerator present
> +  on Qualcomm platforms
> +
> +properties:
> +  compatible:
> +    const: qcom,sdm660-venus
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 5
> +
> +  clock-names:
> +    items:
> +      - const: core
> +      - const: iface
> +      - const: bus
> +      - const: bus_throttle
> +      - const: vcodec0_core
> +
> +  interconnects:
> +    maxItems: 2
> +
> +  interconnect-names:
> +    items:
> +      - const: video-mem
> +      - const: cpu-cfg
> +
> +  iommus:
> +    maxItems: 20

Perhaps some explanation as to what all these are. Looks like it is just 
1 iommu, but lots of ids?

> +
> +  memory-region:
> +    maxItems: 1
> +
> +  power-domains:
> +    minItems: 3
> +
> +  power-domain-names:
> +    items:
> +      - const: cx
> +      - const: vcodec0
> +      - const: venus
> +
> +  video-decoder:
> +    type: object
> +
> +    properties:
> +      compatible:
> +        const: venus-decoder
> +
> +    required:
> +      - compatible
> +
> +    additionalProperties: false
> +
> +  video-encoder:
> +    type: object
> +
> +    properties:
> +      compatible:
> +        const: venus-encoder
> +
> +    required:
> +      - compatible
> +
> +    additionalProperties: false
> +
> +  video-firmware:
> +    type: object
> +
> +    description: |
> +      Firmware subnode is needed when the platform does not
> +      have TrustZone.
> +
> +    properties:
> +      iommus:
> +        maxItems: 2
> +
> +    required:
> +      - iommus
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - power-domains
> +  - power-domain-names
> +  - clocks
> +  - clock-names
> +  - iommus
> +  - memory-region
> +  - video-decoder
> +  - video-encoder
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +        #include <dt-bindings/interrupt-controller/arm-gic.h>
> +        #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
> +        #include <dt-bindings/power/qcom-rpmpd.h>
> +
> +        video-codec@cc00000 {
> +                compatible = "qcom,sdm660-venus";
> +                reg = <0x0cc00000 0xff000>;
> +                interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
> +                power-domains = <&rpmpd SDM660_VDDCX>,
> +                                <&mmcc VENUS_CORE0_GDSC>,
> +                                <&mmcc VENUS_GDSC>;
> +                power-domain-names = "cx", "vcodec0", "venus";
> +                clocks = <&mmcc VIDEO_CORE_CLK>,
> +                         <&mmcc VIDEO_AHB_CLK>,
> +                         <&mmcc VIDEO_AXI_CLK>,
> +                         <&mmcc THROTTLE_VIDEO_AXI_CLK>,
> +                         <&mmcc VIDEO_SUBCORE0_CLK>;
> +                clock-names = "core", "iface", "bus", "bus_throttle",
> +                              "vcodec0_core";
> +                iommus = <&mmss_smmu 0x400>,
> +                         <&mmss_smmu 0x401>,
> +                         <&mmss_smmu 0x40a>,
> +                         <&mmss_smmu 0x407>,
> +                         <&mmss_smmu 0x40e>,
> +                         <&mmss_smmu 0x40f>,
> +                         <&mmss_smmu 0x408>,
> +                         <&mmss_smmu 0x409>,
> +                         <&mmss_smmu 0x40b>,
> +                         <&mmss_smmu 0x40c>,
> +                         <&mmss_smmu 0x40d>,
> +                         <&mmss_smmu 0x410>,
> +                         <&mmss_smmu 0x421>,
> +                         <&mmss_smmu 0x428>,
> +                         <&mmss_smmu 0x429>,
> +                         <&mmss_smmu 0x42b>,
> +                         <&mmss_smmu 0x42c>,
> +                         <&mmss_smmu 0x42d>,
> +                         <&mmss_smmu 0x411>,
> +                         <&mmss_smmu 0x431>;
> +                memory-region = <&venus_region>;
> +
> +                video-decoder {
> +                        compatible = "venus-decoder";
> +                };
> +
> +                video-encoder {
> +                        compatible = "venus-encoder";
> +                };
> +        };
> -- 
> 2.29.2
>
AngeloGioacchino Del Regno Jan. 19, 2021, 11:19 p.m. UTC | #3
Il 20/01/21 00:17, Rob Herring ha scritto:
> On Fri, Jan 15, 2021 at 07:52:52PM +0100, AngeloGioacchino Del Regno wrote:
>> Add new qcom,sdm660-venus DT binding schema.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
>> ---
>>   .../bindings/media/qcom,sdm660-venus.yaml     | 164 ++++++++++++++++++
>>   1 file changed, 164 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml
>>
>> base-commit: 012bd807cf654b992cdc4db7eab85c1e95f9d571
>> prerequisite-patch-id: 734bdefdb043a8f91a48916246cc9a36fb5966e5
>> prerequisite-patch-id: 999517c02973237996492a41ed5bfc2990083932
>> prerequisite-patch-id: a48910425fac61948a7a26bec4d40d63e3368569
>> prerequisite-patch-id: b1a1a4216eed0d04dd16e6e8e1053dee185d06d8
>> prerequisite-patch-id: dff12be2631cc21ef1c3c930fba49d979f5055fe
>>
>> diff --git a/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml
>> new file mode 100644
>> index 000000000000..e7568d4007af
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml
>> @@ -0,0 +1,164 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +
>> +%YAML 1.2
>> +---
>> +$id: "http://devicetree.org/schemas/media/qcom,sdm660-venus.yaml#"
>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
>> +
>> +title: Qualcomm Venus video encode and decode accelerators
>> +
>> +maintainers:
>> +  - Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> +
>> +description: |
>> +  The Venus IP is a video encode and decode accelerator present
>> +  on Qualcomm platforms
>> +
>> +properties:
>> +  compatible:
>> +    const: qcom,sdm660-venus
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    maxItems: 5
>> +
>> +  clock-names:
>> +    items:
>> +      - const: core
>> +      - const: iface
>> +      - const: bus
>> +      - const: bus_throttle
>> +      - const: vcodec0_core
>> +
>> +  interconnects:
>> +    maxItems: 2
>> +
>> +  interconnect-names:
>> +    items:
>> +      - const: video-mem
>> +      - const: cpu-cfg
>> +
>> +  iommus:
>> +    maxItems: 20
> 
> Perhaps some explanation as to what all these are. Looks like it is just
> 1 iommu, but lots of ids?
> 

Sincerely? I have no idea. These are all of the non-secure IDs that
are used downstream, but as you can imagine, there is zero documentation
about them.

Though, that's what works and that's what I've pushed... that's all :\

>> +
>> +  memory-region:
>> +    maxItems: 1
>> +
>> +  power-domains:
>> +    minItems: 3
>> +
>> +  power-domain-names:
>> +    items:
>> +      - const: cx
>> +      - const: vcodec0
>> +      - const: venus
>> +
>> +  video-decoder:
>> +    type: object
>> +
>> +    properties:
>> +      compatible:
>> +        const: venus-decoder
>> +
>> +    required:
>> +      - compatible
>> +
>> +    additionalProperties: false
>> +
>> +  video-encoder:
>> +    type: object
>> +
>> +    properties:
>> +      compatible:
>> +        const: venus-encoder
>> +
>> +    required:
>> +      - compatible
>> +
>> +    additionalProperties: false
>> +
>> +  video-firmware:
>> +    type: object
>> +
>> +    description: |
>> +      Firmware subnode is needed when the platform does not
>> +      have TrustZone.
>> +
>> +    properties:
>> +      iommus:
>> +        maxItems: 2
>> +
>> +    required:
>> +      - iommus
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupts
>> +  - power-domains
>> +  - power-domain-names
>> +  - clocks
>> +  - clock-names
>> +  - iommus
>> +  - memory-region
>> +  - video-decoder
>> +  - video-encoder
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +        #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +        #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
>> +        #include <dt-bindings/power/qcom-rpmpd.h>
>> +
>> +        video-codec@cc00000 {
>> +                compatible = "qcom,sdm660-venus";
>> +                reg = <0x0cc00000 0xff000>;
>> +                interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
>> +                power-domains = <&rpmpd SDM660_VDDCX>,
>> +                                <&mmcc VENUS_CORE0_GDSC>,
>> +                                <&mmcc VENUS_GDSC>;
>> +                power-domain-names = "cx", "vcodec0", "venus";
>> +                clocks = <&mmcc VIDEO_CORE_CLK>,
>> +                         <&mmcc VIDEO_AHB_CLK>,
>> +                         <&mmcc VIDEO_AXI_CLK>,
>> +                         <&mmcc THROTTLE_VIDEO_AXI_CLK>,
>> +                         <&mmcc VIDEO_SUBCORE0_CLK>;
>> +                clock-names = "core", "iface", "bus", "bus_throttle",
>> +                              "vcodec0_core";
>> +                iommus = <&mmss_smmu 0x400>,
>> +                         <&mmss_smmu 0x401>,
>> +                         <&mmss_smmu 0x40a>,
>> +                         <&mmss_smmu 0x407>,
>> +                         <&mmss_smmu 0x40e>,
>> +                         <&mmss_smmu 0x40f>,
>> +                         <&mmss_smmu 0x408>,
>> +                         <&mmss_smmu 0x409>,
>> +                         <&mmss_smmu 0x40b>,
>> +                         <&mmss_smmu 0x40c>,
>> +                         <&mmss_smmu 0x40d>,
>> +                         <&mmss_smmu 0x410>,
>> +                         <&mmss_smmu 0x421>,
>> +                         <&mmss_smmu 0x428>,
>> +                         <&mmss_smmu 0x429>,
>> +                         <&mmss_smmu 0x42b>,
>> +                         <&mmss_smmu 0x42c>,
>> +                         <&mmss_smmu 0x42d>,
>> +                         <&mmss_smmu 0x411>,
>> +                         <&mmss_smmu 0x431>;
>> +                memory-region = <&venus_region>;
>> +
>> +                video-decoder {
>> +                        compatible = "venus-decoder";
>> +                };
>> +
>> +                video-encoder {
>> +                        compatible = "venus-encoder";
>> +                };
>> +        };
>> -- 
>> 2.29.2
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml
new file mode 100644
index 000000000000..e7568d4007af
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml
@@ -0,0 +1,164 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/media/qcom,sdm660-venus.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Venus video encode and decode accelerators
+
+maintainers:
+  - Stanimir Varbanov <stanimir.varbanov@linaro.org>
+
+description: |
+  The Venus IP is a video encode and decode accelerator present
+  on Qualcomm platforms
+
+properties:
+  compatible:
+    const: qcom,sdm660-venus
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 5
+
+  clock-names:
+    items:
+      - const: core
+      - const: iface
+      - const: bus
+      - const: bus_throttle
+      - const: vcodec0_core
+
+  interconnects:
+    maxItems: 2
+
+  interconnect-names:
+    items:
+      - const: video-mem
+      - const: cpu-cfg
+
+  iommus:
+    maxItems: 20
+
+  memory-region:
+    maxItems: 1
+
+  power-domains:
+    minItems: 3
+
+  power-domain-names:
+    items:
+      - const: cx
+      - const: vcodec0
+      - const: venus
+
+  video-decoder:
+    type: object
+
+    properties:
+      compatible:
+        const: venus-decoder
+
+    required:
+      - compatible
+
+    additionalProperties: false
+
+  video-encoder:
+    type: object
+
+    properties:
+      compatible:
+        const: venus-encoder
+
+    required:
+      - compatible
+
+    additionalProperties: false
+
+  video-firmware:
+    type: object
+
+    description: |
+      Firmware subnode is needed when the platform does not
+      have TrustZone.
+
+    properties:
+      iommus:
+        maxItems: 2
+
+    required:
+      - iommus
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - power-domains
+  - power-domain-names
+  - clocks
+  - clock-names
+  - iommus
+  - memory-region
+  - video-decoder
+  - video-encoder
+
+additionalProperties: false
+
+examples:
+  - |
+        #include <dt-bindings/interrupt-controller/arm-gic.h>
+        #include <dt-bindings/clock/qcom,mmcc-sdm660.h>
+        #include <dt-bindings/power/qcom-rpmpd.h>
+
+        video-codec@cc00000 {
+                compatible = "qcom,sdm660-venus";
+                reg = <0x0cc00000 0xff000>;
+                interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+                power-domains = <&rpmpd SDM660_VDDCX>,
+                                <&mmcc VENUS_CORE0_GDSC>,
+                                <&mmcc VENUS_GDSC>;
+                power-domain-names = "cx", "vcodec0", "venus";
+                clocks = <&mmcc VIDEO_CORE_CLK>,
+                         <&mmcc VIDEO_AHB_CLK>,
+                         <&mmcc VIDEO_AXI_CLK>,
+                         <&mmcc THROTTLE_VIDEO_AXI_CLK>,
+                         <&mmcc VIDEO_SUBCORE0_CLK>;
+                clock-names = "core", "iface", "bus", "bus_throttle",
+                              "vcodec0_core";
+                iommus = <&mmss_smmu 0x400>,
+                         <&mmss_smmu 0x401>,
+                         <&mmss_smmu 0x40a>,
+                         <&mmss_smmu 0x407>,
+                         <&mmss_smmu 0x40e>,
+                         <&mmss_smmu 0x40f>,
+                         <&mmss_smmu 0x408>,
+                         <&mmss_smmu 0x409>,
+                         <&mmss_smmu 0x40b>,
+                         <&mmss_smmu 0x40c>,
+                         <&mmss_smmu 0x40d>,
+                         <&mmss_smmu 0x410>,
+                         <&mmss_smmu 0x421>,
+                         <&mmss_smmu 0x428>,
+                         <&mmss_smmu 0x429>,
+                         <&mmss_smmu 0x42b>,
+                         <&mmss_smmu 0x42c>,
+                         <&mmss_smmu 0x42d>,
+                         <&mmss_smmu 0x411>,
+                         <&mmss_smmu 0x431>;
+                memory-region = <&venus_region>;
+
+                video-decoder {
+                        compatible = "venus-decoder";
+                };
+
+                video-encoder {
+                        compatible = "venus-encoder";
+                };
+        };