Skip to contentSkip to conversation

ASoC: Add support for Airoha AN7581

PATCH Superseded Christian Marangi 3 participants 9 messages Nov 21, 2025

Subsystems (4)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover ASoC: Add support for Airoha AN7581

Add all the patch and documentation to support Airoha AN7581 sound driver.

The card follows similar implementation with Mediatek with the codec present on i2c but with a simplified implementation register wise and additional frequency supported.

Changes v2:
- Fix wrong edit in MAINTAINERS file

Christian Marangi (3):
ASoC: dt-bindings: Add Airoha AN7581 with WM8960 YAML
ASoC: dt-bindings: Add Airoha AN7581 AFE YAML
ASoC: airoha: Add AFE and machine driver for Airoha AN7581

 .../bindings/sound/airoha,an7581-afe.yaml     |  41 ++
 .../bindings/sound/airoha,an7581-wm8960.yaml  |  67 +++
 MAINTAINERS                                   |   8 +
 sound/soc/mediatek/Kconfig                    |  20 +
 sound/soc/mediatek/Makefile                   |   1 +
 sound/soc/mediatek/an7581/Makefile            |   9 +
 sound/soc/mediatek/an7581/an7581-afe-common.h |  39 ++
 sound/soc/mediatek/an7581/an7581-afe-pcm.c    | 456 ++++++++++++++++++
 sound/soc/mediatek/an7581/an7581-dai-etdm.c   | 371 ++++++++++++++
 sound/soc/mediatek/an7581/an7581-reg.h        |  61 +++
 sound/soc/mediatek/an7581/an7581-wm8960.c     | 170 +++++++
 11 files changed, 1243 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-afe.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
 create mode 100644 sound/soc/mediatek/an7581/Makefile
 create mode 100644 sound/soc/mediatek/an7581/an7581-afe-common.h
 create mode 100644 sound/soc/mediatek/an7581/an7581-afe-pcm.c
 create mode 100644 sound/soc/mediatek/an7581/an7581-dai-etdm.c
 create mode 100644 sound/soc/mediatek/an7581/an7581-reg.h
 create mode 100644 sound/soc/mediatek/an7581/an7581-wm8960.c
Signature · 1 line
2.51.0
#1 lore raw

PATCH v2 1/3 ASoC: dt-bindings: Add Airoha AN7581 with WM8960 YAML

Add documentation for Airoha AN7581 with WM8960 i2c codec YAML schema.

---
 .../bindings/sound/airoha,an7581-afe.yaml     | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-afe.yaml
Documentation/devicetree/bindings/sound/airoha,an7581-afe.yaml new file +41 -0
new file mode 100644
index 000000000000..80d9e87f1470
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/airoha,an7581-afe.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Airoha AFE PCM controller for AN7581
+
+maintainers:
+  - Christian Marangi <[email protected]>
+
+properties:
+  compatible:
+    const: airoha,an7581-afe
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    afe@1fbe2200 {
+        compatible = "airoha,an7581-afe";
+        reg = <0x1fbe2200 0x9000>;
+
+        interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+    };
+
+...
Signature · 1 line
2.51.0
#4 lore raw

PATCH v2 2/3 ASoC: dt-bindings: Add Airoha AN7581 AFE YAML

In reply to Christian Marangi

Add documentation for Airoha AN7581 AFE YAML schema.

---
 .../bindings/sound/airoha,an7581-wm8960.yaml  | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml new file +67 -0
new file mode 100644
index 000000000000..ebeda0876280
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/airoha,an7581-wm8960.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Airoha AN7581 sound card with WM8960 codec
+
+maintainers:
+  - Christian Marangi <[email protected]>
+
+allOf:
+  - $ref: sound-card-common.yaml#
+
+properties:
+  compatible:
+    const: airoha,an7581-wm8960-sound
+
+  platform:
+    type: object
+    additionalProperties: false
+    properties:
+      sound-dai:
+        description: The phandle of AN7581 platform.
+        maxItems: 1
+    required:
+      - sound-dai
+
+  codec:
+    type: object
+    additionalProperties: false
+    properties:
+      sound-dai:
+        description: The phandle of wm8960 codec.
+        maxItems: 1
+    required:
+      - sound-dai
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - audio-routing
+  - platform
+  - codec
+
+examples:
+  - |
+    sound {
+        compatible = "airoha,an7581-wm8960-sound";
+        model = "an7581-wm8960";
+        audio-routing =
+            "Headphone", "HP_L",
+            "Headphone", "HP_R",
+            "LINPUT1", "AMIC",
+            "RINPUT1", "AMIC";
+
+        platform {
+            sound-dai = <&afe>;
+        };
+
+        codec {
+            sound-dai = <&wm8960>;
+        };
+    };
+
+...
Signature · 1 line
2.51.0
#7 lore raw

