code:
Nuvoton NAU8824 audio codec

This device supports I2C only.

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

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

Optional properties:
  - 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,sar-threshold-num: Number of buttons supported
  - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as
    SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R)
    where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance.
    Refer datasheet section 10.2 for more information about threshold calculation.

  - nuvoton,sar-hysteresis: Button impedance measurement hysteresis.

  - nuvoton,sar-voltage: Reference voltage for button impedance measurement.
      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,sar-compare-time: SAR compare time
      0 - 500 ns
      1 - 1 us
      2 - 2 us
      3 - 4 us

  - nuvoton,sar-sampling-time: SAR sampling time
      0 - 2 us
      1 - 4 us
      2 - 8 us
      3 - 16 us

  - nuvoton,short-key-debounce: Button short key press debounce time.
      0 - 30 ms
      1 - 50 ms
      2 - 100 ms

  - nuvoton,jack-eject-debounce: Jack ejection debounce time.
      0 - 0 ms
      1 - 1 ms
      2 - 10 ms

Example:

  headset: nau8824@1a {
      compatible = "nuvoton,nau8824";
      reg = <0x1a>;
      interrupt-parent = <&gpio>;
      interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>;
      nuvoton,vref-impedance = <2>;
      nuvoton,micbias-voltage = <6>;
      // Setup 4 buttons impedance according to Android specification
      nuvoton,sar-threshold-num = <4>;
      nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
      nuvoton,sar-hysteresis = <0>;
      nuvoton,sar-voltage = <6>;
      nuvoton,sar-compare-time = <1>;
      nuvoton,sar-sampling-time = <1>;
      nuvoton,short-key-debounce = <0>;
      nuvoton,jack-eject-debounce = <1>;
  };


code:
Nuvoton NAU8825 audio codec

This device supports I2C only.

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

  - reg : the I2C address of the device. This is either 0x1a (CSB=0) or 0x1b (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,sar-threshold-num: Number of buttons supported
  - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as
    SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R)
    where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance.
    Refer datasheet section 10.2 for more information about threshold calculation.

  - nuvoton,sar-hysteresis: Button impedance measurement hysteresis.

  - nuvoton,sar-voltage: Reference voltage for button impedance measurement.
      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,sar-compare-time: SAR compare time
      0 - 500 ns
      1 - 1 us
      2 - 2 us
      3 - 4 us

  - nuvoton,sar-sampling-time: SAR sampling time
      0 - 2 us
      1 - 4 us
      2 - 8 us
      3 - 16 us

  - nuvoton,short-key-debounce: Button short key press debounce time.
      0 - 30 ms
      1 - 50 ms
      2 - 100 ms
      3 - 30 ms

  - 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,crosstalk-enable: make crosstalk function enable if set.

  - nuvoton,adcout-drive-strong: make the drive strength of ADCOUT IO PIN strong if set.
      Otherwise, the drive keeps normal strength.

  - clocks: list of phandle and clock specifier pairs according to common clock bindings for the
      clocks described in clock-names
  - clock-names: should include "mclk" for the MCLK master clock

Example:

  headset: nau8825@1a {
      compatible = "nuvoton,nau8825";
      reg = <0x1a>;
      interrupt-parent = <&gpio>;
      interrupts = <TEGRA_GPIO(E, 6) 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>;
      // Setup 4 buttons impedance according to Android specification
      nuvoton,sar-threshold-num = <4>;
      nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
      nuvoton,sar-hysteresis = <1>;
      nuvoton,sar-voltage = <0>;
      nuvoton,sar-compare-time = <0>;
      nuvoton,sar-sampling-time = <0>;
      nuvoton,short-key-debounce = <2>;
      nuvoton,jack-insert-debounce = <7>;
      nuvoton,jack-eject-debounce = <7>;
      nuvoton,crosstalk-enable;

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

repo_name: angery/linux


code:
* Nokia N900 audio setup

Required properties:
- compatible: Should contain "nokia,n900-audio"
- nokia,cpu-dai: phandle for the McBSP node
- nokia,audio-codec: phandles for the main TLV320AIC3X node and the
                     auxiliary TLV320AIC3X node (in this order)
- nokia,headphone-amplifier: phandle for the TPA6130A2 node
- tvout-selection-gpios: GPIO for tvout selection
- jack-detection-gpios: GPIO for jack detection
- eci-switch-gpios: GPIO for ECI (Enhancement Control Interface) switch
- speaker-amplifier-gpios: GPIO for speaker amplifier

Example:

sound {
	compatible = "nokia,n900-audio";

	nokia,cpu-dai = <&mcbsp2>;
	nokia,audio-codec = <&tlv320aic3x>, <&tlv320aic3x_aux>;
	nokia,headphone-amplifier = <&tpa6130a2>;

	tvout-selection-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>; /* 40 */
	jack-detection-gpios = <&gpio6 17 GPIO_ACTIVE_HIGH>; /* 177 */
	eci-switch-gpios = <&gpio6 22 GPIO_ACTIVE_HIGH>; /* 182 */
	speaker-amplifier-gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>;
};


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

title: NVIDIA Tegra audio complex with ALC5632 CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    items:
      - pattern: '^[a-z0-9]+,tegra-audio-alc5632(-[a-z0-9]+)+$'
      - const: nvidia,tegra-audio-alc5632

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.
    minItems: 2
    items:
      enum:
        # Board Connectors
        - "Headset Stereophone"
        - "Int Spk"
        - "Headset Mic"
        - "Digital Mic"

        # CODEC Pins
        - SPKOUT
        - SPKOUTN
        - MICBIAS1
        - MIC1
        - HPR
        - HPL
        - DMICDAT

required:
  - nvidia,i2s-controller

unevaluatedProperties: false

examples:
  - |
    sound {
        compatible = "nvidia,tegra-audio-alc5632-paz00",
                     "nvidia,tegra-audio-alc5632";

        nvidia,model = "Compal PAZ00";

        nvidia,audio-routing = "Int Spk", "SPKOUT",
                               "Int Spk", "SPKOUTN",
                               "Headset Mic", "MICBIAS1",
                               "MIC1", "Headset Mic",
                               "Headset Stereophone", "HPR",
                               "Headset Stereophone", "HPL",
                               "DMICDAT", "Digital Mic";

        nvidia,i2s-controller = <&i2s>;
        nvidia,audio-codec = <&codec>;

        clocks = <&clk 112>, <&clk 113>, <&clk 93>;
        clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: Common properties for NVIDIA Tegra audio complexes

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

properties:
  clocks:
    items:
      - description: PLL A clock
      - description: PLL A OUT0 clock
      - description: The Tegra cdev1/extern1 clock, which feeds the card's mclk

  clock-names:
    items:
      - const: pll_a
      - const: pll_a_out0
      - const: mclk

  nvidia,model:
    $ref: /schemas/types.yaml#/definitions/string
    description: The user-visible name of this sound complex.

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.

  nvidia,ac97-controller:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: The phandle of the AC97 controller

  nvidia,i2s-controller:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: The phandle of the Tegra I2S controller

  nvidia,audio-codec:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: The phandle of audio codec

  nvidia,spkr-en-gpios:
    maxItems: 1
    description: The GPIO that enables the speakers

  nvidia,hp-mute-gpios:
    maxItems: 1
    description: The GPIO that mutes the headphones

  nvidia,hp-det-gpios:
    maxItems: 1
    description: The GPIO that detect headphones are plugged in

  nvidia,mic-det-gpios:
    maxItems: 1
    description: The GPIO that detect microphone is plugged in

  nvidia,ear-sel-gpios:
    maxItems: 1
    description: The GPIO that switch between the microphones

  nvidia,int-mic-en-gpios:
    maxItems: 1
    description: The GPIO that enables the internal microphone

  nvidia,ext-mic-en-gpios:
    maxItems: 1
    description: The GPIO that enables the external microphone

  nvidia,headset:
    type: boolean
    description: The Mic Jack represents state of the headset microphone pin

additionalProperties: true


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

title: Audio Graph based Tegra sound card driver

description: |
  This is based on generic audio graph card driver along with additional
  customizations for Tegra platforms. It uses the same bindings with
  additional standard clock DT bindings required for Tegra.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

allOf:
  - $ref: audio-graph.yaml#

properties:
  compatible:
    enum:
      - nvidia,tegra210-audio-graph-card
      - nvidia,tegra186-audio-graph-card

  clocks:
    minItems: 2

  clock-names:
    items:
      - const: pll_a
      - const: plla_out0

  assigned-clocks:
    minItems: 1
    maxItems: 3

  assigned-clock-parents:
    minItems: 1
    maxItems: 3

  assigned-clock-rates:
    minItems: 1
    maxItems: 3

  interconnects:
    items:
      - description: APE read memory client
      - description: APE write memory client

  interconnect-names:
    items:
      - const: dma-mem # read
      - const: write

  iommus:
    maxItems: 1

required:
  - clocks
  - clock-names
  - assigned-clocks
  - assigned-clock-parents

unevaluatedProperties: false

examples:
  - |
    #include<dt-bindings/clock/tegra210-car.h>

    tegra_sound {
        compatible = "nvidia,tegra210-audio-graph-card";

        clocks = <&tegra_car TEGRA210_CLK_PLL_A>,
                 <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
        clock-names = "pll_a", "plla_out0";

        assigned-clocks = <&tegra_car TEGRA210_CLK_PLL_A>,
                          <&tegra_car TEGRA210_CLK_PLL_A_OUT0>,
                          <&tegra_car TEGRA210_CLK_EXTERN1>;
        assigned-clock-parents = <0>, <0>, <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
        assigned-clock-rates = <368640000>, <49152000>, <12288000>;

        dais = /* FE */
               <&admaif1_port>,
               /* Router */
               <&xbar_i2s1_port>,
               /* I/O DAP Ports */
               <&i2s1_port>;

        label = "jetson-tx1-ape";
    };

    // The ports are defined for AHUB and its child devices.
    ahub@702d0800 {
        compatible = "nvidia,tegra210-ahub";
        reg = <0x702d0800 0x800>;
        clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
        clock-names = "ahub";
        assigned-clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
        assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0x702d0000 0x702d0000 0x0000e400>;

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

            port@0 {
                reg = <0x0>;
                xbar_admaif1_ep: endpoint {
                    remote-endpoint = <&admaif1_ep>;
                };
            };

            // ...

            xbar_i2s1_port: port@a {
                reg = <0xa>;
                xbar_i2s1_ep: endpoint {
                    remote-endpoint = <&i2s1_cif_ep>;
                };
            };
        };

        admaif@702d0000 {
            compatible = "nvidia,tegra210-admaif";
            reg = <0x702d0000 0x800>;
            dmas = <&adma 1>,  <&adma 1>,
                   <&adma 2>,  <&adma 2>,
                   <&adma 3>,  <&adma 3>,
                   <&adma 4>,  <&adma 4>,
                   <&adma 5>,  <&adma 5>,
                   <&adma 6>,  <&adma 6>,
                   <&adma 7>,  <&adma 7>,
                   <&adma 8>,  <&adma 8>,
                   <&adma 9>,  <&adma 9>,
                   <&adma 10>, <&adma 10>;
            dma-names = "rx1",  "tx1",
                        "rx2",  "tx2",
                        "rx3",  "tx3",
                        "rx4",  "tx4",
                        "rx5",  "tx5",
                        "rx6",  "tx6",
                        "rx7",  "tx7",
                        "rx8",  "tx8",
                        "rx9",  "tx9",
                        "rx10", "tx10";

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

                admaif1_port: port@0 {
                    reg = <0x0>;
                    admaif1_ep: endpoint {
                        remote-endpoint = <&xbar_admaif1_ep>;
                    };
                };

                // More ADMAIF ports to follow
            };
        };

        i2s@702d1000 {
            compatible = "nvidia,tegra210-i2s";
            clocks = <&tegra_car TEGRA210_CLK_I2S0>;
            clock-names = "i2s";
            assigned-clocks = <&tegra_car TEGRA210_CLK_I2S0>;
            assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
            assigned-clock-rates = <1536000>;
            reg = <0x702d1000 0x100>;

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

                port@0 {
                    reg = <0x0>;

                    i2s1_cif_ep: endpoint {
                        remote-endpoint = <&xbar_i2s1_ep>;
                    };
                };

                i2s1_port: port@1 {
                    reg = <0x1>;

                    i2s1_dap: endpoint {
                        dai-format = "i2s";
                    };
                };
            };
        };
    };

