Re: [PATCH 9/9] arm64: dts: rockchip: Enable the RK3588 PHP SMMU
From: netdev-bot+sashiko
Date: Tue Nov 17 2026 - 12:36:59 EST
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 1 · High: 1 · Medium: 0 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Critical] This patch enables mmu600_php on every RK3588 board, but the
kernel cannot restore the SMMU after deep suspend.
- [High] This patch's commit message says "the SMMU has its clock", and
the earlier series commit "arm64: dts: rockchip: Add the clock and…
- [Low] The mmu600_php node that this patch enables has `clocks = <&cru
ACLK_MMU_PHP>;` and `resets = <&cru SRST_A_MMU_PHP>;`…
--
arm64: dts: rockchip: Enable the RK3588 PHP SMMU
This commit removes status = "disabled" from the mmu600_php node in
rk3588-base.dtsi. That enables the arm-smmu-v3 instance in front of the
PHP masters (GMAC, SATA, USB3 host2) on all RK3588 boards. The commit
message notes that PD_PHP loses power in deep suspend and that arm-smmu-v3
system sleep support is needed.
Link: https://lore.kernel.org/r/20260929034510.2023173-1-praan@xxxxxxxxxx
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> index cb0a39f637887..0c3d59a391826 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> @@ -574,7 +574,6 @@ mmu600_php: iommu@fcb00000 {
> clocks = <&cru ACLK_MMU_PHP>;
> resets = <&cru SRST_A_MMU_PHP>;
[Severity: High]
The commit message says "the SMMU has its clock". Does anything actually
enable ACLK_MMU_PHP for the SMMU?
The arm-smmu-v3 driver has no clk_get()/clk_prepare_enable(), reset_control
or pm_runtime handling. The node has no power-domains, so genpd pm_clk
does not apply. The platform core does not enable DT clocks by itself
either.
In drivers/clk/rockchip/clk-rk3588.c the clock is a plain gate with no
flags:
GATE(ACLK_MMU_PHP, "aclk_mmu_php", "aclk_php_root", 0,
RK3588_CLKGATE_CON(34), 8, GFLAGS),
Its only enable references come from its children ACLK_GMAC0/1,
ACLK_SATA0/1/2 and ACLK_USB3OTG2. Two things can turn it off:
- clk_disable_unused at late_initcall_sync, when no master is bound
(modular drivers, or a board that enables only some PHP masters).
- The last master disabling its ACLK on runtime suspend or remove.
The SMMU driver still touches the hardware after that. It issues CMDQ
TLBI/CFGI plus CMD_SYNC on unmap and on flush-queue timeouts, it runs the
eventq/gerror handlers, and at reboot it runs:
arm_smmu_device_shutdown()
arm_smmu_disable_action()
That usually happens after the consumer masters have already shut down.
Could this cause CMD_SYNC timeouts or a stalled bus access? The "Add the
PHP GRF clock on RK3588" commit in this series describes a similar hang
for pclk_php_root.
The earlier commit "arm64: dts: rockchip: Add the clock and reset of the
RK3588 PHP SMMU" says the clock was added "so the SMMU keeps its clock
while its masters are idle". Does that need clock handling in the driver
(plus a binding update), or the gate marked as critical or
ignore-unused, rather than only the DT property?
[Severity: Low]
Will this node pass dtbs_check now that it is enabled? The binding in
Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml does not define
clocks, resets or power-domains, and it has:
additionalProperties: false
No patch in the series updates this binding, although the dwmac, ahci and
grf bindings are updated.
Also, the "Add the clock and reset..." commit says the reset is added "as
for the PCIe SMMU". The sibling mmu600_pcie node, which uses the same
compatible, has neither clocks nor resets.
> #iommu-cells = <1>;
> - status = "disabled";
[Severity: Critical]
The commit message says:
PD_PHP is powered off in deep suspend and the SMMU resumes from reset
in bypass, so this needs arm-smmu-v3 system sleep support [1].
Is that support in the tree this patch applies to? No earlier patch in
the series seems to add it.
In drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c, arm_smmu_driver has no
.pm:
static struct platform_driver arm_smmu_driver = {
.driver = { ... },
.probe = arm_smmu_device_probe,
.remove = arm_smmu_device_remove,
.shutdown = arm_smmu_device_shutdown,
};
The only code that programs the stream table, the queues and SMMUEN is
arm_smmu_device_reset(), and only arm_smmu_device_probe() calls it. The
syscore op added to drivers/soc/rockchip/grf.c earlier in the series
restores only the PHP GRF StreamID registers.
With this node enabled, the PHP masters get IOMMU DMA domains and their
drivers program IOVAs. Those masters are usb_host2_xhci, gmac1, sata0 and
sata2, plus gmac0 and sata1 from rk3588-extra.dtsi.
After a deep suspend cycle, does the SMMU stay in its reset bypass state
while stmmac, ahci and xhci keep using descriptor rings and buffers at
their old IOVAs?
If so, the IOVAs would be treated as physical addresses. On gmac RX the
frame contents come from the network and would be written to whatever RAM
or MMIO sits at that address. TX and SATA/USB reads could leak arbitrary
memory.
PD_PHP is also defined only in drivers/pmdomain/rockchip/pm-domains.c and
the dt-bindings header. No DTS references it, and mmu600_php has no
power-domains property, so genpd cannot order an SMMU save and restore
either.
Before this patch the node was disabled and these masters used direct
DMA, so suspend did not hit this problem. Should enabling this node wait
until the arm-smmu-v3 sleep support in [1] is merged?
> };
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113-mmu600-php-v1-0-231196049a3b%40gmail.com