linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors
@ 2025-05-14  8:19 Julien Massot
  2025-05-14  8:19 ` [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property Julien Massot
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Julien Massot @ 2025-05-14  8:19 UTC (permalink / raw)
  To: kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Nícolas F. R. A. Prado, Hui Liu,
	Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy, Tinghan Shen
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu, Julien Massot

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.

Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
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/20250505-mt8395-dtb-errors-v1-0-9c4714dcdcdb@collabora.com

---
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,
-- 
Julien Massot <julien.massot@collabora.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
  2025-05-14  8:19 [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors Julien Massot
@ 2025-05-14  8:19 ` Julien Massot
  2025-05-14 13:45   ` AngeloGioacchino Del Regno
  2025-05-22  7:52   ` Krzysztof Kozlowski
  2025-05-14  8:19 ` [PATCH v2 2/3] dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU Julien Massot
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Julien Massot @ 2025-05-14  8:19 UTC (permalink / raw)
  To: kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Nícolas F. R. A. Prado, Hui Liu,
	Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy, Tinghan Shen
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu, 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")
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
index 6a89b479d10fad3c8b61cab5a3af1453baca4d1a..9580c4ec1ae00f1dd1182357d8b0a5035a1b7f82 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
@@ -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#

-- 
2.49.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 2/3] dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU
  2025-05-14  8:19 [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors Julien Massot
  2025-05-14  8:19 ` [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property Julien Massot
@ 2025-05-14  8:19 ` Julien Massot
  2025-05-22  8:08   ` Krzysztof Kozlowski
  2025-05-14  8:19 ` [PATCH v2 3/3] arm64: dts: mt6359: Rename RTC node to match binding expectations Julien Massot
  2025-05-20 10:25 ` (subset) [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors AngeloGioacchino Del Regno
  3 siblings, 1 reply; 11+ messages in thread
From: Julien Massot @ 2025-05-14  8:19 UTC (permalink / raw)
  To: kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Nícolas F. R. A. Prado, Hui Liu,
	Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy, Tinghan Shen
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu, Julien Massot

The 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

Fixes: 3b5838d1d82e3 ("arm64: dts: mt8195: Add iommu and smi nodes")
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 .../devicetree/bindings/iommu/mediatek,iommu.yaml      | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
index 75750c64157c868725c087500ac81be4e282c829..5068617a5146c8a8d61234d83c19d2848d5e708f 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:
@@ -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:

-- 
2.49.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 3/3] arm64: dts: mt6359: Rename RTC node to match binding expectations
  2025-05-14  8:19 [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors Julien Massot
  2025-05-14  8:19 ` [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property Julien Massot
  2025-05-14  8:19 ` [PATCH v2 2/3] dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU Julien Massot
@ 2025-05-14  8:19 ` Julien Massot
  2025-05-14 13:43   ` AngeloGioacchino Del Regno
  2025-05-20 10:25 ` (subset) [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors AngeloGioacchino Del Regno
  3 siblings, 1 reply; 11+ messages in thread
From: Julien Massot @ 2025-05-14  8:19 UTC (permalink / raw)
  To: kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Nícolas F. R. A. Prado, Hui Liu,
	Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy, Tinghan Shen
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu, 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")
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 arch/arm64/boot/dts/mediatek/mt6359.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt6359.dtsi b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
index 0c479404b3fe3adc9789386e34bda4dc580b5abd..467d8a4c2aa7f16ade92a287ecdeed5089302045 100644
--- a/arch/arm64/boot/dts/mediatek/mt6359.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
@@ -300,7 +300,7 @@ mt6359_vsram_others_sshub_ldo: ldo_vsram_others_sshub {
 			};
 		};
 
-		mt6359rtc: mt6359rtc {
+		mt6359rtc: rtc {
 			compatible = "mediatek,mt6358-rtc";
 		};
 	};

-- 
2.49.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: mt6359: Rename RTC node to match binding expectations
  2025-05-14  8:19 ` [PATCH v2 3/3] arm64: dts: mt6359: Rename RTC node to match binding expectations Julien Massot
@ 2025-05-14 13:43   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 11+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-05-14 13:43 UTC (permalink / raw)
  To: Julien Massot, kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	Nícolas F. R. A. Prado, Hui Liu, Yong Wu, Joerg Roedel,
	Will Deacon, Robin Murphy, Tinghan Shen
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu

Il 14/05/25 10:19, Julien Massot ha scritto:
> 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 <julien.massot@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
  2025-05-14  8:19 ` [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property Julien Massot
@ 2025-05-14 13:45   ` AngeloGioacchino Del Regno
  2025-05-22  7:52   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 11+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-05-14 13:45 UTC (permalink / raw)
  To: Julien Massot, kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	Nícolas F. R. A. Prado, Hui Liu, Yong Wu, Joerg Roedel,
	Will Deacon, Robin Murphy, Tinghan Shen
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu

Il 14/05/25 10:19, Julien Massot ha scritto:
> 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 <julien.massot@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: (subset) [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors
  2025-05-14  8:19 [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors Julien Massot
                   ` (2 preceding siblings ...)
  2025-05-14  8:19 ` [PATCH v2 3/3] arm64: dts: mt6359: Rename RTC node to match binding expectations Julien Massot
@ 2025-05-20 10:25 ` AngeloGioacchino Del Regno
  3 siblings, 0 replies; 11+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-05-20 10:25 UTC (permalink / raw)
  To: kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	Nícolas F. R. A. Prado, Hui Liu, Yong Wu, Joerg Roedel,
	Will Deacon, Robin Murphy, Tinghan Shen, Julien Massot
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu

On Wed, 14 May 2025 10:19:55 +0200, Julien Massot wrote:
> 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




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
  2025-05-14  8:19 ` [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property Julien Massot
  2025-05-14 13:45   ` AngeloGioacchino Del Regno
@ 2025-05-22  7:52   ` Krzysztof Kozlowski
  2025-05-29 15:53     ` Nícolas F. R. A. Prado
  1 sibling, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-22  7:52 UTC (permalink / raw)
  To: Julien Massot
  Cc: kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Nícolas F. R. A. Prado, Hui Liu,
	Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy, Tinghan Shen,
	linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu

On Wed, May 14, 2025 at 10:19:56AM GMT, Julien Massot wrote:
> 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.

> 
> Fixes: 9bc8353be720 ("arm64: dts: mt6359: Add #sound-dai-cells property")
> Signed-off-by: Julien Massot <julien.massot@collabora.com>
> ---
>  Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
> index 6a89b479d10fad3c8b61cab5a3af1453baca4d1a..9580c4ec1ae00f1dd1182357d8b0a5035a1b7f82 100644
> --- a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
> @@ -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

Also extend the example, if there is one for such device.

Best regards,
Krzysztof



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU
  2025-05-14  8:19 ` [PATCH v2 2/3] dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU Julien Massot
@ 2025-05-22  8:08   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-22  8:08 UTC (permalink / raw)
  To: Julien Massot
  Cc: kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Nícolas F. R. A. Prado, Hui Liu,
	Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy, Tinghan Shen,
	linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, iommu

On Wed, May 14, 2025 at 10:19:57AM GMT, Julien Massot wrote:
> @@ -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

Instead list the items here and in else:, or in top-level if first
interrupt is the same.

> +    else:
> +      properties:
> +        interrupts:
> +          maxItems: 1

Best regards,
Krzysztof



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
  2025-05-22  7:52   ` Krzysztof Kozlowski
@ 2025-05-29 15:53     ` Nícolas F. R. A. Prado
  2025-06-06  8:27       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 11+ messages in thread
From: Nícolas F. R. A. Prado @ 2025-05-29 15:53 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Julien Massot, kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Hui Liu, Yong Wu, Joerg Roedel,
	Will Deacon, Robin Murphy, Tinghan Shen, linux-pm, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek, iommu

On Thu, May 22, 2025 at 09:52:07AM +0200, Krzysztof Kozlowski wrote:
> On Wed, May 14, 2025 at 10:19:56AM GMT, Julien Massot wrote:
> > 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.

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property
  2025-05-29 15:53     ` Nícolas F. R. A. Prado
@ 2025-06-06  8:27       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-06-06  8:27 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Julien Massot, kernel, Sen Chu, Sean Wang, Macpaul Lin, Lee Jones,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Hui Liu, Yong Wu, Joerg Roedel,
	Will Deacon, Robin Murphy, Tinghan Shen, linux-pm, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek, iommu

On 29/05/2025 17:53, Nícolas F. R. A. Prado wrote:
> On Thu, May 22, 2025 at 09:52:07AM +0200, Krzysztof Kozlowski wrote:
>> On Wed, May 14, 2025 at 10:19:56AM GMT, Julien Massot wrote:
>>> 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.
> 
> 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.

> 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-06-06  8:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14  8:19 [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors Julien Massot
2025-05-14  8:19 ` [PATCH v2 1/3] dt-bindings: mfd: mediatek: mt6397: Add #sound-dai-cells property Julien Massot
2025-05-14 13:45   ` AngeloGioacchino Del Regno
2025-05-22  7:52   ` Krzysztof Kozlowski
2025-05-29 15:53     ` Nícolas F. R. A. Prado
2025-06-06  8:27       ` Krzysztof Kozlowski
2025-05-14  8:19 ` [PATCH v2 2/3] dt-bindings: iommu: mediatek: Support 5 IRQs on MT8195 infra IOMMU Julien Massot
2025-05-22  8:08   ` Krzysztof Kozlowski
2025-05-14  8:19 ` [PATCH v2 3/3] arm64: dts: mt6359: Rename RTC node to match binding expectations Julien Massot
2025-05-14 13:43   ` AngeloGioacchino Del Regno
2025-05-20 10:25 ` (subset) [PATCH v2 0/3] mt8395/mt6359: Fix several dtb-check errors AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).