linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] MediaTek devicetree/bindings warnings sanitization second round
@ 2025-08-26  7:39 Julien Massot
  2025-08-26  7:39 ` [PATCH v3 1/6] dt-bindings: clock: mediatek: Add power-domains property Julien Massot
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Julien Massot @ 2025-08-26  7:39 UTC (permalink / raw)
  To: kernel, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Ikjoon Jang, Enric Balletbo i Serra,
	Chen-Yu Tsai, Weiyi Lu, Eugen Hristev, Liam Girdwood, Mark Brown,
	Julien Massot, Sean Wang, Linus Walleij
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-sound, linux-gpio, Julien Massot

This patch series continues the effort to address Device Tree validation
warnings for MediaTek platforms, with a focus on MT8183. It follows the
initial cleanup series by Angelo
(https://www.spinics.net/lists/kernel/msg5780177.html).

The patches in this set eliminate several of the remaining warnings by
improving or converting DT bindings to DT schema, adding missing properties,
and updating device tree files accordingly.

Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
Changes in v3:
- Mostly cosmetic updates.
- Patch 1/6: fixed the commit reference in the 'Fixes' tag.
- Patch 1/6: not mentioned in v2, but this patch changed quite a lot
  since v1 after applying Angelo's suggestions, so I dropped Rob's
  'Acked-by' tag.
- Renamed commits from "YAML" to "DT schema", and avoided repetition
  of "bindings".
- Patch 2/6: switched to the generic node name "audio-controller".
- Link to v2:
  https://lore.kernel.org/r/20250820-mtk-dtb-warnings-v2-0-cf4721e58f4e@collabora.com

Merge strategy:
- Patch 1/6 can be picked up independently.
- Patch 2/6 is standalone.
- Patch 3/6 depends on 2/6.
- Patch 4/6 fixes the DTS node name as expected by 3/6.
- Patches 5/6 and 6/6 are independent.

Changes in v2:

- Restrict power-domain usage to mediatek,mt8183-mfgcfg only
- Add the MT8183 AFE binding before audiosys (it is referenced in the example)
  and include the memory-region property
- Rename binding files to align with the compatible name
- Drop former patch 7/9 (already applied via the pinctrl tree)
- Drop patches 8/9 and 9/9 until we decide how to represent R0 and R1 values

---
Julien Massot (6):
      dt-bindings: clock: mediatek: Add power-domains property
      ASoC: dt-binding: Convert mt8183-afe-pcm to dt-schema
      dt-bindings: arm: mediatek: Support mt8183-audiosys variant
      arm64: dts: mt8183: Rename nodes to match audiosys DT schema
      dt-bindings: sound: Convert MT8183 DA7219 sound card to DT schema
      ASoC: dt-binding: Convert MediaTek mt8183-mt6358 to DT schema

 .../bindings/arm/mediatek/mediatek,audsys.yaml     |  16 +-
 .../devicetree/bindings/clock/mediatek,syscon.yaml |  15 ++
 .../bindings/sound/mediatek,mt8183-audio.yaml      | 228 +++++++++++++++++++++
 .../bindings/sound/mediatek,mt8183_da7219.yaml     |  49 +++++
 .../sound/mediatek,mt8183_mt6358_ts3a227.yaml      |  59 ++++++
 .../devicetree/bindings/sound/mt8183-afe-pcm.txt   |  42 ----
 .../bindings/sound/mt8183-da7219-max98357.txt      |  21 --
 .../sound/mt8183-mt6358-ts3a227-max98357.txt       |  25 ---
 arch/arm64/boot/dts/mediatek/mt8183.dtsi           |   4 +-
 9 files changed, 368 insertions(+), 91 deletions(-)
---
base-commit: 9df95ca9b379cb29aa0f75c4ca86d7b2293d8bf9
change-id: 20250801-mtk-dtb-warnings-157d4fc10f77

Best regards,
-- 
Julien Massot <julien.massot@collabora.com>


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

* [PATCH v3 1/6] dt-bindings: clock: mediatek: Add power-domains property
  2025-08-26  7:39 [PATCH v3 0/6] MediaTek devicetree/bindings warnings sanitization second round Julien Massot
@ 2025-08-26  7:39 ` Julien Massot
  2025-08-26 19:57   ` Rob Herring (Arm)
  2025-08-26  7:39 ` [PATCH v3 2/6] ASoC: dt-binding: Convert mt8183-afe-pcm to dt-schema Julien Massot
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Julien Massot @ 2025-08-26  7:39 UTC (permalink / raw)
  To: kernel, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Ikjoon Jang, Enric Balletbo i Serra,
	Chen-Yu Tsai, Weiyi Lu, Eugen Hristev, Liam Girdwood, Mark Brown,
	Julien Massot, Sean Wang, Linus Walleij
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-sound, linux-gpio, Julien Massot