...


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

title: NVIDIA Tegra audio complex with MAX98090 CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    oneOf:
      - items:
          - pattern: '^[a-z0-9]+,tegra-audio-max98090(-[a-z0-9]+)+$'
          - const: nvidia,tegra-audio-max98090
      - items:
          - enum:
              - nvidia,tegra-audio-max98090-nyan-big
              - nvidia,tegra-audio-max98090-nyan-blaze
          - const: nvidia,tegra-audio-max98090-nyan
          - const: nvidia,tegra-audio-max98090

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.
    minItems: 2
    items:
      enum:
        # Board Connectors
        - "Headphones"
        - "Speakers"
        - "Mic Jack"
        - "Int Mic"

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

required:
  - nvidia,i2s-controller

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/tegra124-car.h>

    sound {
        compatible = "nvidia,tegra-audio-max98090-venice2",
                     "nvidia,tegra-audio-max98090";
        nvidia,model = "NVIDIA Tegra Venice2";

        nvidia,audio-routing =
                "Headphones", "HPR",
                "Headphones", "HPL",
                "Speakers", "SPKR",
                "Speakers", "SPKL",
                "Mic Jack", "MICBIAS",
                "IN34", "Mic Jack";

        nvidia,i2s-controller = <&tegra_i2s1>;
        nvidia,audio-codec = <&acodec>;

        clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
                 <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
                 <&tegra_car TEGRA124_CLK_EXTERN1>;
        clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: NVIDIA Tegra audio complex with RT5639 or RT5640 CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    items:
      - pattern: '^[a-z0-9]+,tegra-audio-rt56(39|40)(-[a-z0-9]+)+$'
      - const: nvidia,tegra-audio-rt5640

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.
    minItems: 2
    items:
      enum:
        # Board Connectors
        - "Headphones"
        - "Speakers"
        - "Mic Jack"

        # CODEC Pins
        - DMIC1
        - DMIC2
        - MICBIAS1
        - IN1P
        - IN1R
        - IN2P
        - IN2R
        - HPOL
        - HPOR
        - LOUTL
        - LOUTR
        - MONOP
        - MONON
        - SPOLP
        - SPOLN
        - SPORP
        - SPORN

required:
  - nvidia,i2s-controller

unevaluatedProperties: false

examples:
  - |
    sound {
        compatible = "nvidia,tegra-audio-rt5640-dalmore",
                     "nvidia,tegra-audio-rt5640";
        nvidia,model = "NVIDIA Tegra Dalmore";

        nvidia,audio-routing =
                "Headphones", "HPOR",
                "Headphones", "HPOL",
                "Speakers", "SPORP",
                "Speakers", "SPORN",
                "Speakers", "SPOLP",
                "Speakers", "SPOLN";

        nvidia,i2s-controller = <&tegra_i2s1>;
        nvidia,audio-codec = <&rt5640>;

        nvidia,hp-det-gpios = <&gpio 143 0>;

        clocks = <&clk 216>, <&clk 217>, <&clk 120>;
        clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: NVIDIA Tegra audio complex with RT5677 CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    items:
      - pattern: '^[a-z0-9]+,tegra-audio-rt5677(-[a-z0-9]+)+$'
      - const: nvidia,tegra-audio-rt5677

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.
    minItems: 2
    items:
      enum:
        # Board Connectors
        - "Headphone"
        - "Speaker"
        - "Headset Mic"
        - "Internal Mic 1"
        - "Internal Mic 2"

        # CODEC Pins
        - IN1P
        - IN1N
        - IN2P
        - IN2N
        - MICBIAS1
        - DMIC1
        - DMIC2
        - DMIC3
        - DMIC4
        - "DMIC L1"
        - "DMIC L2"
        - "DMIC L3"
        - "DMIC L4"
        - "DMIC R1"
        - "DMIC R2"
        - "DMIC R3"
        - "DMIC R4"
        - LOUT1
        - LOUT2
        - LOUT3
        - PDM1L
        - PDM1R
        - PDM2L
        - PDM2R

required:
  - nvidia,i2s-controller

unevaluatedProperties: false

examples:
  - |
    sound {
        compatible = "nvidia,tegra-audio-rt5677-ryu",
                     "nvidia,tegra-audio-rt5677";
        nvidia,model = "NVIDIA Tegra Ryu";

        nvidia,audio-routing =
                "Headphone", "LOUT2",
                "Headphone", "LOUT1",
                "Headset Mic", "MICBIAS1",
                "IN1P", "Headset Mic",
                "IN1N", "Headset Mic",
                "DMIC L1", "Internal Mic 1",
                "DMIC R1", "Internal Mic 1",
                "DMIC L2", "Internal Mic 2",
                "DMIC R2", "Internal Mic 2",
                "Speaker", "PDM1L",
                "Speaker", "PDM1R";

        nvidia,i2s-controller = <&tegra_i2s1>;
        nvidia,audio-codec = <&rt5677>;

        nvidia,hp-det-gpios = <&gpio 143 0>;

        clocks = <&clk 216>,
                 <&clk 217>,
                 <&clk 121>;
        clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: NVIDIA Tegra audio complex with SGTL5000 CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    items:
      - pattern: '^[a-z0-9]+,tegra-audio-sgtl5000([-_][a-z0-9]+)+$'
      - const: nvidia,tegra-audio-sgtl5000

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.
    minItems: 2
    items:
      enum:
        # Board Connectors
        - "Headphone Jack"
        - "Line In Jack"
        - "Mic Jack"

        # CODEC Pins
        - HP_OUT
        - LINE_OUT
        - LINE_IN
        - MIC_IN

required:
  - nvidia,i2s-controller

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/tegra30-car.h>

    sound {
      compatible = "toradex,tegra-audio-sgtl5000-apalis_t30",
                   "nvidia,tegra-audio-sgtl5000";
      nvidia,model = "Toradex Apalis T30 SGTL5000";
      nvidia,audio-routing =
              "Headphone Jack", "HP_OUT",
              "LINE_IN", "Line In Jack",
              "MIC_IN", "Mic Jack";
      nvidia,i2s-controller = <&tegra_i2s2>;
      nvidia,audio-codec = <&codec>;
      clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
               <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
               <&tegra_car TEGRA30_CLK_EXTERN1>;
      clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: NVIDIA Tegra audio complex with TrimSlice CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    const: nvidia,tegra-audio-trimslice

required:
  - nvidia,i2s-controller

unevaluatedProperties: false

examples:
  - |
    sound {
        compatible = "nvidia,tegra-audio-trimslice";
        nvidia,i2s-controller = <&tegra_i2s1>;
        nvidia,audio-codec = <&codec>;
        clocks = <&tegra_car 112>, <&tegra_car 113>, <&tegra_car 93>;
        clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: NVIDIA Tegra audio complex with WM8753 CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    items:
      - pattern: '^[a-z0-9]+,tegra-audio-wm8753(-[a-z0-9]+)+$'
      - const: nvidia,tegra-audio-wm8753

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.
    minItems: 2
    items:
      enum:
        # Board Connectors
        - "Headphone Jack"
        - "Mic Jack"

        # CODEC Pins
        - LOUT1
        - LOUT2
        - ROUT1
        - ROUT2
        - MONO1
        - MONO2
        - OUT3
        - OUT4
        - LINE1
        - LINE2
        - RXP
        - RXN
        - ACIN
        - ACOP
        - MIC1N
        - MIC1
        - MIC2N
        - MIC2
        - "Mic Bias"

required:
  - nvidia,i2s-controller

unevaluatedProperties: false

examples:
  - |
    sound {
        compatible = "nvidia,tegra-audio-wm8753-whistler",
                     "nvidia,tegra-audio-wm8753";
        nvidia,model = "tegra-wm8753-harmony";

        nvidia,audio-routing =
                "Headphone Jack", "LOUT1",
                "Headphone Jack", "ROUT1";

        nvidia,i2s-controller = <&i2s1>;
        nvidia,audio-codec = <&wm8753>;

        clocks = <&clk 112>, <&clk 113>, <&clk 93>;
        clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: NVIDIA Tegra audio complex with WM8903 CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    oneOf:
      - items:
          - pattern: '^[a-z0-9]+,tegra-audio-wm8903(-[a-z0-9]+)+$'
          - const: nvidia,tegra-audio-wm8903
      - items:
          - pattern: ad,tegra-audio-plutux
          - const: nvidia,tegra-audio-wm8903

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.
    minItems: 2
    items:
      enum:
        # Board Connectors
        - "Headphone Jack"
        - "Int Spk"
        - "Mic Jack"
        - "Int Mic"

        # CODEC Pins
        - IN1L
        - IN1R
        - IN2L
        - IN2R
        - IN3L
        - IN3R
        - DMICDAT
        - HPOUTL
        - HPOUTR
        - LINEOUTL
        - LINEOUTR
        - LOP
        - LON
        - ROP
        - RON
        - MICBIAS

required:
  - nvidia,i2s-controller

unevaluatedProperties: false

examples:
  - |
    sound {
        compatible = "nvidia,tegra-audio-wm8903-harmony",
                     "nvidia,tegra-audio-wm8903";
        nvidia,model = "tegra-wm8903-harmony";

        nvidia,audio-routing =
                "Headphone Jack", "HPOUTR",
                "Headphone Jack", "HPOUTL",
                "Int Spk", "ROP",
                "Int Spk", "RON",
                "Int Spk", "LOP",
                "Int Spk", "LON",
                "Mic Jack", "MICBIAS",
                "IN1L", "Mic Jack";

        nvidia,i2s-controller = <&i2s1>;
        nvidia,audio-codec = <&wm8903>;

        nvidia,spkr-en-gpios = <&codec 2 0>;
        nvidia,hp-det-gpios = <&gpio 178 0>;
        nvidia,int-mic-en-gpios = <&gpio 184 0>;
        nvidia,ext-mic-en-gpios = <&gpio 185 0>;

        clocks = <&clk 112>, <&clk 113>, <&clk 93>;
        clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: NVIDIA Tegra audio complex with WM9712 CODEC

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

allOf:
  - $ref: nvidia,tegra-audio-common.yaml#

properties:
  compatible:
    items:
      - pattern: '^[a-z0-9]+,tegra-audio-wm9712([-_][a-z0-9]+)+$'
      - const: nvidia,tegra-audio-wm9712

  nvidia,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 for sources and
      sinks are the pins (documented in the binding document),
      and the jacks on the board.
    minItems: 2
    items:
      enum:
        # Board Connectors
        - "Headphone"
        - "LineIn"
        - "Mic"

        # CODEC Pins
        - MONOOUT
        - HPOUTL
        - HPOUTR
        - LOUT2
        - ROUT2
        - OUT3
        - LINEINL
        - LINEINR
        - PHONE
        - PCBEEP
        - MIC1
        - MIC2
        - "Mic Bias"

required:
  - nvidia,ac97-controller

unevaluatedProperties: false

examples:
  - |
    sound {
        compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
                     "nvidia,tegra-audio-wm9712";
        nvidia,model = "Toradex Colibri T20";

        nvidia,audio-routing =
                "Headphone", "HPOUTL",
                "Headphone", "HPOUTR",
                "LineIn", "LINEINL",
                "LineIn", "LINEINR",
                "Mic", "MIC1";

        nvidia,ac97-controller = <&ac97>;

        clocks = <&clk 112>, <&clk 113>, <&clk 93>;
        clock-names = "pll_a", "pll_a_out0", "mclk";
    };


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

title: Tegra186 ASRC

description: |
  Asynchronous Sample Rate Converter (ASRC) converts the sampling frequency
  of the input signal from one frequency to another. It can handle over a
  wide range of sample rate ratios (freq_in/freq_out) from 1:24 to 24:1.
  ASRC has two modes of operation. One where ratio can be programmed in SW
  and the other where it gets the information from ratio estimator module.

  It supports  sample rate conversions in the range of 8 to 192 kHz and
  supports 6 streams upto 12 total channels. The input data size can be
  16, 24 and 32 bits.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^asrc@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra186-asrc
      - items:
          - enum:
              - nvidia,tegra234-asrc
              - nvidia,tegra194-asrc
          - const: nvidia,tegra186-asrc

  reg:
    maxItems: 1

  sound-name-prefix:
    pattern: "^ASRC[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description: |
      ASRC has seven input ports and six output ports. Accordingly ACIF
      (Audio Client Interfaces) port nodes are defined to represent the
      ASRC inputs (port 0 to 6) and outputs (port 7 to 12). These are
      connected to corresponding ports on AHUB (Audio Hub). Additional
      input (port 6) is for receiving ratio information from estimator.

    patternProperties:
      '^port@[0-6]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: ASRC ACIF input ports
      '^port@[7-9]|1[1-2]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: ASRC ACIF output ports

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |

    asrc@2910000 {
        compatible = "nvidia,tegra186-asrc";
        reg = <0x2910000 0x2000>;
        sound-name-prefix = "ASRC1";
    };

...


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

title: Tegra186 DSPK Controller

description: |
  The Digital Speaker Controller (DSPK) can be viewed as a Pulse
  Density Modulation (PDM) transmitter that up-samples the input to
  the desired sampling rate by interpolation and then converts the
  over sampled Pulse Code Modulation (PCM) input to the desired 1-bit
  output via Delta Sigma Modulation (DSM).

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^dspk@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra186-dspk
      - items:
          - enum:
              - nvidia,tegra234-dspk
              - nvidia,tegra194-dspk
          - const: nvidia,tegra186-dspk

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    const: dspk

  assigned-clocks:
    maxItems: 1

  assigned-clock-parents:
    maxItems: 1

  assigned-clock-rates:
    maxItems: 1

  sound-name-prefix:
    pattern: "^DSPK[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          DSPK ACIF (Audio Client Interface) port connected to the
          corresponding AHUB (Audio Hub) ACIF port.

      port@1:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          DSPK DAP (Digital Audio Port) interface which can be connected
          to external audio codec for playback.

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - assigned-clocks
  - assigned-clock-parents
  - sound-name-prefix

additionalProperties: false

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

    dspk@2905000 {
        compatible = "nvidia,tegra186-dspk";
        reg = <0x2905000 0x100>;
        clocks = <&bpmp TEGRA186_CLK_DSPK1>;
        clock-names = "dspk";
        assigned-clocks = <&bpmp TEGRA186_CLK_DSPK1>;
        assigned-clock-parents = <&bpmp TEGRA186_CLK_PLL_A_OUT0>;
        assigned-clock-rates = <12288000>;
        sound-name-prefix = "DSPK1";
    };

...


code:
NVIDIA Tegra 20 AC97 controller

Required properties:
- compatible : "nvidia,tegra20-ac97"
- reg : Should contain AC97 controller registers location and length
- interrupts : Should contain AC97 interrupt
- resets : Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names : Must include the following entries:
  - ac97
- dmas : Must contain an entry for each entry in clock-names.
  See ../dma/dma.txt for details.
- dma-names : Must include the following entries:
  - rx
  - tx
- clocks : Must contain one entry, for the module clock.
  See ../clocks/clock-bindings.txt for details.
- nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number
  of the GPIO used to reset the external AC97 codec
- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number
  of the GPIO corresponding with the AC97 DAP _FS line

Example:

ac97@70002000 {
	compatible = "nvidia,tegra20-ac97";
	reg = <0x70002000 0x200>;
	interrupts = <0 81 0x04>;
	nvidia,codec-reset-gpio = <&gpio 170 0>;
	nvidia,codec-sync-gpio = <&gpio 120 0>;
	clocks = <&tegra_car 3>;
	resets = <&tegra_car 3>;
	reset-names = "ac97";
	dmas = <&apbdma 12>, <&apbdma 12>;
	dma-names = "rx", "tx";
};


code:
NVIDIA Tegra 20 DAS (Digital Audio Switch) controller

Required properties:
- compatible : "nvidia,tegra20-das"
- reg : Should contain DAS registers location and length

Example:

das@70000c00 {
	compatible = "nvidia,tegra20-das";
	reg = <0x70000c00 0x80>;
};


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

title: NVIDIA Tegra20 I2S Controller

description: |
  The I2S Controller streams synchronous serial audio data between system
  memory and an external audio device. The controller supports the I2S Left
  Justified Mode, Right Justified Mode, and DSP mode formats.

maintainers:
  - Thierry Reding <treding@nvidia.com>
  - Jon Hunter <jonathanh@nvidia.com>

properties:
  compatible:
    const: nvidia,tegra20-i2s

  reg:
    maxItems: 1

  resets:
    maxItems: 1

  reset-names:
    const: i2s

  interrupts:
    maxItems: 1

  clocks:
    minItems: 1

  dmas:
    minItems: 2

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

  nvidia,fixed-parent-rate:
    description: |
      Specifies whether board prefers parent clock to stay at a fixed rate.
      This allows multiple Tegra20 audio components work simultaneously by
      limiting number of supportable audio rates.
    type: boolean

required:
  - compatible
  - reg
  - resets
  - reset-names
  - interrupts
  - clocks
  - dmas
  - dma-names

additionalProperties: false

examples:
  - |
    i2s@70002800 {
        compatible = "nvidia,tegra20-i2s";
        reg = <0x70002800 0x200>;
        interrupts = <45>;
        clocks = <&tegra_car 11>;
        resets = <&tegra_car 11>;
        reset-names = "i2s";
        dmas = <&apbdma 21>, <&apbdma 21>;
        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/nvidia,tegra20-spdif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NVIDIA Tegra20 S/PDIF Controller

description: |
  The S/PDIF controller supports both input and output in serial audio
  digital interface format. The input controller can digitally recover
  a clock from the received stream. The S/PDIF controller is also used
  to generate the embedded audio for HDMI output channel.

maintainers:
  - Thierry Reding <treding@nvidia.com>
  - Jon Hunter <jonathanh@nvidia.com>

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

properties:
  compatible:
    const: nvidia,tegra20-spdif

  reg:
    maxItems: 1

  resets:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 2

  clock-names:
    items:
      - const: out
      - const: in

  dmas:
    minItems: 2

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

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

  nvidia,fixed-parent-rate:
    description: |
      Specifies whether board prefers parent clock to stay at a fixed rate.
      This allows multiple Tegra20 audio components work simultaneously by
      limiting number of supportable audio rates.
    type: boolean

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

unevaluatedProperties: false

examples:
  - |
    spdif@70002400 {
        compatible = "nvidia,tegra20-spdif";
        reg = <0x70002400 0x200>;
        interrupts = <77>;
        clocks = <&clk 99>, <&clk 98>;
        clock-names = "out", "in";
        resets = <&rst 10>;
        dmas = <&apbdma 3>, <&apbdma 3>;
        dma-names = "rx", "tx";
        #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/nvidia,tegra210-admaif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Tegra210 ADMAIF

description: |
  ADMAIF is the interface between ADMA and AHUB. Each ADMA channel
  that sends/receives data to/from AHUB must interface through an
  ADMAIF channel. ADMA channel sending data to AHUB pairs with ADMAIF
  Tx channel and ADMA channel receiving data from AHUB pairs with
  ADMAIF Rx channel.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

properties:
  $nodename:
    pattern: "^admaif@[0-9a-f]*$"

  compatible:
    oneOf:
      - enum:
          - nvidia,tegra210-admaif
          - nvidia,tegra186-admaif
      - items:
          - enum:
              - nvidia,tegra234-admaif
              - nvidia,tegra194-admaif
          - const: nvidia,tegra186-admaif

  reg:
    maxItems: 1

  dmas: true

  dma-names: true

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description: |
      Contains list of ACIF (Audio CIF) port nodes for ADMAIF channels.
      The number of port nodes depends on the number of ADMAIF channels
      that SoC may have. These are interfaced with respective ACIF ports
      in AHUB (Audio Hub). Each port is capable of data transfers in
      both directions.

    patternProperties:
      '^port@[0-9]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false

if:
  properties:
    compatible:
      contains:
        const: nvidia,tegra210-admaif

then:
  properties:
    dmas:
      description:
        DMA channel specifiers, equally divided for Tx and Rx.
      minItems: 1
      maxItems: 20
    dma-names:
      items:
        pattern: "^[rt]x(10|[1-9])$"
      description:
        Should be "rx1", "rx2" ... "rx10" for DMA Rx channel
        Should be "tx1", "tx2" ... "tx10" for DMA Tx channel
      minItems: 1
      maxItems: 20

else:
  properties:
    dmas:
      description:
        DMA channel specifiers, equally divided for Tx and Rx.
      minItems: 1
      maxItems: 40
    dma-names:
      items:
        pattern: "^[rt]x(1[0-9]|[1-9]|20)$"
      description:
        Should be "rx1", "rx2" ... "rx20" for DMA Rx channel
        Should be "tx1", "tx2" ... "tx20" for DMA Tx channel
      minItems: 1
      maxItems: 40

required:
  - compatible
  - reg
  - dmas
  - dma-names

additionalProperties: false

examples:
  - |
    admaif@702d0000 {
        compatible = "nvidia,tegra210-admaif";
        reg = <0x702d0000 0x800>;
        dmas = <&adma 1>,  <&adma 1>,
               <&adma 2>,  <&adma 2>,
               <&adma 3>,  <&adma 3>,
               <&adma 4>,  <&adma 4>,
               <&adma 5>,  <&adma 5>,
               <&adma 6>,  <&adma 6>,
               <&adma 7>,  <&adma 7>,
               <&adma 8>,  <&adma 8>,
               <&adma 9>,  <&adma 9>,
               <&adma 10>, <&adma 10>;
        dma-names = "rx1",  "tx1",
                    "rx2",  "tx2",
                    "rx3",  "tx3",
                    "rx4",  "tx4",
                    "rx5",  "tx5",
                    "rx6",  "tx6",
                    "rx7",  "tx7",
                    "rx8",  "tx8",
                    "rx9",  "tx9",
                    "rx10", "tx10";
    };

...


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

title: Tegra210 ADX

description: |
  The Audio Demultiplexer (ADX) block takes an input stream with up to
  16 channels and demultiplexes it into four output streams of up to 16
  channels each. A byte RAM helps to form output frames by any combination
  of bytes from the input frame. Its design is identical to that of byte
  RAM in the AMX except that the data flow direction is reversed.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^adx@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra210-adx
      - items:
          - enum:
              - nvidia,tegra234-adx
              - nvidia,tegra194-adx
              - nvidia,tegra186-adx
          - const: nvidia,tegra210-adx

  reg:
    maxItems: 1

  sound-name-prefix:
    pattern: "^ADX[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description: |
      ADX has one input and four outputs. Accordingly ACIF (Audio Client
      Interface) port nodes are defined to represent ADX input (port 0)
      and outputs (ports 1 to 4). These are connected to corresponding
      ports on AHUB (Audio Hub).
    properties:
      port@0:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: ADX ACIF input port
    patternProperties:
      '^port@[1-4]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: ADX ACIF output ports

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |

    adx@702d3800 {
        compatible = "nvidia,tegra210-adx";
        reg = <0x702d3800 0x100>;
        sound-name-prefix = "ADX1";
    };

...


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

title: Tegra210 AHUB

description: |
  The Audio Hub (AHUB) comprises a collection of hardware accelerators
  for audio pre-processing, post-processing and a programmable full
  crossbar for routing audio data across these accelerators. It has
  external interfaces such as I2S, DMIC, DSPK. It interfaces with ADMA
  engine through ADMAIF.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

properties:
  $nodename:
    pattern: "^ahub@[0-9a-f]*$"

  compatible:
    oneOf:
      - enum:
          - nvidia,tegra210-ahub
          - nvidia,tegra186-ahub
          - nvidia,tegra234-ahub
      - items:
          - const: nvidia,tegra194-ahub
          - const: nvidia,tegra186-ahub

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    const: ahub

  assigned-clocks:
    maxItems: 1

  assigned-clock-parents:
    maxItems: 1

  assigned-clock-rates:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 1

  ranges: true

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description: |
      Contains list of ACIF (Audio CIF) port nodes for AHUB (Audio Hub).
      These are connected to ACIF interfaces of AHUB clients. Thus the
      number of port nodes depend on the number of clients that AHUB may
      have depending on the SoC revision.

    patternProperties:
      '^port@[0-9]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false

patternProperties:
  '^i2s@[0-9a-f]+$':
    type: object

  '^dmic@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-dmic.yaml#

  '^admaif@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-admaif.yaml#

  '^dspk@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra186-dspk.yaml#

  '^mvc@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-mvc.yaml#

  '^sfc@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-sfc.yaml#

  '^amx@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-amx.yaml#

  '^adx@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-adx.yaml#

  '^amixer@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-mixer.yaml#

  '^asrc@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra186-asrc.yaml#

  '^processing-engine@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-ope.yaml#

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - assigned-clocks
  - assigned-clock-parents
  - "#address-cells"
  - "#size-cells"
  - ranges

additionalProperties: false

examples:
  - |
    #include<dt-bindings/clock/tegra210-car.h>

    ahub@702d0800 {
        compatible = "nvidia,tegra210-ahub";
        reg = <0x702d0800 0x800>;
        clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
        clock-names = "ahub";
        assigned-clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
        assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges = <0x702d0000 0x702d0000 0x0000e400>;

        // All AHUB child nodes below
        admaif@702d0000 {
            compatible = "nvidia,tegra210-admaif";
            reg = <0x702d0000 0x800>;
            dmas = <&adma 1>,  <&adma 1>,
               <&adma 2>,  <&adma 2>,
               <&adma 3>,  <&adma 3>,
               <&adma 4>,  <&adma 4>,
               <&adma 5>,  <&adma 5>,
               <&adma 6>,  <&adma 6>,
               <&adma 7>,  <&adma 7>,
               <&adma 8>,  <&adma 8>,
               <&adma 9>,  <&adma 9>,
               <&adma 10>, <&adma 10>;
            dma-names = "rx1",  "tx1",
                    "rx2",  "tx2",
                    "rx3",  "tx3",
                    "rx4",  "tx4",
                    "rx5",  "tx5",
                    "rx6",  "tx6",
                    "rx7",  "tx7",
                    "rx8",  "tx8",
                    "rx9",  "tx9",
                    "rx10", "tx10";
        };

        i2s@702d1000 {
            compatible = "nvidia,tegra210-i2s";
            reg = <0x702d1000 0x100>;
            clocks = <&tegra_car TEGRA210_CLK_I2S0>;
            clock-names = "i2s";
            assigned-clocks = <&tegra_car TEGRA210_CLK_I2S0>;
            assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
            assigned-clock-rates = <1536000>;
            sound-name-prefix = "I2S1";
        };

        dmic@702d4000 {
            compatible = "nvidia,tegra210-dmic";
            reg = <0x702d4000 0x100>;
            clocks = <&tegra_car TEGRA210_CLK_DMIC1>;
            clock-names = "dmic";
            assigned-clocks = <&tegra_car TEGRA210_CLK_DMIC1>;
            assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
            assigned-clock-rates = <3072000>;
            sound-name-prefix = "DMIC1";
        };

        // More child nodes to follow
    };

...


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

title: Tegra210 AMX

description: |
  The Audio Multiplexer (AMX) block can multiplex up to four input streams
  each of which can have maximum 16 channels and generate an output stream
  with maximum 16 channels. A byte RAM helps to form an output frame by
  any combination of bytes from the input frames.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^amx@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra210-amx
      - items:
          - const: nvidia,tegra186-amx
          - const: nvidia,tegra210-amx
      - const: nvidia,tegra194-amx
      - items:
          - const: nvidia,tegra234-amx
          - const: nvidia,tegra194-amx

  reg:
    maxItems: 1

  sound-name-prefix:
    pattern: "^AMX[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description: |
      AMX has four inputs and one output. Accordingly ACIF (Audio Client
      Interfaces) port nodes are defined to represent AMX inputs (port 0
      to 3) and output (port 4). These are connected to corresponding
      ports on AHUB (Audio Hub).

    patternProperties:
      '^port@[0-3]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: AMX ACIF input ports

    properties:
      port@4:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: AMX ACIF output port

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |

    amx@702d3000 {
        compatible = "nvidia,tegra210-amx";
        reg = <0x702d3000 0x100>;
        sound-name-prefix = "AMX1";
    };

...


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

title: Tegra210 DMIC Controller

description: |
  The Digital MIC (DMIC) Controller is used to interface with Pulse
  Density Modulation (PDM) input devices. It converts PDM signals to
  Pulse Coded Modulation (PCM) signals. DMIC can be viewed as a PDM
  receiver.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^dmic@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra210-dmic
      - items:
          - enum:
              - nvidia,tegra234-dmic
              - nvidia,tegra194-dmic
              - nvidia,tegra186-dmic
          - const: nvidia,tegra210-dmic

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    const: dmic

  assigned-clocks:
    maxItems: 1

  assigned-clock-parents:
    maxItems: 1

  assigned-clock-rates:
    maxItems: 1

  sound-name-prefix:
    pattern: "^DMIC[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          DMIC ACIF (Audio Client Interface) port connected to the
          corresponding AHUB (Audio Hub) ACIF port.

      port@1:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          DMIC DAP (Digital Audio Port) interface which can be connected
          to external audio codec for capture.

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - assigned-clocks
  - assigned-clock-parents

additionalProperties: false

examples:
  - |
    #include<dt-bindings/clock/tegra210-car.h>

    dmic@702d4000 {
        compatible = "nvidia,tegra210-dmic";
        reg = <0x702d4000 0x100>;
        clocks = <&tegra_car TEGRA210_CLK_DMIC1>;
        clock-names = "dmic";
        assigned-clocks = <&tegra_car TEGRA210_CLK_DMIC1>;
        assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
        assigned-clock-rates = <3072000>;
        sound-name-prefix = "DMIC1";
    };

...


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

title: Tegra210 I2S Controller

description: |
  The Inter-IC Sound (I2S) controller implements full-duplex,
  bi-directional and single direction point-to-point serial
  interfaces. It can interface with I2S compatible devices.
  I2S controller can operate both in master and slave mode.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^i2s@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra210-i2s
      - items:
          - enum:
              - nvidia,tegra234-i2s
              - nvidia,tegra194-i2s
              - nvidia,tegra186-i2s
          - const: nvidia,tegra210-i2s

  reg:
    maxItems: 1

  clocks:
    minItems: 1
    items:
      - description: I2S bit clock
      - description:
          Sync input clock, which can act as clock source to other I/O
          modules in AHUB. The Tegra I2S driver sets this clock rate as
          per bit clock rate. I/O module which wants to use this clock
          as source, can mention this clock as parent in the DT bindings.
          This is an optional clock entry, since it is only required when
          some other I/O wants to reference from a particular I2Sx
          instance.

  clock-names:
    minItems: 1
    items:
      - const: i2s
      - const: sync_input

  assigned-clocks:
    minItems: 1
    maxItems: 2

  assigned-clock-parents:
    minItems: 1
    maxItems: 2

  assigned-clock-rates:
    minItems: 1
    maxItems: 2

  sound-name-prefix:
    pattern: "^I2S[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          I2S ACIF (Audio Client Interface) port connected to the
          corresponding AHUB (Audio Hub) ACIF port.

      port@1:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          I2S DAP (Digital Audio Port) interface which can be connected
          to external audio codec for playback or capture.

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - assigned-clocks
  - assigned-clock-parents

additionalProperties: false

examples:
  - |
    #include<dt-bindings/clock/tegra210-car.h>

    i2s@702d1000 {
        compatible = "nvidia,tegra210-i2s";
        reg = <0x702d1000 0x100>;
        clocks = <&tegra_car TEGRA210_CLK_I2S0>;
        clock-names = "i2s";
        assigned-clocks = <&tegra_car TEGRA210_CLK_I2S0>;
        assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
        assigned-clock-rates = <1536000>;
        sound-name-prefix = "I2S1";
    };

...


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

title: Tegra210 MBDRC

description:
  The Multi Band Dynamic Range Compressor (MBDRC) is part of Output
  Processing Engine (OPE) which interfaces with Audio Hub (AHUB) via
  Audio Client Interface (ACIF). MBDRC can be used as a traditional
  single full band or a dual band or a multi band dynamic processor.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

properties:
  compatible:
    oneOf:
      - const: nvidia,tegra210-mbdrc
      - items:
          - enum:
              - nvidia,tegra234-mbdrc
              - nvidia,tegra194-mbdrc
              - nvidia,tegra186-mbdrc
          - const: nvidia,tegra210-mbdrc

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    dynamic-range-compressor@702d8200 {
        compatible = "nvidia,tegra210-mbdrc";
        reg = <0x702d8200 0x200>;
    };

...


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

title: Tegra210 Mixer

description: |
  The Mixer supports mixing of up to ten 7.1 audio input streams and
  generate five outputs (each of which can be any combination of the
  ten input streams).

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^amixer@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra210-amixer
      - items:
          - enum:
              - nvidia,tegra234-amixer
              - nvidia,tegra194-amixer
              - nvidia,tegra186-amixer
          - const: nvidia,tegra210-amixer

  reg:
    maxItems: 1

  sound-name-prefix:
    pattern: "^MIXER[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description: |
      Mixer has ten inputs and five outputs. Accordingly ACIF (Audio
      Client Interfaces) port nodes are defined to represent Mixer
      inputs (port 0 to 9) and outputs (port 10 to 14). These are
      connected to corresponding ports on AHUB (Audio Hub).

    patternProperties:
      '^port@[0-9]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: Mixer ACIF input ports
      '^port@[10-14]':
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: Mixer ACIF output ports

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |

    amixer@702dbb00 {
        compatible = "nvidia,tegra210-amixer";
        reg = <0x702dbb00 0x800>;
        sound-name-prefix = "MIXER1";
    };

...


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

title: Tegra210 MVC

description: |
  The Master Volume Control (MVC) provides gain or attenuation to a digital
  signal path. It can be used in input or output signal path for per-stream
  volume control or it can be used as master volume control. The MVC block
  has one input and one output. The input digital stream can be mono or
  multi-channel (up to 7.1 channels) stream. An independent mute control is
  also included in the MVC block.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^mvc@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra210-mvc
      - items:
          - enum:
              - nvidia,tegra234-mvc
              - nvidia,tegra194-mvc
              - nvidia,tegra186-mvc
          - const: nvidia,tegra210-mvc

  reg:
    maxItems: 1

  sound-name-prefix:
    pattern: "^MVC[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          MVC ACIF (Audio Client Interface) input port. This is connected
          to corresponding ACIF output port on AHUB (Audio Hub).

      port@1:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          MVC ACIF output port. This is connected to corresponding ACIF
          input port on AHUB.

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |

    mvc@702da000 {
        compatible = "nvidia,tegra210-mvc";
        reg = <0x702da000 0x200>;
        sound-name-prefix = "MVC1";
    };

...


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

title: Tegra210 OPE

description:
  The Output Processing Engine (OPE) is one of the AHUB client. It has
  PEQ (Parametric Equalizer) and MBDRC (Multi Band Dynamic Range Compressor)
  sub blocks for data processing.

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  compatible:
    oneOf:
      - const: nvidia,tegra210-ope
      - items:
          - enum:
              - nvidia,tegra234-ope
              - nvidia,tegra194-ope
              - nvidia,tegra186-ope
          - const: nvidia,tegra210-ope

  reg:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 1

  ranges: true

  sound-name-prefix:
    pattern: "^OPE[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description:
          OPE ACIF (Audio Client Interface) input port. This is connected
          to corresponding ACIF output port on AHUB (Audio Hub).

      port@1:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description:
          OPE ACIF output port. This is connected to corresponding ACIF
          input port on AHUB.

patternProperties:
  '^equalizer@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-peq.yaml#

  '^dynamic-range-compressor@[0-9a-f]+$':
    type: object
    $ref: nvidia,tegra210-mbdrc.yaml#

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    processing-engine@702d8000 {
        compatible = "nvidia,tegra210-ope";
        reg = <0x702d8000 0x100>;
        sound-name-prefix = "OPE1";
    };

...


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

title: Tegra210 PEQ

description:
  The Parametric Equalizer (PEQ) is a cascade of biquad filters with
  each filter tuned based on certain parameters. It can be used to
  equalize the irregularities in the speaker frequency response.
  PEQ sits inside Output Processing Engine (OPE) which interfaces
  with Audio Hub (AHUB) via Audio Client Interface (ACIF).

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

properties:
  compatible:
    oneOf:
      - const: nvidia,tegra210-peq
      - items:
          - enum:
              - nvidia,tegra234-peq
              - nvidia,tegra194-peq
              - nvidia,tegra186-peq
          - const: nvidia,tegra210-peq

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    equalizer@702d8100 {
        compatible = "nvidia,tegra210-peq";
        reg = <0x702d8100 0x100>;
    };

...


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

title: Tegra210 SFC

description: |
  The Sampling Frequency Converter (SFC) converts the sampling frequency
  of the input signal from one frequency to another. It supports sampling
  frequency conversions of streams of up to two channels (stereo).

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Mohan Kumar <mkumard@nvidia.com>
  - Sameer Pujar <spujar@nvidia.com>

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

properties:
  $nodename:
    pattern: "^sfc@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra210-sfc
      - items:
          - enum:
              - nvidia,tegra234-sfc
              - nvidia,tegra194-sfc
              - nvidia,tegra186-sfc
          - const: nvidia,tegra210-sfc

  reg:
    maxItems: 1

  sound-name-prefix:
    pattern: "^SFC[1-9]$"

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    properties:
      port@0:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          SFC ACIF (Audio Client Interface) input port. This is connected
          to corresponding ACIF output port on AHUB (Audio Hub).

      port@1:
        $ref: audio-graph-port.yaml#
        unevaluatedProperties: false
        description: |
          SFC ACIF output port. This is connected to corresponding ACIF
          input port on AHUB.

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |

    sfc@702d2000 {
        compatible = "nvidia,tegra210-sfc";
        reg = <0x702d2000 0x200>;
        sound-name-prefix = "SFC1";
    };

...


code:
NVIDIA Tegra30 AHUB (Audio Hub)

Required properties:
- compatible : For Tegra30, must contain "nvidia,tegra30-ahub".  For Tegra114,
  must contain "nvidia,tegra114-ahub".  For Tegra124, must contain
  "nvidia,tegra124-ahub".  Otherwise, must contain "nvidia,<chip>-ahub",
  plus at least one of the above, where <chip> is tegra132.
- reg : Should contain the register physical address and length for each of
  the AHUB's register blocks.
  - Tegra30 requires 2 entries, for the APBIF and AHUB/AUDIO register blocks.
  - Tegra114 requires an additional entry, for the APBIF2 register block.
- interrupts : Should contain AHUB interrupt
- clocks : Must contain an entry for each entry in clock-names.
  See ../clocks/clock-bindings.txt for details.
- clock-names : Must include the following entries:
  - d_audio
  - apbif
- resets : Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names : Must include the following entries:
  Tegra30 and later:
  - d_audio
  - apbif
  - i2s0
  - i2s1
  - i2s2
  - i2s3
  - i2s4
  - dam0
  - dam1
  - dam2
  - spdif
  Tegra114 and later additionally require:
  - amx
  - adx
  Tegra124 and later additionally require:
  - amx1
  - adx1
  - afc0
  - afc1
  - afc2
  - afc3
  - afc4
  - afc5
- ranges : The bus address mapping for the configlink register bus.
  Can be empty since the mapping is 1:1.
- dmas : Must contain an entry for each entry in clock-names.
  See ../dma/dma.txt for details.
- dma-names : Must include the following entries:
  - rx0 .. rx<n>
  - tx0 .. tx<n>
  ... where n is:
  Tegra30: 3
  Tegra114, Tegra124: 9
- #address-cells : For the configlink bus. Should be <1>;
- #size-cells : For the configlink bus. Should be <1>.

AHUB client modules need to specify the IDs of their CIFs (Client InterFaces).
For RX CIFs, the numbers indicate the register number within AHUB routing
register space (APBIF 0..3 RX, I2S 0..5 RX, DAM 0..2 RX 0..1, SPDIF RX 0..1).
For TX CIFs, the numbers indicate the bit position within the AHUB routing
registers (APBIF 0..3 TX, I2S 0..5 TX, DAM 0..2 TX, SPDIF TX 0..1).

Example:

ahub@70080000 {
	compatible = "nvidia,tegra30-ahub";
	reg = <0x70080000 0x200 0x70080200 0x100>;
	interrupts = < 0 103 0x04 >;
	nvidia,dma-request-selector = <&apbdma 1>;
	clocks = <&tegra_car 106>, <&tegra_car 107>;
	clock-names = "d_audio", "apbif";
	resets = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>,
		<&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>,
		<&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>,
		<&tegra_car 110>, <&tegra_car 10>;
	reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
		"i2s3", "i2s4", "dam0", "dam1", "dam2",
		"spdif";
	dmas = <&apbdma 1>, <&apbdma 1>;
	       <&apbdma 2>, <&apbdma 2>;
	       <&apbdma 3>, <&apbdma 3>;
	       <&apbdma 4>, <&apbdma 4>;
	dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2", "rx3", "tx3";
	ranges;
	#address-cells = <1>;
	#size-cells = <1>;
};


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

title: NVIDIA Tegra HDA controller

description: |
  The High Definition Audio (HDA) block provides a serial interface to
  audio codec. It supports multiple input and output streams.

maintainers:
  - Thierry Reding <treding@nvidia.com>
  - Jon Hunter <jonathanh@nvidia.com>

properties:
  $nodename:
    pattern: "^hda@[0-9a-f]*$"

  compatible:
    oneOf:
      - const: nvidia,tegra30-hda
      - items:
          - enum:
              - nvidia,tegra234-hda
              - nvidia,tegra194-hda
              - nvidia,tegra186-hda
              - nvidia,tegra210-hda
              - nvidia,tegra124-hda
          - const: nvidia,tegra30-hda
      - items:
          - const: nvidia,tegra132-hda
          - const: nvidia,tegra124-hda
          - const: nvidia,tegra30-hda

  reg:
    maxItems: 1

  interrupts:
    description: The interrupt from the HDA controller
    maxItems: 1

  clocks:
    minItems: 2
    maxItems: 3

  clock-names:
    minItems: 2
    items:
      - const: hda
      - const: hda2hdmi
      - const: hda2codec_2x

  resets:
    minItems: 2
    maxItems: 3

  reset-names:
    minItems: 2
    items:
      - const: hda
      - const: hda2hdmi
      - const: hda2codec_2x

  power-domains:
    maxItems: 1

  interconnects:
    maxItems: 2

  interconnect-names:
    items:
      - const: dma-mem
      - const: write

  iommus:
    maxItems: 1

  nvidia,model:
    $ref: /schemas/types.yaml#/definitions/string
    description: |
      The user-visible name of this sound complex. If this property is
      not specified then boards can use default name provided in hda driver.

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names

additionalProperties: false

examples:
  - |
    #include<dt-bindings/clock/tegra124-car-common.h>
    #include<dt-bindings/interrupt-controller/arm-gic.h>

    hda@70030000 {
        compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda";
        reg = <0x70030000 0x10000>;
        interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&tegra_car TEGRA124_CLK_HDA>,
                 <&tegra_car TEGRA124_CLK_HDA2HDMI>,
                 <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>;
        clock-names = "hda", "hda2hdmi", "hda2codec_2x";
        resets = <&tegra_car 125>, /* hda */
                 <&tegra_car 128>, /* hda2hdmi */
                 <&tegra_car 111>; /* hda2codec_2x */
        reset-names = "hda", "hda2hdmi", "hda2codec_2x";
        nvidia,model = "jetson-tk1-hda";
    };

...


code:
NVIDIA Tegra30 I2S controller

Required properties:
- compatible : For Tegra30, must contain "nvidia,tegra30-i2s".  For Tegra124,
  must contain "nvidia,tegra124-i2s".  Otherwise, must contain
  "nvidia,<chip>-i2s" plus at least one of the above, where <chip> is
  tegra114 or tegra132.
- reg : Should contain I2S registers location and length
- clocks : Must contain one entry, for the module clock.
  See ../clocks/clock-bindings.txt for details.
- resets : Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names : Must include the following entries:
  - i2s
- nvidia,ahub-cif-ids : The list of AHUB CIF IDs for this port, rx (playback)
  first, tx (capture) second. See nvidia,tegra30-ahub.txt for values.

Example:

i2s@70080300 {
	compatible = "nvidia,tegra30-i2s";
	reg = <0x70080300 0x100>;
	nvidia,ahub-cif-ids = <4 4>;
	clocks = <&tegra_car 11>;
	resets = <&tegra_car 11>;
	reset-names = "i2s";
};


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

title: NXP/Goodix TFA989X (TFA1) Audio Amplifiers

maintainers:
  - Stephan Gerhold <stephan@gerhold.net>

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

properties:
  compatible:
    enum:
      - nxp,tfa9890
      - nxp,tfa9895
      - nxp,tfa9897

  reg:
    maxItems: 1

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

  rcv-gpios:
    description: optional GPIO to be asserted when receiver mode is enabled.

  sound-name-prefix: true

  vddd-supply:
    description: regulator phandle for the VDDD power supply.

if:
  not:
    properties:
      compatible:
        const: nxp,tfa9897
then:
  properties:
    rcv-gpios: false

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

additionalProperties: false

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

      audio-codec@34 {
        compatible = "nxp,tfa9895";
        reg = <0x34>;
        sound-name-prefix = "Speaker Left";
        #sound-dai-cells = <0>;
      };
      audio-codec@36 {
        compatible = "nxp,tfa9895";
        reg = <0x36>;
        sound-name-prefix = "Speaker Right";
        #sound-dai-cells = <0>;
      };
    };

  - |
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      speaker_codec_top: audio-codec@34 {
        compatible = "nxp,tfa9897";
        reg = <0x34>;
        vddd-supply = <&pm8916_l6>;
        rcv-gpios = <&msmgpio 50 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&speaker_top_default>;
        sound-name-prefix = "Speaker Top";
        #sound-dai-cells = <0>;
      };

      speaker_codec_bottom: audio-codec@36 {
        compatible = "nxp,tfa9897";
        reg = <0x36>;
        vddd-supply = <&pm8916_l6>;
        rcv-gpios = <&msmgpio 111 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&speaker_bottom_default>;
        sound-name-prefix = "Speaker Bottom";
        #sound-dai-cells = <0>;
      };
    };


code:
* Texas Instruments OMAP4+ and twl6040 based audio setups

Required properties:
- compatible: "ti,abe-twl6040"
- ti,model: Name of the sound card ( for example "SDP4430")
- ti,mclk-freq: MCLK frequency for HPPLL operation
- ti,mcpdm: phandle for the McPDM node
- ti,twl6040: phandle for the twl6040 core node
- ti,audio-routing: List of 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.

Optional properties:
- ti,dmic: phandle for the OMAP dmic node if the machine have it connected
- ti,jack-detection: Need to be present if the board capable to detect jack
  insertion, removal.

Available audio endpoints for the audio-routing table:

Board connectors:
 * Headset Stereophone
 * Earphone Spk
 * Ext Spk
 * Line Out
 * Vibrator
 * Headset Mic
 * Main Handset Mic
 * Sub Handset Mic
 * Line In
 * Digital Mic

twl6040 pins:
 * HSOL
 * HSOR
 * EP
 * HFL
 * HFR
 * AUXL
 * AUXR
 * VIBRAL
 * VIBRAR
 * HSMIC
 * MAINMIC
 * SUBMIC
 * AFML
 * AFMR

 * Headset Mic Bias
 * Main Mic Bias
 * Digital Mic1 Bias
 * Digital Mic2 Bias

Digital mic pins:
 * DMic

Example:

sound {
	compatible = "ti,abe-twl6040";
	ti,model = "SDP4430";

	ti,jack-detection;
	ti,mclk-freq = <38400000>;

	ti,mcpdm = <&mcpdm>;
	ti,dmic = <&dmic>;

	ti,twl6040 = <&twl6040>;

	/* Audio routing */
	ti,audio-routing =
		"Headset Stereophone", "HSOL",
		"Headset Stereophone", "HSOR",
		"Earphone Spk", "EP",
		"Ext Spk", "HFL",
		"Ext Spk", "HFR",
		"Line Out", "AUXL",
		"Line Out", "AUXR",
		"Vibrator", "VIBRAL",
		"Vibrator", "VIBRAR",
		"HSMIC", "Headset Mic",
		"Headset Mic", "Headset Mic Bias",
		"MAINMIC", "Main Handset Mic",
		"Main Handset Mic", "Main Mic Bias",
		"SUBMIC", "Sub Handset Mic",
		"Sub Handset Mic", "Main Mic Bias",
		"AFML", "Line In",
		"AFMR", "Line In",
		"DMic", "Digital Mic",
		"Digital Mic", "Digital Mic1 Bias";
};


code:
* Texas Instruments OMAP4+ Digital Microphone Module

Required properties:
- compatible: "ti,omap4-dmic"
- reg: Register location and size as an array:
       <MPU access base address, size>,
       <L3 interconnect address, size>;
- interrupts: Interrupt number for DMIC
- ti,hwmods: Name of the hwmod associated with OMAP dmic IP

Example:

dmic: dmic@4012e000 {
	compatible = "ti,omap4-dmic";
	reg = <0x4012e000 0x7f>, /* MPU private access */
	      <0x4902e000 0x7f>; /* L3 Interconnect */
	interrupts = <0 114 0x4>;
	interrupt-parent = <&gic>;
	ti,hwmods = "dmic";
};


code:
* Texas Instruments OMAP2+ McBSP module

Required properties:
- compatible: "ti,omap2420-mcbsp" for McBSP on OMAP2420
	      "ti,omap2430-mcbsp" for McBSP on OMAP2430
	      "ti,omap3-mcbsp" for McBSP on OMAP3
	      "ti,omap4-mcbsp" for McBSP on OMAP4 and newer SoC
- reg: Register location and size, for OMAP4+ as an array:
       <MPU access base address, size>,
       <L3 interconnect address, size>;
- reg-names: Array of strings associated with the address space
- interrupts: Interrupt numbers for the McBSP port, as an array in case the
	      McBSP IP have more interrupt lines:
	<OCP compliant irq>,
	<TX irq>,
	<RX irq>;
- interrupt-names: Array of strings associated with the interrupt numbers
- ti,buffer-size: Size of the FIFO on the port (OMAP2430 and newer SoC)
- ti,hwmods: Name of the hwmod associated to the McBSP port

Example:

mcbsp2: mcbsp@49022000 {
	compatible = "ti,omap3-mcbsp";
	reg = <0x49022000 0xff>,
	      <0x49028000 0xff>;
	reg-names = "mpu", "sidetone";
	interrupts = <0 17 0x4>, /* OCP compliant interrupt */
		     <0 62 0x4>, /* TX interrupt */
		     <0 63 0x4>, /* RX interrupt */
		     <0 4 0x4>;  /* Sidetone */
	interrupt-names = "common", "tx", "rx", "sidetone";
	interrupt-parent = <&intc>;
	ti,buffer-size = <1280>;
	ti,hwmods = "mcbsp2";
};


code:
* Texas Instruments OMAP4+ McPDM

Required properties:
- compatible: "ti,omap4-mcpdm"
- reg: Register location and size as an array:
       <MPU access base address, size>,
       <L3 interconnect address, size>;
- interrupts: Interrupt number for McPDM
- ti,hwmods: Name of the hwmod associated to the McPDM
- clocks:  phandle for the pdmclk provider, likely <&twl6040>
- clock-names: Must be "pdmclk"

Example:

mcpdm: mcpdm@40132000 {
	compatible = "ti,omap4-mcpdm";
	reg = <0x40132000 0x7f>, /* MPU private access */
	      <0x49032000 0x7f>; /* L3 Interconnect */
	interrupts = <0 112 0x4>;
	interrupt-parent = <&gic>;
	ti,hwmods = "mcpdm";
};

In board DTS file the pdmclk needs to be added:

&mcpdm {
	clocks = <&twl6040>;
	clock-names = "pdmclk";
	status = "okay";
};


code:
* Texas Instruments SoC with twl4030 based audio setups

Required properties:
- compatible: "ti,omap-twl4030"
- ti,model: Name of the sound card (for example "omap3beagle")
- ti,mcbsp: phandle for the McBSP node

Optional properties:
- ti,codec: phandle for the twl4030 audio node
- ti,mcbsp-voice: phandle for the McBSP node connected to the voice port of twl
- ti, jack-det-gpio: Jack detect GPIO
- ti,audio-routing: List of 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.
  If the routing is not provided all possible connection will be available

Available audio endpoints for the audio-routing table:

Board connectors:
 * Headset Stereophone
 * Earpiece Spk
 * Handsfree Spk
 * Ext Spk
 * Main Mic
 * Sub Mic
 * Headset Mic
 * Carkit Mic
 * Digital0 Mic
 * Digital1 Mic
 * Line In

twl4030 pins:
 * HSOL
 * HSOR
 * EARPIECE
 * HFL
 * HFR
 * PREDRIVEL
 * PREDRIVER
 * CARKITL
 * CARKITR
 * MAINMIC
 * SUBMIC
 * HSMIC
 * DIGIMIC0
 * DIGIMIC1
 * CARKITMIC
 * AUXL
 * AUXR

 * Headset Mic Bias
 * Mic Bias 1 /* Used for Main Mic or Digimic0 */
 * Mic Bias 2 /* Used for Sub Mic or Digimic1 */

Example:

sound {
	compatible = "ti,omap-twl4030";
	ti,model = "omap3beagle";

	ti,mcbsp = <&mcbsp2>;
};


code:
Texas Instruments pcm1789 DT bindings

PCM1789 is a simple audio codec that can be connected via
I2C or SPI. Currently, only I2C bus is supported.

Required properties:

 - compatible: "ti,pcm1789"

Required properties on I2C:

 - reg: the I2C address
 - reset-gpios: GPIO to control the RESET pin

Examples:

	audio-codec@4c {
		compatible = "ti,pcm1789";
		reg = <0x4c>;
		reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
		#sound-dai-cells = <0>;
	};


code:
Texas Instruments pcm179x DT bindings

This driver supports both the I2C and SPI bus.

Required properties:

 - compatible: "ti,pcm1792a"

For required properties on SPI, please consult
Documentation/devicetree/bindings/spi/spi-bus.txt

Required properties on I2C:

 - reg: the I2C address

Examples:

	codec_spi: 1792a@0 {
		compatible = "ti,pcm1792a";
		spi-max-frequency = <600000>;
	};

	codec_i2c: 1792a@4c {
		compatible = "ti,pcm1792a";
		reg = <0x4c>;
	};


code:
Texas Instruments PCM186x Universal Audio ADC

These devices support both I2C and SPI (configured with pin strapping
on the board).

Required properties:

 - compatible : "ti,pcm1862",
                "ti,pcm1863",
                "ti,pcm1864",
                "ti,pcm1865"

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

 - avdd-supply: Analog core power supply (3.3v)
 - dvdd-supply: Digital core power supply
 - iovdd-supply: Digital IO power supply
        See regulator/regulator.txt for more information

CODEC input pins:
 * VINL1
 * VINR1
 * VINL2
 * VINR2
 * VINL3
 * VINR3
 * VINL4
 * VINR4

The pins can be used in referring sound node's audio-routing property.

Example:

	pcm186x: audio-codec@4a {
		compatible = "ti,pcm1865";
		reg = <0x4a>;

		avdd-supply = <&reg_3v3_analog>;
		dvdd-supply = <&reg_3v3>;
		iovdd-supply = <&reg_1v8>;
	};


code:
PCM3060 audio CODEC

This driver supports both I2C and SPI.

Required properties:

- compatible: "ti,pcm3060"

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

Optional properties:

- ti,out-single-ended: "true" if output is single-ended;
                       "false" or not specified if output is differential.

Examples:

	pcm3060: pcm3060@46 {
		 compatible = "ti,pcm3060";
		 reg = <0x46>;
		 ti,out-single-ended = "true";
	};


code:
PCM5102a audio CODECs

These devices does not use I2C or SPI.

Required properties:

  - compatible : set as "ti,pcm5102a"

Examples:

	pcm5102a: pcm5102a {
		compatible = "ti,pcm5102a";
	};


code:
PCM512x audio CODECs

These devices support both I2C and SPI (configured with pin strapping
on the board).

Required properties:

  - compatible : One of "ti,pcm5121", "ti,pcm5122", "ti,pcm5141" or
                 "ti,pcm5142"

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

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

Optional properties:

  - clocks : A clock specifier for the clock connected as SCLK.  If this
    is absent the device will be configured to clock from BCLK.  If pll-in
    and pll-out are specified in addition to a clock, the device is
    configured to accept clock input on a specified gpio pin.

  - pll-in, pll-out : gpio pins used to connect the pll using <1>
    through <6>.  The device will be configured for clock input on the
    given pll-in pin and PLL output on the given pll-out pin.  An
    external connection from the pll-out pin to the SCLK pin is assumed.

Examples:

	pcm5122: pcm5122@4c {
		compatible = "ti,pcm5122";
		reg = <0x4c>;

		AVDD-supply = <&reg_3v3_analog>;
		DVDD-supply = <&reg_1v8>;
		CPVDD-supply = <&reg_3v3>;
	};

	pcm5142: pcm5142@4c {
		compatible = "ti,pcm5142";
		reg = <0x4c>;

		AVDD-supply = <&reg_3v3_analog>;
		DVDD-supply = <&reg_1v8>;
		CPVDD-supply = <&reg_3v3>;

		clocks = <&sck>;
		pll-in = <3>;
		pll-out = <6>;
	};


code:
* Qualcomm Technologies APQ8096 ASoC sound card driver

This binding describes the APQ8096 sound card, which uses qdsp for audio.

- compatible:
	Usage: required
	Value type: <stringlist>
	Definition: must be "qcom,apq8096-sndcard"

- audio-routing:
	Usage: Optional
	Value type: <stringlist>
	Definition:  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:
		  Valid names include:

		Board Connectors:
			"Headphone Left"
			"Headphone Right"
			"Earphone"
			"Line Out1"
			"Line Out2"
			"Line Out3"
			"Line Out4"
			"Analog Mic1"
			"Analog Mic2"
			"Analog Mic3"
			"Analog Mic4"
			"Analog Mic5"
			"Analog Mic6"
			"Digital Mic2"
			"Digital Mic3"

		Audio pins and MicBias on WCD9335 Codec:
			"MIC_BIAS1"
			"MIC_BIAS2"
			"MIC_BIAS3"
			"MIC_BIAS4"
			"AMIC1"
			"AMIC2"
			"AMIC3"
			"AMIC4"
			"AMIC5"
			"AMIC6"
			"AMIC6"
			"DMIC1"
			"DMIC2"
			"DMIC3"

- model:
	Usage: required
	Value type: <stringlist>
	Definition: The user-visible name of this sound card.

- aux-devs
	Usage: optional
	Value type: <array of phandles>
	Definition: A list of phandles for auxiliary devices (e.g. analog
		    amplifiers) that do not appear directly within the DAI
		    links. Should be connected to another audio component
		    using "audio-routing".

= dailinks
Each subnode of sndcard represents either a dailink, and subnodes of each
dailinks would be cpu/codec/platform dais.

- link-name:
	Usage: required
	Value type: <string>
	Definition: User friendly name for dai link

= CPU, PLATFORM, CODEC dais subnodes
- cpu:
	Usage: required
	Value type: <subnode>
	Definition: cpu dai sub-node

- codec:
	Usage: Optional
	Value type: <subnode>
	Definition: codec dai sub-node

- platform:
	Usage: Optional
	Value type: <subnode>
	Definition: platform dai sub-node

- sound-dai:
	Usage: required
	Value type: <phandle with arguments>
	Definition: dai phandle/s and port of CPU/CODEC/PLATFORM node.

Obsolete:
	qcom,model: String for soundcard name (Use model instead)
	qcom,audio-routing: A list of the connections between audio components.
			    (Use audio-routing instead)

Example:

audio {
	compatible = "qcom,apq8096-sndcard";
	model = "DB820c";

	mm1-dai-link {
		link-name = "MultiMedia1";
		cpu {
			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
		};
	};

	hdmi-dai-link {
		link-name = "HDMI Playback";
		cpu {
			sound-dai = <&q6afe HDMI_RX>;
		};

		platform {
			sound-dai = <&q6adm>;
		};

		codec {
			sound-dai = <&hdmi 0>;
		};
	};
};


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

title: Qualcomm Technologies Inc. LPASS CPU dai driver bindings

maintainers:
  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
  - Rohit kumar <rohitkr@codeaurora.org>

description: |
  Qualcomm Technologies Inc. SOC Low-Power Audio SubSystem (LPASS) that consist
  of MI2S interface for audio data transfer on external codecs. LPASS cpu driver
  is a module to configure Low-Power Audio Interface(LPAIF) core registers
  across different IP versions.

properties:
  compatible:
    enum:
      - qcom,lpass-cpu
      - qcom,apq8016-lpass-cpu
      - qcom,sc7180-lpass-cpu
      - qcom,sc7280-lpass-cpu

  reg:
    minItems: 1
    maxItems: 6
    description: LPAIF core registers

  reg-names:
    minItems: 1
    maxItems: 6

  clocks:
    minItems: 3
    maxItems: 7

  clock-names:
    minItems: 1
    maxItems: 10

  interrupts:
    minItems: 1
    maxItems: 4
    description: LPAIF DMA buffer interrupt

  interrupt-names:
    minItems: 1
    maxItems: 4

  qcom,adsp:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: Phandle for the audio DSP node

  iommus:
    minItems: 2
    maxItems: 3
    description: Phandle to apps_smmu node with sid mask

  power-domains:
    maxItems: 1

  power-domain-names:
    maxItems: 1

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

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

patternProperties:
  "^dai-link@[0-9a-f]$":
    type: object
    description: |
      LPASS CPU dai node for each I2S device or Soundwire device. Bindings of each node
      depends on the specific driver providing the functionality and
      properties.
    properties:
      reg:
        maxItems: 1
        description: Must be one of the DAI ID

      qcom,playback-sd-lines:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        description: list of MI2S data lines for playback

      qcom,capture-sd-lines:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        description: list of MI2S data lines for capture

    required:
      - reg

    additionalProperties: false

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

unevaluatedProperties: false

allOf:
  - $ref: dai-common.yaml#
  - if:
      properties:
        compatible:
          contains:
            const: qcom,lpass-cpu

    then:
      properties:
        clock-names:
          items:
            - const: ahbix-clk
            - const: mi2s-osr-clk
            - const: mi2s-bit-clk

  - if:
      properties:
        compatible:
          contains:
            const: qcom,apq8016-lpass-cpu

    then:
      properties:
        clock-names:
          items:
            - const: ahbix-clk
            - const: mi2s-bit-clk0
            - const: mi2s-bit-clk1
            - const: mi2s-bit-clk2
            - const: mi2s-bit-clk3
            - const: pcnoc-mport-clk
            - const: pcnoc-sway-clk

  - if:
      properties:
        compatible:
          contains:
            const: qcom,sc7180-lpass-cpu

    then:
      properties:
        clock-names:
          oneOf:
            - items:   #for I2S
                - const: pcnoc-sway-clk
                - const: audio-core
                - const: mclk0
                - const: pcnoc-mport-clk
                - const: mi2s-bit-clk0
                - const: mi2s-bit-clk1
            - items:   #for HDMI
                - const: pcnoc-sway-clk
                - const: audio-core
                - const: pcnoc-mport-clk
        reg-names:
          anyOf:
            - items:   #for I2S
                - const: lpass-lpaif
            - items:   #for I2S and HDMI
                - const: lpass-hdmiif
                - const: lpass-lpaif
        interrupt-names:
          anyOf:
            - items:   #for I2S
                - const: lpass-irq-lpaif
            - items:   #for I2S and HDMI
                - const: lpass-irq-lpaif
                - const: lpass-irq-hdmi
      required:
        - iommus
        - power-domains

  - if:
      properties:
        compatible:
          contains:
            const: qcom,sc7280-lpass-cpu

    then:
      properties:
        clock-names:
          oneOf:
            - items:   #for I2S
                - const: aon_cc_audio_hm_h
                - const: audio_cc_ext_mclk0
                - const: core_cc_sysnoc_mport_core
                - const: core_cc_ext_if0_ibit
                - const: core_cc_ext_if1_ibit
            - items:   #for Soundwire
                - const: aon_cc_audio_hm_h
                - const: audio_cc_codec_mem
                - const: audio_cc_codec_mem0
                - const: audio_cc_codec_mem1
                - const: audio_cc_codec_mem2
                - const: aon_cc_va_mem0
            - items:   #for HDMI
                - const: core_cc_sysnoc_mport_core

        reg-names:
          anyOf:
            - items:   #for I2S
                - const: lpass-lpaif
            - items:   #for I2S and HDMI
                - const: lpass-hdmiif
                - const: lpass-lpaif
            - items:   #for I2S, soundwire and HDMI
                - const: lpass-hdmiif
                - const: lpass-lpaif
                - const: lpass-rxtx-cdc-dma-lpm
                - const: lpass-rxtx-lpaif
                - const: lpass-va-lpaif
                - const: lpass-va-cdc-dma-lpm
        interrupt-names:
          anyOf:
            - items:   #for I2S
                - const: lpass-irq-lpaif
            - items:   #for I2S and HDMI
                - const: lpass-irq-lpaif
                - const: lpass-irq-hdmi
            - items:   #for I2S, soundwire and HDMI
                - const: lpass-irq-lpaif
                - const: lpass-irq-hdmi
                - const: lpass-irq-vaif
                - const: lpass-irq-rxtxif
        power-domain-names:
          allOf:
            - items:
                - const: lcx

      required:
        - iommus
        - power-domains

examples:
  - |
    #include <dt-bindings/sound/sc7180-lpass.h>

    soc {
        #address-cells = <2>;
        #size-cells = <2>;
        lpass@62d80000 {
            compatible = "qcom,sc7180-lpass-cpu";

            reg = <0 0x62d87000 0 0x68000>,
                  <0 0x62f00000 0 0x29000>;
            reg-names = "lpass-hdmiif",
                        "lpass-lpaif";
            iommus = <&apps_smmu 0x1020 0>,
                     <&apps_smmu 0x1032 0>;
            power-domains = <&lpass_hm 0>;

            clocks = <&gcc 131>,
                 <&lpasscorecc 6>,
                 <&lpasscorecc 7>,
                 <&lpasscorecc 10>,
                 <&lpasscorecc 8>,
                 <&lpasscorecc 9>;

            clock-names = "pcnoc-sway-clk", "audio-core",
                          "mclk0", "pcnoc-mport-clk",
                          "mi2s-bit-clk0", "mi2s-bit-clk1";

            interrupts = <0 160 1>,
                         <0 268 1>;
            interrupt-names = "lpass-irq-lpaif",
                              "lpass-irq-hdmi";
            #sound-dai-cells = <1>;

            #address-cells = <1>;
            #size-cells = <0>;
            /* Optional to set different MI2S SD lines */
            dai-link@0 {
                reg = <MI2S_PRIMARY>;
                qcom,playback-sd-lines = <1>;
                qcom,capture-sd-lines = <0>;
            };
        };
    };

...