Some Mediatek IOMMU can have up to five interrupts so increase
the 'maxItems' to 5.
Fix the following dtb-check error:
mediatek/mt8395-radxa-nio-12l.dtb: infra-iommu@10315000: interrupts:
[[0, 795, 4, 0], [0, 796, 4, 0], [0, 797, 4, 0], [0, 798, 4, 0], [0, 799, 4, 0]] is too long
Fixes: 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
--- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
@@ -97,7 +97,8 @@ properties:
maxItems: 1
interrupts:
- maxItems: 1
+ minItems: 1
+ maxItems: 5
clocks:
items:
--
2.49.0
On 05/05/2025 15:23, Julien Massot wrote:
>
> Fixes: 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
> Signed-off-by: Julien Massot <julien.massot@collabora.com>
> ---
> Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
> --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> @@ -97,7 +97,8 @@ properties:
> maxItems: 1
>
> interrupts:
> - maxItems: 1
> + minItems: 1
> + maxItems: 5
>
Every iommu or just some (as described in commit msg) can have 5
interrupts? Looks you miss here proper constraints per variant.
Best regards,
Krzysztof
Il 08/05/25 08:03, Krzysztof Kozlowski ha scritto:
> On 05/05/2025 15:23, Julien Massot wrote:
>>
>> Fixes: 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
>> Signed-off-by: Julien Massot <julien.massot@collabora.com>
>> ---
>> Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
>> index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
>> --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
>> +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
>> @@ -97,7 +97,8 @@ properties:
>> maxItems: 1
>>
>> interrupts:
>> - maxItems: 1
>> + minItems: 1
>> + maxItems: 5
>>
> Every iommu or just some (as described in commit msg) can have 5
> interrupts? Looks you miss here proper constraints per variant.
>
Technically, all of the IOMMUs can have more than one interrupt - but it's not
clear which one and why, as documentation is lacking.
Let's restrict this discussion to MT8195 anyway, as it's the only one declaring
those 5 interrupts...
...all of the IOMMUs declare just one, and mediatek,mt8195-iommu-infra declares 5.
P.S.: Nice catch!
Cheers,
Angelo
Hi Krzysztof, Angelo,
On Thu, 2025-05-08 at 10:34 +0200, AngeloGioacchino Del Regno wrote:
> Il 08/05/25 08:03, Krzysztof Kozlowski ha scritto:
> > On 05/05/2025 15:23, Julien Massot wrote:
> > >
> > > Fixes: 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
> > > Signed-off-by: Julien Massot <julien.massot@collabora.com>
> > > ---
> > > Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > > b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > > index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251
> > > 100644
> > > --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > > +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > > @@ -97,7 +97,8 @@ properties:
> > > maxItems: 1
> > >
> > > interrupts:
> > > - maxItems: 1
> > > + minItems: 1
> > > + maxItems: 5
> > >
> > Every iommu or just some (as described in commit msg) can have 5
> > interrupts? Looks you miss here proper constraints per variant.
> >
> Technically, all of the IOMMUs can have more than one interrupt - but it's not
> clear which one and why, as documentation is lacking.
>
> Let's restrict this discussion to MT8195 anyway, as it's the only one declaring
> those 5 interrupts...
> ...all of the IOMMUs declare just one, and mediatek,mt8195-iommu-infra declares 5.
Setting 5 interrupts will be restricted to mt8195 infra iommu in the v2.
Regards,
Julien
Il 05/05/25 15:23, Julien Massot ha scritto:
> Some Mediatek IOMMU can have up to five interrupts so increase
> the 'maxItems' to 5.
>
> Fix the following dtb-check error:
>
> mediatek/mt8395-radxa-nio-12l.dtb: infra-iommu@10315000: interrupts:
> [[0, 795, 4, 0], [0, 796, 4, 0], [0, 797, 4, 0], [0, 798, 4, 0], [0, 799, 4, 0]] is too long
>
> Fixes: 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
> Signed-off-by: Julien Massot <julien.massot@collabora.com>
> ---
> Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
> --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> @@ -97,7 +97,8 @@ properties:
> maxItems: 1
>
> interrupts:
> - maxItems: 1
> + minItems: 1
Isn't minItems already implicitly 1? :-)
Cheers,
Angelo
> + maxItems: 5
>
> clocks:
> items:
>
Hi Angelo,
On Tue, 2025-05-06 at 10:34 +0200, AngeloGioacchino Del Regno wrote:
> Il 05/05/25 15:23, Julien Massot ha scritto:
> > Some Mediatek IOMMU can have up to five interrupts so increase
> > the 'maxItems' to 5.
> >
> > Fix the following dtb-check error:
> >
> > mediatek/mt8395-radxa-nio-12l.dtb: infra-iommu@10315000: interrupts:
> > [[0, 795, 4, 0], [0, 796, 4, 0], [0, 797, 4, 0], [0, 798, 4, 0], [0, 799, 4, 0]] is too long
> >
> > Fixes: 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
> > Signed-off-by: Julien Massot <julien.massot@collabora.com>
> > ---
> > Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
> > --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > @@ -97,7 +97,8 @@ properties:
> > maxItems: 1
> >
> > interrupts:
> > - maxItems: 1
> > + minItems: 1
>
> Isn't minItems already implicitly 1? :-)
>
> Looks not, from my understanding if 'minItems' is omitted then
dt-schema is setting it to 'maxItems'.
https://github.com/devicetree-org/dt-schema/blob/v2025.02/dtschema/fixups.py#L129
And you will have an error for a one item interrupts:
Documentation/devicetree/bindings/iommu/mediatek,iommu.example.dtb: iommu@10205000: interrupts: [[0,
139, 8]] is too short
Regards,
Julien
Il 06/05/25 12:03, Julien Massot ha scritto:
> Hi Angelo,
>
> On Tue, 2025-05-06 at 10:34 +0200, AngeloGioacchino Del Regno wrote:
>> Il 05/05/25 15:23, Julien Massot ha scritto:
>>> Some Mediatek IOMMU can have up to five interrupts so increase
>>> the 'maxItems' to 5.
>>>
>>> Fix the following dtb-check error:
>>>
>>> mediatek/mt8395-radxa-nio-12l.dtb: infra-iommu@10315000: interrupts:
>>> [[0, 795, 4, 0], [0, 796, 4, 0], [0, 797, 4, 0], [0, 798, 4, 0], [0, 799, 4, 0]] is too long
>>>
>>> Fixes: 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
>>> Signed-off-by: Julien Massot <julien.massot@collabora.com>
>>> ---
>>> Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
>>> b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
>>> index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
>>> --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
>>> +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
>>> @@ -97,7 +97,8 @@ properties:
>>> maxItems: 1
>>>
>>> interrupts:
>>> - maxItems: 1
>>> + minItems: 1
>>
>> Isn't minItems already implicitly 1? :-)
>>
>> Looks not, from my understanding if 'minItems' is omitted then
> dt-schema is setting it to 'maxItems'.
> https://github.com/devicetree-org/dt-schema/blob/v2025.02/dtschema/fixups.py#L129
>
> And you will have an error for a one item interrupts:
> Documentation/devicetree/bindings/iommu/mediatek,iommu.example.dtb: iommu@10205000: interrupts: [[0,
> 139, 8]] is too short
>
Whoops, you're right.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
© 2016 - 2026 Red Hat, Inc.