* [PATCH v5 1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required
@ 2024-04-17 15:24 Frank Li
2024-04-17 15:24 ` [PATCH v5 2/2] dt-bindings: dma: fsl-edma: allow 'power-domains' property Frank Li
2024-04-25 9:17 ` [PATCH v5 1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required Vinod Koul
0 siblings, 2 replies; 4+ messages in thread
From: Frank Li @ 2024-04-17 15:24 UTC (permalink / raw)
To: robh
Cc: 20240409185416.2224609-1-Frank.Li, Frank.Li, conor+dt,
devicetree, dmaengine, imx, krzk, krzysztof.kozlowski+dt,
linux-kernel, pankaj.gupta, peng.fan, shengjiu.wang,
shenwei.wang, vkoul, xu.yang_2
fsl,imx8qm-adma and fsl,imx8qm-edma don't require 'clocks'. Remove it from
required and add 'if' block for other compatible string to keep the same
restrictions.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Notes:
Change from v4 to v5
- none
Change from v3 to v4
- fixed '\t' during fix conflicts.
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 dt_binding_check DT_SCHEMA_FILES=fsl,edma.yaml
LINT Documentation/devicetree/bindings
DTEX Documentation/devicetree/bindings/dma/fsl,edma.example.dts
CHKDT Documentation/devicetree/bindings/processed-schema.json
SCHEMA Documentation/devicetree/bindings/processed-schema.json
DTC_CHK Documentation/devicetree/bindings/dma/fsl,edma.example.dtb
Change from v2 to v3
- rebase to dmaengine/next, fixed conflicts
Change from v1 to v2
- add Krzysztof's ACK.
.../devicetree/bindings/dma/fsl,edma.yaml | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
index 825f4715499e5..fb5fbe4b9f9d4 100644
--- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
+++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
@@ -82,7 +82,6 @@ required:
- compatible
- reg
- interrupts
- - clocks
- dma-channels
allOf:
@@ -187,6 +186,22 @@ allOf:
"#dma-cells":
const: 3
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,vf610-edma
+ - fsl,imx7ulp-edma
+ - fsl,imx93-edma3
+ - fsl,imx93-edma4
+ - fsl,imx95-edma5
+ - fsl,imx8ulp-edma
+ - fsl,ls1028a-edma
+ then:
+ required:
+ - clocks
+
unevaluatedProperties: false
examples:
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v5 2/2] dt-bindings: dma: fsl-edma: allow 'power-domains' property
2024-04-17 15:24 [PATCH v5 1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required Frank Li
@ 2024-04-17 15:24 ` Frank Li
2024-04-18 13:10 ` Rob Herring
2024-04-25 9:17 ` [PATCH v5 1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required Vinod Koul
1 sibling, 1 reply; 4+ messages in thread
From: Frank Li @ 2024-04-17 15:24 UTC (permalink / raw)
To: robh
Cc: 20240409185416.2224609-1-Frank.Li, Frank.Li, conor+dt,
devicetree, dmaengine, imx, krzk, krzysztof.kozlowski+dt,
linux-kernel, pankaj.gupta, peng.fan, shengjiu.wang,
shenwei.wang, vkoul, xu.yang_2
Allow 'power-domains' property because i.MX8DXL i.MX8QM and i.MX8QXP need
it. EDMA supports each power-domain for each dma channel. So minItems and
maxItems align 'dma-channels'.
Change fsl,imx93-edma3 example to fsl,imx8qm-edma to reflect this variants.
Fixed below DTB_CHECK warning:
dma-controller@599f0000: Unevaluated properties are not allowed ('power-domains' was unexpected)
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Notes:
Change from v4 to v5
- Add description according to rob's suggest.
"The number of power domains matches the number of channels, arranged
in ascending order according to their associated DMA channels."
Change from v3 to v4
- Remove 'contains' change should be belong to first patch when rebase.
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 dt_binding_check DT_SCHEMA_FILES=fsl,edma.yaml
LINT Documentation/devicetree/bindings
DTEX Documentation/devicetree/bindings/dma/fsl,edma.example.dts
CHKDT Documentation/devicetree/bindings/processed-schema.json
SCHEMA Documentation/devicetree/bindings/processed-schema.json
DTC_CHK Documentation/devicetree/bindings/dma/fsl,edma.example.dtb
After this patch no warning for imx8dxl-evk.dtb.
touch arch/arm64/boot/dts/freescale/imx8dxl.dtsi
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 CHECK_DTBS=y freescale/imx8dxl-evk.dtb
DTC_CHK arch/arm64/boot/dts/freescale/imx8dxl-evk.dtb
Change from v2 to v3
- set 'power-domains' false for other compatitble string
- change imx93 example to 8qm example to affect this change according to
Krzysztof Kozlowski's suggestion, choose least channel number edma
instance to reduce code copy. max channel number is 64.
- Rebase to latest dmaengine/next, fixes conflicts.
Change from v1 to v2
- using maxitem: 64. Each channel have one power domain. Max 64 dmachannel.
- add power-domains to 'required' when compatible string is fsl,imx8qm-adma
or fsl,imx8qm-edma
.../devicetree/bindings/dma/fsl,edma.yaml | 80 ++++++++++---------
1 file changed, 42 insertions(+), 38 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
index fb5fbe4b9f9d4..f624961223f34 100644
--- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
+++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
@@ -71,6 +71,13 @@ properties:
minItems: 1
maxItems: 33
+ power-domains:
+ description:
+ The number of power domains matches the number of channels, arranged
+ in ascending order according to their associated DMA channels.
+ minItems: 1
+ maxItems: 64
+
big-endian:
description: |
If present registers and hardware scatter/gather descriptors of the
@@ -202,6 +209,20 @@ allOf:
required:
- clocks
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx8qm-adma
+ - fsl,imx8qm-edma
+ then:
+ required:
+ - power-domains
+ else:
+ properties:
+ power-domains: false
+
unevaluatedProperties: false
examples:
@@ -257,44 +278,27 @@ examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
- #include <dt-bindings/clock/imx93-clock.h>
+ #include <dt-bindings/firmware/imx/rsrc.h>
- dma-controller@44000000 {
- compatible = "fsl,imx93-edma3";
- reg = <0x44000000 0x200000>;
+ dma-controller@5a9f0000 {
+ compatible = "fsl,imx8qm-edma";
+ reg = <0x5a9f0000 0x90000>;
#dma-cells = <3>;
- dma-channels = <31>;
- interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX93_CLK_EDMA1_GATE>;
- clock-names = "dma";
+ dma-channels = <8>;
+ interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&pd IMX_SC_R_DMA_3_CH0>,
+ <&pd IMX_SC_R_DMA_3_CH1>,
+ <&pd IMX_SC_R_DMA_3_CH2>,
+ <&pd IMX_SC_R_DMA_3_CH3>,
+ <&pd IMX_SC_R_DMA_3_CH4>,
+ <&pd IMX_SC_R_DMA_3_CH5>,
+ <&pd IMX_SC_R_DMA_3_CH6>,
+ <&pd IMX_SC_R_DMA_3_CH7>;
};
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v5 2/2] dt-bindings: dma: fsl-edma: allow 'power-domains' property
2024-04-17 15:24 ` [PATCH v5 2/2] dt-bindings: dma: fsl-edma: allow 'power-domains' property Frank Li
@ 2024-04-18 13:10 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2024-04-18 13:10 UTC (permalink / raw)
To: Frank Li
Cc: vkoul, pankaj.gupta, 20240409185416.2224609-1-Frank.Li,
shenwei.wang, xu.yang_2, shengjiu.wang, devicetree,
krzysztof.kozlowski+dt, krzk, linux-kernel, peng.fan, imx,
conor+dt, dmaengine
On Wed, 17 Apr 2024 11:24:57 -0400, Frank Li wrote:
> Allow 'power-domains' property because i.MX8DXL i.MX8QM and i.MX8QXP need
> it. EDMA supports each power-domain for each dma channel. So minItems and
> maxItems align 'dma-channels'.
>
> Change fsl,imx93-edma3 example to fsl,imx8qm-edma to reflect this variants.
>
> Fixed below DTB_CHECK warning:
> dma-controller@599f0000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>
> Notes:
> Change from v4 to v5
> - Add description according to rob's suggest.
>
> "The number of power domains matches the number of channels, arranged
> in ascending order according to their associated DMA channels."
>
> Change from v3 to v4
> - Remove 'contains' change should be belong to first patch when rebase.
>
> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 dt_binding_check DT_SCHEMA_FILES=fsl,edma.yaml
> LINT Documentation/devicetree/bindings
> DTEX Documentation/devicetree/bindings/dma/fsl,edma.example.dts
> CHKDT Documentation/devicetree/bindings/processed-schema.json
> SCHEMA Documentation/devicetree/bindings/processed-schema.json
> DTC_CHK Documentation/devicetree/bindings/dma/fsl,edma.example.dtb
>
> After this patch no warning for imx8dxl-evk.dtb.
>
> touch arch/arm64/boot/dts/freescale/imx8dxl.dtsi
> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 CHECK_DTBS=y freescale/imx8dxl-evk.dtb
> DTC_CHK arch/arm64/boot/dts/freescale/imx8dxl-evk.dtb
>
> Change from v2 to v3
> - set 'power-domains' false for other compatitble string
> - change imx93 example to 8qm example to affect this change according to
> Krzysztof Kozlowski's suggestion, choose least channel number edma
> instance to reduce code copy. max channel number is 64.
>
> - Rebase to latest dmaengine/next, fixes conflicts.
>
> Change from v1 to v2
> - using maxitem: 64. Each channel have one power domain. Max 64 dmachannel.
> - add power-domains to 'required' when compatible string is fsl,imx8qm-adma
> or fsl,imx8qm-edma
>
> .../devicetree/bindings/dma/fsl,edma.yaml | 80 ++++++++++---------
> 1 file changed, 42 insertions(+), 38 deletions(-)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v5 1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required
2024-04-17 15:24 [PATCH v5 1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required Frank Li
2024-04-17 15:24 ` [PATCH v5 2/2] dt-bindings: dma: fsl-edma: allow 'power-domains' property Frank Li
@ 2024-04-25 9:17 ` Vinod Koul
1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2024-04-25 9:17 UTC (permalink / raw)
To: robh, Frank Li
Cc: 20240409185416.2224609-1-Frank.Li, conor+dt, devicetree,
dmaengine, imx, krzk, krzysztof.kozlowski+dt, linux-kernel,
pankaj.gupta, peng.fan, shengjiu.wang, shenwei.wang, xu.yang_2
On Wed, 17 Apr 2024 11:24:56 -0400, Frank Li wrote:
> fsl,imx8qm-adma and fsl,imx8qm-edma don't require 'clocks'. Remove it from
> required and add 'if' block for other compatible string to keep the same
> restrictions.
>
>
Applied, thanks!
[1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required
commit: 9c21bbfa30ec14f8dcf24e7f26fe72368960975c
[2/2] dt-bindings: dma: fsl-edma: allow 'power-domains' property
commit: 167ec660c247ea4c71a059290b50c100659d6e86
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-25 9:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 15:24 [PATCH v5 1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required Frank Li
2024-04-17 15:24 ` [PATCH v5 2/2] dt-bindings: dma: fsl-edma: allow 'power-domains' property Frank Li
2024-04-18 13:10 ` Rob Herring
2024-04-25 9:17 ` [PATCH v5 1/2] dt-bindings: dma: fsl-edma: remove 'clocks' from required Vinod Koul
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).