Re: [PATCH 1/1] ASoC: dt-bindings: consolidate simple audio codec to trivial-codec.yaml

Rob Herring
2025-10-30T19:14:28Z

On Wed, Oct 29, 2025 at 05:40:15PM -0400, Frank Li wrote:
> Consolidate simple audio codec (one compatible string, one reg and
> '#sound-dai-cells' 0) to a trivial-codec.yaml.

I feel like we're going to be moving things back out when/if supplies
are added. I imagine there's not much alignment there. OTOH, if this is
all older stuff, then that may never happen.

> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> .../bindings/sound/adi,max98363.yaml | 60 -----------------
> .../bindings/sound/adi,ssm3515.yaml | 49 --------------
> .../devicetree/bindings/sound/da9055.txt | 22 -------
> .../bindings/sound/nuvoton,nau8540.yaml | 40 ------------
> .../bindings/sound/nuvoton,nau8810.yaml | 45 -------------
> .../bindings/sound/nxp,tfa9879.yaml | 44 -------------
> .../bindings/sound/nxp,uda1342.yaml | 42 ------------
> .../bindings/sound/trivial-codec.yaml | 65 +++++++++++++++++++
> .../devicetree/bindings/sound/wlf,wm8510.yaml | 41 ------------
> .../devicetree/bindings/sound/wlf,wm8523.yaml | 40 ------------
> .../devicetree/bindings/sound/wlf,wm8580.yaml | 42 ------------
> .../devicetree/bindings/sound/wlf,wm8711.yaml | 40 ------------
> .../devicetree/bindings/sound/wlf,wm8728.yaml | 40 ------------
> .../devicetree/bindings/sound/wlf,wm8737.yaml | 40 ------------
> .../devicetree/bindings/sound/wlf,wm8750.yaml | 42 ------------
> .../devicetree/bindings/sound/wlf,wm8753.yaml | 62 ------------------
> .../devicetree/bindings/sound/wlf,wm8776.yaml | 41 ------------
> .../devicetree/bindings/sound/wlf,wm8961.yaml | 43 ------------
> .../devicetree/bindings/sound/wlf,wm8974.yaml | 41 ------------
> .../devicetree/bindings/sound/wm8770.txt | 16 -----

Also, these can be added I think:

cirrus,cs4349
cirrus,cs4341a
cirrus,cs4265
"adi,ssm2602", "adi,ssm2603", "adi,ssm2604"
ti,pcm1792a
ti,pcm1789 (Add reset-gpios)
ti,pcm5102a
dlg,da9055-codec

> 20 files changed, 65 insertions(+), 790 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/sound/adi,max98363.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/adi,ssm3515.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/da9055.txt
> delete mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8540.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8810.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/nxp,tfa9879.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/nxp,uda1342.yaml
> create mode 100644 Documentation/devicetree/bindings/sound/trivial-codec.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8510.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8523.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8580.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8711.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8728.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8737.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8750.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8753.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8776.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8961.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8974.yaml
> delete mode 100644 Documentation/devicetree/bindings/sound/wm8770.txt

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/trivial-codec.yaml
> @@ -0,0 +1,65 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/trivial-codec.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: collect trivial audio codec

Just 'Trivial Audio Codecs'

> +
> +maintainers:
> + - patches@opensource.cirrus.com

You can put me.

> +
> +allOf:
> + - $ref: dai-common.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - adi,ssm3515
> + - dlg,da9055-codec
> + # Nuvoton Technology Corporation NAU85L40 Audio CODEC
> + - nuvoton,nau8540
> + - nuvoton,nau8810
> + - nuvoton,nau8812
> + - nuvoton,nau8814
> + # NXP TFA9879 class-D audio amplifier
> + - nxp,tfa9879
> + - nxp,uda1342
> + - sdw3019f836300
> + - wlf,wm8510
> + - wlf,wm8523
> + - wlf,wm8580
> + - wlf,wm8581
> + - wlf,wm8711
> + - wlf,wm8728
> + - wlf,wm8737
> + - wlf,wm8750
> + - wlf,wm8753
> + - wlf,wm8770
> + - wlf,wm8776
> + - wlf,wm8961
> + - wlf,wm8974
> + - wlf,wm8987
> +
> + reg:
> + maxItems: 1
> +
> + "#sound-dai-cells":
> + const: 0
> +
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + codec@1a {
> + compatible = "wlf,wm8523";
> + reg = <0x1a>;
> + };
> + };