Skip to contentSkip to conversation

mt8395/mt6359: Fix several dtb-check errors

PATCH Applied Julien Massot 4 participants 18 messages May 5, 2025 – May 14, 2025

Subsystems (7)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover mt8395/mt6359: Fix several dtb-check errors

Hi,
This patch series addresses several dtb-check errors reported for the mt8395-genio-1200-evk.dtb and mt8395-radxa-nio-12l.dtb device trees.

The fixes include:
- Adding the missing #sound-dai-cells property in the mt6397 binding.
- Allowing up to 5 interrupts in the MediaTek IOMMU binding to support MT8395 properly.
- Defining the required compatible property in the regulators node of the mt6359.dtsi.
- Renaming the rtc node to match expected schema naming.

---
Julien Massot (4):
dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
dt-bindings: iommu: mediatek: mt8195 Accept up to 5 interrupts
arm64: dts: mt6359: Add missing 'compatible' property to regulators node
arm64: dts: mt6359: Rename RTC node to match binding expectations

 Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml  | 3 +++
 arch/arm64/boot/dts/mediatek/mt6359.dtsi                    | 4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)

---
base-commit: 407f60a151df3c44397e5afc0111eb9b026c38d3
change-id: 20250505-mt8395-dtb-errors-0847ffc12f44

Best regards,

Signature · 1 line
Julien Massot <[email protected]>
#1 lore raw

PATCH 1/4 dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property

The 'mt6359.dtsi' file already uses the '#sound-dai-cells' property. Add the corresponding property to the binding to fix the following dtb-check error:

mediatek/mt8395-radxa-nio-12l.dtb: pmic: '#sound-dai-cells', 'mt6359rtc' do not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#

Fixes 9bc8353be720 ("arm64: dts: mt6359: Add #sound-dai-cells property")
---
 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml +3 -0
index 6a89b479d10fad3c8b61cab5a3af1453baca4d1a..86fc1b5db3b075ea0f6e35f58ecbca7956d230c4 100644
@@ -53,6 +53,9 @@ properties:
   "#interrupt-cells":
     const: 2
 
+  '#sound-dai-cells':
+    const: 1
+
   rtc:
     type: object
     $ref: /schemas/rtc/rtc.yaml#
Signature · 1 line
2.49.0
maintainer Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property

Il 05/05/25 15:23, Julien Massot ha scritto:

Quoted 9 lines

The 'mt6359.dtsi' file already uses the '#sound-dai-cells' property. Add the corresponding property to the binding to fix the following dtb-check error:

mediatek/mt8395-radxa-nio-12l.dtb: pmic: '#sound-dai-cells', 'mt6359rtc' do not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#

Fixes 9bc8353be720 ("arm64: dts: mt6359: Add #sound-dai-cells property")
Reviewed-by on v1 1/4
#3 lore raw

Re: [PATCH 1/4] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property

In reply to Julien Massot
Quoted 9 lines · Julien Massot

The 'mt6359.dtsi' file already uses the '#sound-dai-cells' property. Add the corresponding property to the binding to fix the following dtb-check error:

mediatek/mt8395-radxa-nio-12l.dtb: pmic: '#sound-dai-cells', 'mt6359rtc' do not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#

Fixes 9bc8353be720 ("arm64: dts: mt6359: Add #sound-dai-cells property")

Thanks,
Nícolas

#4 lore raw

Re: [PATCH 1/4] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property

In reply to Julien Massot
Quoted 3 lines · Julien Massot

The 'mt6359.dtsi' file already uses the '#sound-dai-cells' property. Add the corresponding property to the binding to fix the following dtb-check error:

If this is a DAI, then you miss dai-common reference. If not, you need to explain it in commit msg.

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH 1/4] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property

Hi Krzysztof,

Quoted 6 lines · Krzysztof Kozlowski
Quoted 3 lines · Julien Massot

The 'mt6359.dtsi' file already uses the '#sound-dai-cells' property. Add the corresponding property to the binding to fix the following dtb-check error:

If this is a DAI, then you miss dai-common reference. If not, you need to explain it in commit msg.

Thanks for the review, I will add the missing dai-common reference in the v2.

Regards,
Julien

