diff mbox series

[06/11] dt-bindings: dma: stm32-dma3: introduce st,axi-max-burst-len property

Message ID 20241010-dma3-mp25-updates-v1-6-adf0633981ea@foss.st.com (mailing list archive)
State New, archived
Headers show
Series STM32 DMA3 updates for STM32MP25 | expand

Commit Message

Amelie Delaunay Oct. 10, 2024, 2:27 p.m. UTC
DMA3 maximum burst length (in unit of beat) may be restricted depending
on bus interconnect.

As mentionned in STM32MP2 reference manual [1], "the maximum allowed AXI
burst length is 16. The user must set [S|D]BL_1 lower or equal to 15
if the Source/Destination allocated port is AXI (if [S|D]AP=0)".

Introduce st,axi-max-burst-len. If used, it will clamp the burst length
to that value if AXI port is used, if not, the maximum burst length value
supported by DMA3 is used.

[1] https://www.st.com/resource/en/reference_manual/rm0457-stm32mp2325xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
 .../devicetree/bindings/dma/stm32/st,stm32-dma3.yaml          | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Rob Herring Oct. 10, 2024, 6:16 p.m. UTC | #1
On Thu, Oct 10, 2024 at 04:27:56PM +0200, Amelie Delaunay wrote:
> DMA3 maximum burst length (in unit of beat) may be restricted depending
> on bus interconnect.
> 
> As mentionned in STM32MP2 reference manual [1], "the maximum allowed AXI
> burst length is 16. The user must set [S|D]BL_1 lower or equal to 15
> if the Source/Destination allocated port is AXI (if [S|D]AP=0)".

This should be implied by the SoC specific compatible.

> 
> Introduce st,axi-max-burst-len. If used, it will clamp the burst length
> to that value if AXI port is used, if not, the maximum burst length value
> supported by DMA3 is used.
> 
> [1] https://www.st.com/resource/en/reference_manual/rm0457-stm32mp2325xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf
> 
> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
> ---
>  .../devicetree/bindings/dma/stm32/st,stm32-dma3.yaml          | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
> index 38c30271f732e0c8da48199a224a88bb647eeca7..90ad70bb24eb790afe72bf2085478fa4cec60b94 100644
> --- a/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
> +++ b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
> @@ -51,6 +51,16 @@ properties:
>    power-domains:
>      maxItems: 1
>  
> +  st,axi-max-burst-len:
> +    description: |
> +      Restrict AXI burst length in unit of beat by value specified in this property.
> +      The value specified in this property is clamped to the maximum burst length supported by DMA3.
> +      If this property is missing, the maximum burst length supported by DMA3 is used.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 1
> +    maximum: 256
> +    default: 64
> +
>    "#dma-cells":
>      const: 3
>      description: |
> @@ -137,5 +147,6 @@ examples:
>                     <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
>        clocks = <&rcc CK_BUS_HPDMA1>;
>        #dma-cells = <3>;
> +      st,axi-max-burst-len = <16>;
>      };
>  ...
> 
> -- 
> 2.25.1
>
Amelie Delaunay Oct. 11, 2024, 9:12 a.m. UTC | #2
On 10/10/24 20:16, Rob Herring wrote:
> On Thu, Oct 10, 2024 at 04:27:56PM +0200, Amelie Delaunay wrote:
>> DMA3 maximum burst length (in unit of beat) may be restricted depending
>> on bus interconnect.
>>
>> As mentionned in STM32MP2 reference manual [1], "the maximum allowed AXI
>> burst length is 16. The user must set [S|D]BL_1 lower or equal to 15
>> if the Source/Destination allocated port is AXI (if [S|D]AP=0)".
> 
> This should be implied by the SoC specific compatible.
> 

I took an example from snps,dw-axi-dmac.yaml (snps,axi-max-burst-len). 
But I agree, it will be implied by st,stm32mp25-dma3 compatible in V2.
Patch 8/11 will then be dropped.

Regards,
Amelie

>>
>> Introduce st,axi-max-burst-len. If used, it will clamp the burst length
>> to that value if AXI port is used, if not, the maximum burst length value
>> supported by DMA3 is used.
>>
>> [1] https://www.st.com/resource/en/reference_manual/rm0457-stm32mp2325xx-advanced-armbased-3264bit-mpus-stmicroelectronics.pdf
>>
>> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
>> ---
>>   .../devicetree/bindings/dma/stm32/st,stm32-dma3.yaml          | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
>> index 38c30271f732e0c8da48199a224a88bb647eeca7..90ad70bb24eb790afe72bf2085478fa4cec60b94 100644
>> --- a/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
>> +++ b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
>> @@ -51,6 +51,16 @@ properties:
>>     power-domains:
>>       maxItems: 1
>>   
>> +  st,axi-max-burst-len:
>> +    description: |
>> +      Restrict AXI burst length in unit of beat by value specified in this property.
>> +      The value specified in this property is clamped to the maximum burst length supported by DMA3.
>> +      If this property is missing, the maximum burst length supported by DMA3 is used.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    minimum: 1
>> +    maximum: 256
>> +    default: 64
>> +
>>     "#dma-cells":
>>       const: 3
>>       description: |
>> @@ -137,5 +147,6 @@ examples:
>>                      <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
>>         clocks = <&rcc CK_BUS_HPDMA1>;
>>         #dma-cells = <3>;
>> +      st,axi-max-burst-len = <16>;
>>       };
>>   ...
>>
>> -- 
>> 2.25.1
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
index 38c30271f732e0c8da48199a224a88bb647eeca7..90ad70bb24eb790afe72bf2085478fa4cec60b94 100644
--- a/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
+++ b/Documentation/devicetree/bindings/dma/stm32/st,stm32-dma3.yaml
@@ -51,6 +51,16 @@  properties:
   power-domains:
     maxItems: 1
 
+  st,axi-max-burst-len:
+    description: |
+      Restrict AXI burst length in unit of beat by value specified in this property.
+      The value specified in this property is clamped to the maximum burst length supported by DMA3.
+      If this property is missing, the maximum burst length supported by DMA3 is used.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 256
+    default: 64
+
   "#dma-cells":
     const: 3
     description: |
@@ -137,5 +147,6 @@  examples:
                    <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
       clocks = <&rcc CK_BUS_HPDMA1>;
       #dma-cells = <3>;
+      st,axi-max-burst-len = <16>;
     };
 ...