PATCH v2 3/3 ASoC: airoha: Add AFE and machine driver for Airoha AN7581

In reply to Christian Marangi

Add support for the Sound system present on Airoha AN7581 SoC. This is based on the mediatek AFE drivers.

Also add the machine driver to create an actual sound card for the AFE.

---
 MAINTAINERS                                   |   8 +
 sound/soc/mediatek/Kconfig                    |  20 +
 sound/soc/mediatek/Makefile                   |   1 +
 sound/soc/mediatek/an7581/Makefile            |   9 +
 sound/soc/mediatek/an7581/an7581-afe-common.h |  39 ++
 sound/soc/mediatek/an7581/an7581-afe-pcm.c    | 456 ++++++++++++++++++
 sound/soc/mediatek/an7581/an7581-dai-etdm.c   | 371 ++++++++++++++
 sound/soc/mediatek/an7581/an7581-reg.h        |  61 +++
 sound/soc/mediatek/an7581/an7581-wm8960.c     | 170 +++++++
 9 files changed, 1135 insertions(+)
 create mode 100644 sound/soc/mediatek/an7581/Makefile
 create mode 100644 sound/soc/mediatek/an7581/an7581-afe-common.h
 create mode 100644 sound/soc/mediatek/an7581/an7581-afe-pcm.c
 create mode 100644 sound/soc/mediatek/an7581/an7581-dai-etdm.c
 create mode 100644 sound/soc/mediatek/an7581/an7581-reg.h
 create mode 100644 sound/soc/mediatek/an7581/an7581-wm8960.c
MAINTAINERS +8 -0
index 48810529994a..e34460928ff5 100644
@@ -766,6 +766,14 @@ F:	Documentation/devicetree/bindings/phy/airoha,en7581-pcie-phy.yaml
 F:	drivers/phy/phy-airoha-pcie-regs.h
 F:	drivers/phy/phy-airoha-pcie.c
 
+AIROHA SOUND DRIVER
+M:	Christian Marangi <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/sound/airoha,an7581-afe.yaml
+F:	Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
+F:	sound/soc/mediatek/an7581/*
+
 AIROHA SPI SNFI DRIVER
 M:	Lorenzo Bianconi <[email protected]>
 M:	Ray Liu <[email protected]>
sound/soc/mediatek/Kconfig +20 -0
index 3a1e1fa3fe5c..04d1f00fd980 100644
@@ -5,6 +5,26 @@ config SND_SOC_MEDIATEK
 	tristate
 	select REGMAP_MMIO
 
+config SND_SOC_AN7581
+	tristate "ASoC support for Airoha AN7581 chip"
+	depends on ARCH_AIROHA || COMPILE_TEST
+	select SND_SOC_MEDIATEK
+	help
+	  This adds ASoC platform driver support for Airoha AN7581 chip
+	  that can be used with other codecs.
+	  Select Y if you have such device.
+	  If unsure select "N".
+
+config SND_SOC_AN7581_WM8960
+	tristate "ASoc Audio driver for Airoha AN7581 with WM8960 codec"
+	depends on SND_SOC_AN7581 && I2C
+	select SND_SOC_WM8960
+	help
+	  This adds support for ASoC machine driver for Airoha AN7581
+	  boards with the WM8960 codecs.
+	  Select Y if you have such device.
+	  If unsure select "N".
+
 config SND_SOC_MT2701
 	tristate "ASoC support for Mediatek MT2701 chip"
 	depends on ARCH_MEDIATEK
sound/soc/mediatek/Makefile +1 -0
index 7cd67bce92e9..692d7a472ecc 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SND_SOC_MEDIATEK) += common/
+obj-$(CONFIG_SND_SOC_AN7581) += an7581/
 obj-$(CONFIG_SND_SOC_MT2701) += mt2701/
 obj-$(CONFIG_SND_SOC_MT6797) += mt6797/
 obj-$(CONFIG_SND_SOC_MT7986) += mt7986/
sound/soc/mediatek/an7581/Makefile new file +9 -0
new file mode 100644
index 000000000000..f48cd0269bea
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+
+# platform driver
+snd-soc-an7581-afe-y := \
+	an7581-afe-pcm.o \
+	an7581-dai-etdm.o
+
+obj-$(CONFIG_SND_SOC_AN7581) += snd-soc-an7581-afe.o
+obj-$(CONFIG_SND_SOC_AN7581_WM8960) += an7581-wm8960.o
sound/soc/mediatek/an7581/an7581-afe-common.h new file +39 -0
new file mode 100644
index 000000000000..fef1a7b4529e
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * an7581-afe-common.h  --  Airoha AN7581 audio driver definitions
+ */
+
+#ifndef _AN7581_AFE_COMMON_H_
+#define _AN7581_AFE_COMMON_H_
+
+#include <sound/soc.h>
+#include <linux/list.h>
+#include <linux/regmap.h>
+#include "../../mediatek/common/mtk-base-afe.h"
+
+enum {
+	AN7581_MEMIF_DL1,
+	AN7581_MEMIF_UL1,
+	AN7581_MEMIF_NUM,
+	AN7581_DAI_ETDM = AN7581_MEMIF_NUM,
+	AN7581_DAI_NUM,
+};
+
+enum {
+	AN7581_IRQ_0,
+	AN7581_IRQ_1,
+	AN7581_IRQ_NUM,
+};
+
+struct an7581_afe_private {
+	/* dai */
+	void *dai_priv[AN7581_DAI_NUM];
+};
+
+unsigned int an7581_afe_rate_transform(struct device *dev,
+				       unsigned int rate);
+
+/* dai register */
+int an7581_dai_etdm_register(struct mtk_base_afe *afe);
+
+#endif
sound/soc/mediatek/an7581/an7581-afe-pcm.c new file +456 -0