#6 lore raw

PATCH 2/4 dt-bindings: iommu: mediatek: mt8195 Accept up to 5 interrupts

In reply to Julien Massot

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")
---
 Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +2 -1
index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
@@ -97,7 +97,8 @@ properties:
     maxItems: 1
 
   interrupts:
-    maxItems: 1
+    minItems: 1
+    maxItems: 5
 
   clocks:
     items:
Signature · 1 line
2.49.0
#7 lore raw

Re: [PATCH 2/4] dt-bindings: iommu: mediatek: mt8195 Accept up to 5 interrupts

Il 05/05/25 15:23, Julien Massot ha scritto:

Quoted 19 lines

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")
---
  Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml properties: · line 100

Quoted 5 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +1 -1
@@ -97,7 +97,8 @@ properties:
      maxItems: 1
 
    interrupts:
-    maxItems: 1
+    minItems: 1

Isn't minItems already implicitly 1? :-)

Cheers,
Angelo

Quoted 5 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +1 -0
+    maxItems: 5
 
    clocks:
      items:
#8 lore raw

Re: [PATCH 2/4] dt-bindings: iommu: mediatek: mt8195 Accept up to 5 interrupts

Hi Angelo,

Quoted 29 lines · AngeloGioacchino Del Regno

Il 05/05/25 15:23, Julien Massot ha scritto:

Quoted 20 lines

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")

---
  Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
@@ -97,7 +97,8 @@ properties:
Quoted 5 lines

      maxItems: 1

    interrupts:
-    maxItems: 1
+    minItems: 1

Isn't minItems already implicitly 1? :-)

Quoted 1 line

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

maintainer Reviewed-by
#9 lore raw

Re: [PATCH 2/4] dt-bindings: iommu: mediatek: mt8195 Accept up to 5 interrupts

Il 06/05/25 12:03, Julien Massot ha scritto:

Quoted 32 lines

Hi Angelo,

Quoted 29 lines · AngeloGioacchino Del Regno

Il 05/05/25 15:23, Julien Massot ha scritto:

Quoted 20 lines

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")
---
   Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml properties: · line 100

Quoted 5 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +1 -1
@@ -97,7 +97,8 @@ properties:
       maxItems: 1
 
     interrupts:
-    maxItems: 1
+    minItems: 1

Isn't minItems already implicitly 1? :-)

Quoted 8 lines
Quoted 1 line

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.

#10 lore raw

Re: [PATCH 2/4] dt-bindings: iommu: mediatek: mt8195 Accept up to 5 interrupts

In reply to Julien Massot
Quoted 12 lines · Julien Massot
Fixes 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
---
 Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml properties: · line 102

Quoted 7 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +2 -1
@@ -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

#11 lore raw

Re: [PATCH 2/4] dt-bindings: iommu: mediatek: mt8195 Accept up to 5 interrupts

Il 08/05/25 08:03, Krzysztof Kozlowski ha scritto:

Quoted 15 lines · Julien Massot
Quoted 14 lines
Fixes 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
---
  Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251 100644
@@ -97,7 +97,8 @@ properties:
      maxItems: 1
 
Quoted 8 lines

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml properties: · line 102

Quoted 5 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +2 -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

#12 lore raw

Re: [PATCH 2/4] dt-bindings: iommu: mediatek: mt8195 Accept up to 5 interrupts

Hi Krzysztof, Angelo,

Quoted 26 lines · AngeloGioacchino Del Regno

Il 08/05/25 08:03, Krzysztof Kozlowski ha scritto:

Quoted 8 lines · Julien Massot
Quoted 7 lines
Fixes 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")

---
  Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 17 lines
Quoted 7 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
index 75750c64157c868725c087500ac81be4e282c829..035941c2db32170e9a69a5363d8c05ef767bb251

100644

Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +0 -0
@@ -97,7 +97,8 @@ properties:
Quoted 7 lines

      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.

Quoted 6 lines

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

#13 lore raw

PATCH 3/4 arm64: dts: mt6359: Add missing 'compatible' property to regulators node

In reply to Julien Massot

