code:
* Hisilicon 6210 i2s controller

Required properties:

- compatible: should be one of the following:
   - "hisilicon,hi6210-i2s"
- reg: physical base address of the i2s controller unit and length of
   memory mapped region.
- interrupts: should contain the i2s interrupt.
- clocks: a list of phandle + clock-specifier pairs, one for each entry
  in clock-names.
- clock-names: should contain following:
   - "dacodec"
   - "i2s-base"
- dmas: DMA specifiers for tx dma. See the DMA client binding,
  Documentation/devicetree/bindings/dma/dma.txt
- dma-names: should be "tx" and "rx"
- hisilicon,sysctrl-syscon: phandle to sysctrl syscon
- #sound-dai-cells: Should be set to 1 (for multi-dai)
   - The dai cell indexes reference the following interfaces:
       0: S2 interface
       (Currently that is the only one available, but more may be
        supported in the future)

Example for the hi6210 i2s controller:

i2s0: i2s@f7118000{
	compatible = "hisilicon,hi6210-i2s";
	reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */
	interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */
	clocks = <&sys_ctrl HI6220_DACODEC_PCLK>,
		 <&sys_ctrl HI6220_BBPPLL0_DIV>;
	clock-names = "dacodec", "i2s-base";
	dmas = <&dma0 15 &dma0 14>;
	dma-names = "rx", "tx";
	hisilicon,sysctrl-syscon = <&sys_ctrl>;
	#sound-dai-cells = <1>;
};

Then when referencing the i2s controller:
	sound-dai = <&i2s0 0>; /* index 0 => S2 interface */


code:
Invensense ICS-43432-compatible MEMS microphone with I2S output.

There are no software configuration options for this device, indeed, the only
host connection is the I2S interface. Apart from requirements on clock
frequency (460 kHz to 3.379 MHz according to the data sheet) there must be
64 clock cycles in each stereo output frame; 24 of the 32 available bits
contain audio data. A hardware pin determines if the device outputs data
on the left or right channel of the I2S frame.

Required properties:
  - compatible: should be one of the following.
     "invensense,ics43432": For the Invensense ICS43432
     "cui,cmm-4030d-261": For the CUI CMM-4030D-261-I2S-TR

Example:

	ics43432: ics43432 {
		compatible = "invensense,ics43432";
	};

repo_name: angery/linux


code:
Imagination Technologies I2S Input Controller

Required Properties:

  - compatible : Compatible list, must contain "img,i2s-in"

  - #sound-dai-cells : Must be equal to 0

  - reg : Offset and length of the register set for the device

  - clocks : Contains an entry for each entry in clock-names

  - clock-names : Must include the following entry:
	"sys"	The system clock

  - dmas: Contains an entry for each entry in dma-names.

  - dma-names: Must include the following entry:
	"rx"	Single DMA channel used by all active I2S channels

  - img,i2s-channels : Number of I2S channels instantiated in the I2S in block

Optional Properties:

  - interrupts : Contains the I2S in interrupts. Depending on
	the configuration, there may be no interrupts, one interrupt,
	or an interrupt per I2S channel. For the case where there is
	one interrupt per channel, the interrupts should be listed
	in ascending channel order

  - resets: Contains a phandle to the I2S in reset signal

  - reset-names: Contains the reset signal name "rst"

Example:

i2s_in: i2s-in@18100800 {
	compatible = "img,i2s-in";
	reg = <0x18100800 0x200>;
	interrupts = <GIC_SHARED 7 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 30 0xffffffff 0>;
	dma-names = "rx";
	clocks = <&cr_periph SYS_CLK_I2S_IN>;
	clock-names = "sys";
	img,i2s-channels = <6>;
	#sound-dai-cells = <0>;
};


code:
Imagination Technologies I2S Output Controller

Required Properties:

  - compatible : Compatible list, must contain "img,i2s-out"

  - #sound-dai-cells : Must be equal to 0

  - reg : Offset and length of the register set for the device

  - clocks : Contains an entry for each entry in clock-names

  - clock-names : Must include the following entries:
	"sys"	The system clock
	"ref"	The reference clock

  - dmas: Contains an entry for each entry in dma-names.

  - dma-names: Must include the following entry:
	"tx"	Single DMA channel used by all active I2S channels

  - img,i2s-channels : Number of I2S channels instantiated in the I2S out block

  - resets: Contains a phandle to the I2S out reset signal

  - reset-names: Contains the reset signal name "rst"

Optional Properties:

  - interrupts : Contains the I2S out interrupts. Depending on
	the configuration, there may be no interrupts, one interrupt,
	or an interrupt per I2S channel. For the case where there is
	one interrupt per channel, the interrupts should be listed
	in ascending channel order

Example:

i2s_out: i2s-out@18100a00 {
	compatible = "img,i2s-out";
	reg = <0x18100A00 0x200>;
	interrupts = <GIC_SHARED 13 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 23 0xffffffff 0>;
	dma-names = "tx";
	clocks = <&cr_periph SYS_CLK_I2S_OUT>,
		 <&clk_core CLK_I2S>;
	clock-names = "sys", "ref";
	img,i2s-channels = <6>;
	resets = <&pistachio_reset PISTACHIO_RESET_I2S_OUT>;
	reset-names = "rst";
	#sound-dai-cells = <0>;
};


code:
Imagination Technologies Parallel Output Controller

Required Properties:

  - compatible : Compatible list, must contain "img,parallel-out".

  - #sound-dai-cells : Must be equal to 0

  - reg : Offset and length of the register set for the device.

  - dmas: Contains an entry for each entry in dma-names.

  - dma-names: Must include the following entry:
	"tx"

  - clocks : Contains an entry for each entry in clock-names.

  - clock-names : Includes the following entries:
	"sys"	The system clock
	"ref"	The reference clock

  - resets: Contains a phandle to the parallel out reset signal

  - reset-names: Contains the reset signal name "rst"

Optional Properties:

  - interrupts : Contains the parallel out interrupt, if present

Example:

parallel_out: parallel-out@18100c00 {
	compatible = "img,parallel-out";
	reg = <0x18100C00 0x100>;
	interrupts = <GIC_SHARED 19 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 16 0xffffffff 0>;
	dma-names = "tx";
	clocks = <&cr_periph SYS_CLK_PAUD_OUT>,
		 <&clk_core CLK_AUDIO_DAC>;
	clock-names = "sys", "ref";
	resets = <&pistachio_reset PISTACHIO_RESET_PRL_OUT>;
	reset-names = "rst";
	#sound-dai-cells = <0>;
};


code:
Pistachio internal DAC DT bindings

Required properties:

  - compatible: "img,pistachio-internal-dac"

  - img,cr-top : Must contain a phandle to the top level control syscon
		 node which contains the internal dac control registers

  - VDD-supply : Digital power supply regulator (+1.8V or +3.3V)

Examples:

internal_dac: internal-dac {
	compatible = "img,pistachio-internal-dac";
	img,cr-top = <&cr_top>;
	VDD-supply = <&supply3v3>;
};


code:
Imagination Technologies SPDIF Input Controller

Required Properties:

  - compatible : Compatible list, must contain "img,spdif-in"

  - #sound-dai-cells : Must be equal to 0

  - reg : Offset and length of the register set for the device

  - dmas: Contains an entry for each entry in dma-names.

  - dma-names: Must include the following entry:
	"rx"

  - clocks : Contains an entry for each entry in clock-names

  - clock-names : Includes the following entries:
	"sys"	The system clock

Optional Properties:

  - resets: Should contain a phandle to the spdif in reset signal, if any

  - reset-names: Should contain the reset signal name "rst", if a
	reset phandle is given

  - interrupts : Contains the spdif in interrupt, if present

Example:

spdif_in: spdif-in@18100e00 {
	compatible = "img,spdif-in";
	reg = <0x18100E00 0x100>;
	interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 15 0xffffffff 0>;
	dma-names = "rx";
	clocks = <&cr_periph SYS_CLK_SPDIF_IN>;
	clock-names = "sys";
	#sound-dai-cells = <0>;
};


code:
Imagination Technologies SPDIF Output Controller

Required Properties:

  - compatible : Compatible list, must contain "img,spdif-out"

  - #sound-dai-cells : Must be equal to 0

  - reg : Offset and length of the register set for the device

  - dmas: Contains an entry for each entry in dma-names.

  - dma-names: Must include the following entry:
	"tx"

  - clocks : Contains an entry for each entry in clock-names.

  - clock-names : Includes the following entries:
	"sys"	The system clock
	"ref"	The reference clock

  - resets: Contains a phandle to the spdif out reset signal

  - reset-names: Contains the reset signal name "rst"

Optional Properties:

  - interrupts : Contains the parallel out interrupt, if present

Example:

spdif_out: spdif-out@18100d00 {
	compatible = "img,spdif-out";
	reg = <0x18100D00 0x100>;
	interrupts = <GIC_SHARED 21 IRQ_TYPE_LEVEL_HIGH>;
	dmas = <&mdc 14 0xffffffff 0>;
	dma-names = "tx";
	clocks = <&cr_periph SYS_CLK_SPDIF_OUT>,
		 <&clk_core CLK_SPDIF>;
	clock-names = "sys", "ref";
	resets = <&pistachio_reset PISTACHIO_RESET_SPDIF_OUT>;
	reset-names = "rst";
	#sound-dai-cells = <0>;
};


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/imx-audio-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP i.MX audio sound card.

maintainers:
  - Shengjiu Wang <shengjiu.wang@nxp.com>

properties:
  compatible:
    enum:
      - fsl,imx-audio-card

  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User specified audio sound card name

  audio-routing:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    description:
      A list of the connections between audio components. Each entry is a
      pair of strings, the first being the connection's sink, the second
      being the connection's source. Valid names could be power supplies,
      MicBias of codec and the jacks on the board.

patternProperties:
  ".*-dai-link$":
    description:
      Each subnode represents a dai link. Subnodes of each dai links would be
      cpu/codec dais.

    type: object

    properties:
      link-name:
        description: Indicates dai-link name and PCM stream name.
        $ref: /schemas/types.yaml#/definitions/string
        maxItems: 1

      format:
        description: audio format.
        items:
          enum:
            - i2s
            - dsp_b

      dai-tdm-slot-num:
        description: see tdm-slot.txt.
        $ref: /schemas/types.yaml#/definitions/uint32

      dai-tdm-slot-width:
        description: see tdm-slot.txt.
        $ref: /schemas/types.yaml#/definitions/uint32

      cpu:
        description: Holds subnode which indicates cpu dai.
        type: object
        additionalProperties: false
        properties:
          sound-dai:
            maxItems: 1

      codec:
        description: Holds subnode which indicates codec dai.
        type: object
        additionalProperties: false
        properties:
          sound-dai:
            minItems: 1
            maxItems: 2

      fsl,mclk-equal-bclk:
        description: Indicates mclk can be equal to bclk, especially for sai interface
        $ref: /schemas/types.yaml#/definitions/flag

    required:
      - link-name
      - cpu

    additionalProperties: false

required:
  - compatible
  - model

additionalProperties: false

examples:
  - |
    sound-ak4458 {
        compatible = "fsl,imx-audio-card";
        model = "ak4458-audio";
        pri-dai-link {
            link-name = "akcodec";
            format = "i2s";
            fsl,mclk-equal-bclk;
            cpu {
                 sound-dai = <&sai1>;
            };
            codec {
                 sound-dai = <&ak4458_1>, <&ak4458_2>;
            };
        };
        fe-dai-link {
            link-name = "HiFi-ASRC-FE";
            format = "i2s";
            cpu {
                sound-dai = <&easrc>;
            };
        };
        be-dai-link {
            link-name = "HiFi-ASRC-BE";
            format = "dsp_b";
            dai-tdm-slot-num = <8>;
            dai-tdm-slot-width = <32>;
            fsl,mclk-equal-bclk;
            cpu {
                sound-dai = <&sai1>;
            };
            codec {
                sound-dai = <&ak4458_1>, <&ak4458_2>;
            };
        };
    };


