Re: [PATCH v2 1/2] dt-bindings: iommu: rockchip: Add support for multiple interface clocks

Chaoyi Chen
2025-12-01T10:09:58Z

On 12/1/2025 4:39 PM, Krzysztof Kozlowski wrote:
> On 01/12/2025 09:10, Chaoyi Chen wrote:
>>>> + - if:
>>>> + properties:
>>>> + compatible:
>>>> + items:
>>>> + - const: rockchip,iommu
>>>> + - const: rockchip,rk3568-iommu
>>>> + then:
>>>> + properties:
>>>> + clocks:
>>>> + maxItems: 2
>>>
>>> Why this is unspecific now? Please look at other examples how it is
>>> done, e.g. Samsung clocks.
>>
>> I looked at some examples. Maybe it need to set both minItems and
>> maxItems here? I'm not sure I understood your point.
>
> Individual items were described before. Now they are not, so first item
> can be anything.
>
> You need to define the list. If the devices have completely different
> clocks, then you would go with Samsung approach. But devices should not
> have completely different clocks, so you should define common parts in
> top-level and just narrow number of items here. maxItems is enough in
> such case.

Ah, it looks like Samsung's clock bindings rarely have common parts.
At present, there are indeed some common parts for the IOMMU clock,
but I'm not sure how other variants will change.

I'll give this a try, thank you!

--
Best,
Chaoyi