Re: [RFC PATCH v6 3/9] dt-bindings: iommu: rockchip: allow the RK3576 NPU MMU clock set

"Diederik de Haas" <[email protected]> Thu, 06 Aug 2026 13:29:05 +0200
Newsgroups dev.linux.lists.iommu,org.freedesktop.lists.dri-devel,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Jiaxing,

On Thu Aug 6, 2026 at 11:55 AM CEST, Jiaxing Hu wrote:
> Hi Diederik,
>
>> Now every MMU with "rockchip,rk3568-iommu", "rockchip,rk3588-iommu" or
>> "rockchip,rk3576-iommu" is allowed to have a minimum of 2 clocks, instead
>> of having exactly 2 clocks. That does not sound desirable.
>
> You are right, and it is worse than sounding undesirable, it actually

Yeah, it was a 'bit' of an understatement ;-)

> happens. I gave an RK3588 NPU MMU a bogus third clock and v6's schema
> accepted it without a word. That is a real loss of coverage for every
> existing Rockchip IOMMU and I should not have sent it that way.
>
> Fixed for v7 the way you and the bot suggest, with a compatible of its
> own:

If you haven't already, it's probably worth checking whether Sashiko made
other useful remarks. I don't feel qualified to judge those, so I didn't
reference those. But they made be valid as well. Or hallucinations ;-)

>   compatible = "rockchip,rk3576-npu-iommu", "rockchip,rk3568-iommu";
>
> and an allOf that pins each side:
>
>   if compatible contains rockchip,rk3576-npu-iommu
>     then clocks/clock-names minItems: 5
>     else clocks/clock-names maxItems: 2
>
> so the NPU MMUs are required to carry all five and everything else is
> back to exactly two. Checked in both directions: the three clock RK3588
> node is rejected again, an NPU MMU with only aclk and iface is rejected,
> and every rockchip dtb in the tree validates clean.
>
> No driver change goes with it. rk_iommu matches only "rockchip,iommu"
> and "rockchip,rk3568-iommu", and the fallback stays, so the new string
> is documentation only.

I'll leave it up to others to comment whether that's correct or not.

Another thing you could consider is splitting this NPU iommu 'stuff' into
a separate patch set and drop the RFC 'prefix' for that series.
IIUC the RFC is (only) related to the working of the NPU on RK3576.

Cheers,
  Diederik

> The name is the part I am least sure of. Everything else in that binding
> ends in -iommu, which is why I did not use -mmu to pair with the
> rknn-core node it belongs to. Happy to change it if Heiko or Krzysztof
> prefer something else.
>
> Thanks for catching it.
>
> Cheers,
> Jiaxing
>
> _______________________________________________
> Linux-rockchip mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-rockchip