code:
Freescale i.MX audio complex with ES8328 codec

Required properties:
- compatible       : "fsl,imx-audio-es8328"
- model            : The user-visible name of this sound complex
- ssi-controller   : The phandle of the i.MX SSI controller
- jack-gpio        : Optional GPIO for headphone jack
- audio-amp-supply : Power regulator for speaker amps
- audio-codec      : The phandle of the ES8328 audio codec
- audio-routing    : A list of the connections between audio components.
                     Each entry is a pair of strings, the first being the
		     connection's sink, the second being the connection's
		     source. Valid names could be power supplies, ES8328
		     pins, and the jacks on the board:

			Power supplies:
			   * audio-amp

			ES8328 pins:
			   * LOUT1
			   * LOUT2
			   * ROUT1
			   * ROUT2
			   * LINPUT1
			   * LINPUT2
			   * RINPUT1
			   * RINPUT2
			   * Mic PGA

			Board connectors:
			   * Headphone
			   * Speaker
			   * Mic Jack
- mux-int-port     : The internal port of the i.MX audio muxer (AUDMUX)
- mux-ext-port     : The external port of the i.MX audio muxer (AUDMIX)

Note: The AUDMUX port numbering should start at 1, which is consistent with
hardware manual.

Example:

sound {
	compatible = "fsl,imx-audio-es8328";
	model = "imx-audio-es8328";
	ssi-controller = <&ssi1>;
	audio-codec = <&codec>;
	jack-gpio = <&gpio5 15 0>;
	audio-amp-supply = <&reg_audio_amp>;
	audio-routing =
		"Speaker", "LOUT2",
		"Speaker", "ROUT2",
		"Speaker", "audio-amp",
		"Headphone", "ROUT1",
		"Headphone", "LOUT1",
		"LINPUT1", "Mic Jack",
		"RINPUT1", "Mic Jack",
		"Mic Jack", "Mic Bias";
	mux-int-port = <1>;
	mux-ext-port = <3>;
};


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/imx-audio-hdmi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP i.MX audio complex with HDMI

maintainers:
  - Shengjiu Wang <shengjiu.wang@nxp.com>

properties:
  compatible:
    enum:
      - fsl,imx-audio-hdmi
      - fsl,imx-audio-sii902x

  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User specified audio sound card name

  audio-cpu:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: The phandle of an CPU DAI controller

  hdmi-out:
    type: boolean
    description: |
      This is a boolean property. If present, the transmitting function
      of HDMI will be enabled, indicating there's a physical HDMI out
      connector or jack on the board or it's connecting to some other IP
      block, such as an HDMI encoder or display-controller.

  hdmi-in:
    type: boolean
    description: |
      This is a boolean property. If present, the receiving function of
      HDMI will be enabled, indicating there is a physical HDMI in
      connector/jack on the board.

required:
  - compatible
  - model
  - audio-cpu

additionalProperties: false

examples:
  - |
    sound-hdmi {
        compatible = "fsl,imx-audio-hdmi";
        model = "audio-hdmi";
        audio-cpu = <&aud2htx>;
        hdmi-out;
    };


code:
Freescale i.MX audio complex with SGTL5000 codec

Required properties:

  - compatible		: "fsl,imx-audio-sgtl5000"

  - model		: The user-visible name of this sound complex

  - ssi-controller	: The phandle of the i.MX SSI controller

  - audio-codec		: The phandle of the SGTL5000 audio codec

  - audio-routing	: A list of the connections between audio components.
			  Each entry is a pair of strings, the first being the
			  connection's sink, the second being the connection's
			  source. Valid names could be power supplies, SGTL5000
			  pins, and the jacks on the board:

			  Power supplies:
			   * Mic Bias

			  SGTL5000 pins:
			   * MIC_IN
			   * LINE_IN
			   * HP_OUT
			   * LINE_OUT

			  Board connectors:
			   * Mic Jack
			   * Line In Jack
			   * Headphone Jack
			   * Line Out Jack
			   * Ext Spk

  - mux-int-port	: The internal port of the i.MX audio muxer (AUDMUX)

  - mux-ext-port	: The external port of the i.MX audio muxer

Note: The AUDMUX port numbering should start at 1, which is consistent with
hardware manual.

Example:

sound {
	compatible = "fsl,imx51-babbage-sgtl5000",
		     "fsl,imx-audio-sgtl5000";
	model = "imx51-babbage-sgtl5000";
	ssi-controller = <&ssi1>;
	audio-codec = <&sgtl5000>;
	audio-routing =
		"MIC_IN", "Mic Jack",
		"Mic Jack", "Mic Bias",
		"Headphone Jack", "HP_OUT";
	mux-int-port = <1>;
	mux-ext-port = <3>;
};


code:
Freescale i.MX audio complex with S/PDIF transceiver

Required properties:

  - compatible		: "fsl,imx-audio-spdif"

  - model		: The user-visible name of this sound complex

  - spdif-controller	: The phandle of the i.MX S/PDIF controller

Optional properties:

  - spdif-out		: This is a boolean property. If present, the
			  transmitting function of S/PDIF will be enabled,
			  indicating there's a physical S/PDIF out connector
			  or jack on the board or it's connecting to some
			  other IP block, such as an HDMI encoder or
			  display-controller.

  - spdif-in		: This is a boolean property. If present, the receiving
			  function of S/PDIF will be enabled, indicating there
			  is a physical S/PDIF in connector/jack on the board.

* Note: At least one of these two properties should be set in the DT binding.

Example:

sound-spdif {
	compatible = "fsl,imx-audio-spdif";
	model = "imx-spdif";
	spdif-controller = <&spdif>;
	spdif-out;
	spdif-in;
};


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/imx-audmux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Freescale Digital Audio Mux device

maintainers:
  - Oleksij Rempel <o.rempel@pengutronix.de>

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - fsl,imx27-audmux
          - const: fsl,imx21-audmux
      - items:
          - enum:
              - fsl,imx25-audmux
              - fsl,imx35-audmux
              - fsl,imx50-audmux
              - fsl,imx51-audmux
              - fsl,imx53-audmux
              - fsl,imx6q-audmux
              - fsl,imx6sl-audmux
              - fsl,imx6sll-audmux
              - fsl,imx6sx-audmux
          - const: fsl,imx31-audmux

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: audmux

