Unverified Commit 4acbfcf1 authored by Frank Li's avatar Frank Li Committed by Mark Brown
Browse files

ASoC: dt-bindings: consolidate simple audio codec to trivial-codec.yaml



Consolidate simple audio codec (one compatible string, one reg, one
optional reset-gpios and '#sound-dai-cells' 0) to a trivial-codec.yaml.

Signed-off-by: default avatarFrank Li <Frank.Li@nxp.com>
Reviewed-by: default avatarRob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20251031144622.4033833-1-Frank.Li@nxp.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e32c4025
Loading
Loading
Loading
Loading
+0 −60
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/adi,max98363.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices MAX98363 SoundWire Amplifier

maintainers:
  - Ryan Lee <ryans.lee@analog.com>

description:
  The MAX98363 is a SoundWire input Class D mono amplifier that
  supports MIPI SoundWire v1.2-compatible digital interface for
  audio and control data.
  SoundWire peripheral device ID of MAX98363 is 0x3*019f836300
  where * is the peripheral device unique ID decoded from pin.
  It supports up to 10 peripheral devices(0x0 to 0x9).

allOf:
  - $ref: dai-common.yaml#

properties:
  compatible:
    const: sdw3019f836300

  reg:
    maxItems: 1

  '#sound-dai-cells':
    const: 0

required:
  - compatible
  - reg
  - "#sound-dai-cells"

unevaluatedProperties: false

examples:
  - |
    soundwire@3250000 {
        #address-cells = <2>;
        #size-cells = <0>;
        reg = <0x3250000 0x2000>;

        speaker@0,0 {
            compatible = "sdw3019f836300";
            reg = <0 0>;
            #sound-dai-cells = <0>;
            sound-name-prefix = "Speaker Left";
        };

        speaker@0,1 {
            compatible = "sdw3019f836300";
            reg = <0 1>;
            #sound-dai-cells = <0>;
            sound-name-prefix = "Speaker Right";
        };
    };
+0 −19
Original line number Diff line number Diff line
Analog Devices SSM2602, SSM2603 and SSM2604 I2S audio CODEC devices

SSM2602 support both I2C and SPI as the configuration interface,
the selection is made by the MODE strap-in pin.
SSM2603 and SSM2604 only support I2C as the configuration interface.

Required properties:

  - compatible : One of "adi,ssm2602", "adi,ssm2603" or "adi,ssm2604"

  - reg : the I2C address of the device for I2C, the chip select
          number for SPI.

 Example:

	ssm2602: ssm2602@1a {
		compatible = "adi,ssm2602";
		reg = <0x1a>;
	};
+0 −49
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/adi,ssm3515.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices SSM3515 Audio Amplifier

maintainers:
  - Martin Povišer <povik+lin@cutebit.org>

description: |
  SSM3515 is a mono Class-D audio amplifier with digital input.

  https://www.analog.com/media/en/technical-documentation/data-sheets/SSM3515.pdf

allOf:
  - $ref: dai-common.yaml#

properties:
  compatible:
    enum:
      - adi,ssm3515

  reg:
    maxItems: 1

  '#sound-dai-cells':
    const: 0

required:
  - compatible
  - reg

unevaluatedProperties: false

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      codec@14 {
        compatible = "adi,ssm3515";
        reg = <0x14>;
        #sound-dai-cells = <0>;
        sound-name-prefix = "Left Tweeter";
      };
    };
+0 −29
Original line number Diff line number Diff line
CS4265 audio CODEC

This device supports I2C only.

Required properties:

  - compatible : "cirrus,cs4265"

  - reg : the I2C address of the device for I2C. The I2C address depends on
          the state of the AD0 pin.  If AD0 is high, the i2c address is 0x4f.
          If it is low, the i2c address is 0x4e.

Optional properties:

  - reset-gpios : a GPIO spec for the reset pin. If specified, it will be
		 deasserted before communication to the codec starts.

Examples:

codec_ad0_high: cs4265@4f { /* AD0 Pin is high */
	compatible = "cirrus,cs4265";
	reg = <0x4f>;
};


codec_ad0_low: cs4265@4e { /* AD0 Pin is low */
	compatible = "cirrus,cs4265";
	reg = <0x4e>;
};
+0 −22
Original line number Diff line number Diff line
Cirrus Logic CS4341 audio DAC

This device supports both I2C and SPI (configured with pin strapping
on the board).

Required properties:
  - compatible: "cirrus,cs4341a"
  - reg : the I2C address of the device for I2C, the chip select
          number for SPI.

For required properties on I2C-bus, please consult
dtschema schemas/i2c/i2c-controller.yaml
For required properties on SPI-bus, please consult
Documentation/devicetree/bindings/spi/spi-bus.txt

Example:
	codec: cs4341@0 {
		#sound-dai-cells = <0>;
		compatible = "cirrus,cs4341a";
		reg = <0>;
		spi-max-frequency = <6000000>;
	};
Loading