[PATCH v7 0/3] dmaengine: zynqmp_dma: Add reset support for Versal Gen2 and Versal Net

From: Golla Nagendra

Date: Thu Dec 03 2026 - 02:40:01 EST


This series adds per-channel reset support for Versal Gen2 and Versal Net
DMA channels.

Patch 1 requires the resets property for Versal Gen2 DMA devices.

Patch 2 adds the amd,versal-net-dma-1.0 compatible with
xlnx,zynqmp-dma-1.0 as its fallback and requires the resets property for
Versal Net devices.

Patch 3 resets each Versal Gen2 and Versal Net DMA channel during probe
using device_reset_optional(). Legacy SoCs without a reset line continue
to work.

Changes in V7:
- Drop the separate driver match-table entry. Versal Net uses the legacy
compatible as a fallback, which the driver already supports. It also
uses the same IRQ layout. The shared probe code handles the reset, and
the binding requires the reset property for Versal Net.

Changes in V6:
- Initially, used device_reset() and checked the has_reset flag in the
driver, explaining that reset was needed only for those Versal Net and
Versa2 . So we decided to allow the reset patch to run for those 2
compatibles, while it would be skipped entirely for the legacy one. But,
following the Frank Li's’ review and suggestions, the required reset
property is validated by the DT binding, so switched to
device_reset_optional and removed the check from the driver.

Changes in V5:
- Drop the probe-time PM and unrelated IRQ-guard patches; retain only the
patches required for reset support
- Split the Versal Gen2 reset requirement and Versal Net compatible into
separate binding patches.

Changes in V4:
- Patch 1: Use PM_RUNTIME_ACQUIRE_AUTOSUSPEND() instead of
pm_runtime_resume_and_get(), and fail probe immediately if the guard
acquire fails. Add zynqmp_dma_probe_pm_put()/_fail()
helpers so every error path releases the reference and gates the
clocks without goto-based cleanup, and pair every direct
zynqmp_dma_runtime_suspend() call with pm_runtime_set_suspended() to
keep the runtime PM status in sync with the clocks
- Patch 2: Bypass the guard when pm_runtime_get_if_active() returns
-EINVAL, covering disabled runtime PM and CONFIG_PM=n, so interrupt
handlers keep servicing interrupts instead of bailing out
- Patch 3: Remove the IS_ENABLED(CONFIG_PM) condition from the guard
error check, since patch 2 already handles disabled runtime PM and
CONFIG_PM=n inside the guard itself
- Patch 4: Move the allOf block under the required field
Add the new compatible string and the resets property in the example
- Patch 5: No change
- Patch 6: No change

Changes in V3:
- Patch 1: New patch - split PM usage count fix into a separate patch as
- Patch 2: New patch - add PM_RUNTIME_ACQUIRE_IF_ACTIVE() guard and its
backing infrastructure to pm_runtime.h
- Patch 3: Use PM_RUNTIME_ACQUIRE_IF_ACTIVE() guard instead of the manual
pm_runtime_get_if_active()/pm_runtime_put() pair from V2
- Patch 4: Use allOf:if:then: to restrict the resets property per-
compatible with resets: false for non-matching platforms
also expand to include amd,versal-net-dma-1.0
- Patch 5: New patch - add amd,versal-net-dma-1.0 compatible to driver
- Patch 6: Introduce has_reset flag in zynqmp_dma_config to gate the
reset path; PM usage count fix split into patch 1/6

Link to V6:
-----------
https://lore.kernel.org/all/20261202-v_6_reset_series-v6-0-935f9338ea1e@xxxxxxx/

To: Vinod Koul <vkoul@xxxxxxxxxx>
To: Frank Li <Frank.Li@xxxxxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
To: Conor Dooley <conor+dt@xxxxxxxxxx>
To: Michal Simek <michal.simek@xxxxxxx>
To: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
To: Harini Katakam <harini.katakam@xxxxxxx>
To: Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Cc: dmaengine@xxxxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: git@xxxxxxx

Signed-off-by: Golla Nagendra <nagendra.golla@xxxxxxx>
---
Golla Nagendra (3):
dt-bindings: dma: xlnx,zynqmp-dma: Require resets for Versal Gen2
dt-bindings: dma: xlnx,zynqmp-dma: Add Versal Net compatible
dmaengine: zynqmp_dma: Add per-channel reset support

.../bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml | 35 +++++++++++++++++-----
drivers/dma/xilinx/zynqmp_dma.c | 6 ++++
2 files changed, 34 insertions(+), 7 deletions(-)
---
base-commit: 2576c937f7b442df7de8e39332ff585f08b666b8
change-id: 20261203-v7_reser_series_adma-445c6b85eb51

Best regards,
--
Golla Nagendra <nagendra.golla@xxxxxxx>