patternProperties:
  "^mux-[0-9a-z]*$":
    type: object
    properties:
      fsl,audmux-port:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: |
          Integer of the audmux port that is configured by this child node

      fsl,port-config:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        description: |
          List of configuration options for the specific port.
          For imx31-audmux and above, it is a list of tuples ptcr pdcr.
          For imx21-audmux it is a list of pcr values.

    required:
      - fsl,audmux-port
      - fsl,port-config

    additionalProperties: false

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    audmux@21d8000 {
        compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux";
        reg = <0x021d8000 0x4000>;
    };
  - |
    audmux@10016000 {
        compatible = "fsl,imx27-audmux", "fsl,imx21-audmux";
        reg = <0x10016000 0x1000>;
        clocks = <&clks 1>;
        clock-names = "audmux";

        mux-ssi0 {
            fsl,audmux-port = <0>;
            fsl,port-config = <0xcb205000>;
        };

        mux-pins4 {
            fsl,audmux-port = <2>;
            fsl,port-config = <0x00001000>;
        };
    };
  - |
    #include <dt-bindings/sound/fsl-imx-audmux.h>
    audmux@21d8000 {
        compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux";
        reg = <0x021d8000 0x4000>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_audmux>;

        mux-ssi1 {
            fsl,audmux-port = <0>;
            fsl,port-config = <
                IMX_AUDMUX_V2_PTCR_SYN		0
                IMX_AUDMUX_V2_PTCR_TFSEL(2)	0
                IMX_AUDMUX_V2_PTCR_TCSEL(2)	0
                IMX_AUDMUX_V2_PTCR_TFSDIR	0
                IMX_AUDMUX_V2_PTCR_TCLKDIR      IMX_AUDMUX_V2_PDCR_RXDSEL(2)
              >;
        };

        mux-pins3 {
            fsl,audmux-port = <2>;
            fsl,port-config = <
                IMX_AUDMUX_V2_PTCR_SYN          IMX_AUDMUX_V2_PDCR_RXDSEL(0)
                0                               IMX_AUDMUX_V2_PDCR_TXRXEN
              >;
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ingenic,aic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Ingenic SoCs AC97 / I2S Controller (AIC) DT bindings

maintainers:
  - Paul Cercueil <paul@crapouillou.net>

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

properties:
  $nodename:
    pattern: '^audio-controller@'

  compatible:
    oneOf:
      - enum:
          - ingenic,jz4740-i2s
          - ingenic,jz4760-i2s
          - ingenic,jz4770-i2s
          - ingenic,jz4780-i2s
      - items:
          - const: ingenic,jz4725b-i2s
          - const: ingenic,jz4740-i2s

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

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: AIC clock
      - description: I2S clock

  clock-names:
    items:
      - const: aic
      - const: i2s

  dmas:
    items:
      - description: DMA controller phandle and request line for I2S RX
      - description: DMA controller phandle and request line for I2S TX

  dma-names:
    items:
      - const: rx
      - const: tx

unevaluatedProperties: false

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - dmas
  - dma-names
  - '#sound-dai-cells'

examples:
  - |
    #include <dt-bindings/clock/ingenic,jz4740-cgu.h>
    aic: audio-controller@10020000 {
      compatible = "ingenic,jz4740-i2s";
      reg = <0x10020000 0x38>;

      #sound-dai-cells = <0>;

      interrupt-parent = <&intc>;
      interrupts = <18>;

      clocks = <&cgu JZ4740_CLK_AIC>,
               <&cgu JZ4740_CLK_I2S>;
      clock-names = "aic", "i2s";

      dmas = <&dmac 25 0xffffffff>, <&dmac 24 0xffffffff>;
      dma-names = "rx", "tx";
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ingenic,codec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Ingenic JZ47xx internal codec DT bindings

maintainers:
  - Paul Cercueil <paul@crapouillou.net>

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

properties:
  $nodename:
    pattern: '^audio-codec@.*'

  compatible:
    oneOf:
      - enum:
          - ingenic,jz4770-codec
          - ingenic,jz4760-codec
          - ingenic,jz4725b-codec
          - ingenic,jz4740-codec
      - items:
          - const: ingenic,jz4760b-codec
          - const: ingenic,jz4760-codec

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: aic

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

unevaluatedProperties: false

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - '#sound-dai-cells'

examples:
  - |
    #include <dt-bindings/clock/ingenic,jz4740-cgu.h>
    codec: audio-codec@10020080 {
      compatible = "ingenic,jz4740-codec";
      reg = <0x10020080 0x8>;
      #sound-dai-cells = <0>;
      clocks = <&cgu JZ4740_CLK_AIC>;
      clock-names = "aic";
    };

...


code:
Inno audio codec for RK3036

Inno audio codec is integrated inside RK3036 SoC.

Required properties:
- compatible : Should be "rockchip,rk3036-codec".
- reg : The registers of codec.
- clock-names : Should be "acodec_pclk".
- clocks : The clock of codec.
- rockchip,grf : The phandle of grf device node.

Example:

	acodec: acodec-ana@20030000 {
		compatible = "rk3036-codec";
		reg = <0x20030000 0x4000>;
		rockchip,grf = <&grf>;
		clock-names = "acodec_pclk";
		clocks = <&cru ACLK_VCODEC>;
	};


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2020 Intel Corporation
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/intel,keembay-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Intel KeemBay I2S

maintainers:
  - Daniele Alessandrelli <daniele.alessandrelli@intel.com>
  - Paul J. Murphy <paul.j.murphy@intel.com>

description: |
 Intel KeemBay I2S

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

properties:
  compatible:
    enum:
      - intel,keembay-i2s
      - intel,keembay-tdm
      - intel,keembay-hdmi-i2s

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

  reg:
    items:
      - description: I2S registers
      - description: I2S gen configuration

  reg-names:
    items:
      - const: i2s-regs
      - const: i2s_gen_cfg

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Bus Clock
      - description: Module Clock

  clock-names:
    items:
      - const: osc
      - const: apb_clk

  dmas:
    items:
      - description: DMA TX channel
      - description: DMA RX channel

  dma-names:
    items:
      - const: tx
      - const: rx

required:
  - compatible
  - "#sound-dai-cells"
  - reg
  - clocks
  - clock-names
  - interrupts

unevaluatedProperties: false

examples:
  - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/interrupt-controller/irq.h>
     #define KEEM_BAY_PSS_AUX_I2S3
     #define KEEM_BAY_PSS_I2S3
     i2s3: i2s@20140000 {
         compatible = "intel,keembay-i2s";
         #sound-dai-cells = <0>;
         reg = <0x20140000 0x200>, /* I2S registers */
               <0x202a00a4 0x4>; /* I2S gen configuration */
         reg-names = "i2s-regs", "i2s_gen_cfg";
         interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
         clock-names = "osc", "apb_clk";
         clocks = <&scmi_clk KEEM_BAY_PSS_AUX_I2S3>, <&scmi_clk KEEM_BAY_PSS_I2S3>;
         dmas = <&axi_dma0 29>, <&axi_dma0 33>;
         dma-names = "tx", "rx";
     };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/linux,bt-sco.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Bluetooth SCO Audio Codec

maintainers:
  - Mark Brown <broonie@kernel.org>

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

properties:
  '#sound-dai-cells':
    enum:
      - 0

      # For Wideband PCM
      - 1

  compatible:
    enum:
      - delta,dfbmcs320
      - linux,bt-sco

required:
  - '#sound-dai-cells'
  - compatible

unevaluatedProperties: false

examples:
  - |
    codec {
        #sound-dai-cells = <0>;
        compatible = "linux,bt-sco";
    };

...


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/linux,spdif-dit.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Dummy SPDIF Transmitter

maintainers:
  - Mark Brown <broonie@kernel.org>

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

properties:
  compatible:
    const: linux,spdif-dit

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

  sound-name-prefix: true

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

additionalProperties: false

examples:
  - |
    spdif-out {
        #sound-dai-cells = <0>;
        compatible = "linux,spdif-dit";
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/marvell,mmp-sspa.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Marvel SSPA Digital Audio Interface Bindings

maintainers:
  - Lubomir Rintel <lkundrak@v3.sk>

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

properties:
  $nodename:
    pattern: "^audio-controller(@.*)?$"

  compatible:
    const: marvell,mmp-sspa

  reg:
    items:
      - description: RX block
      - description: TX block

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Clock for the Audio block
      - description: I2S bit clock

  clock-names:
    items:
      - const: audio
      - const: bitclk

  power-domains:
    maxItems: 1

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

  dmas:
    items:
      - description: TX DMA Channel
      - description: RX DMA Channel

  dma-names:
    items:
      - const: tx
      - const: rx

  port:
    $ref: audio-graph-port.yaml#
    unevaluatedProperties: false

    properties:
      endpoint:
        type: object

        properties:
          dai-format:
            const: i2s

required:
  - "#sound-dai-cells"
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - dmas
  - dma-names
  - port

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/marvell,mmp2.h>

    audio-controller@d42a0c00 {
      compatible = "marvell,mmp-sspa";
      reg = <0xd42a0c00 0x30>,
            <0xd42a0c80 0x30>;
      interrupts = <2>;
      clock-names = "audio", "bitclk";
      clocks = <&soc_clocks 127>,
               <&audio_clk 1>;
      #sound-dai-cells = <0>;
      dmas = <&adma0 0>, <&adma0 1>;
      dma-names = "tx", "rx";
      port {
        endpoint {
          remote-endpoint = <&rt5631_0>;
          dai-format = "i2s";
        };
      };
    };

...


code:
Marvell PXA2xx audio complex

This descriptions matches the AC97 controller found in pxa2xx and pxa3xx series.

Required properties:
  - compatible: should be one of the following:
    "marvell,pxa250-ac97"
    "marvell,pxa270-ac97"
    "marvell,pxa300-ac97"
  - reg: device MMIO address space
  - interrupts: single interrupt generated by AC97 IP
  - clocks: input clock of the AC97 IP, refer to clock-bindings.txt

Optional properties:
  - pinctrl-names, pinctrl-0: refer to pinctrl-bindings.txt
  - reset-gpios: gpio used for AC97 reset, refer to gpio.txt

Example:
	ac97: sound@40500000 {
		compatible = "marvell,pxa250-ac97";
		reg = < 0x40500000 0x1000 >;
		interrupts = <14>;
		reset-gpios = <&gpio 113 GPIO_ACTIVE_HIGH>;
		#sound-dai-cells = <1>;
		pinctrl-names = "default";
		pinctrl-0 = < &pmux_ac97_default >;
	};


code:
MAX98090 audio CODEC

This device supports I2C only.

Required properties:

- compatible : "maxim,max98090" or "maxim,max98091".

- reg : The I2C address of the device.

- interrupts : The CODEC's interrupt output.

Optional properties:

- clocks: The phandle of the master clock to the CODEC

- clock-names: Should be "mclk"

- #sound-dai-cells : should be 0.

- maxim,dmic-freq: Frequency at which to clock DMIC

- maxim,micbias: Micbias voltage applies to the analog mic, valid voltages value are:
	0 - 2.2v
	1 - 2.55v
	2 - 2.4v
	3 - 2.8v

Pins on the device (for linking into audio routes):

  * MIC1
  * MIC2
  * DMICL
  * DMICR
  * IN1
  * IN2
  * IN3
  * IN4
  * IN5
  * IN6
  * IN12
  * IN34
  * IN56
  * HPL
  * HPR
  * SPKL
  * SPKR
  * RCVL
  * RCVR
  * MICBIAS

Example:

audio-codec@10 {
	compatible = "maxim,max98090";
	reg = <0x10>;
	interrupt-parent = <&gpio>;
	interrupts = <TEGRA_GPIO(H, 4) IRQ_TYPE_LEVEL_HIGH>;
};


code:
MAX98095 audio CODEC

This device supports I2C only.

Required properties:

- compatible : "maxim,max98095".

- reg : The I2C address of the device.

Optional properties:

- clocks: The phandle of the master clock to the CODEC

- clock-names: Should be "mclk"

Example:

max98095: codec@11 {
	compatible = "maxim,max98095";
	reg = <0x11>;
};


code:
max98371 codec

This device supports I2C mode only.

Required properties:

- compatible : "maxim,max98371"
- reg : The chip select number on the I2C bus

Example:

&i2c {
	max98371: max98371@31 {
		compatible = "maxim,max98371";
		reg = <0x31>;
	};
};


code:
Maxim Integrated MAX98373 Speaker Amplifier

This device supports I2C.

Required properties:

 - compatible : "maxim,max98373"

 - reg : the I2C address of the device.

Optional properties:

  - maxim,vmon-slot-no : slot number used to send voltage information
                   or in inteleave mode this will be used as
                   interleave slot.
                   slot range : 0 ~ 15,  Default : 0

  - maxim,imon-slot-no : slot number used to send current information
                   slot range : 0 ~ 15,  Default : 0

  - maxim,spkfb-slot-no : slot number used to send speaker feedback information
                   slot range : 0 ~ 15,  Default : 0

  - maxim,interleave-mode : For cases where a single combined channel
		   for the I/V sense data is not sufficient, the device can also be configured
		   to share a single data output channel on alternating frames.
		   In this configuration, the current and voltage data will be frame interleaved
		   on a single output channel.
                   Boolean, define to enable the interleave mode, Default : false

Example:

codec: max98373@31 {
   compatible = "maxim,max98373";
   reg = <0x31>;
   maxim,vmon-slot-no = <0>;
   maxim,imon-slot-no = <1>;
   maxim,spkfb-slot-no = <2>;
   maxim,interleave-mode;
};


code:
MAX9860 Mono Audio Voice Codec

Required properties:

  - compatible : "maxim,max9860"

  - reg : the I2C address of the device

  - AVDD-supply, DVDD-supply and DVDDIO-supply : power supplies for
    the device, as covered in bindings/regulator/regulator.txt

  - clock-names : Required element: "mclk".

  - clocks : A clock specifier for the clock connected as MCLK.

Examples:

	max9860: max9860@10 {
		compatible = "maxim,max9860";
		reg = <0x10>;

		AVDD-supply = <&reg_1v8>;
		DVDD-supply = <&reg_1v8>;
		DVDDIO-supply = <&reg_3v0>;

		clock-names = "mclk";
		clocks = <&pck2>;
	};


code:
max9867 codec

This device supports I2C mode only.

Required properties:

- compatible : "maxim,max9867"
- reg : The chip select number on the I2C bus

Example:

&i2c {
	max9867: max9867@18 {
		compatible = "maxim,max9867";
		reg = <0x18>;
	};
};


code:
Maxim Integrated MAX98925/MAX98926/MAX98927 Speaker Amplifier

This device supports I2C.

Required properties:

  - compatible : should be one of the following
    - "maxim,max98925"
    - "maxim,max98926"
    - "maxim,max98927"

  - vmon-slot-no : slot number used to send voltage information
                   or in inteleave mode this will be used as
                   interleave slot.
                   MAX98925/MAX98926 slot range : 0 ~ 30,  Default : 0
                   MAX98927 slot range : 0 ~ 15,  Default : 0

  - imon-slot-no : slot number used to send current information
                   MAX98925/MAX98926 slot range : 0 ~ 30,  Default : 0
                   MAX98927 slot range : 0 ~ 15,  Default : 0

  - interleave-mode : When using two MAX9892X in a system it is
                   possible to create ADC data that that will
                   overflow the frame size. Digital Audio Interleave
                   mode provides a means to output VMON and IMON data
                   from two devices on a single DOUT line when running
                   smaller frames sizes such as 32 BCLKS per LRCLK or
                   48 BCLKS per LRCLK.
                   Range : 0 (off), 1 (on),  Default : 0

  - reg : the I2C address of the device for I2C

Optional properties:
  - reset-gpios : GPIO to reset the device

Example:

codec: max98927@3a {
   compatible = "maxim,max98927";
   vmon-slot-no = <0>;
   imon-slot-no = <1>;
   interleave-mode = <0>;
   reg = <0x3a>;
};


code:
Maxim MAX9759 Speaker Amplifier
===============================

Required properties:
- compatible : "maxim,max9759"
- shutdown-gpios : the gpio connected to the shutdown pin
- mute-gpios : the gpio connected to the mute pin
- gain-gpios : the 2 gpios connected to the g1 and g2 pins

Example:

max9759: analog-amplifier {
	compatible = "maxim,max9759";
	shutdown-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
	mute-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
	gain-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>,
		     <&gpio3 25 GPIO_ACTIVE_LOW>;
};


code:
MAX98088 audio CODEC

This device supports I2C only.

Required properties:

- compatible: "maxim,max98088" or "maxim,max98089".
- reg: The I2C address of the device.

Optional properties:

- clocks: the clock provider of MCLK, see ../clock/clock-bindings.txt section
  "consumer" for more information.
- clock-names: must be set to "mclk"

Example:

max98089: codec@10 {
	compatible = "maxim,max98089";
	reg = <0x10>;
	clocks = <&clks IMX6QDL_CLK_CKO2>;
	clock-names = "mclk";
};


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98357a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim Integrated MAX98357A/MAX98360A amplifier

maintainers:
  - Tzung-Bi Shih <tzungbi@kernel.org>

description:
  Maxim Integrated MAX98357A/MAX98360A is a digital pulse-code modulation (PCM)
  input Class D amplifier.

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

properties:
  compatible:
    enum:
      - maxim,max98357a
      - maxim,max98360a

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

  sdmode-gpios:
    maxItems: 1
    description:
      Chip's SD_MODE pin.  If missing the chip is always on.

  sdmode-delay:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Delay time for SD_MODE pin changes intended to make I2S clocks ready
      before SD_MODE is unmuted in order to avoid the speaker pop noise.

required:
  - compatible

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    amplifier {
        compatible = "maxim,max98360a";
        #sound-dai-cells = <0>;
        sdmode-gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>;
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98390.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim Integrated MAX98390 Speaker Amplifier with Integrated Dynamic Speaker Management

maintainers:
  - Steve Lee <steves.lee@maximintegrated.com>

properties:
  compatible:
    const: maxim,max98390

  reg:
    maxItems: 1
    description: I2C address of the device.

  maxim,temperature_calib:
    description: The calculated temperature data was measured while doing the calibration.
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 65535

  maxim,r0_calib:
    description: This is r0 calibration data which was measured in factory mode.
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 1
    maximum: 8388607

  reset-gpios:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      max98390: amplifier@38 {
        compatible = "maxim,max98390";
        reg = <0x38>;
        maxim,temperature_calib = <1024>;
        maxim,r0_calib = <100232>;
        reset-gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
      };
    };


code:
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98504.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim Integrated MAX98504 class D mono speaker amplifier

maintainers:
  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

description:
  Maxim Integrated MAX98504 speaker amplifier supports I2C control interface
  with an IRQ output signal, PCM and PDM digital audio interface (DAI) and a
  differential analog input.

properties:
  compatible:
    const: maxim,max98504

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  DIOVDD-supply: true
  DVDD-supply: true
  PVDD-supply: true

  maxim,brownout-threshold:
    $ref: /schemas/types.yaml#/definitions/uint32
    maximum: 21
    default: 0
    description:
      PVDD brownout threshold, where values correspond to 2.6V, 2.65V...3.65V
      voltage range.  Property also enables the PVDD brownout protection.

  maxim,brownout-attenuation:
    $ref: /schemas/types.yaml#/definitions/uint32
    maximum: 6
    default: 0
    description:
      Brownout attenuation to the speaker gain applied during the "attack hold"
      and "timed hold" phase, the value must be from 0...6 (dB) range.

  maxim,brownout-attack-hold-ms:
    maximum: 255
    default: 0
    description:
      Brownout attack hold phase time in ms, VBATBROWN_ATTK_HOLD, register 0x0018.

  maxim,brownout-timed-hold-ms:
    maximum: 255
    default: 0
    description:
      Brownout timed hold phase time in ms, VBATBROWN_TIME_HOLD, register 0x0019.

  maxim,brownout-release-rate-ms:
    maximum: 255
    default: 0
    description:
      Brownout release phase step time in ms, VBATBROWN_RELEASE, register 0x001A.

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

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

        amplifier@31 {
            compatible = "maxim,max98504";
            reg = <0x31>;

            DIOVDD-supply = <&ldo3_reg>;
            DVDD-supply = <&ldo3_reg>;
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98520.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim Integrated MAX98520 Speaker Amplifier Driver

maintainers:
  - George Song <george.song@maximintegrated.com>

properties:
  compatible:
    const: maxim,max98520

  reg:
    maxItems: 1
    description: I2C address of the device.

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      max98520: amplifier@38 {
        compatible = "maxim,max98520";
        reg = <0x38>;
      };
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mchp,i2s-mcc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip I2S Multi-Channel Controller

maintainers:
  - Codrin Ciubotariu <codrin.ciubotariu@microchip.com>

description:
  The I2SMCC complies with the Inter-IC Sound (I2S) bus specification and
  supports a Time Division Multiplexed (TDM) interface with external
  multi-channel audio codecs. It consists of a receiver, a transmitter and a
  common clock generator that can be enabled separately to provide Adapter,
  Client or Controller modes with receiver and/or transmitter active.
  On later I2SMCC versions (starting with Microchip's SAMA7G5) I2S
  multi-channel is supported by using multiple data pins, output and
  input, without TDM.

properties:
  "#sound-dai-cells":
    const: 0

  compatible:
    enum:
      - microchip,sam9x60-i2smcc
      - microchip,sama7g5-i2smcc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Peripheral Bus Clock
      - description: Generic Clock (Optional). Should be set mostly when Master
          Mode is required.
    minItems: 1

  clock-names:
    items:
      - const: pclk
      - const: gclk
    minItems: 1

  dmas:
    items:
      - description: TX DMA Channel
      - description: RX DMA Channel

  dma-names:
    items:
      - const: tx
      - const: rx

  microchip,tdm-data-pair:
    description:
      Represents the DIN/DOUT pair pins that are used to receive/send
      TDM data. It is optional and it is only needed if the controller
      uses the TDM mode.
    $ref: /schemas/types.yaml#/definitions/uint8
    enum: [0, 1, 2, 3]
    default: 0

allOf:
  - $ref: dai-common.yaml#
  - if:
      properties:
        compatible:
          const: microchip,sam9x60-i2smcc
    then:
      properties:
        microchip,tdm-data-pair: false

required:
  - "#sound-dai-cells"
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - dmas
  - dma-names

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/dma/at91.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    i2s@f001c000 {
        #sound-dai-cells = <0>;
        compatible = "microchip,sam9x60-i2smcc";
        reg = <0xf001c000 0x100>;
        interrupts = <34 IRQ_TYPE_LEVEL_HIGH 7>;
        dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
                       AT91_XDMAC_DT_PERID(36))>,
               <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
                       AT91_XDMAC_DT_PERID(37))>;
        dma-names = "tx", "rx";
        clocks = <&i2s_clk>, <&i2s_gclk>;
        clock-names = "pclk", "gclk";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2s_default>;
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mchp,spdifrx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip S/PDIF Rx Controller

maintainers:
  - Codrin Ciubotariu <codrin.ciubotariu@microchip.com>

description:
  The Microchip Sony/Philips Digital Interface Receiver is a serial port
  compliant with the IEC-60958 standard.

properties:
  "#sound-dai-cells":
    const: 0

  compatible:
    const: microchip,sama7g5-spdifrx

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Peripheral Bus Clock
      - description: Generic Clock

  clock-names:
    items:
      - const: pclk
      - const: gclk

  dmas:
    description: RX DMA Channel
    maxItems: 1

  dma-names:
    const: rx

required:
  - "#sound-dai-cells"
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - dmas
  - dma-names

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/at91.h>
    #include <dt-bindings/dma/at91.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    spdifrx: spdifrx@e1614000 {
        #sound-dai-cells = <0>;
        compatible = "microchip,sama7g5-spdifrx";
        reg = <0xe1614000 0x4000>;
        interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
        dmas = <&dma0 AT91_XDMAC_DT_PERID(49)>;
        dma-names = "rx";
        clocks = <&pmc PMC_TYPE_PERIPHERAL 84>, <&pmc PMC_TYPE_GCK 84>;
        clock-names = "pclk", "gclk";
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mchp,spdiftx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip S/PDIF Tx Controller

maintainers:
  - Codrin Ciubotariu <codrin.ciubotariu@microchip.com>

description:
  The Microchip Sony/Philips Digital Interface Transmitter is a serial port
  compliant with the IEC-60958 standard.

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

properties:
  "#sound-dai-cells":
    const: 0

  compatible:
    const: microchip,sama7g5-spdiftx

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Peripheral Bus Clock
      - description: Generic Clock

  clock-names:
    items:
      - const: pclk
      - const: gclk

  dmas:
    description: TX DMA Channel
    maxItems: 1

  dma-names:
    const: tx

required:
  - "#sound-dai-cells"
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - dmas
  - dma-names

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/at91.h>
    #include <dt-bindings/dma/at91.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    spdiftx@e1618000 {
        #sound-dai-cells = <0>;
        compatible = "microchip,sama7g5-spdiftx";
        reg = <0xe1618000 0x4000>;
        interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
        dmas = <&dma0 AT91_XDMAC_DT_PERID(50)>;
        dma-names = "tx";
        clocks = <&pmc PMC_TYPE_PERIPHERAL 85>, <&pmc PMC_TYPE_GCK 85>;
        clock-names = "pclk", "gclk";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spdiftx_default>;
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/microchip,pdmc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip Pulse Density Microphone Controller

maintainers:
  - Codrin Ciubotariu <codrin.ciubotariu@microchip.com>

description:
  The Microchip Pulse Density Microphone Controller (PDMC) interfaces up to 4
  digital microphones having Pulse Density Modulated (PDM) outputs.

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

properties:
  compatible:
    const: microchip,sama7g5-pdmc

  reg:
    maxItems: 1

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

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Peripheral Bus Clock
      - description: Generic Clock

  clock-names:
    items:
      - const: pclk
      - const: gclk

  dmas:
    description: RX DMA Channel
    maxItems: 1

  dma-names:
    const: rx

  microchip,mic-pos:
    description: |
      Position of PDM microphones on the DS line and the sampling edge (rising
      or falling) of the CLK line. A microphone is represented as a pair of DS
      line and the sampling edge. The first microphone is mapped to channel 0,
      the second to channel 1, etc.
    $ref: /schemas/types.yaml#/definitions/uint32-matrix
    items:
      items:
        - description: value for DS line
        - description: value for sampling edge
      anyOf:
        - enum:
            - [0, 0]
            - [0, 1]
            - [1, 0]
            - [1, 1]
    minItems: 1
    maxItems: 4
    uniqueItems: true

required:
  - compatible
  - reg
  - "#sound-dai-cells"
  - interrupts
  - clocks
  - clock-names
  - dmas
  - dma-names
  - microchip,mic-pos

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/at91.h>
    #include <dt-bindings/dma/at91.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/sound/microchip,pdmc.h>

    pdmc: sound@e1608000 {
        compatible = "microchip,sama7g5-pdmc";
        reg = <0xe1608000 0x4000>;
        #sound-dai-cells = <0>;
        interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
        dmas = <&dma0 AT91_XDMAC_DT_PERID(37)>;
        dma-names = "rx";
        clocks = <&pmc PMC_TYPE_PERIPHERAL 68>, <&pmc PMC_TYPE_GCK 68>;
        clock-names = "pclk", "gclk";
        microchip,mic-pos = <MCHP_PDMC_DS0 MCHP_PDMC_CLK_POSITIVE>,
                            <MCHP_PDMC_DS0 MCHP_PDMC_CLK_NEGATIVE>,
                            <MCHP_PDMC_DS1 MCHP_PDMC_CLK_POSITIVE>,
                            <MCHP_PDMC_DS1 MCHP_PDMC_CLK_NEGATIVE>;
    };


code:
Mikroe-PROTO audio board

Required properties:
  - compatible: "mikroe,mikroe-proto"
  - dai-format: Must be "i2s".
  - i2s-controller: The phandle of the I2S controller.
  - audio-codec: The phandle of the WM8731 audio codec.
Optional properties:
  - model: The user-visible name of this sound complex.
  - bitclock-master: Indicates dai-link bit clock master; for details see simple-card.txt (1).
  - frame-master: Indicates dai-link frame master; for details see simple-card.txt (1).

(1) : There must be the same master for both bit and frame clocks.

Example:
	sound {
		compatible = "mikroe,mikroe-proto";
		model = "wm8731 @ sama5d2_xplained";
		i2s-controller = <&i2s0>;
		audio-codec = <&wm8731>;
		dai-format = "i2s";
        };
};


code:
Marvell PXA SSP CPU DAI bindings

Required properties:

	compatible	Must be "mrvl,pxa-ssp-dai"
	port		A phandle reference to a PXA ssp upstream device

Optional properties:

	clock-names
	clocks		Through "clock-names" and "clocks", external clocks
			can be configured. If a clock names "extclk" exists,
			it will be set to the mclk rate of the audio stream
			and be used as clock provider of the DAI.

Example:

	/* upstream device */

	ssp1: ssp@41000000 {
		compatible = "mrvl,pxa3xx-ssp";
		reg = <0x41000000 0x40>;
		interrupts = <24>;
		clock-names = "pxa27x-ssp.0";
	};

	/* DAI as user */

	ssp_dai0: ssp_dai@0 {
		compatible = "mrvl,pxa-ssp-dai";
		port = <&ssp1>;
		#sound-dai-cells = <0>;
	};


code:
Mediatek AFE PCM controller for mt2701

Required properties:
- compatible: should be one of the followings.
	      - "mediatek,mt2701-audio"
	      - "mediatek,mt7622-audio"
- interrupts: should contain AFE and ASYS interrupts
- interrupt-names: should be "afe" and "asys"
- power-domains: should define the power domain
- clocks: Must contain an entry for each entry in clock-names
  See ../clocks/clock-bindings.txt for details
- clock-names: should have these clock names:
		"infra_sys_audio_clk",
		"top_audio_mux1_sel",
		"top_audio_mux2_sel",
		"top_audio_a1sys_hp",
		"top_audio_a2sys_hp",
		"i2s0_src_sel",
		"i2s1_src_sel",
		"i2s2_src_sel",
		"i2s3_src_sel",
		"i2s0_src_div",
		"i2s1_src_div",
		"i2s2_src_div",
		"i2s3_src_div",
		"i2s0_mclk_en",
		"i2s1_mclk_en",
		"i2s2_mclk_en",
		"i2s3_mclk_en",
		"i2so0_hop_ck",
		"i2so1_hop_ck",
		"i2so2_hop_ck",
		"i2so3_hop_ck",
		"i2si0_hop_ck",
		"i2si1_hop_ck",
		"i2si2_hop_ck",
		"i2si3_hop_ck",
		"asrc0_out_ck",
		"asrc1_out_ck",
		"asrc2_out_ck",
		"asrc3_out_ck",
		"audio_afe_pd",
		"audio_afe_conn_pd",
		"audio_a1sys_pd",
		"audio_a2sys_pd",
		"audio_mrgif_pd";
- assigned-clocks: list of input clocks and dividers for the audio system.
		   See ../clocks/clock-bindings.txt for details.
- assigned-clocks-parents: parent of input clocks of assigned clocks.
- assigned-clock-rates: list of clock frequencies of assigned clocks.

Must be a subnode of MediaTek audsys device tree node.
See ../arm/mediatek/mediatek,audsys.txt for details about the parent node.

Example:

	audsys: audio-subsystem@11220000 {
		compatible = "mediatek,mt2701-audsys", "syscon";
		...

		afe: audio-controller {
			compatible = "mediatek,mt2701-audio";
			interrupts =  <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
				      <GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
			interrupt-names	= "afe", "asys";
			power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;

			clocks = <&infracfg CLK_INFRA_AUDIO>,
				 <&topckgen CLK_TOP_AUD_MUX1_SEL>,
				 <&topckgen CLK_TOP_AUD_MUX2_SEL>,
				 <&topckgen CLK_TOP_AUD_48K_TIMING>,
				 <&topckgen CLK_TOP_AUD_44K_TIMING>,
				 <&topckgen CLK_TOP_AUD_K1_SRC_SEL>,
				 <&topckgen CLK_TOP_AUD_K2_SRC_SEL>,
				 <&topckgen CLK_TOP_AUD_K3_SRC_SEL>,
				 <&topckgen CLK_TOP_AUD_K4_SRC_SEL>,
				 <&topckgen CLK_TOP_AUD_K1_SRC_DIV>,
				 <&topckgen CLK_TOP_AUD_K2_SRC_DIV>,
				 <&topckgen CLK_TOP_AUD_K3_SRC_DIV>,
				 <&topckgen CLK_TOP_AUD_K4_SRC_DIV>,
				 <&topckgen CLK_TOP_AUD_I2S1_MCLK>,
				 <&topckgen CLK_TOP_AUD_I2S2_MCLK>,
				 <&topckgen CLK_TOP_AUD_I2S3_MCLK>,
				 <&topckgen CLK_TOP_AUD_I2S4_MCLK>,
				 <&audsys CLK_AUD_I2SO1>,
				 <&audsys CLK_AUD_I2SO2>,
				 <&audsys CLK_AUD_I2SO3>,
				 <&audsys CLK_AUD_I2SO4>,
				 <&audsys CLK_AUD_I2SIN1>,
				 <&audsys CLK_AUD_I2SIN2>,
				 <&audsys CLK_AUD_I2SIN3>,
				 <&audsys CLK_AUD_I2SIN4>,
				 <&audsys CLK_AUD_ASRCO1>,
				 <&audsys CLK_AUD_ASRCO2>,
				 <&audsys CLK_AUD_ASRCO3>,
				 <&audsys CLK_AUD_ASRCO4>,
				 <&audsys CLK_AUD_AFE>,
				 <&audsys CLK_AUD_AFE_CONN>,
				 <&audsys CLK_AUD_A1SYS>,
				 <&audsys CLK_AUD_A2SYS>,
				 <&audsys CLK_AUD_AFE_MRGIF>;

			clock-names = "infra_sys_audio_clk",
				      "top_audio_mux1_sel",
				      "top_audio_mux2_sel",
				      "top_audio_a1sys_hp",
				      "top_audio_a2sys_hp",
				      "i2s0_src_sel",
				      "i2s1_src_sel",
				      "i2s2_src_sel",
				      "i2s3_src_sel",
				      "i2s0_src_div",
				      "i2s1_src_div",
				      "i2s2_src_div",
				      "i2s3_src_div",
				      "i2s0_mclk_en",
				      "i2s1_mclk_en",
				      "i2s2_mclk_en",
				      "i2s3_mclk_en",
				      "i2so0_hop_ck",
				      "i2so1_hop_ck",
				      "i2so2_hop_ck",
				      "i2so3_hop_ck",
				      "i2si0_hop_ck",
				      "i2si1_hop_ck",
				      "i2si2_hop_ck",
				      "i2si3_hop_ck",
				      "asrc0_out_ck",
				      "asrc1_out_ck",
				      "asrc2_out_ck",
				      "asrc3_out_ck",
				      "audio_afe_pd",
				      "audio_afe_conn_pd",
				      "audio_a1sys_pd",
				      "audio_a2sys_pd",
				      "audio_mrgif_pd";

			assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
					  <&topckgen CLK_TOP_AUD_MUX2_SEL>,
					  <&topckgen CLK_TOP_AUD_MUX1_DIV>,
					  <&topckgen CLK_TOP_AUD_MUX2_DIV>;
			assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
						 <&topckgen CLK_TOP_AUD2PLL_90M>;
			assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
		};
	};


code:
MT2701 with CS42448 CODEC

Required properties:
- compatible: "mediatek,mt2701-cs42448-machine"
- mediatek,platform: the phandle of MT2701 ASoC platform
- audio-routing: a list of the connections between audio
- mediatek,audio-codec: the phandles of cs42448 codec
- mediatek,audio-codec-bt-mrg the phandles of bt-sco dummy codec
- pinctrl-names: Should contain only one value - "default"
- pinctrl-0: Should specify pin control groups used for this controller.
- i2s1-in-sel-gpio1, i2s1-in-sel-gpio2: Should specify two gpio pins to
					control I2S1-in mux.

Example:

	sound:sound {
		compatible = "mediatek,mt2701-cs42448-machine";
		mediatek,platform = <&afe>;
		/* CS42448 Machine name */
		audio-routing =
			"Line Out Jack", "AOUT1L",
			"Line Out Jack", "AOUT1R",
			"Line Out Jack", "AOUT2L",
			"Line Out Jack", "AOUT2R",
			"Line Out Jack", "AOUT3L",
			"Line Out Jack", "AOUT3R",
			"Line Out Jack", "AOUT4L",
			"Line Out Jack", "AOUT4R",
			"AIN1L", "AMIC",
			"AIN1R", "AMIC",
			"AIN2L", "Tuner In",
			"AIN2R", "Tuner In",
			"AIN3L", "Satellite Tuner In",
			"AIN3R", "Satellite Tuner In",
			"AIN3L", "AUX In",
			"AIN3R", "AUX In";
		mediatek,audio-codec = <&cs42448>;
		mediatek,audio-codec-bt-mrg = <&bt_sco_codec>;
		pinctrl-names = "default";
		pinctrl-0 = <&aud_pins_default>;
		i2s1-in-sel-gpio1 = <&pio 53 0>;
		i2s1-in-sel-gpio2 = <&pio 54 0>;
	};


code:
MT2701 with WM8960 CODEC

Required properties:
- compatible: "mediatek,mt2701-wm8960-machine"
- mediatek,platform: the phandle of MT2701 ASoC platform
- audio-routing: a list of the connections between audio
- mediatek,audio-codec: the phandles of wm8960 codec
- pinctrl-names: Should contain only one value - "default"
- pinctrl-0: Should specify pin control groups used for this controller.

Example:

	sound:sound {
		compatible = "mediatek,mt2701-wm8960-machine";
		mediatek,platform = <&afe>;
		audio-routing =
			"Headphone", "HP_L",
			"Headphone", "HP_R",
			"LINPUT1", "AMIC",
			"RINPUT1", "AMIC";
		mediatek,audio-codec = <&wm8960>;
		pinctrl-names = "default";
		pinctrl-0 = <&aud_pins_default>;
	};


code:
Mediatek MT6351 Audio Codec

The communication between MT6351 and SoC is through Mediatek PMIC wrapper.
For more detail, please visit Mediatek PMIC wrapper documentation.

Must be a child node of PMIC wrapper.

Required properties:

- compatible : "mediatek,mt6351-sound".

Example:

mt6351_snd {
	compatible = "mediatek,mt6351-sound";
};


code:
Mediatek MT6358 Audio Codec

The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
For more detail, please visit Mediatek PMIC wrapper documentation.

Must be a child node of PMIC wrapper.

Required properties:

- compatible - "string" - One of:
    "mediatek,mt6358-sound"
    "mediatek,mt6366-sound"
- Avdd-supply : power source of AVDD

Optional properties:
- mediatek,dmic-mode : Indicates how many data pins are used to transmit two
	channels of PDM signal. 0 means two wires, 1 means one wire. Default
	value is 0.

Example:

mt6358_snd {
	compatible = "mediatek,mt6358-sound";
	Avdd-supply = <&mt6358_vaud28_reg>;
	mediatek,dmic-mode = <0>;
};


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt6359.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Mediatek MT6359 Codec

maintainers:
  - Eason Yen <eason.yen@mediatek.com>
  - Jiaxin Yu <jiaxin.yu@mediatek.com>
  - Shane Chien <shane.chien@mediatek.com>

description: |
  The communication between MT6359 and SoC is through Mediatek PMIC wrapper.
  For more detail, please visit Mediatek PMIC wrapper documentation.
  Must be a child node of PMIC wrapper.

properties:
  mediatek,dmic-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Indicates how many data pins are used to transmit two channels of PDM
      signal. 0 means two wires, 1 means one wire. Default value is 0.
    enum:
      - 0 # one wire
      - 1 # two wires

  mediatek,mic-type-0:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Specifies the type of mic type connected to adc0

    enum:
      - 0 # IDLE - mic in turn-off status
      - 1 # ACC - analog mic with alternating coupling
      - 2 # DMIC - digital mic
      - 3 # DCC - analog mic with direct couping
      - 4 # DCC_ECM_DIFF - analog electret condenser mic with differential mode
      - 5 # DCC_ECM_SINGLE - analog electret condenser mic with single mode

  mediatek,mic-type-1:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Specifies the type of mic type connected to adc1

  mediatek,mic-type-2:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Specifies the type of mic type connected to adc2

additionalProperties: false

examples:
  - |
    mt6359codec: mt6359codec {
      mediatek,dmic-mode = <0>;
      mediatek,mic-type-0 = <2>;
    };

...


code:
Mediatek AFE PCM controller for mt6797

Required properties:
- compatible = "mediatek,mt6797-audio";
- reg: register location and size
- interrupts: should contain AFE interrupt
- 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",
		"infra_sys_audio_26m",
		"mtkaif_26m_clk",
		"top_mux_audio",
		"top_mux_aud_intbus",
		"top_sys_pll3_d4",
		"top_sys_pll1_d4",
		"top_clk26m_clk";

Example:

	afe: mt6797-afe-pcm@11220000  {
		compatible = "mediatek,mt6797-audio";
		reg = <0 0x11220000 0 0x1000>;
		interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_LOW>;
		power-domains = <&scpsys MT6797_POWER_DOMAIN_AUDIO>;
		clocks = <&infrasys CLK_INFRA_AUDIO>,
			 <&infrasys CLK_INFRA_AUDIO_26M>,
			 <&infrasys CLK_INFRA_AUDIO_26M_PAD_TOP>,
			 <&topckgen CLK_TOP_MUX_AUDIO>,
			 <&topckgen CLK_TOP_MUX_AUD_INTBUS>,
			 <&topckgen CLK_TOP_SYSPLL3_D4>,
			 <&topckgen CLK_TOP_SYSPLL1_D4>,
			 <&clk26m>;
		clock-names = "infra_sys_audio_clk",
			      "infra_sys_audio_26m",
			      "mtkaif_26m_clk",
			      "top_mux_audio",
			      "top_mux_aud_intbus",
			      "top_sys_pll3_d4",
			      "top_sys_pll1_d4",
			      "top_clk26m_clk";
	};


code:
MT6797 with MT6351 CODEC

Required properties:
- compatible: "mediatek,mt6797-mt6351-sound"
- mediatek,platform: the phandle of MT6797 ASoC platform
- mediatek,audio-codec: the phandles of MT6351 codec

Example:

	sound {
		compatible = "mediatek,mt6797-mt6351-sound";
		mediatek,audio-codec = <&mt6351_snd>;
		mediatek,platform = <&afe>;
	};


code:
MT8173 with MAX98090 CODEC

Required properties:
- compatible : "mediatek,mt8173-max98090"
- mediatek,audio-codec: the phandle of the MAX98090 audio codec
- mediatek,platform: the phandle of MT8173 ASoC platform

Example:

	sound {
		compatible = "mediatek,mt8173-max98090";
		mediatek,audio-codec = <&max98090>;
		mediatek,platform = <&afe>;
	};


code:
MT8173 with RT5650 RT5514 CODECS

Required properties:
- compatible : "mediatek,mt8173-rt5650-rt5514"
- mediatek,audio-codec: the phandles of rt5650 and rt5514 codecs
- mediatek,platform: the phandle of MT8173 ASoC platform

Example:

	sound {
		compatible = "mediatek,mt8173-rt5650-rt5514";
		mediatek,audio-codec = <&rt5650 &rt5514>;
		mediatek,platform = <&afe>;
	};


code:
MT8173 with RT5650 RT5676 CODECS and HDMI via I2S

Required properties:
- compatible : "mediatek,mt8173-rt5650-rt5676"
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
			and of the hdmi encoder node
- mediatek,platform: the phandle of MT8173 ASoC platform

Example:

	sound {
		compatible = "mediatek,mt8173-rt5650-rt5676";
		mediatek,audio-codec = <&rt5650 &rt5676 &hdmi0>;
		mediatek,platform = <&afe>;
	};


code:
MT8173 with RT5650 CODECS and HDMI via I2S

Required properties:
- compatible : "mediatek,mt8173-rt5650"
- mediatek,audio-codec: the phandles of rt5650 codecs
                        and of the hdmi encoder node
- mediatek,platform: the phandle of MT8173 ASoC platform

Optional subnodes:
- codec-capture : the subnode of rt5650 codec capture
Required codec-capture subnode properties:
- sound-dai: audio codec dai name on capture path
  <&rt5650 0> : Default setting. Connect rt5650 I2S1 for capture. (dai_name = rt5645-aif1)
  <&rt5650 1> : Connect rt5650 I2S2 for capture. (dai_name = rt5645-aif2)

- mediatek,mclk: the MCLK source
  0 : external oscillator, MCLK = 12.288M
  1 : internal source from mt8173, MCLK = sampling rate*256

Example:

	sound {
		compatible = "mediatek,mt8173-rt5650";
		mediatek,audio-codec = <&rt5650 &hdmi0>;
		mediatek,platform = <&afe>;
		mediatek,mclk = <0>;
		codec-capture {
			sound-dai = <&rt5650 1>;
		};
	};


code:
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";
	};


code:
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>;
	};


code:
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>;
	};


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt8186-afe-pcm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Mediatek AFE PCM controller for mt8186

maintainers:
  - Jiaxin Yu <jiaxin.yu@mediatek.com>

properties:
  compatible:
    const: mediatek,mt8186-sound

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  resets:
    maxItems: 1

  reset-names:
    const: audiosys

  mediatek,apmixedsys:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of the mediatek apmixedsys controller

  mediatek,infracfg:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of the mediatek infracfg controller

  mediatek,topckgen:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of the mediatek topckgen controller

  clocks:
    items:
      - description: audio infra sys clock
      - description: audio infra 26M clock
      - description: audio top mux
      - description: audio intbus mux
      - description: mainpll 136.5M clock
      - description: faud1 mux
      - description: apll1 clock
      - description: faud2 mux
      - description: apll2 clock
      - description: audio engen1 mux
      - description: apll1_d8 22.5792M clock
      - description: audio engen2 mux
      - description: apll2_d8 24.576M clock
      - description: i2s0 mclk mux
      - description: i2s1 mclk mux
      - description: i2s2 mclk mux
      - description: i2s4 mclk mux
      - description: tdm mclk mux
      - description: i2s0_mck divider
      - description: i2s1_mck divider
      - description: i2s2_mck divider
      - description: i2s4_mck divider
      - description: tdm_mck divider
      - description: audio hires mux
      - description: 26M clock

  clock-names:
    items:
      - const: aud_infra_clk
      - const: mtkaif_26m_clk
      - const: top_mux_audio
      - const: top_mux_audio_int
      - const: top_mainpll_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_i2s4_m_sel
      - const: top_tdm_m_sel
      - const: top_apll12_div0
      - const: top_apll12_div1
      - const: top_apll12_div2
      - const: top_apll12_div4
      - const: top_apll12_div_tdm
      - const: top_mux_audio_h
      - const: top_clk26m_clk

required:
  - compatible
  - interrupts
  - resets
  - reset-names
  - mediatek,apmixedsys
  - mediatek,infracfg
  - mediatek,topckgen
  - clocks
  - clock-names

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    afe: mt8186-afe-pcm@11210000 {
        compatible = "mediatek,mt8186-sound";
        reg = <0x11210000 0x2000>;
        interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
        resets = <&watchdog 17>; //MT8186_TOPRGU_AUDIO_SW_RST
        reset-names = "audiosys";
        mediatek,apmixedsys = <&apmixedsys>;
        mediatek,infracfg = <&infracfg>;
        mediatek,topckgen = <&topckgen>;
        clocks = <&infracfg_ao 44>, //CLK_INFRA_AO_AUDIO
                 <&infracfg_ao 54>, //CLK_INFRA_AO_AUDIO_26M_BCLK
                 <&topckgen 15>, //CLK_TOP_AUDIO
                 <&topckgen 16>, //CLK_TOP_AUD_INTBUS
                 <&topckgen 70>, //CLK_TOP_MAINPLL_D2_D4
                 <&topckgen 17>, //CLK_TOP_AUD_1
                 <&apmixedsys 12>, //CLK_APMIXED_APLL1
                 <&topckgen 18>, //CLK_TOP_AUD_2
                 <&apmixedsys 13>, //CLK_APMIXED_APLL2
                 <&topckgen 19>, //CLK_TOP_AUD_ENGEN1
                 <&topckgen 101>, //CLK_TOP_APLL1_D8
                 <&topckgen 20>, //CLK_TOP_AUD_ENGEN2
                 <&topckgen 104>, //CLK_TOP_APLL2_D8
                 <&topckgen 63>, //CLK_TOP_APLL_I2S0_MCK_SEL
                 <&topckgen 64>, //CLK_TOP_APLL_I2S1_MCK_SEL
                 <&topckgen 65>, //CLK_TOP_APLL_I2S2_MCK_SEL
                 <&topckgen 66>, //CLK_TOP_APLL_I2S4_MCK_SEL
                 <&topckgen 67>, //CLK_TOP_APLL_TDMOUT_MCK_SEL
                 <&topckgen 131>, //CLK_TOP_APLL12_CK_DIV0
                 <&topckgen 132>, //CLK_TOP_APLL12_CK_DIV1
                 <&topckgen 133>, //CLK_TOP_APLL12_CK_DIV2
                 <&topckgen 134>, //CLK_TOP_APLL12_CK_DIV4
                 <&topckgen 135>, //CLK_TOP_APLL12_CK_DIV_TDMOUT_M
                 <&topckgen 44>, //CLK_TOP_AUDIO_H
                 <&clk26m>;
        clock-names = "aud_infra_clk",
                      "mtkaif_26m_clk",
                      "top_mux_audio",
                      "top_mux_audio_int",
                      "top_mainpll_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_i2s4_m_sel",
                      "top_tdm_m_sel",
                      "top_apll12_div0",
                      "top_apll12_div1",
                      "top_apll12_div2",
                      "top_apll12_div4",
                      "top_apll12_div_tdm",
                      "top_mux_audio_h",
                      "top_clk26m_clk";
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt8186-mt6366-da7219-max98357.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Mediatek MT8186 with MT6366, DA7219 and MAX98357 ASoC sound card driver

maintainers:
  - Jiaxin Yu <jiaxin.yu@mediatek.com>

description:
  This binding describes the MT8186 sound card.

properties:
  compatible:
    enum:
      - mediatek,mt8186-mt6366-da7219-max98357-sound

  mediatek,platform:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of MT8186 ASoC platform.

  headset-codec:
    type: object
    additionalProperties: false
    properties:
      sound-dai:
        maxItems: 1
    required:
      - sound-dai

  playback-codecs:
    type: object
    additionalProperties: false
    properties:
      sound-dai:
        items:
          - description: phandle of dp codec
          - description: phandle of l channel speaker codec
          - description: phandle of r channel speaker codec
        minItems: 2
    required:
      - sound-dai

  mediatek,adsp:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: The phandle of MT8186 ADSP platform.

  mediatek,dai-link:
    $ref: /schemas/types.yaml#/definitions/string-array
    description:
      A list of the desired dai-links in the sound card. Each entry is a
      name defined in the machine driver.

additionalProperties: false

required:
  - compatible
  - mediatek,platform
  - headset-codec
  - playback-codecs

examples:
  - |

    sound: mt8186-sound {
        compatible = "mediatek,mt8186-mt6366-da7219-max98357-sound";
        mediatek,platform = <&afe>;
        pinctrl-names = "aud_clk_mosi_off",
                        "aud_clk_mosi_on";
        pinctrl-0 = <&aud_clk_mosi_off>;
        pinctrl-1 = <&aud_clk_mosi_on>;

        headset-codec {
            sound-dai = <&da7219>;
        };

        playback-codecs {
            sound-dai = <&anx_bridge_dp>,
                        <&max98357a>;
        };
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt8186-mt6366-rt1019-rt5682s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Mediatek MT8186 with MT6366, RT1019 and RT5682S ASoC sound card driver

maintainers:
  - Jiaxin Yu <jiaxin.yu@mediatek.com>

description:
  This binding describes the MT8186 sound card.

properties:
  compatible:
    enum:
      - mediatek,mt8186-mt6366-rt1019-rt5682s-sound

  mediatek,platform:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of MT8186 ASoC platform.

  dmic-gpios:
    maxItems: 1
    description:
      dmic-gpios optional prop for switching between two DMICs.
      Ex, the GPIO can control a MUX HW component to select
      dmic clk and data form a Front or Rear dmic.

  headset-codec:
    type: object
    additionalProperties: false
    properties:
      sound-dai:
        maxItems: 1
    required:
      - sound-dai

  playback-codecs:
    type: object
    additionalProperties: false
    properties:
      sound-dai:
        items:
          - description: phandle of dp codec
          - description: phandle of l channel speaker codec
          - description: phandle of r channel speaker codec
        minItems: 2
    required:
      - sound-dai

  mediatek,adsp:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: The phandle of MT8186 ADSP platform.

  mediatek,dai-link:
    $ref: /schemas/types.yaml#/definitions/string-array
    description:
      A list of the desired dai-links in the sound card. Each entry is a
      name defined in the machine driver.

additionalProperties: false

required:
  - compatible
  - mediatek,platform
  - headset-codec
  - playback-codecs

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    sound: mt8186-sound {
        compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
        mediatek,platform = <&afe>;
        pinctrl-names = "aud_clk_mosi_off",
                        "aud_clk_mosi_on",
                        "aud_gpio_dmic_sec";
        pinctrl-0 = <&aud_clk_mosi_off>;
        pinctrl-1 = <&aud_clk_mosi_on>;
        pinctrl-2 = <&aud_gpio_dmic_sec>;

        dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>;

        headset-codec {
            sound-dai = <&rt5682s>;
        };

        playback-codecs {
             sound-dai = <&it6505dptx>,
                         <&rt1019p>;
        };
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt8192-afe-pcm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Mediatek AFE PCM controller for mt8192

maintainers:
  - Jiaxin Yu <jiaxin.yu@mediatek.com>
  - Shane Chien <shane.chien@mediatek.com>

properties:
  compatible:
    const: mediatek,mt8192-audio

  interrupts:
    maxItems: 1

  resets:
    maxItems: 1

  reset-names:
    const: audiosys

  mediatek,apmixedsys:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of the mediatek apmixedsys controller

  mediatek,infracfg:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of the mediatek infracfg controller

  mediatek,topckgen:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of the mediatek topckgen controller

  power-domains:
    maxItems: 1

  clocks:
    items:
      - description: AFE clock
      - description: ADDA DAC clock
      - description: ADDA DAC pre-distortion clock
      - description: audio infra sys clock
      - description: audio infra 26M clock

  clock-names:
    items:
      - const: aud_afe_clk
      - const: aud_dac_clk
      - const: aud_dac_predis_clk
      - const: aud_infra_clk
      - const: aud_infra_26m_clk

required:
  - compatible
  - interrupts
  - resets
  - reset-names
  - mediatek,apmixedsys
  - mediatek,infracfg
  - mediatek,topckgen
  - power-domains
  - clocks
  - clock-names

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/mt8192-clk.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/power/mt8192-power.h>
    #include <dt-bindings/reset/mt8192-resets.h>

    afe: mt8192-afe-pcm {
        compatible = "mediatek,mt8192-audio";
        interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>;
        resets = <&watchdog MT8192_TOPRGU_AUDIO_SW_RST>;
        reset-names = "audiosys";
        mediatek,apmixedsys = <&apmixedsys>;
        mediatek,infracfg = <&infracfg>;
        mediatek,topckgen = <&topckgen>;
        power-domains = <&scpsys MT8192_POWER_DOMAIN_AUDIO>;
        clocks = <&audsys CLK_AUD_AFE>,
                 <&audsys CLK_AUD_DAC>,
                 <&audsys CLK_AUD_DAC_PREDIS>,
                 <&infracfg CLK_INFRA_AUDIO>,
                 <&infracfg CLK_INFRA_AUDIO_26M_B>;
        clock-names = "aud_afe_clk",
                      "aud_dac_clk",
                      "aud_dac_predis_clk",
                      "aud_infra_clk",
                      "aud_infra_26m_clk";
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt8192-mt6359-rt1015-rt5682.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Mediatek MT8192 with MT6359, RT1015 and RT5682 ASoC sound card driver

maintainers:
  - Jiaxin Yu <jiaxin.yu@mediatek.com>
  - Shane Chien <shane.chien@mediatek.com>

description:
  This binding describes the MT8192 sound card.

properties:
  compatible:
    enum:
      - mediatek,mt8192_mt6359_rt1015_rt5682
      - mediatek,mt8192_mt6359_rt1015p_rt5682
      - mediatek,mt8192_mt6359_rt1015p_rt5682s

  mediatek,platform:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of MT8192 ASoC platform.

  mediatek,hdmi-codec:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of HDMI codec.

  headset-codec:
    type: object
    additionalProperties: false

    properties:
      sound-dai:
        maxItems: 1
    required:
      - sound-dai

  speaker-codecs:
    type: object
    additionalProperties: false

    properties:
      sound-dai:
        minItems: 1
        maxItems: 2
        items:
          maxItems: 1
    required:
      - sound-dai

additionalProperties: false

required:
  - compatible
  - mediatek,platform
  - headset-codec
  - speaker-codecs

examples:
  - |

    sound: mt8192-sound {
        compatible = "mediatek,mt8192_mt6359_rt1015_rt5682";
        mediatek,platform = <&afe>;
        mediatek,hdmi-codec = <&anx_bridge_dp>;
        pinctrl-names = "aud_clk_mosi_off",
                        "aud_clk_mosi_on";
        pinctrl-0 = <&aud_clk_mosi_off>;
        pinctrl-1 = <&aud_clk_mosi_on>;

        headset-codec {
            sound-dai = <&rt5682>;
        };

        speaker-codecs {
            sound-dai = <&rt1015_l>,
                        <&rt1015_r>;
        };
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt8195-afe-pcm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Mediatek AFE PCM controller for mt8195

maintainers:
  - Trevor Wu <trevor.wu@mediatek.com>

properties:
  compatible:
    const: mediatek,mt8195-audio

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  resets:
    maxItems: 1

  reset-names:
    const: audiosys

  memory-region:
    maxItems: 1
    description: |
      Shared memory region for AFE memif.  A "shared-dma-pool".
      See ../reserved-memory/reserved-memory.txt for details.

  mediatek,topckgen:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of the mediatek topckgen controller

  power-domains:
    maxItems: 1

  clocks:
    items:
      - description: 26M clock
      - description: audio pll1 clock
      - description: audio pll2 clock
      - description: clock divider for i2si1_mck
      - description: clock divider for i2si2_mck
      - description: clock divider for i2so1_mck
      - description: clock divider for i2so2_mck
      - description: clock divider for dptx_mck
      - description: a1sys hoping clock
      - description: audio intbus clock
      - description: audio hires clock
      - description: audio local bus clock
      - description: mux for dptx_mck
      - description: mux for i2so1_mck
      - description: mux for i2so2_mck
      - description: mux for i2si1_mck
      - description: mux for i2si2_mck
      - description: audio infra 26M clock
      - description: infra bus clock

  clock-names:
    items:
      - const: clk26m
      - const: apll1_ck
      - const: apll2_ck
      - const: apll12_div0
      - const: apll12_div1
      - const: apll12_div2
      - const: apll12_div3
      - const: apll12_div9
      - const: a1sys_hp_sel
      - const: aud_intbus_sel
      - const: audio_h_sel
      - const: audio_local_bus_sel
      - const: dptx_m_sel
      - const: i2so1_m_sel
      - const: i2so2_m_sel
      - const: i2si1_m_sel
      - const: i2si2_m_sel
      - const: infra_ao_audio_26m_b
      - const: scp_adsp_audiodsp

  mediatek,etdm-in1-chn-disabled:
    $ref: /schemas/types.yaml#/definitions/uint8-array
    maxItems: 24
    description: Specify which input channel should be disabled.

  mediatek,etdm-in2-chn-disabled:
    $ref: /schemas/types.yaml#/definitions/uint8-array
    maxItems: 16
    description: Specify which input channel should be disabled.

patternProperties:
  "^mediatek,etdm-in[1-2]-mclk-always-on-rate-hz$":
    description: Specify etdm in mclk output rate for always on case.

  "^mediatek,etdm-out[1-3]-mclk-always-on-rate-hz$":
    description: Specify etdm out mclk output rate for always on case.

  "^mediatek,etdm-in[1-2]-multi-pin-mode$":
    type: boolean
    description: if present, the etdm data mode is I2S.

  "^mediatek,etdm-out[1-3]-multi-pin-mode$":
    type: boolean
    description: if present, the etdm data mode is I2S.

  "^mediatek,etdm-in[1-2]-cowork-source$":
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      etdm modules can share the same external clock pin. Specify
      which etdm clock source is required by this etdm in moudule.
    enum:
      - 0 # etdm1_in
      - 1 # etdm2_in
      - 2 # etdm1_out
      - 3 # etdm2_out

  "^mediatek,etdm-out[1-2]-cowork-source$":
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      etdm modules can share the same external clock pin. Specify
      which etdm clock source is required by this etdm out moudule.
    enum:
      - 0 # etdm1_in
      - 1 # etdm2_in
      - 2 # etdm1_out
      - 3 # etdm2_out

required:
  - compatible
  - reg
  - interrupts
  - resets
  - reset-names
  - mediatek,topckgen
  - power-domains
  - clocks
  - clock-names
  - memory-region

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    afe: mt8195-afe-pcm@10890000 {
        compatible = "mediatek,mt8195-audio";
        reg = <0x10890000 0x10000>;
        interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
        resets = <&watchdog 14>;
        reset-names = "audiosys";
        mediatek,topckgen = <&topckgen>;
        power-domains = <&spm 7>; //MT8195_POWER_DOMAIN_AUDIO
        memory-region = <&snd_dma_mem_reserved>;
        clocks = <&clk26m>,
                 <&topckgen 163>, //CLK_TOP_APLL1
                 <&topckgen 166>, //CLK_TOP_APLL2
                 <&topckgen 233>, //CLK_TOP_APLL12_DIV0
                 <&topckgen 234>, //CLK_TOP_APLL12_DIV1
                 <&topckgen 235>, //CLK_TOP_APLL12_DIV2
                 <&topckgen 236>, //CLK_TOP_APLL12_DIV3
                 <&topckgen 238>, //CLK_TOP_APLL12_DIV9
                 <&topckgen 100>, //CLK_TOP_A1SYS_HP_SEL
                 <&topckgen 33>, //CLK_TOP_AUD_INTBUS_SEL
                 <&topckgen 34>, //CLK_TOP_AUDIO_H_SEL
                 <&topckgen 107>, //CLK_TOP_AUDIO_LOCAL_BUS_SEL
                 <&topckgen 98>, //CLK_TOP_DPTX_M_SEL
                 <&topckgen 94>, //CLK_TOP_I2SO1_M_SEL
                 <&topckgen 95>, //CLK_TOP_I2SO2_M_SEL
                 <&topckgen 96>, //CLK_TOP_I2SI1_M_SEL
                 <&topckgen 97>, //CLK_TOP_I2SI2_M_SEL
                 <&infracfg_ao 50>, //CLK_INFRA_AO_AUDIO_26M_B
                 <&scp_adsp 0>; //CLK_SCP_ADSP_AUDIODSP
        clock-names = "clk26m",
                      "apll1_ck",
                      "apll2_ck",
                      "apll12_div0",
                      "apll12_div1",
                      "apll12_div2",
                      "apll12_div3",
                      "apll12_div9",
                      "a1sys_hp_sel",
                      "aud_intbus_sel",
                      "audio_h_sel",
                      "audio_local_bus_sel",
                      "dptx_m_sel",
                      "i2so1_m_sel",
                      "i2so2_m_sel",
                      "i2si1_m_sel",
                      "i2si2_m_sel",
                      "infra_ao_audio_26m_b",
                      "scp_adsp_audiodsp";
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt8195-mt6359.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MediaTek MT8195 ASoC sound card driver

maintainers:
  - Trevor Wu <trevor.wu@mediatek.com>

description:
  This binding describes the MT8195 sound card.

properties:
  compatible:
    enum:
      - mediatek,mt8195_mt6359_rt1019_rt5682
      - mediatek,mt8195_mt6359_rt1011_rt5682
      - mediatek,mt8195_mt6359_max98390_rt5682

  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User specified audio sound card name

  mediatek,platform:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of MT8195 ASoC platform.

  mediatek,dptx-codec:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of MT8195 Display Port Tx codec node.

  mediatek,hdmi-codec:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of MT8195 HDMI codec node.

  mediatek,adsp:
    $ref: "/schemas/types.yaml#/definitions/phandle"
    description: The phandle of MT8195 ADSP platform.

  mediatek,dai-link:
    $ref: /schemas/types.yaml#/definitions/string-array
    description:
      A list of the desired dai-links in the sound card. Each entry is a
      name defined in the machine driver.

additionalProperties: false

required:
  - compatible
  - mediatek,platform

examples:
  - |

    sound: mt8195-sound {
        compatible = "mediatek,mt8195_mt6359_rt1019_rt5682";
        mediatek,platform = <&afe>;
        pinctrl-names = "default";
        pinctrl-0 = <&aud_pins_default>;
    };

...


code:
Mediatek AFE PCM controller

Required properties:
- compatible = "mediatek,mt8173-afe-pcm";
- reg: register location and size
- interrupts: Should contain AFE interrupt
- clock-names: should have these clock names:
		"infra_sys_audio_clk",
		"top_pdn_audio",
		"top_pdn_aud_intbus",
		"bck0",
		"bck1",
		"i2s0_m",
		"i2s1_m",
		"i2s2_m",
		"i2s3_m",
		"i2s3_b";

Example:

	afe: mt8173-afe-pcm@11220000  {
		compatible = "mediatek,mt8173-afe-pcm";
		reg = <0 0x11220000 0 0x1000>;
		interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_FALLING>;
		clocks = <&infracfg INFRA_AUDIO>,
			<&topckgen TOP_AUDIO_SEL>,
			<&topckgen TOP_AUD_INTBUS_SEL>,
			<&topckgen TOP_APLL1_DIV0>,
			<&topckgen TOP_APLL2_DIV0>,
			<&topckgen TOP_I2S0_M_CK_SEL>,
			<&topckgen TOP_I2S1_M_CK_SEL>,
			<&topckgen TOP_I2S2_M_CK_SEL>,
			<&topckgen TOP_I2S3_M_CK_SEL>,
			<&topckgen TOP_I2S3_B_CK_SEL>;
		clock-names = "infra_sys_audio_clk",
				"top_pdn_audio",
				"top_pdn_aud_intbus",
				"bck0",
				"bck1",
				"i2s0_m",
				"i2s1_m",
				"i2s2_m",
				"i2s3_m",
				"i2s3_b";
	};


code:
Mediatek ALSA BT SCO CVSD/MSBC Driver

Required properties:
- compatible = "mediatek,mtk-btcvsd-snd";
- reg: register location and size of PKV and SRAM_BANK2
- interrupts: should contain BTSCO interrupt
- mediatek,infracfg: the phandles of INFRASYS
- mediatek,offset: Array contains of register offset and mask
    infra_misc_offset,
    infra_conn_bt_cvsd_mask,
    cvsd_mcu_read_offset,
    cvsd_mcu_write_offset,
    cvsd_packet_indicator_offset

Example:

	mtk-btcvsd-snd@18000000 {
		compatible = "mediatek,mtk-btcvsd-snd";
		reg=<0 0x18000000 0 0x1000>,
		    <0 0x18080000 0 0x8000>;
		interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_LOW>;
		mediatek,infracfg = <&infrasys>;
		mediatek,offset = <0xf00 0x800 0xfd0 0xfd4 0xfd8>;
	};


code:
* mvebu (Kirkwood, Dove, Armada 370) audio controller

Required properties:

- compatible:
  "marvell,kirkwood-audio" for Kirkwood platforms
  "marvell,dove-audio" for Dove platforms
  "marvell,armada370-audio" for Armada 370 platforms
  "marvell,armada-380-audio" for Armada 38x platforms

- reg: physical base address of the controller and length of memory mapped
  region (named "i2s_regs").
  With "marvell,armada-380-audio" two other regions are required:
  first of those is dedicated for Audio PLL Configuration registers
  (named "pll_regs") and the second one ("soc_ctrl") - for register
  where one of exceptive I/O types (I2S or S/PDIF) is set.

- interrupts:
  with "marvell,kirkwood-audio", the audio interrupt
  with "marvell,dove-audio", a list of two interrupts, the first for
  the data flow, and the second for errors.

- clocks: one or two phandles.
  The first one is mandatory and defines the internal clock.
  The second one is optional and defines an external clock.

- clock-names: names associated to the clocks:
	"internal" for the internal clock
	"extclk" for the external clock

Optional properties:

- spdif-mode:
  Enable S/PDIF mode on Armada 38x SoC. Using this property
  disables standard I2S I/O. Valid only with "marvell,armada-380-audio"
  compatible string.

Example:

i2s1: audio-controller@b4000 {
	compatible = "marvell,dove-audio";
	reg = <0xb4000 0x2210>;
	interrupts = <21>, <22>;
	clocks = <&gate_clk 13>;
	clock-names = "internal";
};


code:
* Freescale MXS audio complex with SGTL5000 codec

Required properties:
- compatible		: "fsl,mxs-audio-sgtl5000"
- model			: The user-visible name of this sound complex
- saif-controllers	: The phandle list of the MXS SAIF controller
- audio-codec		: The phandle of the SGTL5000 audio codec
- audio-routing		: A list of the connections between audio components.
			  Each entry is a pair of strings, the first being the
			  connection's sink, the second being the connection's
			  source. Valid names could be power supplies, SGTL5000
			  pins, and the jacks on the board:

			  Power supplies:
			   * Mic Bias

			  SGTL5000 pins:
			   * MIC_IN
			   * LINE_IN
			   * HP_OUT
			   * LINE_OUT

			  Board connectors:
			   * Mic Jack
			   * Line In Jack
			   * Headphone Jack
			   * Line Out Jack
			   * Ext Spk

Example:

sound {
	compatible = "fsl,imx28-evk-sgtl5000",
		     "fsl,mxs-audio-sgtl5000";
	model = "imx28-evk-sgtl5000";
	saif-controllers = <&saif0 &saif1>;
	audio-codec = <&sgtl5000>;
	audio-routing =
		"MIC_IN", "Mic Jack",
		"Mic Jack", "Mic Bias",
		"Headphone Jack", "HP_OUT";
};


code:
* Freescale MXS Serial Audio Interface (SAIF)

Required properties:
- compatible: Should be "fsl,<chip>-saif"
- reg: Should contain registers location and length
- interrupts: Should contain ERROR interrupt number
- dmas: DMA specifier, consisting of a phandle to DMA controller node
  and SAIF DMA channel ID.
  Refer to dma.txt and fsl-mxs-dma.txt for details.
- dma-names: Must be "rx-tx".

Optional properties:
- fsl,saif-master: phandle to the master SAIF.  It's only required for
  the slave SAIF.

Note: Each SAIF controller should have an alias correctly numbered
in "aliases" node.

Example:

aliases {
	saif0 = &saif0;
	saif1 = &saif1;
};

saif0: saif@80042000 {
	compatible = "fsl,imx28-saif";
	reg = <0x80042000 2000>;
	interrupts = <59>;
	dmas = <&dma_apbx 4>;
	dma-names = "rx-tx";
};

saif1: saif@80046000 {
	compatible = "fsl,imx28-saif";
	reg = <0x80046000 2000>;
	interrupts = <58>;
	dmas = <&dma_apbx 5>;
	dma-names = "rx-tx";
	fsl,saif-master = <&saif0>;
};


code:
Nuvoton NAU8315 Mono Class-D Amplifier

Required properties:
- compatible   : "nuvoton,nau8315"
                 "nuvoton,nau8318"

Optional properties:
- enable-gpios : GPIO specifier for the chip's device enable input(EN) pin.
        If this option is not specified then driver does not manage
        the pin state (e.g. chip is always on).

Example:

#include <dt-bindings/gpio/gpio.h>

nau8315 {
	compatible = "nuvoton,nau8315";
	enable-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
};

nau8318 {
	compatible = "nuvoton,nau8318";
	enable-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
};


code:
NAU85L40 audio CODEC

This device supports I2C only.

Required properties:

  - compatible : "nuvoton,nau8540"

  - reg : the I2C address of the device.

Example:

codec: nau8540@1c {
       compatible = "nuvoton,nau8540";
       reg = <0x1c>;
};


code:
NAU8810/NAU8812/NAU8814 audio CODEC

This device supports I2C only.

Required properties:

  - compatible : One of "nuvoton,nau8810" or "nuvoton,nau8812" or
	"nuvoton,nau8814"

  - reg : the I2C address of the device.

Example:

codec: nau8810@1a {
	compatible = "nuvoton,nau8810";
	reg = <0x1a>;
};


code:
Nuvoton NAU88L21 audio codec

This device supports I2C only.

Required properties:
  - compatible : Must be "nuvoton,nau8821"

  - reg : the I2C address of the device. This is either 0x1B (CSB=0) or 0x54 (CSB=1).

Optional properties:
  - nuvoton,jkdet-enable: Enable jack detection via JKDET pin.
  - nuvoton,jkdet-pull-enable: Enable JKDET pin pull. If set - pin pull enabled,
      otherwise pin in high impedance state.
  - nuvoton,jkdet-pull-up: Pull-up JKDET pin. If set then JKDET pin is pull up, otherwise pull down.
  - nuvoton,jkdet-polarity: JKDET pin polarity. 0 - active high, 1 - active low.

  - nuvoton,vref-impedance: VREF Impedance selection
      0 - Open
      1 - 25 kOhm
      2 - 125 kOhm
      3 - 2.5 kOhm

  - nuvoton,micbias-voltage: Micbias voltage level.
      0 - VDDA
      1 - VDDA
      2 - VDDA * 1.1
      3 - VDDA * 1.2
      4 - VDDA * 1.3
      5 - VDDA * 1.4
      6 - VDDA * 1.53
      7 - VDDA * 1.53

  - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
  - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms

  - nuvoton,dmic-clk-threshold: the ADC threshold of DMIC clock.
  - nuvoton,key_enable: Headset button detection switch.

Example:

  headset: nau8821@1b {
      compatible = "nuvoton,nau8821";
      reg = <0x1b>;
      interrupt-parent = <&gpio>;
      interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
      nuvoton,jkdet-enable;
      nuvoton,jkdet-pull-enable;
      nuvoton,jkdet-pull-up;
      nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
      nuvoton,vref-impedance = <2>;
      nuvoton,micbias-voltage = <6>;
      nuvoton,jack-insert-debounce = <7>;
      nuvoton,jack-eject-debounce = <7>;
      nuvoton,dmic-clk-threshold = 3072000;
  };


code:
NAU8822 audio CODEC

This device supports I2C only.

Required properties:

  - compatible : "nuvoton,nau8822"

  - reg : the I2C address of the device.

Example:

codec: nau8822@1a {
	compatible = "nuvoton,nau8822";
	reg = <0x1a>;
};