The mt8183-mfgcfg node uses a power domain in its device tree node.
To prevent schema validation warnings, add the optional `power-domains`
property to the binding schema for mediatek syscon clocks.

Fixes: 1781f2c46180 ("arm64: dts: mediatek: mt8183: Add power-domains properity to mfgcfg")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 .../devicetree/bindings/clock/mediatek,syscon.yaml        | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/mediatek,syscon.yaml b/Documentation/devicetree/bindings/clock/mediatek,syscon.yaml
index a86a64893c675ac134af609b3a49242565db6ad8..a52f90bfc9f92b52feb9f488db5550630ac55f0a 100644
--- a/Documentation/devicetree/bindings/clock/mediatek,syscon.yaml
+++ b/Documentation/devicetree/bindings/clock/mediatek,syscon.yaml
@@ -76,6 +76,9 @@ properties:
           - const: mediatek,mt2701-vdecsys
           - const: syscon
 
+  power-domains:
+    maxItems: 1
+
   reg:
     maxItems: 1
 
@@ -86,6 +89,18 @@ required:
   - compatible
   - '#clock-cells'
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: mediatek,mt8183-mfgcfg
+then:
+  properties:
+    power-domains: true
+else:
+  properties:
+    power-domains: false
+
 additionalProperties: false
 
 examples:

-- 
2.50.1


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

