diff mbox series

[1/2] dt-bindings: dma: Support channel page to nvidia,tegra210-adma

Message ID 20241205145859.2331691-2-mkumard@nvidia.com (mailing list archive)
State Superseded
Headers show
Series Add Tegra ADMA channel page support | expand

Commit Message

Mohan Kumar D Dec. 5, 2024, 2:58 p.m. UTC
Multiple ADMA Channel page hardware support has been added from
TEGRA186 and onwards. Update the DT binding to use any of the
ADMA channel page address space region.

Signed-off-by: Mohan Kumar D <mkumard@nvidia.com>
---
 .../bindings/dma/nvidia,tegra210-adma.yaml    | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Dec. 5, 2024, 3:15 p.m. UTC | #1
On 05/12/2024 15:58, Mohan Kumar D wrote:
> Multiple ADMA Channel page hardware support has been added from
> TEGRA186 and onwards. Update the DT binding to use any of the
> ADMA channel page address space region.
> 
> Signed-off-by: Mohan Kumar D <mkumard@nvidia.com>
> ---
>  .../bindings/dma/nvidia,tegra210-adma.yaml    | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml b/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
> index 877147e95ecc..8c76c98560c5 100644
> --- a/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
> +++ b/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
> @@ -29,7 +29,24 @@ properties:
>            - const: nvidia,tegra186-adma
>  
>    reg:
> -    maxItems: 1
> +    description: |

Do not need '|' unless you need to preserve formatting.

> +     The 'page' region describes the address space of the page
> +     used for accessing the DMA channel registers. The 'global'
> +     region describes the address space of the global DMA registers.
> +     In the absence of the 'reg-names' property, there must be a
> +     single entry that covers the address space of the global DMA
> +     registers and the DMA channel registers.

Rather oneOf listing the items with description.

> +     minItems: 1
> +     maxItems: 2
> +
> +  reg-names:
> +    oneOf:
> +      - enum:
> +          - page
> +          - global

This is not correct. You said it covers both.


You also need allOf:if:then: block restricting it per each variant/device.



Best regards,
Krzysztof
Mohan Kumar D Dec. 16, 2024, 9:57 a.m. UTC | #2
On 05-12-2024 20:45, Krzysztof Kozlowski wrote:
> External email: Use caution opening links or attachments
>
>
> On 05/12/2024 15:58, Mohan Kumar D wrote:
>> Multiple ADMA Channel page hardware support has been added from
>> TEGRA186 and onwards. Update the DT binding to use any of the
>> ADMA channel page address space region.
>>
>> Signed-off-by: Mohan Kumar D <mkumard@nvidia.com>
>> ---
>>   .../bindings/dma/nvidia,tegra210-adma.yaml    | 19 ++++++++++++++++++-
>>   1 file changed, 18 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml b/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
>> index 877147e95ecc..8c76c98560c5 100644
>> --- a/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
>> +++ b/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
>> @@ -29,7 +29,24 @@ properties:
>>             - const: nvidia,tegra186-adma
>>
>>     reg:
>> -    maxItems: 1
>> +    description: |
> Do not need '|' unless you need to preserve formatting.
Acknowledge.
>> +     The 'page' region describes the address space of the page
>> +     used for accessing the DMA channel registers. The 'global'
>> +     region describes the address space of the global DMA registers.
>> +     In the absence of the 'reg-names' property, there must be a
>> +     single entry that covers the address space of the global DMA
>> +     registers and the DMA channel registers.
> Rather oneOf listing the items with description.
Acknowledge. will fix in next patch.
>
>> +     minItems: 1
>> +     maxItems: 2
>> +
>> +  reg-names:
>> +    oneOf:
>> +      - enum:
>> +          - page
>> +          - global
> This is not correct. You said it covers both.
>
> You also need allOf:if:then: block restricting it per each variant/device.
I will fix the above concern with the next patch version which will have 
clear variant/device specific restriction on reg-names property usage.
>
>
>
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml b/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
index 877147e95ecc..8c76c98560c5 100644
--- a/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
+++ b/Documentation/devicetree/bindings/dma/nvidia,tegra210-adma.yaml
@@ -29,7 +29,24 @@  properties:
           - const: nvidia,tegra186-adma
 
   reg:
-    maxItems: 1
+    description: |
+     The 'page' region describes the address space of the page
+     used for accessing the DMA channel registers. The 'global'
+     region describes the address space of the global DMA registers.
+     In the absence of the 'reg-names' property, there must be a
+     single entry that covers the address space of the global DMA
+     registers and the DMA channel registers.
+     minItems: 1
+     maxItems: 2
+
+  reg-names:
+    oneOf:
+      - enum:
+          - page
+          - global
+      - items:
+          - const: page
+          - const: global
 
   interrupts:
     description: |