456 lines not on this page · raw message

sound/soc/mediatek/an7581/an7581-dai-etdm.c new file +371 -0

371 lines not on this page · raw message

sound/soc/mediatek/an7581/an7581-reg.h new file +61 -0

61 lines not on this page · raw message

sound/soc/mediatek/an7581/an7581-wm8960.c new file +170 -0

170 lines not on this page · raw message

Signature · 1 line
2.51.0
#8 lore raw

Re: [PATCH v2 3/3] ASoC: airoha: Add AFE and machine driver for Airoha AN7581

Quoted 8 lines · Christian Marangi

Add support for the Sound system present on Airoha AN7581 SoC. This is based on the mediatek AFE drivers.

Also add the machine driver to create an actual sound card for the AFE.

---

[...]

Quoted 166 lines
sound/soc/mediatek/an7581/an7581-wm8960.c new file +160 -0
new file mode 100644
index 000000000000..5d6c736aa6f2
@@ -0,0 +1,170 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Airoha ALSA SoC I2S platform driver for AN7581
+ *
+ */
+
+#include <linux/module.h>
+#include <sound/soc.h>
+
+#include "an7581-afe-common.h"
+
+static const struct snd_soc_dapm_widget an7581_wm8960_widgets[] = {
+       SND_SOC_DAPM_HP("Headphone", NULL),
+       SND_SOC_DAPM_MIC("AMIC", NULL),
+};
+
+static const struct snd_kcontrol_new an7581_wm8960_controls[] = {
+       SOC_DAPM_PIN_SWITCH("Headphone"),
+       SOC_DAPM_PIN_SWITCH("AMIC"),
+};
+
+SND_SOC_DAILINK_DEFS(playback,
+                    DAILINK_COMP_ARRAY(COMP_CPU("DL1")),
+                    DAILINK_COMP_ARRAY(COMP_DUMMY()),
+                    DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
+SND_SOC_DAILINK_DEFS(capture,
+                    DAILINK_COMP_ARRAY(COMP_CPU("UL1")),
+                    DAILINK_COMP_ARRAY(COMP_DUMMY()),
+                    DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
+SND_SOC_DAILINK_DEFS(codec,
+                    DAILINK_COMP_ARRAY(COMP_CPU("ETDM")),
+                    DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8960-hifi")),
+                    DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
+static struct snd_soc_dai_link an7581_wm8960_dai_links[] = {
+       /* FE */
+       {
+               .name = "wm8960-playback",
+               .stream_name = "wm8960-playback",
+               .trigger = {SND_SOC_DPCM_TRIGGER_POST,
+                           SND_SOC_DPCM_TRIGGER_POST},
+               .dynamic = 0,
+               .playback_only = 1,
+               SND_SOC_DAILINK_REG(playback),
+       },
+       {
+               .name = "wm8960-capture",
+               .stream_name = "wm8960-capture",
+               .trigger = {SND_SOC_DPCM_TRIGGER_POST,
+                           SND_SOC_DPCM_TRIGGER_POST},
+               .dynamic = 0,
+               .capture_only = 1,
+               SND_SOC_DAILINK_REG(capture),
+       },
+       /* BE */
+       {
+               .name = "wm8960-codec",
+               .no_pcm = 1,
+               .dai_fmt = SND_SOC_DAIFMT_I2S |
+                       SND_SOC_DAIFMT_NB_NF |
+                       SND_SOC_DAIFMT_CBC_CFC |
+                       SND_SOC_DAIFMT_GATED,
+               SND_SOC_DAILINK_REG(codec),
+       },
+};
+
+static struct snd_soc_card an7581_wm8960_card = {
+       .name = "an7581-wm8960",
+       .owner = THIS_MODULE,
+       .dai_link = an7581_wm8960_dai_links,
+       .num_links = ARRAY_SIZE(an7581_wm8960_dai_links),
+       .controls = an7581_wm8960_controls,
+       .num_controls = ARRAY_SIZE(an7581_wm8960_controls),
+       .dapm_widgets = an7581_wm8960_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(an7581_wm8960_widgets),
+};
+
+static int an7581_wm8960_machine_probe(struct platform_device *pdev)
+{
+       struct device_node *platform_dai_node, *codec_dai_node;
+       struct snd_soc_card *card = &an7581_wm8960_card;
+       struct device_node *platform, *codec;
+       struct snd_soc_dai_link *dai_link;
+       int ret, i;
+
+       card->dev = &pdev->dev;
+
+       platform = of_get_child_by_name(pdev->dev.of_node, "platform");
+
+       if (platform) {
+               platform_dai_node = of_parse_phandle(platform, "sound-dai", 0);
+               of_node_put(platform);
+
+               if (!platform_dai_node) {
+                       dev_err(&pdev->dev, "Failed to parse platform/sound-dai property\n");
+                       return -EINVAL;
+               }
+       } else {
+               dev_err(&pdev->dev, "Property 'platform' missing or invalid\n");
+               return -EINVAL;
+       }
+
+       for_each_card_prelinks(card, i, dai_link) {
+               if (dai_link->platforms->name)
+                       continue;
+               dai_link->platforms->of_node = platform_dai_node;
+       }
+
+       codec = of_get_child_by_name(pdev->dev.of_node, "codec");
+
+       if (codec) {
+               codec_dai_node = of_parse_phandle(codec, "sound-dai", 0);
+               of_node_put(codec);
+
+               if (!codec_dai_node) {
+                       of_node_put(platform_dai_node);
+                       dev_err(&pdev->dev, "Failed to parse codec/sound-dai property\n");
+                       return -EINVAL;
+               }
+       } else {
+               of_node_put(platform_dai_node);
+               dev_err(&pdev->dev, "Property 'codec' missing or invalid\n");
+               return -EINVAL;
+       }
+
+       for_each_card_prelinks(card, i, dai_link) {
+               if (dai_link->codecs->name)
+                       continue;
+               dai_link->codecs->of_node = codec_dai_node;
+       }
+
+       ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
+       if (ret) {
+               dev_err(&pdev->dev, "Failed to parse audio-routing: %d\n", ret);
+               goto err_of_node_put;
+       }
+
+       ret = devm_snd_soc_register_card(&pdev->dev, card);
+       if (ret) {
+               dev_err_probe(&pdev->dev, ret, "%s snd_soc_register_card fail\n", __func__);
+               goto err_of_node_put;
+       }
+
+       return 0;
+
+err_of_node_put:
+       of_node_put(platform_dai_node);
+       of_node_put(codec_dai_node);
+       return ret;
+}
+
+static const struct of_device_id an7581_wm8960_machine_dt_match[] = {
+       { .compatible = "airoha,an7581-wm8960-sound" },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, an7581_wm8960_machine_dt_match);
+
+static struct platform_driver an7581_wm8960_driver = {

sound/soc/mediatek/an7581/an7581-wm8960.c line 170

Quoted 10 lines
sound/soc/mediatek/an7581/an7581-wm8960.c new file +10 -0
+       .driver = {
+                  .name = "an7581-wm8960",
+                  .of_match_table = an7581_wm8960_machine_dt_match,
+       },
+       .probe = an7581_wm8960_machine_probe,
+};
+module_platform_driver(an7581_wm8960_driver);
+
+MODULE_DESCRIPTION("Airoha SoC I2S platform driver for ALSA AN7581");
+MODULE_LICENSE("GPL");

This machine driver seems very generic. Maybe you could get away with using the audio graph drivers instead? It avoids tying the platform with a specific codec just for boilerplate code.

ChenYu

Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] ASoC: dt-bindings: Add Airoha AN7581 with WM8960 YAML

In reply to Christian Marangi
Quoted 1 line · Christian Marangi

Add documentation for Airoha AN7581 with WM8960 i2c codec YAML schema.

I don't see WM8690 nowhere in the binding, so that's a bit confusing. It feels like you mention here entire sound card description but binding is for specific component (AFE).

Well, anyway, probably not worth to resend, so:

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v2 2/3] ASoC: dt-bindings: Add Airoha AN7581 AFE YAML

In reply to Christian Marangi
Quoted 1 line · Christian Marangi

Add documentation for Airoha AN7581 AFE YAML schema.

Drop YAML and YAML schema from subbect and commit description. See also submitting-patches in DT dir. You cannot add documentation for YAML schema. It's like adding a Linux driver for C code.

Quoted 42 lines
---
 .../bindings/sound/airoha,an7581-wm8960.yaml  | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml new file +29 -0
new file mode 100644
index 000000000000..ebeda0876280
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/airoha,an7581-wm8960.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Airoha AN7581 sound card with WM8960 codec
+
+maintainers:
+  - Christian Marangi <[email protected]>
+
+allOf:
+  - $ref: sound-card-common.yaml#
+
+properties:
+  compatible:
+    const: airoha,an7581-wm8960-sound
+
+  platform:
+    type: object
+    additionalProperties: false
+    properties:
+      sound-dai:
+        description: The phandle of AN7581 platform.
+        maxItems: 1
+    required:
+      - sound-dai
+
+  codec:

Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml line 39

Quoted 10 lines
Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml new file +10 -0
+    type: object
+    additionalProperties: false
+    properties:
+      sound-dai:
+        description: The phandle of wm8960 codec.
+        maxItems: 1
+    required:
+      - sound-dai
+
+unevaluatedProperties: false

Please place it after 'required:' block.

Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml line 45

Quoted 6 lines
Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml new file +6 -0
+
+required:
+  - compatible
+  - audio-routing
+  - platform
+  - codec

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v2 1/3] ASoC: dt-bindings: Add Airoha AN7581 with WM8960 YAML