* [PATCH v3 2/6] ASoC: dt-binding: Convert mt8183-afe-pcm to dt-schema
  2025-08-26  7:39 [PATCH v3 0/6] MediaTek devicetree/bindings warnings sanitization second round Julien Massot
  2025-08-26  7:39 ` [PATCH v3 1/6] dt-bindings: clock: mediatek: Add power-domains property Julien Massot
@ 2025-08-26  7:39 ` Julien Massot
  2025-08-26  7:39 ` [PATCH v3 3/6] dt-bindings: arm: mediatek: Support mt8183-audiosys variant Julien Massot
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Julien Massot @ 2025-08-26  7:39 UTC (permalink / raw)
  To: kernel, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Ikjoon Jang, Enric Balletbo i Serra,
	Chen-Yu Tsai, Weiyi Lu, Eugen Hristev, Liam Girdwood, Mark Brown,
	Julien Massot, Sean Wang, Linus Walleij
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-sound, linux-gpio, Julien Massot

Convert the MediaTek MT8183 AFE PCM Device Tree binding from the old
.txt format to dt-schema format to improve validation.

While converting, also document all clock inputs and memory-region
used by the AFE block.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 .../bindings/sound/mediatek,mt8183-audio.yaml      | 228 +++++++++++++++++++++
 .../devicetree/bindings/sound/mt8183-afe-pcm.txt   |  42 ----
 2 files changed, 228 insertions(+), 42 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8183-audio.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8183-audio.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..031b0fa7b4dc1bcb9e258be1801d4bbe4c02af84
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt8183-audio.yaml
@@ -0,0 +1,228 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt8183-audio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek AFE PCM controller for mt8183
+
+maintainers:
+  - Julien Massot <jmassot@collabora.com>
+
+properties:
+  compatible:
+    const: mediatek,mt8183-audio
+
+  interrupts:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    const: audiosys
+
+  power-domains:
+    maxItems: 1
+
+  memory-region:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: AFE clock
+      - description: ADDA DAC clock
+      - description: ADDA DAC pre-distortion clock
+      - description: ADDA ADC clock
+      - description: ADDA6 ADC clock
+      - description: Audio low-jitter 22.5792m clock
+      - description: Audio low-jitter 24.576m clock
+      - description: Audio PLL1 tuner clock
+      - description: Audio PLL2 tuner clock
+      - description: I2S1 bit clock
+      - description: I2S2 bit clock
+      - description: I2S3 bit clock
+      - description: I2S4 bit clock
+      - description: Audio Time-Division Multiplexing interface clock
+      - description: Powerdown Audio test model clock
+      - description: Audio infra sys clock
+      - description: Audio infra 26M clock
+      - description: Mux for audio clock
+      - description: Mux for audio internal bus clock
+      - description: Mux main divider by 4
+      - description: Primary audio mux
+      - description: Primary audio PLL
+      - description: Secondary audio mux
+      - description: Secondary audio PLL
+      - description: Primary audio en-generator clock
+      - description: Primary PLL divider by 4 for IEC
+      - description: Secondary audio en-generator clock
+      - description: Secondary PLL divider by 8 for IEC
+      - description: Mux selector for I2S port 0
+      - description: Mux selector for I2S port 1
+      - description: Mux selector for I2S port 2
+      - description: Mux selector for I2S port 3
+      - description: Mux selector for I2S port 4
+      - description: Mux selector for I2S port 5
+      - description: APLL1 and APLL2 divider for I2S port 0
+      - description: APLL1 and APLL2 divider for I2S port 1
+      - description: APLL1 and APLL2 divider for I2S port 2
+      - description: APLL1 and APLL2 divider for I2S port 3
+      - description: APLL1 and APLL2 divider for I2S port 4
+      - description: APLL1 and APLL2 divider for IEC
+      - description: 26MHz clock for audio subsystem
+
+  clock-names:
+    items:
+      - const: aud_afe_clk
+      - const: aud_dac_clk
+      - const: aud_dac_predis_clk
+      - const: aud_adc_clk
+      - const: aud_adc_adda6_clk
+      - const: aud_apll22m_clk
+      - const: aud_apll24m_clk
+      - const: aud_apll1_tuner_clk
+      - const: aud_apll2_tuner_clk
+      - const: aud_i2s1_bclk_sw
+      - const: aud_i2s2_bclk_sw
+      - const: aud_i2s3_bclk_sw
+      - const: aud_i2s4_bclk_sw
+      - const: aud_tdm_clk
+      - const: aud_tml_clk
+      - const: aud_infra_clk
+      - const: mtkaif_26m_clk
+      - const: top_mux_audio
+      - const: top_mux_aud_intbus
+      - const: top_syspll_d2_d4
+      - const: top_mux_aud_1
+      - const: top_apll1_ck
+      - const: top_mux_aud_2
+      - const: top_apll2_ck
+      - const: top_mux_aud_eng1
+      - const: top_apll1_d8
+      - const: top_mux_aud_eng2
+      - const: top_apll2_d8
+      - const: top_i2s0_m_sel
+      - const: top_i2s1_m_sel
+      - const: top_i2s2_m_sel
+      - const: top_i2s3_m_sel
+      - const: top_i2s4_m_sel
+      - const: top_i2s5_m_sel
+      - const: top_apll12_div0
+      - const: top_apll12_div1
+      - const: top_apll12_div2
+      - const: top_apll12_div3
+      - const: top_apll12_div4
+      - const: top_apll12_divb
+      - const: top_clk26m_clk
+
+required:
+  - compatible
+  - interrupts
+  - resets
+  - reset-names
+  - power-domains
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/mt8183-clk.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/power/mt8183-power.h>
+    #include <dt-bindings/reset/mt8183-resets.h>
+
+    audio-controller {
+        compatible = "mediatek,mt8183-audio";
+        interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_LOW>;
+        resets = <&watchdog MT8183_TOPRGU_AUDIO_SW_RST>;
+        reset-names = "audiosys";
+        power-domains = <&spm MT8183_POWER_DOMAIN_AUDIO>;
+        clocks = <&audiosys CLK_AUDIO_AFE>,
+                 <&audiosys CLK_AUDIO_DAC>,
+                 <&audiosys CLK_AUDIO_DAC_PREDIS>,
+                 <&audiosys CLK_AUDIO_ADC>,
+                 <&audiosys CLK_AUDIO_PDN_ADDA6_ADC>,
+                 <&audiosys CLK_AUDIO_22M>,
+                 <&audiosys CLK_AUDIO_24M>,
+                 <&audiosys CLK_AUDIO_APLL_TUNER>,
+                 <&audiosys CLK_AUDIO_APLL2_TUNER>,
+                 <&audiosys CLK_AUDIO_I2S1>,
+                 <&audiosys CLK_AUDIO_I2S2>,
+                 <&audiosys CLK_AUDIO_I2S3>,
+                 <&audiosys CLK_AUDIO_I2S4>,
+                 <&audiosys CLK_AUDIO_TDM>,
+                 <&audiosys CLK_AUDIO_TML>,
+                 <&infracfg CLK_INFRA_AUDIO>,
+                 <&infracfg CLK_INFRA_AUDIO_26M_BCLK>,
+                 <&topckgen CLK_TOP_MUX_AUDIO>,
+                 <&topckgen CLK_TOP_MUX_AUD_INTBUS>,
+                 <&topckgen CLK_TOP_SYSPLL_D2_D4>,
+                 <&topckgen CLK_TOP_MUX_AUD_1>,
+                 <&topckgen CLK_TOP_APLL1_CK>,
+                 <&topckgen CLK_TOP_MUX_AUD_2>,
+                 <&topckgen CLK_TOP_APLL2_CK>,
+                 <&topckgen CLK_TOP_MUX_AUD_ENG1>,
+                 <&topckgen CLK_TOP_APLL1_D8>,
+                 <&topckgen CLK_TOP_MUX_AUD_ENG2>,
+                 <&topckgen CLK_TOP_APLL2_D8>,
+                 <&topckgen CLK_TOP_MUX_APLL_I2S0>,
+                 <&topckgen CLK_TOP_MUX_APLL_I2S1>,
+                 <&topckgen CLK_TOP_MUX_APLL_I2S2>,
+                 <&topckgen CLK_TOP_MUX_APLL_I2S3>,
+                 <&topckgen CLK_TOP_MUX_APLL_I2S4>,
+                 <&topckgen CLK_TOP_MUX_APLL_I2S5>,
+                 <&topckgen CLK_TOP_APLL12_DIV0>,
+                 <&topckgen CLK_TOP_APLL12_DIV1>,
+                 <&topckgen CLK_TOP_APLL12_DIV2>,
+                 <&topckgen CLK_TOP_APLL12_DIV3>,
+                 <&topckgen CLK_TOP_APLL12_DIV4>,
+                 <&topckgen CLK_TOP_APLL12_DIVB>,
+                 <&clk26m>;
+      clock-names = "aud_afe_clk",
+                    "aud_dac_clk",
+                    "aud_dac_predis_clk",
+                    "aud_adc_clk",
+                    "aud_adc_adda6_clk",
+                    "aud_apll22m_clk",
+                    "aud_apll24m_clk",
+                    "aud_apll1_tuner_clk",
+                    "aud_apll2_tuner_clk",
+                    "aud_i2s1_bclk_sw",
+                    "aud_i2s2_bclk_sw",
+                    "aud_i2s3_bclk_sw",
+                    "aud_i2s4_bclk_sw",
+                    "aud_tdm_clk",
+                    "aud_tml_clk",
+                    "aud_infra_clk",
+                    "mtkaif_26m_clk",
+                    "top_mux_audio",
+                    "top_mux_aud_intbus",
+                    "top_syspll_d2_d4",
+                    "top_mux_aud_1",
+                    "top_apll1_ck",
+                    "top_mux_aud_2",
+                    "top_apll2_ck",
+                    "top_mux_aud_eng1",
+                    "top_apll1_d8",
+                    "top_mux_aud_eng2",
+                    "top_apll2_d8",
+                    "top_i2s0_m_sel",
+                    "top_i2s1_m_sel",
+                    "top_i2s2_m_sel",
+                    "top_i2s3_m_sel",
+                    "top_i2s4_m_sel",
+                    "top_i2s5_m_sel",
+                    "top_apll12_div0",
+                    "top_apll12_div1",
+                    "top_apll12_div2",
+                    "top_apll12_div3",
+                    "top_apll12_div4",
+                    "top_apll12_divb",
+                    "top_clk26m_clk";
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/sound/mt8183-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt8183-afe-pcm.txt
deleted file mode 100644
index 1f1cba4152ceecbe61d0db0b972f98df7d5d91ac..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/sound/mt8183-afe-pcm.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Mediatek AFE PCM controller for mt8183
-
-Required properties:
-- compatible = "mediatek,mt68183-audio";
-- reg: register location and size
-- interrupts: should contain AFE interrupt
-- resets: Must contain an entry for each entry in reset-names
-  See ../reset/reset.txt for details.
-- reset-names: should have these reset names:
-		"audiosys";
-- power-domains: should define the power domain
-- clocks: Must contain an entry for each entry in clock-names
-- clock-names: should have these clock names:
-		"infra_sys_audio_clk",
-		"mtkaif_26m_clk",
-		"top_mux_audio",
-		"top_mux_aud_intbus",
-		"top_sys_pll3_d4",
-		"top_clk26m_clk";
-
-Example:
-
-	afe: mt8183-afe-pcm@11220000  {
-		compatible = "mediatek,mt8183-audio";
-		reg = <0 0x11220000 0 0x1000>;
-		interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_LOW>;
-		resets = <&watchdog MT8183_TOPRGU_AUDIO_SW_RST>;
-		reset-names = "audiosys";
-		power-domains = <&scpsys MT8183_POWER_DOMAIN_AUDIO>;
-		clocks = <&infrasys CLK_INFRA_AUDIO>,
-			 <&infrasys CLK_INFRA_AUDIO_26M_BCLK>,
-			 <&topckgen CLK_TOP_MUX_AUDIO>,
-			 <&topckgen CLK_TOP_MUX_AUD_INTBUS>,
-			 <&topckgen CLK_TOP_SYSPLL_D2_D4>,
-			 <&clk26m>;
-		clock-names = "infra_sys_audio_clk",
-			      "mtkaif_26m_clk",
-			      "top_mux_audio",
-			      "top_mux_aud_intbus",
-			      "top_sys_pll_d2_d4",
-			      "top_clk26m_clk";
-	};

-- 
2.50.1


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

* [PATCH v3 3/6] dt-bindings: arm: mediatek: Support mt8183-audiosys variant
  2025-08-26  7:39 [PATCH v3 0/6] MediaTek devicetree/bindings warnings sanitization second round Julien Massot
  2025-08-26  7:39 ` [PATCH v3 1/6] dt-bindings: clock: mediatek: Add power-domains property Julien Massot
  2025-08-26  7:39 ` [PATCH v3 2/6] ASoC: dt-binding: Convert mt8183-afe-pcm to dt-schema Julien Massot
@ 2025-08-26  7:39 ` Julien Massot
  2025-08-26  7:39 ` [PATCH v3 4/6] arm64: dts: mt8183: Rename nodes to match audiosys DT schema Julien Massot
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Julien Massot @ 2025-08-26  7:39 UTC (permalink / raw)
  To: kernel, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Ikjoon Jang, Enric Balletbo i Serra,
	Chen-Yu Tsai, Weiyi Lu, Eugen Hristev, Liam Girdwood, Mark Brown,
	Julien Massot, Sean Wang, Linus Walleij
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-sound, linux-gpio, Julien Massot

Update the mediatek,audsys binding to support the mt8183-audiosys
compatible, which uses a different audio controller
(mediatek,mt8183-audio.yaml) compared to the legacy mt2701-audio
controller.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 .../bindings/arm/mediatek/mediatek,audsys.yaml           | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
index 45d4a6620041b11cf6e943de49a42f3fcd91e1b9..f3a761cbd0fd44e2f7ff35c274dd170bbb177e96 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
@@ -23,6 +23,7 @@ properties:
               - mediatek,mt7622-audsys
               - mediatek,mt8167-audsys
               - mediatek,mt8173-audsys
+              - mediatek,mt8183-audiosys
               - mediatek,mt8183-audsys
               - mediatek,mt8186-audsys
               - mediatek,mt8192-audsys
@@ -41,13 +42,26 @@ properties:
     const: 1
 
   audio-controller:
-    $ref: /schemas/sound/mediatek,mt2701-audio.yaml#
     type: object
 
 required:
   - compatible
   - '#clock-cells'
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: mediatek,mt8183-audiosys
+then:
+  properties:
+    audio-controller:
+      $ref: /schemas/sound/mediatek,mt8183-audio.yaml#
+else:
+  properties:
+    audio-controller:
+      $ref: /schemas/sound/mediatek,mt2701-audio.yaml#
+
 additionalProperties: false
 
 examples:

-- 
2.50.1


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

* [PATCH v3 4/6] arm64: dts: mt8183: Rename nodes to match audiosys DT schema
  2025-08-26  7:39 [PATCH v3 0/6] MediaTek devicetree/bindings warnings sanitization second round Julien Massot
                   ` (2 preceding siblings ...)
  2025-08-26  7:39 ` [PATCH v3 3/6] dt-bindings: arm: mediatek: Support mt8183-audiosys variant Julien Massot
@ 2025-08-26  7:39 ` Julien Massot
  2025-08-26  7:39 ` [PATCH v3 5/6] dt-bindings: sound: Convert MT8183 DA7219 sound card to " Julien Massot
  2025-08-26  7:39 ` [PATCH v3 6/6] ASoC: dt-binding: Convert MediaTek mt8183-mt6358 " Julien Massot
  5 siblings, 0 replies; 8+ messages in thread
