Re: [PATCH V3 4/6] dt-bindings: dma: xlnx,zynqmp-dma: Add Versal Net compatible support

"Golla, Nagendra" <[email protected]>
Newsgroups org.kernel.vger.dmaengine,dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Hi,

On 8/10/2026 3:50 PM, [email protected] wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Invalid fallback compatible string `xlnx,zynqmp-dma-1.0` for `amd,versal-net-dma-1.0`.
> --
> 
> --- Patch [4]: [PATCH V3 4/6] dt-bindings: dma: xlnx,zynqmp-dma: Add Versal Net compatible support ---
> commit c94f71cbb3b4d274afbe8968d6bb108158803292
> Author: Jay Buddhabhatti <[email protected]>
> 
> dt-bindings: dma: xlnx,zynqmp-dma: Add Versal Net compatible support
> 
> This commit introduces the amd,versal-net-dma-1.0 compatible string with a
> fallback to xlnx,zynqmp-dma-1.0. It also adds a required per-channel reset
> property for Versal Gen2 and Versal Net because the DMA channel must be
> reset to clear the state left by firmware.
> 
>> diff --git a/Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml b/Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml
>> index 2da86037ad79e..87c65aef5c7d3 100644
>> --- a/Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml
>> +++ b/Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml
> 
> [ ... ]
> 
>> @@ -18,15 +18,31 @@ maintainers:
>>   properties:
>>     "#dma-cells":
>>       const: 1
>>   
>>     compatible:
>> -    enum:
>> -      - amd,versal2-dma-1.0
>> -      - xlnx,zynqmp-dma-1.0
>> +    oneOf:
>> +      - const: amd,versal2-dma-1.0
>> +      - const: xlnx,zynqmp-dma-1.0
>> +      - items:
>> +          - const: amd,versal-net-dma-1.0
>> +          - const: xlnx,zynqmp-dma-1.0
> 
> [Severity: Medium]
> Is this fallback compatible string appropriate here?
> 
> The commit message explicitly states that a DMA channel reset is essential
> because the device is left in a bad state by firmware, and DMA functionality
> fails without it.
> 
> If a device tree is parsed by an older OS using the fallback
> xlnx,zynqmp-dma-1.0 driver, it will attempt to operate the hardware without
> knowing about the new resets property. Since the older driver cannot perform
> the required channel reset, won't the DMA functionality fail just as
> described?
> 
> Should the fallback be removed if the older driver cannot reliably operate
> the device?
Thanks for the review

The fallback to xlnx,zynqmp-dma-1.0 is intentional. The reset is only 
needed when firmware has already used the DMA channel before Linux boots 
and left it in a bad state. If Linux is the first to use the channel 
after power-on, no reset is needed and the fallback driver works fine.

Removing the fallback would mean Versal Net cannot be probed at all on 
kernels that do not have this support yet, which would break existing 
users who do not have the firmware pre-use scenario.

Users who need the reset must use a kernel with this support, which will 
match amd,versal-net-dma-1.0 directly and perform the reset.

Thanks,
Nagendra
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.