devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: iommu: rockchip: Add rockchip,disable-device-link-resume
@ 2023-03-30 13:17 Jagan Teki
  2023-03-30 13:17 ` [PATCH 2/3] iommu/rockchip: Disable the device link during resume Jagan Teki
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jagan Teki @ 2023-03-30 13:17 UTC (permalink / raw)
  To: Heiko Stuebner, Joerg Roedel, Will Deacon, Robin Murphy,
	Rob Herring, Krzysztof Kozlowski
  Cc: iommu, linux-rockchip, linux-arm-kernel, devicetree,
	linux-amarula, Jagan Teki

Rockchip iommu is trying to enable the associated device at runtime
resume however some devices might enable the iommu during their pm
runtime resume operation which indeed leads iommu to use the wrong
domain and this leads to device iommu page fault.

Add rockchip,disable-device-link-resume flag and give an option for
those devices to disable the device link during Rockchip iommu pm
runtime operation.

This makes the device enablement for that iommu domain ignored during
the rk_iommu_resume call as it assumes it handled iommu device
attachment in the associated device itself.

Document rockchip,disable-device-link-resume flag.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 .../devicetree/bindings/iommu/rockchip,iommu.yaml        | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
index ba9124f721f1..ac8b03806cb3 100644
--- a/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml
@@ -58,6 +58,15 @@ properties:
       Some mmu instances may produce unexpected results
       when the reset operation is used.
 
+  rockchip,disable-device-link-resume:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: |
+      Do not link the device during runtime resume operation.
+      Some devices might enable the iommu during their pm runtime
+      resume operation, so disable the device link for those devices
+      otherwise iommu use the wrong domain and that leads to device
+      iommu page fault.
+
 required:
   - compatible
   - reg
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-28 10:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30 13:17 [PATCH 1/3] dt-bindings: iommu: rockchip: Add rockchip,disable-device-link-resume Jagan Teki
2023-03-30 13:17 ` [PATCH 2/3] iommu/rockchip: Disable the device link during resume Jagan Teki
2023-03-30 13:42   ` Robin Murphy
2023-04-04  7:51     ` Jagan Teki
2023-05-18 12:15       ` Jagan Teki
2023-05-28 10:35       ` Jagan Teki
2023-03-30 13:17 ` [PATCH 3/3] arm64: dts: rockchip: Disable device link for RK3328 VOP Jagan Teki
2023-03-31  8:35 ` [PATCH 1/3] dt-bindings: iommu: rockchip: Add rockchip,disable-device-link-resume Krzysztof Kozlowski

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).