From: Julien Massot @ 2025-08-26  7:39 UTC (permalink / raw)
  To: kernel, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Ikjoon Jang, Enric Balletbo i Serra,
	Chen-Yu Tsai, Weiyi Lu, Eugen Hristev, Liam Girdwood, Mark Brown,
	Julien Massot, Sean Wang, Linus Walleij
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-sound, linux-gpio, Julien Massot

The DT schema for "mediatek,mt8183-audiosys" expects an
audio-controller node inside the audiosys block. Rename
the nested AFE node from "mt8183-afe-pcm" to
"audio-controller" accordingly.

Also rename the audiosys node itself from "audio-controller" to
"clock-controller" to better reflect its function.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index 3c1fe80e64b9c5e32703f1e8663942a24543cf23..e2500e3c3f66d12a6fd19f29fa9fd63a6f04821f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -1445,11 +1445,11 @@ usb_host: usb@11200000 {
 			};
 		};
 
-		audiosys: audio-controller@11220000 {
+		audiosys: clock-controller@11220000 {
 			compatible = "mediatek,mt8183-audiosys", "syscon";
 			reg = <0 0x11220000 0 0x1000>;
 			#clock-cells = <1>;
-			afe: mt8183-afe-pcm {
+			afe: audio-controller {
 				compatible = "mediatek,mt8183-audio";
 				interrupts = <GIC_SPI 161 IRQ_TYPE_LEVEL_LOW>;
 				resets = <&watchdog MT8183_TOPRGU_AUDIO_SW_RST>;

-- 
2.50.1


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

* [PATCH v3 5/6] dt-bindings: sound: Convert MT8183 DA7219 sound card to DT schema
  2025-08-26  7:39 [PATCH v3 0/6] MediaTek devicetree/bindings warnings sanitization second round Julien Massot
                   ` (3 preceding siblings ...)
  2025-08-26  7:39 ` [PATCH v3 4/6] arm64: dts: mt8183: Rename nodes to match audiosys DT schema Julien Massot
@ 2025-08-26  7:39 ` Julien Massot
  2025-08-26  7:39 ` [PATCH v3 6/6] ASoC: dt-binding: Convert MediaTek mt8183-mt6358 " Julien Massot
  5 siblings, 0 replies; 8+ messages in thread
From: Julien Massot @ 2025-08-26  7:39 UTC (permalink / raw)
  To: kernel, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Ikjoon Jang, Enric Balletbo i Serra,
	Chen-Yu Tsai, Weiyi Lu, Eugen Hristev, Liam Girdwood, Mark Brown,
	Julien Massot, Sean Wang, Linus Walleij
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-sound, linux-gpio, Julien Massot

Convert the Device Tree binding for MT8183-based boards using the
DA7219 headset codec and optional MAX98357, RT1015 or RT1015P speaker
amplifiers from the legacy .txt format to DT schema.

This improves binding validation and removes DT schema warnings
for boards using these audio components.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 .../bindings/sound/mediatek,mt8183_da7219.yaml     | 49 ++++++++++++++++++++++
 .../bindings/sound/mt8183-da7219-max98357.txt      | 21 ----------
 2 files changed, 49 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8183_da7219.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8183_da7219.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..b526e8123182bce87a8996928c4cf5f1f60264a6
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt8183_da7219.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt8183_da7219.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT8183 sound card with external codecs
+
+maintainers:
+  - Julien Massot <jmassot@collabora.com>
+
+description:
+  MediaTek MT8183 SoC-based sound cards with DA7219 as headset codec,
+  and MAX98357A, RT1015 or RT1015P as speaker amplifiers. Optionally includes HDMI codec.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt8183_da7219_max98357
+      - mediatek,mt8183_da7219_rt1015
+      - mediatek,mt8183_da7219_rt1015p
+
+  mediatek,headset-codec:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the DA7219 headset codec.
+
+  mediatek,platform:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the MT8183 ASoC platform (e.g., AFE node).
+
+  mediatek,hdmi-codec:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Optional phandle to the HDMI codec (e.g., IT6505).
+
+required:
+  - compatible
+  - mediatek,headset-codec
+  - mediatek,platform
+
+additionalProperties: false
+
+examples:
+  - |
+    sound {
+        compatible = "mediatek,mt8183_da7219_max98357";
+        mediatek,headset-codec = <&da7219>;
+        mediatek,hdmi-codec = <&it6505dptx>;
+        mediatek,platform = <&afe>;
+    };
diff --git a/Documentation/devicetree/bindings/sound/mt8183-da7219-max98357.txt b/Documentation/devicetree/bindings/sound/mt8183-da7219-max98357.txt
deleted file mode 100644
index f276dfc74b4654deb0867f830e17a92638b39e23..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/sound/mt8183-da7219-max98357.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-MT8183 with MT6358, DA7219, MAX98357, and RT1015 CODECS
-
-Required properties:
-- compatible : "mediatek,mt8183_da7219_max98357" for MAX98357A codec
-               "mediatek,mt8183_da7219_rt1015" for RT1015 codec
-               "mediatek,mt8183_da7219_rt1015p" for RT1015P codec
-- mediatek,headset-codec: the phandles of da7219 codecs
-- mediatek,platform: the phandle of MT8183 ASoC platform
-
-Optional properties:
-- mediatek,hdmi-codec: the phandles of HDMI codec
-
-Example:
-
-	sound {
-		compatible = "mediatek,mt8183_da7219_max98357";
-		mediatek,headset-codec = <&da7219>;
-		mediatek,hdmi-codec = <&it6505dptx>;
-		mediatek,platform = <&afe>;
-	};
-

-- 
2.50.1


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

* [PATCH v3 6/6] ASoC: dt-binding: Convert MediaTek mt8183-mt6358 to DT schema
  2025-08-26  7:39 [PATCH v3 0/6] MediaTek devicetree/bindings warnings sanitization second round Julien Massot
                   ` (4 preceding siblings ...)
  2025-08-26  7:39 ` [PATCH v3 5/6] dt-bindings: sound: Convert MT8183 DA7219 sound card to " Julien Massot
@ 2025-08-26  7:39 ` Julien Massot
  5 siblings, 0 replies; 8+ messages in thread
From: Julien Massot @ 2025-08-26  7:39 UTC (permalink / raw)
  To: kernel, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Ikjoon Jang, Enric Balletbo i Serra,
	Chen-Yu Tsai, Weiyi Lu, Eugen Hristev, Liam Girdwood, Mark Brown,
	Julien Massot, Sean Wang, Linus Walleij
  Cc: linux-clk, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-sound, linux-gpio, Julien Massot

Convert the existing text-based DT binding for MT8183 sound cards using
MT6358 and various other codecs to a DT schema.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 .../sound/mediatek,mt8183_mt6358_ts3a227.yaml      | 59 ++++++++++++++++++++++
 .../sound/mt8183-mt6358-ts3a227-max98357.txt       | 25 ---------
 2 files changed, 59 insertions(+), 25 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8183_mt6358_ts3a227.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8183_mt6358_ts3a227.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..43a6f9d40644c2fc1e61ebf58fcd62eaf3ee43f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt8183_mt6358_ts3a227.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt8183_mt6358_ts3a227.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT8183 sound card with MT6358, TS3A227, and MAX98357/RT1015 codecs
+
+maintainers:
+  - Julien Massot <julien.massot@collabora.com>
+
+description:
+  MediaTek MT8183 SoC-based sound cards using the MT6358 codec,
+  with optional TS3A227 headset codec, EC codec (via Chrome EC), and HDMI audio.
+  Speaker amplifier can be one of MAX98357A/B, RT1015, or RT1015P.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt8183_mt6358_ts3a227_max98357
+      - mediatek,mt8183_mt6358_ts3a227_max98357b
+      - mediatek,mt8183_mt6358_ts3a227_rt1015
+      - mediatek,mt8183_mt6358_ts3a227_rt1015p
+
+  mediatek,platform:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the MT8183 ASoC platform node (e.g., AFE).
+
+  mediatek,headset-codec:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the TS3A227 headset codec.
+
+  mediatek,ec-codec:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: |
+      Optional phandle to a ChromeOS EC codec node.
+      See bindings in google,cros-ec-codec.yaml.
+
+  mediatek,hdmi-codec:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Optional phandle to an HDMI audio codec node.
+
+required:
+  - compatible
+  - mediatek,platform
+
+additionalProperties: false
+
+examples:
+  - |
+    sound {
+        compatible = "mediatek,mt8183_mt6358_ts3a227_max98357";
+        mediatek,headset-codec = <&ts3a227>;
+        mediatek,ec-codec = <&ec_codec>;
+        mediatek,hdmi-codec = <&it6505dptx>;
+        mediatek,platform = <&afe>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt b/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt
deleted file mode 100644
index ecd46ed8eb98b99d0f2cc9eeca5f6d0aef6a5ada..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-MT8183 with MT6358, TS3A227, MAX98357, and RT1015 CODECS
-
-Required properties:
-- compatible : "mediatek,mt8183_mt6358_ts3a227_max98357" for MAX98357A codec
-               "mediatek,mt8183_mt6358_ts3a227_max98357b" for MAX98357B codec
-               "mediatek,mt8183_mt6358_ts3a227_rt1015" for RT1015 codec
-               "mediatek,mt8183_mt6358_ts3a227_rt1015p" for RT1015P codec
-- mediatek,platform: the phandle of MT8183 ASoC platform
-
-Optional properties:
-- mediatek,headset-codec: the phandles of ts3a227 codecs
-- mediatek,ec-codec: the phandle of EC codecs.
-                     See google,cros-ec-codec.txt for more details.
-- mediatek,hdmi-codec: the phandles of HDMI codec
-
-Example:
-
-	sound {
-		compatible = "mediatek,mt8183_mt6358_ts3a227_max98357";
-		mediatek,headset-codec = <&ts3a227>;
-		mediatek,ec-codec = <&ec_codec>;
-		mediatek,hdmi-codec = <&it6505dptx>;
-		mediatek,platform = <&afe>;
-	};
-

-- 
2.50.1


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

* Re: [PATCH v3 1/6] dt-bindings: clock: mediatek: Add power-domains property
  2025-08-26  7:39 ` [PATCH v3 1/6] dt-bindings: clock: mediatek: Add power-domains property Julien Massot
@ 2025-08-26 19:57   ` Rob Herring (Arm)
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2025-08-26 19:57 UTC (permalink / raw)
  To: Julien Massot
  Cc: linux-arm-kernel, linux-clk, devicetree, Eugen Hristev,
	Michael Turquette, kernel, Mark Brown, Stephen Boyd,
	Matthias Brugger, Julien Massot, linux-gpio,
	Enric Balletbo i Serra, Ikjoon Jang, Chen-Yu Tsai,
	Krzysztof Kozlowski, Linus Walleij, linux-kernel, Sean Wang,
	linux-sound, AngeloGioacchino Del Regno, Liam Girdwood,
	Conor Dooley, linux-mediatek, Weiyi Lu


On Tue, 26 Aug 2025 09:39:34 +0200, Julien Massot wrote:
> The mt8183-mfgcfg node uses a power domain in its device tree node.
> To prevent schema validation warnings, add the optional `power-domains`
> property to the binding schema for mediatek syscon clocks.
> 
> Fixes: 1781f2c46180 ("arm64: dts: mediatek: mt8183: Add power-domains properity to mfgcfg")
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Signed-off-by: Julien Massot <julien.massot@collabora.com>
> ---
>  .../devicetree/bindings/clock/mediatek,syscon.yaml        | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 


Please add Acked-by/Reviewed-by tags when posting new versions. However,
there's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.

If a tag was not added on purpose, please state why and what changed.

Missing tags:

Acked-by: Rob Herring (Arm) <robh@kernel.org>




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

end of thread, other threads:[~2025-08-26 19:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26  7:39 [PATCH v3 0/6] MediaTek devicetree/bindings warnings sanitization second round Julien Massot
2025-08-26  7:39 ` [PATCH v3 1/6] dt-bindings: clock: mediatek: Add power-domains property Julien Massot
2025-08-26 19:57   ` Rob Herring (Arm)
2025-08-26  7:39 ` [PATCH v3 2/6] ASoC: dt-binding: Convert mt8183-afe-pcm to dt-schema Julien Massot
2025-08-26  7:39 ` [PATCH v3 3/6] dt-bindings: arm: mediatek: Support mt8183-audiosys variant Julien Massot
2025-08-26  7:39 ` [PATCH v3 4/6] arm64: dts: mt8183: Rename nodes to match audiosys DT schema Julien Massot
2025-08-26  7:39 ` [PATCH v3 5/6] dt-bindings: sound: Convert MT8183 DA7219 sound card to " Julien Massot
2025-08-26  7:39 ` [PATCH v3 6/6] ASoC: dt-binding: Convert MediaTek mt8183-mt6358 " Julien Massot

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