The 'compatible' property is required by the 'mfd/mediatek,mt6397.yaml' binding. Add it to fix the following dtb-check error:
mediatek/mt8395-radxa-nio-12l.dtb: pmic: regulators:
'compatible' is a required property

Fixes 3b7d143be4b7 ("arm64: dts: mt6359: add PMIC MT6359 related nodes")
---
 arch/arm64/boot/dts/mediatek/mt6359.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/mediatek/mt6359.dtsi +2 -0
index 7b10f9c59819a9ad02319f00938f35c931091f9f..0c479404b3fe3adc9789386e34bda4dc580b5abd 100644
@@ -20,6 +20,8 @@ mt6359codec: audio-codec {
 		};
 
 		regulators {
+			compatible = "mediatek,mt6359-regulator";
+
 			mt6359_vs1_buck_reg: buck_vs1 {
 				regulator-name = "vs1";
 				regulator-min-microvolt = <800000>;
Signature · 1 line
2.49.0
maintainer Reviewed-by on v1 3/4
#14 lore raw

Re: [PATCH 3/4] arm64: dts: mt6359: Add missing 'compatible' property to regulators node

Il 05/05/25 15:23, Julien Massot ha scritto:

Quoted 8 lines

The 'compatible' property is required by the 'mfd/mediatek,mt6397.yaml' binding. Add it to fix the following dtb-check error:
mediatek/mt8395-radxa-nio-12l.dtb: pmic: regulators:
'compatible' is a required property

Fixes 3b7d143be4b7 ("arm64: dts: mt6359: add PMIC MT6359 related nodes")
#15 lore raw

PATCH 4/4 arm64: dts: mt6359: Rename RTC node to match binding expectations

In reply to Julien Massot

Rename the node 'mt6359rtc' to 'rtc', as required by the binding.

Fix the following dtb-check error:

mediatek/mt8395-radxa-nio-12l.dtb: pmic: 'mt6359rtc' do not match any of the regexes: 'pinctrl-[0-9]+'

Fixes 3b7d143be4b7 ("arm64: dts: mt6359: add PMIC MT6359 related nodes")
---
 arch/arm64/boot/dts/mediatek/mt6359.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt6359.dtsi +1 -1
index 0c479404b3fe3adc9789386e34bda4dc580b5abd..467d8a4c2aa7f16ade92a287ecdeed5089302045 100644
@@ -300,7 +300,7 @@ mt6359_vsram_others_sshub_ldo: ldo_vsram_others_sshub {
 			};
 		};
 
-		mt6359rtc: mt6359rtc {
+		mt6359rtc: rtc {
 			compatible = "mediatek,mt6358-rtc";
 		};
 	};
Signature · 1 line
2.49.0
#16 lore raw

Re: [PATCH 4/4] arm64: dts: mt6359: Rename RTC node to match binding expectations

Il 05/05/25 15:23, Julien Massot ha scritto:

Quoted 8 lines

Rename the node 'mt6359rtc' to 'rtc', as required by the binding.

Fix the following dtb-check error:

mediatek/mt8395-radxa-nio-12l.dtb: pmic: 'mt6359rtc' do not match any of the regexes: 'pinctrl-[0-9]+'

Fixes 3b7d143be4b7 ("arm64: dts: mt6359: add PMIC MT6359 related nodes")

Your S-o-B is missing....

Cheers,
Angelo

maintainer Applied
#17 lore raw

Re: (subset) [PATCH 0/4] mt8395/mt6359: Fix several dtb-check errors

In reply to Julien Massot
Quoted 9 lines · Julien Massot

This patch series addresses several dtb-check errors reported for the mt8395-genio-1200-evk.dtb and mt8395-radxa-nio-12l.dtb device trees.

The fixes include:
- Adding the missing #sound-dai-cells property in the mt6397 binding.
- Allowing up to 5 interrupts in the MediaTek IOMMU binding to support MT8395 properly.
- Defining the required compatible property in the regulators node of the mt6359.dtsi.
- Renaming the rtc node to match expected schema naming.

[...]

Applied to v6.15-next/dts64, thanks!

[3/4] arm64: dts: mt6359: Add missing 'compatible' property to regulators node

      commit: 1fe38d2a19950fa6dbc384ee8967c057aef9faf4

Cheers,
Angelo