* [PATCH v4 0/3] iommu/arm-smmu-v3: Keep the clock of the RK3588 PCIe SMMU running
@ 2026-11-26 9:54 Arun Iyengar via B4 Relay
2026-11-26 9:54 ` [PATCH v4 1/3] dt-bindings: iommu: arm,smmu-v3: Allow a clock and a reset Arun Iyengar via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-26 9:54 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel (AMD), Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Niklas Cassel
Cc: Pranjal Shrivastava, linux-arm-kernel, iommu, linux-kernel,
devicetree, linux-rockchip, Sebastian Reichel, Shawn Lin,
Simon Xue, Finley Xiao, Arun Iyengar
On RK3588 boards without an enabled PCIe controller, ACLK_MMU_PCIE is
gated as unused while arm-smmu-v3 is bound to the PCIe SMMU, and reboot
hangs in arm_smmu_device_shutdown() until the watchdog fires.
Patches 1-2 are for the iommu tree, patch 3 for the Rockchip tree. The
clock can move into the runtime PM callbacks of Pranjal Shrivastava's
pending SMMUv3 sleep ops series once it lands.
Tested as v2 (same code apart from comments) on an Orange Pi 5 with the
M.2 slot in SATA mode: reboot reaches the boot loader in 0.59 s (was
~89 s, via the watchdog). The resets property is unused by the driver
and untested.
Developed with Claude (Anthropic), which wrote the code and the commit
messages. I reviewed every change.
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
Changes in v4:
- 1/3: Acked-by Rob Herring
- 2/3: kept dev_err_probe(): the clk getters do not print, and the
message records the deferral reason (Sebastian Reichel)
- 2/3, 3/3: shorter commit messages; 2/3: shorter comment
- Rebased
- Link to v3: https://patch.msgid.link/20261113-smmu-v3-pcie-pd-v3-0-39eb4f919529@gmail.com
Changes in v3:
- Shortened the commit messages and the cover letter, and dropped the
"on SoCs where ..." part of the binding's clock description
(Sebastian Reichel).
- Squashed the DTS reset patch into the clock patch (Sebastian Reichel).
His Reviewed-by of the clock patch is kept.
- Dropped the description of the binding's resets property.
- No code changes.
- Link to v2: https://patch.msgid.link/20261112-smmu-v3-pcie-pd-v2-0-3a77bbb6b2c4@gmail.com
Changes in v2:
- Moved the fix for the Tegra CMDQV reference leak on a bad
#iommu-cells (Sashiko AI review) to a separate patch.
- Dropped the power-domain patches: the TRM puts MMU600_PCIE in PD_PHP,
which Linux does not control (Sebastian Reichel, Shawn Lin).
- Binding: one clock instead of up to four (Sashiko, Sebastian Reichel).
- Driver: one optional clock, got before the firmware probe so a failure
cannot leak the CMDQV reference (Sashiko); shorter comment (Sebastian
Reichel).
- Added the reset to the binding and the DTS (Sebastian Reichel).
- Link to v1: https://patch.msgid.link/20261110-smmu-v3-pcie-pd-v1-0-628819ca44b9@gmail.com
---
Arun Iyengar (3):
dt-bindings: iommu: arm,smmu-v3: Allow a clock and a reset
iommu/arm-smmu-v3: Enable an optional clock
arm64: dts: rockchip: Add the clock and reset of the RK3588 PCIe SMMU
Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml | 8 ++++++++
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 ++
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 ++++++++
3 files changed, 18 insertions(+)
---
base-commit: c9b82d9808c4af1734e6d08f06fd411c30438ae8
change-id: 20261110-smmu-v3-pcie-pd-a2f127b81d8f
Best regards,
--
Arun Iyengar <aiyengar1990@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v4 1/3] dt-bindings: iommu: arm,smmu-v3: Allow a clock and a reset
2026-11-26 9:54 [PATCH v4 0/3] iommu/arm-smmu-v3: Keep the clock of the RK3588 PCIe SMMU running Arun Iyengar via B4 Relay
@ 2026-11-26 9:54 ` Arun Iyengar via B4 Relay
2026-11-26 10:09 ` Sebastian Reichel
2026-11-26 9:54 ` [PATCH v4 2/3] iommu/arm-smmu-v3: Enable an optional clock Arun Iyengar via B4 Relay
2026-11-26 9:54 ` [PATCH v4 3/3] arm64: dts: rockchip: Add the clock and reset of the RK3588 PCIe SMMU Arun Iyengar via B4 Relay
2 siblings, 1 reply; 6+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-26 9:54 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel (AMD), Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Niklas Cassel
Cc: Pranjal Shrivastava, linux-arm-kernel, iommu, linux-kernel,
devicetree, linux-rockchip, Sebastian Reichel, Shawn Lin,
Simon Xue, Finley Xiao, Arun Iyengar
From: Arun Iyengar <aiyengar1990@gmail.com>
The RK3588 PCIe MMU-600 has a clock (ACLK_MMU_PCIE) and a reset
(SRST_A_MMU_PCIE) in the CRU. When no PCIe controller holds the clock,
it is gated as unused and the SMMU stops responding. Allow one clock and
one reset.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml
index 3c044e4f03d4..9ab80142a485 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml
@@ -63,6 +63,14 @@ properties:
msi-parent: true
+ clocks:
+ maxItems: 1
+ description:
+ Clock of the SMMU's register and memory interfaces.
+
+ resets:
+ maxItems: 1
+
nvidia,cmdqv:
description: |
A phandle to its pairing CMDQV extension for an implementation on NVIDIA
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v4 1/3] dt-bindings: iommu: arm,smmu-v3: Allow a clock and a reset
2026-11-26 9:54 ` [PATCH v4 1/3] dt-bindings: iommu: arm,smmu-v3: Allow a clock and a reset Arun Iyengar via B4 Relay
@ 2026-11-26 10:09 ` Sebastian Reichel
0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Reichel @ 2026-11-26 10:09 UTC (permalink / raw)
To: aiyengar1990
Cc: Will Deacon, Robin Murphy, Joerg Roedel (AMD), Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Niklas Cassel,
Pranjal Shrivastava, linux-arm-kernel, iommu, linux-kernel,
devicetree, linux-rockchip, Shawn Lin, Simon Xue, Finley Xiao
[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]
Hi,
On Thu, Nov 26, 2026 at 09:54:13AM +0000, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> The RK3588 PCIe MMU-600 has a clock (ACLK_MMU_PCIE) and a reset
> (SRST_A_MMU_PCIE) in the CRU. When no PCIe controller holds the clock,
> it is gated as unused and the SMMU stops responding. Allow one clock and
> one reset.
>
> Acked-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Greetings,
-- Sebastian
> Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml
> index 3c044e4f03d4..9ab80142a485 100644
> --- a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml
> +++ b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml
> @@ -63,6 +63,14 @@ properties:
>
> msi-parent: true
>
> + clocks:
> + maxItems: 1
> + description:
> + Clock of the SMMU's register and memory interfaces.
> +
> + resets:
> + maxItems: 1
> +
> nvidia,cmdqv:
> description: |
> A phandle to its pairing CMDQV extension for an implementation on NVIDIA
>
> --
> 2.55.0
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 2/3] iommu/arm-smmu-v3: Enable an optional clock
2026-11-26 9:54 [PATCH v4 0/3] iommu/arm-smmu-v3: Keep the clock of the RK3588 PCIe SMMU running Arun Iyengar via B4 Relay
2026-11-26 9:54 ` [PATCH v4 1/3] dt-bindings: iommu: arm,smmu-v3: Allow a clock and a reset Arun Iyengar via B4 Relay
@ 2026-11-26 9:54 ` Arun Iyengar via B4 Relay
2026-11-26 10:13 ` Sebastian Reichel
2026-11-26 9:54 ` [PATCH v4 3/3] arm64: dts: rockchip: Add the clock and reset of the RK3588 PCIe SMMU Arun Iyengar via B4 Relay
2 siblings, 1 reply; 6+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-26 9:54 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel (AMD), Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Niklas Cassel
Cc: Pranjal Shrivastava, linux-arm-kernel, iommu, linux-kernel,
devicetree, linux-rockchip, Sebastian Reichel, Shawn Lin,
Simon Xue, Finley Xiao, Arun Iyengar
From: Arun Iyengar <aiyengar1990@gmail.com>
On the RK3588 the PCIe SMMU's clock is gated as unused when no PCIe
controller holds it, and the CR0 write at shutdown then hangs. Enable
the clock from the firmware node, if any, while the driver is bound.
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 100b34f07032..beea222dcf57 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -12,6 +12,7 @@
#include <linux/acpi.h>
#include <linux/acpi_iort.h>
#include <linux/bitops.h>
+#include <linux/clk.h>
#include <linux/crash_dump.h>
#include <linux/delay.h>
#include <linux/err.h>
@@ -5786,12 +5787,19 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
resource_size_t ioaddr;
struct arm_smmu_device *smmu;
struct device *dev = &pdev->dev;
+ struct clk *clk;
smmu = devm_kzalloc_obj(dev, *smmu);
if (!smmu)
return -ENOMEM;
smmu->dev = dev;
+ /* Before the firmware probe, which may take a CMDQV reference */
+ clk = devm_clk_get_optional_enabled(dev, NULL);
+ if (IS_ERR(clk))
+ return dev_err_probe(dev, PTR_ERR(clk),
+ "failed to enable clock\n");
+
if (dev->of_node) {
ret = arm_smmu_device_dt_probe(pdev, smmu);
} else {
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v4 2/3] iommu/arm-smmu-v3: Enable an optional clock
2026-11-26 9:54 ` [PATCH v4 2/3] iommu/arm-smmu-v3: Enable an optional clock Arun Iyengar via B4 Relay
@ 2026-11-26 10:13 ` Sebastian Reichel
0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Reichel @ 2026-11-26 10:13 UTC (permalink / raw)
To: aiyengar1990
Cc: Will Deacon, Robin Murphy, Joerg Roedel (AMD), Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Niklas Cassel,
Pranjal Shrivastava, linux-arm-kernel, iommu, linux-kernel,
devicetree, linux-rockchip, Shawn Lin, Simon Xue, Finley Xiao
[-- Attachment #1: Type: text/plain, Size: 1986 bytes --]
Hi,
On Thu, Nov 26, 2026 at 09:54:14AM +0000, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> On the RK3588 the PCIe SMMU's clock is gated as unused when no PCIe
> controller holds it, and the CR0 write at shutdown then hangs. Enable
> the clock from the firmware node, if any, while the driver is bound.
>
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
Once runtime PM support lands [0], this should move to runtime PM
resume. But at the moment it looks sensible:
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Greetings,
-- Sebastian
[0] https://lore.kernel.org/linux-iommu/20260929034510.2023173-1-praan@google.com/
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> index 100b34f07032..beea222dcf57 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> @@ -12,6 +12,7 @@
> #include <linux/acpi.h>
> #include <linux/acpi_iort.h>
> #include <linux/bitops.h>
> +#include <linux/clk.h>
> #include <linux/crash_dump.h>
> #include <linux/delay.h>
> #include <linux/err.h>
> @@ -5786,12 +5787,19 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
> resource_size_t ioaddr;
> struct arm_smmu_device *smmu;
> struct device *dev = &pdev->dev;
> + struct clk *clk;
>
> smmu = devm_kzalloc_obj(dev, *smmu);
> if (!smmu)
> return -ENOMEM;
> smmu->dev = dev;
>
> + /* Before the firmware probe, which may take a CMDQV reference */
> + clk = devm_clk_get_optional_enabled(dev, NULL);
> + if (IS_ERR(clk))
> + return dev_err_probe(dev, PTR_ERR(clk),
> + "failed to enable clock\n");
> +
> if (dev->of_node) {
> ret = arm_smmu_device_dt_probe(pdev, smmu);
> } else {
>
> --
> 2.55.0
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 3/3] arm64: dts: rockchip: Add the clock and reset of the RK3588 PCIe SMMU
2026-11-26 9:54 [PATCH v4 0/3] iommu/arm-smmu-v3: Keep the clock of the RK3588 PCIe SMMU running Arun Iyengar via B4 Relay
2026-11-26 9:54 ` [PATCH v4 1/3] dt-bindings: iommu: arm,smmu-v3: Allow a clock and a reset Arun Iyengar via B4 Relay
2026-11-26 9:54 ` [PATCH v4 2/3] iommu/arm-smmu-v3: Enable an optional clock Arun Iyengar via B4 Relay
@ 2026-11-26 9:54 ` Arun Iyengar via B4 Relay
2 siblings, 0 replies; 6+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-26 9:54 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel (AMD), Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Niklas Cassel
Cc: Pranjal Shrivastava, linux-arm-kernel, iommu, linux-kernel,
devicetree, linux-rockchip, Sebastian Reichel, Shawn Lin,
Simon Xue, Finley Xiao, Arun Iyengar
From: Arun Iyengar <aiyengar1990@gmail.com>
With no PCIe controller enabled (e.g. Orange Pi 5, M.2 in SATA mode),
ACLK_MMU_PCIE is gated as unused and reboot hangs in SMMU shutdown.
Fixes: da92d3dfc871 ("arm64: dts: rockchip: enable the mmu600_pcie IOMMU on the rk3588 SoC")
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
index aa69fd3793fd..45c1bb335447 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
@@ -559,6 +559,8 @@ mmu600_pcie: iommu@fc900000 {
<GIC_SPI 374 IRQ_TYPE_EDGE_RISING 0>,
<GIC_SPI 367 IRQ_TYPE_EDGE_RISING 0>;
interrupt-names = "eventq", "gerror", "priq", "cmdq-sync";
+ clocks = <&cru ACLK_MMU_PCIE>;
+ resets = <&cru SRST_A_MMU_PCIE>;
#iommu-cells = <1>;
};
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-26 10:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 9:54 [PATCH v4 0/3] iommu/arm-smmu-v3: Keep the clock of the RK3588 PCIe SMMU running Arun Iyengar via B4 Relay
2026-11-26 9:54 ` [PATCH v4 1/3] dt-bindings: iommu: arm,smmu-v3: Allow a clock and a reset Arun Iyengar via B4 Relay
2026-11-26 10:09 ` Sebastian Reichel
2026-11-26 9:54 ` [PATCH v4 2/3] iommu/arm-smmu-v3: Enable an optional clock Arun Iyengar via B4 Relay
2026-11-26 10:13 ` Sebastian Reichel
2026-11-26 9:54 ` [PATCH v4 3/3] arm64: dts: rockchip: Add the clock and reset of the RK3588 PCIe SMMU Arun Iyengar via B4 Relay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox