summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/sound/ti,tlv320aic3x.yaml
blob: 206f6d61e362e30725df809bc459a758a992561b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
# Copyright (C) 2022 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,tlv320aic3x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments TLV320AIC3x Codec

description: |
  TLV320AIC3x are a series of low-power stereo audio codecs with stereo
  headphone amplifier, as well as multiple inputs and outputs programmable in
  single-ended or fully differential configurations.

  The serial control bus supports SPI or I2C protocols, while the serial audio
  data bus is programmable for I2S, left/right-justified, DSP, or TDM modes.

  The following pins can be referred in the sound node's audio routing property:

  CODEC output pins:
     LLOUT
     RLOUT
     MONO_LOUT
     HPLOUT
     HPROUT
     HPLCOM
     HPRCOM

  CODEC input pins for TLV320AIC3104:
     MIC2L
     MIC2R
     LINE1L
     LINE1R

  CODEC input pins for other compatible codecs:
     MIC3L
     MIC3R
     LINE1L
     LINE2L
     LINE1R
     LINE2R

maintainers:
  - Jai Luthra <j-luthra@ti.com>

properties:
  compatible:
    enum:
      - ti,tlv320aic3x
      - ti,tlv320aic33
      - ti,tlv320aic3007
      - ti,tlv320aic3106
      - ti,tlv320aic3104

  reg:
    maxItems: 1

  reset-gpios:
    maxItems: 1
    description:
      GPIO specification for the active low RESET input.

  gpio-reset:
    $ref: /schemas/types.yaml#/definitions/uint32-matrix
    maxItems: 1
    description:
      Deprecated, please use reset-gpios instead.
    deprecated: true

  ai3x-gpio-func:
    description: AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
    $ref: /schemas/types.yaml#/definitions/uint32-array
    maxItems: 2

  ai3x-micbias-vg:
    description: MicBias required voltage. If node is omitted then MicBias is powered down.
    $ref: /schemas/types.yaml#/definitions/uint32
    oneOf:
      - const: 1
        description: MICBIAS output is powered to 2.0V.
      - const: 2
        description: MICBIAS output is powered to 2.5V.
      - const: 3
        description: MICBIAS output is connected to AVDD.

  ai3x-ocmv:
    description: Output Common-Mode Voltage selection.
    $ref: /schemas/types.yaml#/definitions/uint32
    oneOf:
      - const: 0
        description: 1.35V
      - const: 1
        description: 1.5V
      - const: 2
        description: 1.65V
      - const: 3
        description: 1.8V

  AVDD-supply:
    description: Analog DAC voltage.

  IOVDD-supply:
    description: I/O voltage.

  DRVDD-supply:
    description: ADC analog and output driver voltage.

  DVDD-supply:
    description: Digital core voltage.

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

  clocks:
    maxItems: 1

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

required:
  - compatible
  - reg

additionalProperties: false

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

      tlv320aic3x_i2c: audio-codec@1b {
        compatible = "ti,tlv320aic3x";
        reg = <0x1b>;

        reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;

        AVDD-supply = <&regulator>;
        IOVDD-supply = <&regulator>;
        DRVDD-supply = <&regulator>;
        DVDD-supply = <&regulator>;
      };
    };

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

      tlv320aic3x_spi: audio-codec@0 {
        compatible = "ti,tlv320aic3x";
        reg = <0>; /* CS number */
        #sound-dai-cells = <0>;

        AVDD-supply = <&regulator>;
        IOVDD-supply = <&regulator>;
        DRVDD-supply = <&regulator>;
        DVDD-supply = <&regulator>;
        ai3x-ocmv = <0>;
      };
    };

...