In reply to Krzysztof Kozlowski
Quoted 11 lines · Krzysztof Kozlowski
Quoted 1 line · Christian Marangi

Add documentation for Airoha AN7581 with WM8960 i2c codec YAML schema.

I don't see WM8690 nowhere in the binding, so that's a bit confusing. It feels like you mention here entire sound card description but binding is for specific component (AFE).

Well, anyway, probably not worth to resend, so:

Maybe I have to send a new revision for the machine driver so I have to resent anyway.

I took mt7986 schema as reference and the i2c codec card wasn't defined in the example.

Signature · 1 line
	Ansuel
#6 lore raw

Re: [PATCH v2 2/3] ASoC: dt-bindings: Add Airoha AN7581 AFE YAML

In reply to Krzysztof Kozlowski
Quoted 53 lines · Krzysztof Kozlowski
Quoted 1 line · Christian Marangi

Add documentation for Airoha AN7581 AFE YAML schema.

Drop YAML and YAML schema from subbect and commit description. See also submitting-patches in DT dir. You cannot add documentation for YAML schema. It's like adding a Linux driver for C code.

Quoted 46 lines
---
 .../bindings/sound/airoha,an7581-wm8960.yaml  | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml new file +33 -0
new file mode 100644
index 000000000000..ebeda0876280
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/airoha,an7581-wm8960.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Airoha AN7581 sound card with WM8960 codec
+
+maintainers:
+  - Christian Marangi <[email protected]>
+
+allOf:
+  - $ref: sound-card-common.yaml#
+
+properties:
+  compatible:
+    const: airoha,an7581-wm8960-sound
+
+  platform:
+    type: object
+    additionalProperties: false
+    properties:
+      sound-dai:
+        description: The phandle of AN7581 platform.
+        maxItems: 1
+    required:
+      - sound-dai
+
+  codec:
+    type: object
+    additionalProperties: false
+    properties:
+      sound-dai:
Quoted 9 lines

Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml line 39

Quoted 6 lines
Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml new file +6 -0
+        description: The phandle of wm8960 codec.
+        maxItems: 1
+    required:
+      - sound-dai
+
+unevaluatedProperties: false

Please place it after 'required:' block.

Thanks for the review. Will do!

Quoted 10 lines

Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml line 45

Quoted 6 lines
Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml new file +6 -0
+
+required:
+  - compatible
+  - audio-routing
+  - platform
+  - codec

Best regards,
Krzysztof

Signature · 1 line
	Ansuel