Skip to content

RK3588: Enable the PHP SMMU

Arun Iyengar b4-sent linux-arm-kernel linux-devicetree linux-ide linux-iommu linux-rockchip lkml netdev sashiko-reviews 1 version In review

Get series with b4
b4 am [email protected] change-id 20261113-mmu600-php-0367fe7f1609

Versions newest first

  1. v1 Latest9 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9dt-bindings: net: rockchip-dwmac: Allow iommusDocumentation/devicetree/bindings/net/rockchip-dwmac.yaml+3 -01 reply
2/9dt-bindings: ata: rockchip,dwc-ahci: Allow iommusDocumentation/devicetree/bindings/ata/rockchip,dwc-ahci.yaml+3 -01 reply
3/9dt-bindings: soc: rockchip: grf: Allow a clock for the RK3588 PHP GRFDocumentation/devicetree/bindings/soc/rockchip/grf.yaml+10 -21 reply
4/9soc: rockchip: grf: Assign the StreamIDs of the RK3588 PHP SMMU mastersdrivers/soc/rockchip/grf.c+37 -00 replies
5/9arm64: dts: rockchip: Add the PHP GRF clock on RK3588arch/arm64/boot/dts/rockchip/rk3588-base.dtsi+1 -00 replies
6/9soc: rockchip: grf: Restore the RK3588 PHP StreamIDs after system suspenddrivers/soc/rockchip/grf.c+68 -20 replies
7/9arm64: dts: rockchip: Add the clock and reset of the RK3588 PHP SMMUarch/arm64/boot/dts/rockchip/rk3588-base.dtsi+2 -00 replies
8/9arm64: dts: rockchip: Attach the masters of the RK3588 PHP SMMUarch/arm64/boot/dts/rockchip/rk3588-base.dtsi arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi+6 -00 replies
9/9arm64: dts: rockchip: Enable the RK3588 PHP SMMUarch/arm64/boot/dts/rockchip/rk3588-base.dtsi+0 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] RK3588: Enable the PHP SMMU

The RK3588 PHP SMMU (MMU600_PHP) is disabled because nothing programs the StreamIDs of its masters (GMAC0/1, SATA0-2, USB3OTG_2) in the PHP GRF. Program them, attach the masters and enable the SMMU.

Shawn Lin asked whether mmu600_php should be enabled too; Heiko asked for the same handling as the PCIe SMMU [3].

Patch 7 needs [1]. Please hold the last patch until [2] is merged:
PD_PHP is off in deep suspend and the SMMU resumes in bypass (GBPA read as 0).

Tested on an Orange Pi 5 (RK3588S), 7.3-based with [2] (my Tested-by is [4]):
- SATA0 root, GMAC1 and a USB3 disk translated: 1 GiB sha256-checked on each; three reboots; no SMMU events or bus errors;
- deep suspend 3/3 with all three translated; s2idle 3/3 with USB3OTG_2 and GMAC1. TF-A v2.15 kept the StreamIDs; patch 6 restored six zeroed for the test (pm_test=core).
Not tested: GMAC0, SATA1/2, the series without [2], the reset (no driver uses it).

Developed with Claude (Anthropic), which wrote the code and the commit messages. I reviewed every change.

[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
[3] https://lore.kernel.org/r/[email protected]
[4] https://lore.kernel.org/r/[email protected]

---
Arun Iyengar (9):
dt-bindings: net: rockchip-dwmac: Allow iommus
dt-bindings: ata: rockchip,dwc-ahci: Allow iommus
dt-bindings: soc: rockchip: grf: Allow a clock for the RK3588 PHP GRF
soc: rockchip: grf: Assign the StreamIDs of the RK3588 PHP SMMU masters
arm64: dts: rockchip: Add the PHP GRF clock on RK3588
soc: rockchip: grf: Restore the RK3588 PHP StreamIDs after system suspend
arm64: dts: rockchip: Add the clock and reset of the RK3588 PHP SMMU
arm64: dts: rockchip: Attach the masters of the RK3588 PHP SMMU
arm64: dts: rockchip: Enable the RK3588 PHP SMMU

 .../devicetree/bindings/ata/rockchip,dwc-ahci.yaml |   3 +
 .../devicetree/bindings/net/rockchip-dwmac.yaml    |   3 +
 .../devicetree/bindings/soc/rockchip/grf.yaml      |  12 ++-
 arch/arm64/boot/dts/rockchip/rk3588-base.dtsi      |   8 +-
 arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi     |   2 +
 drivers/soc/rockchip/grf.c                         | 103 +++++++++++++++++++++
 6 files changed, 128 insertions(+), 3 deletions(-)

---
base-commit: c3baae5f1a15645cddadcb2b9abddef5df291f59
change-id: 20261113-mmu600-php-0367fe7f1609
prerequisite-message-id: <[email protected]>
prerequisite-patch-id: 51134fb38514fa92f20d3831e7905b02c7fbaae6
prerequisite-patch-id: c59ab0be12ec964dc1698dfa3e0d5bfae82d0c54
prerequisite-patch-id: 845e9980a7e0de45c746b7d8b6fd439033e08fdd

Best regards,

Signature · 1 line
Arun Iyengar <[email protected]>