xref: /freebsd/sys/contrib/device-tree/Bindings/sound/ti,tlv320adc3xxx.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2e67e8565SEmmanuel Vadot%YAML 1.2
3e67e8565SEmmanuel Vadot---
4e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/ti,tlv320adc3xxx.yaml#
5e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6e67e8565SEmmanuel Vadot
7e67e8565SEmmanuel Vadottitle: Texas Instruments TLV320ADC3001/TLV320ADC3101 Stereo ADC
8e67e8565SEmmanuel Vadot
9e67e8565SEmmanuel Vadotmaintainers:
10e67e8565SEmmanuel Vadot  - Ricard Wanderlof <ricardw@axis.com>
11e67e8565SEmmanuel Vadot
12e67e8565SEmmanuel Vadotdescription: |
13e67e8565SEmmanuel Vadot  Texas Instruments TLV320ADC3001 and TLV320ADC3101 Stereo ADC
14e67e8565SEmmanuel Vadot  https://www.ti.com/product/TLV320ADC3001
15e67e8565SEmmanuel Vadot  https://www.ti.com/product/TLV320ADC3101
16e67e8565SEmmanuel Vadot
17*8bab661aSEmmanuel VadotallOf:
18*8bab661aSEmmanuel Vadot  - $ref: dai-common.yaml#
19*8bab661aSEmmanuel Vadot
20e67e8565SEmmanuel Vadotproperties:
21e67e8565SEmmanuel Vadot  compatible:
22e67e8565SEmmanuel Vadot    enum:
23e67e8565SEmmanuel Vadot      - ti,tlv320adc3001
24e67e8565SEmmanuel Vadot      - ti,tlv320adc3101
25e67e8565SEmmanuel Vadot
26e67e8565SEmmanuel Vadot  reg:
27e67e8565SEmmanuel Vadot    maxItems: 1
28e67e8565SEmmanuel Vadot    description: I2C address
29e67e8565SEmmanuel Vadot
30e67e8565SEmmanuel Vadot  '#sound-dai-cells':
31e67e8565SEmmanuel Vadot    const: 0
32e67e8565SEmmanuel Vadot
33e67e8565SEmmanuel Vadot  '#gpio-cells':
34e67e8565SEmmanuel Vadot    const: 2
35e67e8565SEmmanuel Vadot
36e67e8565SEmmanuel Vadot  gpio-controller: true
37e67e8565SEmmanuel Vadot
38e67e8565SEmmanuel Vadot  reset-gpios:
39e67e8565SEmmanuel Vadot    maxItems: 1
40e67e8565SEmmanuel Vadot    description: GPIO pin used for codec reset (RESET pin)
41e67e8565SEmmanuel Vadot
42e67e8565SEmmanuel Vadot  clocks:
43e67e8565SEmmanuel Vadot    maxItems: 1
44e67e8565SEmmanuel Vadot    description: Master clock (MCLK)
45e67e8565SEmmanuel Vadot
46e67e8565SEmmanuel Vadot  ti,dmdin-gpio1:
47e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
48e67e8565SEmmanuel Vadot    enum:
49e67e8565SEmmanuel Vadot      - 0 # ADC3XXX_GPIO_DISABLED       - I/O buffers powered down and not used
50e67e8565SEmmanuel Vadot      - 1 # ADC3XXX_GPIO_INPUT          - Various non-GPIO input functions
51e67e8565SEmmanuel Vadot      - 2 # ADC3XXX_GPIO_GPI            - General purpose input
52e67e8565SEmmanuel Vadot      - 3 # ADC3XXX_GPIO_GPO            - General purpose output
53e67e8565SEmmanuel Vadot      - 4 # ADC3XXX_GPIO_CLKOUT         - Clock source set in CLKOUT_MUX reg
54e67e8565SEmmanuel Vadot      - 5 # ADC3XXX_GPIO_INT1           - INT1 output
55e67e8565SEmmanuel Vadot      - 6 # ADC3XXX_GPIO_SECONDARY_BCLK - Codec interface secondary BCLK
56e67e8565SEmmanuel Vadot      - 7 # ADC3XXX_GPIO_SECONDARY_WCLK - Codec interface secondary WCLK
57e67e8565SEmmanuel Vadot    default: 0
58e67e8565SEmmanuel Vadot    description: |
59e67e8565SEmmanuel Vadot      Configuration for DMDIN/GPIO1 pin.
60e67e8565SEmmanuel Vadot
61e67e8565SEmmanuel Vadot      When ADC3XXX_GPIO_GPO is configured, this causes corresponding the
62e67e8565SEmmanuel Vadot      ALSA control "GPIOx Output" to appear, as a switch control.
63e67e8565SEmmanuel Vadot
64e67e8565SEmmanuel Vadot  ti,dmclk-gpio2:
65e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
66e67e8565SEmmanuel Vadot    enum:
67e67e8565SEmmanuel Vadot      - 0 # ADC3XXX_GPIO_DISABLED       - I/O buffers powered down and not used
68e67e8565SEmmanuel Vadot      - 1 # ADC3XXX_GPIO_INPUT          - Various non-GPIO input functions
69e67e8565SEmmanuel Vadot      - 2 # ADC3XXX_GPIO_GPI            - General purpose input
70e67e8565SEmmanuel Vadot      - 3 # ADC3XXX_GPIO_GPO            - General purpose output
71e67e8565SEmmanuel Vadot      - 4 # ADC3XXX_GPIO_CLKOUT         - Clock source set in CLKOUT_MUX reg
72e67e8565SEmmanuel Vadot      - 5 # ADC3XXX_GPIO_INT1           - INT1 output
73e67e8565SEmmanuel Vadot      - 6 # ADC3XXX_GPIO_SECONDARY_BCLK - Codec interface secondary BCLK
74e67e8565SEmmanuel Vadot      - 7 # ADC3XXX_GPIO_SECONDARY_WCLK - Codec interface secondary WCLK
75e67e8565SEmmanuel Vadot    default: 0
76e67e8565SEmmanuel Vadot    description: |
77e67e8565SEmmanuel Vadot      Configuration for DMCLK/GPIO2 pin.
78e67e8565SEmmanuel Vadot
79e67e8565SEmmanuel Vadot      When ADC3XXX_GPIO_GPO is configured, this causes corresponding the
80e67e8565SEmmanuel Vadot      ALSA control "GPIOx Output" to appear, as a switch control.
81e67e8565SEmmanuel Vadot
82e67e8565SEmmanuel Vadot      Note that there is currently no support for reading the GPIO pins as
83e67e8565SEmmanuel Vadot      inputs.
84e67e8565SEmmanuel Vadot
85e67e8565SEmmanuel Vadot  ti,micbias1-vg:
86e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
87e67e8565SEmmanuel Vadot    enum:
88e67e8565SEmmanuel Vadot      - 0 # ADC3XXX_MICBIAS_OFF		- Mic bias is powered down
89e67e8565SEmmanuel Vadot      - 1 # ADC3XXX_MICBIAS_2_0V	- Mic bias is set to 2.0V
90e67e8565SEmmanuel Vadot      - 2 # ADC3XXX_MICBIAS_2_5V	- Mic bias is set to 2.5V
91e67e8565SEmmanuel Vadot      - 3 # ADC3XXX_MICBIAS_AVDD	- Mic bias is same as AVDD supply
92e67e8565SEmmanuel Vadot    default: 0
93e67e8565SEmmanuel Vadot    description: |
94e67e8565SEmmanuel Vadot      Mic bias voltage output on MICBIAS1 pin
95e67e8565SEmmanuel Vadot
96e67e8565SEmmanuel Vadot  ti,micbias2-vg:
97e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
98e67e8565SEmmanuel Vadot    enum:
99e67e8565SEmmanuel Vadot      - 0 # ADC3XXX_MICBIAS_OFF		- Mic bias is powered down
100e67e8565SEmmanuel Vadot      - 1 # ADC3XXX_MICBIAS_2_0V	- Mic bias is set to 2.0V
101e67e8565SEmmanuel Vadot      - 2 # ADC3XXX_MICBIAS_2_5V	- Mic bias is set to 2.5V
102e67e8565SEmmanuel Vadot      - 3 # ADC3XXX_MICBIAS_AVDD	- Mic bias is same as AVDD supply
103e67e8565SEmmanuel Vadot    default: 0
104e67e8565SEmmanuel Vadot    description: |
105e67e8565SEmmanuel Vadot      Mic bias voltage output on MICBIAS2 pin
106e67e8565SEmmanuel Vadot
107e67e8565SEmmanuel Vadotrequired:
108e67e8565SEmmanuel Vadot  - compatible
109e67e8565SEmmanuel Vadot  - reg
110e67e8565SEmmanuel Vadot  - clocks
111e67e8565SEmmanuel Vadot
112*8bab661aSEmmanuel VadotunevaluatedProperties: false
113e67e8565SEmmanuel Vadot
114e67e8565SEmmanuel Vadotexamples:
115e67e8565SEmmanuel Vadot  - |
116e67e8565SEmmanuel Vadot
117e67e8565SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
118e67e8565SEmmanuel Vadot    #include <dt-bindings/sound/tlv320adc3xxx.h>
119e67e8565SEmmanuel Vadot
120e67e8565SEmmanuel Vadot    i2c {
121e67e8565SEmmanuel Vadot        #address-cells = <1>;
122e67e8565SEmmanuel Vadot        #size-cells = <0>;
123e67e8565SEmmanuel Vadot        tlv320adc3101: audio-codec@18 {
124e67e8565SEmmanuel Vadot            compatible = "ti,tlv320adc3101";
125e67e8565SEmmanuel Vadot            reg = <0x18>;
126e67e8565SEmmanuel Vadot            reset-gpios = <&gpio_pc 3 GPIO_ACTIVE_LOW>;
127e67e8565SEmmanuel Vadot            clocks = <&audio_mclk>;
128e67e8565SEmmanuel Vadot            gpio-controller;
129e67e8565SEmmanuel Vadot            #gpio-cells = <2>;
130e67e8565SEmmanuel Vadot            ti,dmdin-gpio1 = <ADC3XXX_GPIO_GPO>;
131e67e8565SEmmanuel Vadot            ti,micbias1-vg = <ADC3XXX_MICBIAS_AVDD>;
132e67e8565SEmmanuel Vadot        };
133e67e8565SEmmanuel Vadot    };
134e67e8565SEmmanuel Vadot
135e67e8565SEmmanuel Vadot    audio_mclk: clock {
136e67e8565SEmmanuel Vadot        compatible = "fixed-clock";
137e67e8565SEmmanuel Vadot        #clock-cells = <0>;
138e67e8565SEmmanuel Vadot        clock-frequency = <24576000>;
139e67e8565SEmmanuel Vadot    };
140e67e8565SEmmanuel Vadot...
141