From a16b44ac43f84cb6bfaeefc52174be1895d4c18b Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Mon, 19 May 2025 07:58:02 +0800 Subject: [PATCH] mediatek: filogic: fix wm8960 dtc warnings Add missing #address-cells, #size-cells and #sound-dai-cells to fix the following dtc warnings: mt7986a-bananapi-bpi-r3-respeaker-2mics.dtso:46.5-18: Warning (reg_format): /fragment@1/__overlay__/wm8960@1a:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) mt7986a-bananapi-bpi-r3-respeaker-2mics.dtso:29.11-31.7: Warning (sound_dai_property): /fragment@0/__overlay__/sound_wm8960/codec: Missing property '#sound-dai-cells' in node /fragment@1/__overlay__/wm8960@1a or bad phandle (referred from sound-dai[0]) mt7986a-rfb-spim-nand.dts:17.12-19.5: Warning (sound_dai_property): /sound_wm8960/platform: Missing property '#sound-dai-cells' in node /soc/audio-controller@11210000 or bad phandle (referred from sound-dai[0]) mt7986a-rfb-spim-nand.dts:21.9-23.5: Warning (sound_dai_property): /sound_wm8960/codec: Missing property '#sound-dai-cells' in node /soc/i2c@11008000/wm8960@1a or bad phandle (referred from sound-dai[0]) Signed-off-by: Shiji Yang --- .../mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch | 3 ++- .../patches-6.6/863-arm64-dts-mt7986-add-sound-wm8960.patch | 5 +++-- .../864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch | 5 ++++- ...-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch | 6 +++--- .../945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch | 6 +++--- .../946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch | 6 +++--- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/target/linux/mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch b/target/linux/mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch index 29de7851d3f..1b768f652c5 100644 --- a/target/linux/mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch +++ b/target/linux/mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch @@ -9,13 +9,14 @@ Subject: [PATCH] arm64: dts: mt7986: add afe --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -202,6 +202,28 @@ +@@ -202,6 +202,29 @@ #interrupt-cells = <2>; }; + afe: audio-controller@11210000 { + compatible = "mediatek,mt7986-afe"; + reg = <0 0x11210000 0 0x9000>; ++ #sound-dai-cells = <0>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_AUD_BUS_CK>, + <&infracfg CLK_INFRA_AUD_26M_CK>, diff --git a/target/linux/mediatek/patches-6.6/863-arm64-dts-mt7986-add-sound-wm8960.patch b/target/linux/mediatek/patches-6.6/863-arm64-dts-mt7986-add-sound-wm8960.patch index 15e30dec56c..b16a63ada9d 100644 --- a/target/linux/mediatek/patches-6.6/863-arm64-dts-mt7986-add-sound-wm8960.patch +++ b/target/linux/mediatek/patches-6.6/863-arm64-dts-mt7986-add-sound-wm8960.patch @@ -9,7 +9,7 @@ Subject: [PATCH] arm64: dts: mt7986: add sound wm8960 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb-spim-nand.dts -@@ -4,6 +4,35 @@ +@@ -4,6 +4,36 @@ / { compatible = "mediatek,mt7986a-rfb-snand"; @@ -40,12 +40,13 @@ Subject: [PATCH] arm64: dts: mt7986: add sound wm8960 + + wm8960: wm8960@1a { + compatible = "wlf,wm8960"; ++ #sound-dai-cells = <0>; + reg = <0x1a>; + }; }; &spi0 { -@@ -50,3 +79,13 @@ +@@ -50,3 +80,13 @@ &wifi { mediatek,mtd-eeprom = <&factory 0>; }; diff --git a/target/linux/mediatek/patches-6.6/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch b/target/linux/mediatek/patches-6.6/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch index 784ae5b6139..3ce6fdd4ade 100644 --- a/target/linux/mediatek/patches-6.6/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch +++ b/target/linux/mediatek/patches-6.6/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-respeaker-2mics.dtso -@@ -0,0 +1,62 @@ +@@ -0,0 +1,65 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2023 MediaTek Inc. @@ -39,6 +39,8 @@ + fragment@1 { + target = <&i2c0>; + __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins>; + clock-frequency = <400000>; @@ -46,6 +48,7 @@ + + wm8960: wm8960@1a { + compatible = "wlf,wm8960"; ++ #sound-dai-cells = <0>; + reg = <0x1a>; + }; + }; diff --git a/target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch index 73714fbd6fd..a75a297e048 100644 --- a/target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch +++ b/target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch @@ -24,7 +24,7 @@ Signed-off-by: Lorenzo Bianconi }; soc { -@@ -532,10 +526,11 @@ +@@ -533,10 +527,11 @@ interrupt-parent = <&gic>; interrupts = ; memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, @@ -38,7 +38,7 @@ Signed-off-by: Lorenzo Bianconi }; wed1: wed@15011000 { -@@ -545,10 +540,11 @@ +@@ -546,10 +541,11 @@ interrupt-parent = <&gic>; interrupts = ; memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, @@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi }; eth: ethernet@15100000 { -@@ -606,6 +602,11 @@ +@@ -607,6 +603,11 @@ interrupts = ; }; diff --git a/target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch index e2dce9ffa31..c64b3b37c3b 100644 --- a/target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch +++ b/target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch @@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi wo_data: wo-data@4fd80000 { reg = <0 0x4fd80000 0 0x240000>; no-map; -@@ -525,11 +515,10 @@ +@@ -526,11 +516,10 @@ reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi mediatek,wo-cpuboot = <&wo_cpuboot>; }; -@@ -539,11 +528,10 @@ +@@ -540,11 +529,10 @@ reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -64,7 +64,7 @@ Signed-off-by: Lorenzo Bianconi mediatek,wo-cpuboot = <&wo_cpuboot>; }; -@@ -602,6 +590,16 @@ +@@ -603,6 +591,16 @@ interrupts = ; }; diff --git a/target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch index a972f235f25..13fe1f792c4 100644 --- a/target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch +++ b/target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch @@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi }; soc { -@@ -515,10 +505,11 @@ +@@ -516,10 +506,11 @@ reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi mediatek,wo-cpuboot = <&wo_cpuboot>; }; -@@ -528,10 +519,11 @@ +@@ -529,10 +520,11 @@ reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; @@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi mediatek,wo-cpuboot = <&wo_cpuboot>; }; -@@ -600,6 +592,16 @@ +@@ -601,6 +593,16 @@ reg = <0 0x151f0000 0 0x8000>; };