mt8395/mt6359: Fix several dtb-check errors
Subsystems (7)
v2 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 5 interrupts in the MediaTek IOMMU binding to support MT8395 properly.
- Renaming the rtc node to match expected schema naming.
---
Changes in v2:
- Patch 1/3: Add ref to dai-common as suggested by Krzysztof
- Patch 2/3: Only accept 5 interrupts for mt8195 infra IOMMU
- Patch 3/3: Add missing S-o-B
- I did not include the 'Reviewed-by' from Angelo and Nicolas since the 1/3 and 2/3 changed from v1
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Julien Massot (3):
dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU
arm64: dts: mt6359: Rename RTC node to match binding expectations
.../devicetree/bindings/iommu/mediatek,iommu.yaml | 18 +++++++++++++++++- .../devicetree/bindings/mfd/mediatek,mt6397.yaml | 6 ++++++ arch/arm64/boot/dts/mediatek/mt6359.dtsi | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-)
---
base-commit: ed61cb3d78d585209ec775933078e268544fe9a4
change-id: 20250505-mt8395-dtb-errors-0847ffc12f44
Best regards,
Signature · 1 line
Julien Massot <[email protected]>
PATCH v2 1/3 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#
--- Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml +6 -0
@@ -30,6 +30,9 @@ description: | See the following for pwrap node definitions: Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml +allOf: + - $ref: /schemas/sound/dai-common.yaml# + properties: compatible: oneOf:
@@ -53,6 +56,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
Re: [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
Il 14/05/25 10:19, 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")Signed-off-by Julien Massot <[email protected]>
Re: [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
In reply to Julien MassotQuoted 6 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#
If this is a random drive-by, would be fine, but if that's your platform which you should know, then I expect this to be a real reason instead something which can easily be rejected with: what if DTS is wrong?
I could not find the ASoC driver for that compatible and quick glance to MFD shown me no usage of dai cells, so you need proper explanation here.
Especially, that there is a subnode audio-codec, so adding dai cells to the parent node feels just wrong. One is wrong - either subnode or parent is a codec.
Quoted 22 lines
Fixes 9bc8353be720 ("arm64: dts: mt6359: Add #sound-dai-cells property")Signed-off-by Julien Massot <[email protected]>--- Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml | 6 ++++++ 1 file changed, 6 insertions(+)Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml +3
-0@@ -30,6 +30,9 @@ description: | See the following for pwrap node definitions: Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml +allOf: + - $ref: /schemas/sound/dai-common.yaml# + properties: compatible: oneOf:
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml properties: · line 60
Quoted 5 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml +2
-0@@ -53,6 +56,9 @@ properties: "#interrupt-cells": const: 2 + '#sound-dai-cells': + const: 1
Also extend the example, if there is one for such device.
Best regards,
Krzysztof
Re: [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
Quoted 12 lines · Krzysztof Kozlowski
Quoted 6 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#
If this is a random drive-by, would be fine, but if that's your platform which you should know, then I expect this to be a real reason instead something which can easily be rejected with: what if DTS is wrong?
Quoted 6 lines
I could not find the ASoC driver for that compatible and quick glance to MFD shown me no usage of dai cells, so you need proper explanation here.
Especially, that there is a subnode audio-codec, so adding dai cells to the parent node feels just wrong. One is wrong - either subnode or parent is a codec.
The driver is sound/soc/codecs/mt6359.c, which defines 2 DAIs. It's currently probed by the MFD through the driver name, hence the parent MFD device is the one used to register the audio component.
The right fix would probably be to add the compatible both to the ASoC and the MFD drivers, and then move the dai-cells to the sound subnode in DT.
Thanks,
Nícolas
Re: [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
Quoted 16 lines · Nícolas F. R. A. Prado
Quoted 15 lines · Krzysztof Kozlowski
Quoted 6 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#
If this is a random drive-by, would be fine, but if that's your platform which you should know, then I expect this to be a real reason instead something which can easily be rejected with: what if DTS is wrong?
I could not find the ASoC driver for that compatible and quick glance to MFD shown me no usage of dai cells, so you need proper explanation here.
Quoted 6 lines
Quoted 3 lines
Especially, that there is a subnode audio-codec, so adding dai cells to the parent node feels just wrong. One is wrong - either subnode or parent is a codec.
The driver is
sound/soc/codecs/mt6359.c, which defines 2 DAIs. It's currently probed by the MFD through the driver name, hence the parent MFD device is the
It does not matter whether MFD or simple bus instantiates a device. Really.
Quoted 1 line
one used to register the audio component.
I see codecs/mt6359.c registering the component, not the parent MFD device. This change does not look right but maybe the binding needs fixes as well.
Best regards,
Krzysztof
PATCH v2 2/3 dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU
In reply to Julien MassotThe MT8195 Infra IOMMU is currently the only Mediatek IOMMU instance that uses five interrupts instead of one.
Update the binding to allow either one or five interrupts, depending on the compatible string. This avoids dtbs_check errors on platforms like the Radxa NIO 12L using the MT8395 SoC:
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
--- .../devicetree/bindings/iommu/mediatek,iommu.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +17 -1
@@ -97,7 +97,8 @@ properties: maxItems: 1 interrupts: - maxItems: 1 + minItems: 1 + maxItems: 5 clocks: items:
@@ -201,6 +202,21 @@ allOf: required: - mediatek,infracfg + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8195-iommu-infra + then: + properties: + interrupts: + minItems: 5 + else: + properties: + interrupts: + maxItems: 1 + - if: # The IOMMUs don't have larbs. not: properties:
Signature · 1 line
2.49.0
Re: [PATCH v2 2/3] dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU
Quoted 14 lines · Julien Massot
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +2
-1@@ -97,7 +97,8 @@ properties: maxItems: 1 interrupts: - maxItems: 1 + minItems: 1 + maxItems: 5 clocks: items:@@ -201,6 +202,21 @@ allOf: required: - mediatek,infracfg
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml allOf: · line 214
Quoted 10 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +10
-0+ - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8195-iommu-infra + then: + properties: + interrupts: + minItems: 5
Instead list the items here and in else:, or in top-level if first interrupt is the same.
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml allOf: · line 218
Quoted 4 lines
Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +4
-0+ else: + properties: + interrupts: + maxItems: 1
Best regards,
Krzysztof
PATCH v2 3/3 arm64: dts: mt6359: Rename RTC node to match binding expectations
In reply to Julien MassotRename 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]+'
--- arch/arm64/boot/dts/mediatek/mt6359.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt6359.dtsi +1 -1
@@ -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
Re: [PATCH v2 3/3] arm64: dts: mt6359: Rename RTC node to match binding expectations
Il 14/05/25 10:19, Julien Massot ha scritto:
Quoted 9 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")Signed-off-by Julien Massot <[email protected]>
Re: (subset) [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors
In reply to Julien MassotQuoted 8 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 5 interrupts in the MediaTek IOMMU binding to support MT8395 properly.
- Renaming the rtc node to match expected schema naming.[...]
Applied to v6.15-next/dts64, thanks!
[3/3] arm64: dts: mt6359: Rename RTC node to match binding expectations
commit: e19de38cca6d037bf3ab5b9908d49e230f817062
Cheers,
Angelo