Skip to contentSkip to conversation

dt-bindings: dma: xilinx: Add power-domains to xlnx,zynqmp-dpdma

PATCH Applied Michal Simek 4 participants 5 messages May 12, 2023 – May 16, 2023

Subsystems (4)
lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

PATCH v3 1/1 dt-bindings: dma: xilinx: Add power-domains to xlnx,zynqmp-dpdma

DP DMA has own power domain that's why describe required power-domain property.

---

Changes in v3:
- make power-domains as required property
- also update commit message

Changes in v2:
- rewrite commit message - requested by Krzysztof

The commit b06112cd5e08 ("arm64: dts: zynqmp: Add power domain for the DisplayPort DMA controller") added this property already in Linux that's why the patch is also fixing dts_check warnings.

In v2 I got ack from Krzysztof but not adding it because of additional discussion about required property in v3.
https://lore.kernel.org/r/[email protected]

---
 .../devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml   | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml +6 -0
index d6cbd95ec26d..2128f4645c98 100644
@@ -41,6 +41,9 @@ properties:
   clock-names:
     const: axi_clk
 
+  power-domains:
+    maxItems: 1
+
 required:
   - "#dma-cells"
   - compatible
@@ -48,12 +51,14 @@ required:
   - interrupts
   - clocks
   - clock-names
+  - power-domains
 
 additionalProperties: false
 
 examples:
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/xlnx-zynqmp-power.h>
 
     dma: dma-controller@fd4c0000 {
       compatible = "xlnx,zynqmp-dpdma";
@@ -63,6 +68,7 @@ examples:
       clocks = <&dpdma_clk>;
       clock-names = "axi_clk";
       #dma-cells = <1>;
+      power-domains = <&zynqmp_firmware PD_DP>;
     };
 
 ...
Signature · 1 line
2.36.1
maintainer Reviewed-by on v3 1/1
#1 lore raw

Hi Michal,

Thank you for the patch.

Quoted 4 lines · Michal Simek

DP DMA has own power domain that's why describe required power-domain property.

Quoted 58 lines

---

Changes in v3:
- make power-domains as required property
- also update commit message

Changes in v2:
- rewrite commit message - requested by Krzysztof

The commit b06112cd5e08 ("arm64: dts: zynqmp: Add power domain for the DisplayPort DMA controller") added this property already in Linux that's why the patch is also fixing dts_check warnings.

In v2 I got ack from Krzysztof but not adding it because of additional discussion about required property in v3.
https://lore.kernel.org/r/[email protected]

---
 .../devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml   | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml +6 -0
index d6cbd95ec26d..2128f4645c98 100644
@@ -41,6 +41,9 @@ properties:
   clock-names:
     const: axi_clk
 
+  power-domains:
+    maxItems: 1
+
 required:
   - "#dma-cells"
   - compatible
@@ -48,12 +51,14 @@ required:
   - interrupts
   - clocks
   - clock-names
+  - power-domains
 
 additionalProperties: false
 
 examples:
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/xlnx-zynqmp-power.h>
 
     dma: dma-controller@fd4c0000 {
       compatible = "xlnx,zynqmp-dpdma";
@@ -63,6 +68,7 @@ examples:
       clocks = <&dpdma_clk>;
       clock-names = "axi_clk";
       #dma-cells = <1>;
+      power-domains = <&zynqmp_firmware PD_DP>;
     };
 
...
Signature · 3 lines
Regards,

Laurent Pinchart
Acked-by on v3 1/1
#2 lore raw
In reply to Michal Simek
Quoted 13 lines · Michal Simek

DP DMA has own power domain that's why describe required power-domain property.

---

Changes in v3:
- make power-domains as required property
- also update commit message

Changes in v2:
- rewrite commit message - requested by Krzysztof

Quoted 7 lines

The commit b06112cd5e08 ("arm64: dts: zynqmp: Add power domain for the DisplayPort DMA controller") added this property already in Linux that's why the patch is also fixing dts_check warnings.

In v2 I got ack from Krzysztof but not adding it because of additional discussion about required property in v3.
https://lore.kernel.org/r/[email protected]

It was not entirely clear reading that whether the driver actually functions correctly if the property is omitted.
Is it the case that if the property is omitted, and the power domain controller driver is enabled, that the dma controller will not operate correctly?
If I am understanding correctly, it very much does sound like it should be listed as required, so:

Thanks,
Conor.

Quoted 45 lines
---
 .../devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml   | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.yaml +6 -0
index d6cbd95ec26d..2128f4645c98 100644
@@ -41,6 +41,9 @@ properties:
   clock-names:
     const: axi_clk
 
+  power-domains:
+    maxItems: 1
+
 required:
   - "#dma-cells"
   - compatible
@@ -48,12 +51,14 @@ required:
   - interrupts
   - clocks
   - clock-names
+  - power-domains
 
 additionalProperties: false
 
 examples:
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/xlnx-zynqmp-power.h>
 
     dma: dma-controller@fd4c0000 {
       compatible = "xlnx,zynqmp-dpdma";
@@ -63,6 +68,7 @@ examples:
       clocks = <&dpdma_clk>;
       clock-names = "axi_clk";
       #dma-cells = <1>;
+      power-domains = <&zynqmp_firmware PD_DP>;
     };
 
...
Signature · 1 line
2.36.1
author maintainer
#3 lore raw
Quoted 22 lines · Conor Dooley
Quoted 13 lines · Michal Simek

DP DMA has own power domain that's why describe required power-domain property.

---

Changes in v3:
- make power-domains as required property
- also update commit message

Changes in v2:
- rewrite commit message - requested by Krzysztof

Quoted 7 lines

The commit b06112cd5e08 ("arm64: dts: zynqmp: Add power domain for the DisplayPort DMA controller") added this property already in Linux that's why the patch is also fixing dts_check warnings.

In v2 I got ack from Krzysztof but not adding it because of additional discussion about required property in v3.
https://lore.kernel.org/r/[email protected]

Quoted 8 lines

It was not entirely clear reading that whether the driver actually functions correctly if the property is omitted.
Is it the case that if the property is omitted, and the power domain controller driver is enabled, that the dma controller will not operate correctly?
If I am understanding correctly, it very much does sound like it should be listed as required, so:

As was discussed there are 3 things here. One thing is if property is required from simple description point of view. In silicon there is own power domain for pretty much every IP separately. The second if driver is using it. The third if power domains are enabled in the kernel configuration.

On our SOC pretty much we should look at every dt binding and make power-domains, smmus, etc all required because they are there (it is not said how exactly described but HW have them).

And SOC basic setup for 2nd/3rd point above. By default they are enabled and power domain driver has capability to disable it to save power.

Thanks,
Michal

maintainer Applied
#4 lore raw
In reply to Michal Simek
Quoted 2 lines · Michal Simek

DP DMA has own power domain that's why describe required power-domain property.

Applied, thanks

Signature · 1 line
~Vinod