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 178bab661aSEmmanuel VadotallOf: 188bab661aSEmmanuel Vadot - $ref: dai-common.yaml# 198bab661aSEmmanuel 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 61*0e8011faSEmmanuel Vadot When ADC3XXX_GPIO_GPO is selected, the pin may be controlled via the 62*0e8011faSEmmanuel Vadot GPIO framework, as pin number 0 on the device. 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 79*0e8011faSEmmanuel Vadot When ADC3XXX_GPIO_GPO is selected, the pin may be controlled via the 80*0e8011faSEmmanuel Vadot GPIO framework, as pin number 1 on the device. 81e67e8565SEmmanuel Vadot 82e67e8565SEmmanuel Vadot Note that there is currently no support for reading the GPIO pins as 83e67e8565SEmmanuel Vadot inputs. 84e67e8565SEmmanuel Vadot 85*0e8011faSEmmanuel Vadot ti,micbias1-gpo: 86*0e8011faSEmmanuel Vadot type: boolean 87*0e8011faSEmmanuel Vadot description: | 88*0e8011faSEmmanuel Vadot When set, the MICBIAS1 pin may be controlled via the GPIO framework, 89*0e8011faSEmmanuel Vadot as pin number 3 on the device. 90*0e8011faSEmmanuel Vadot 91*0e8011faSEmmanuel Vadot In this mode, when the pin is activated, it will be set to the voltage 92*0e8011faSEmmanuel Vadot specified by the ti,micbias1-vg property. When deactivated, the pin will 93*0e8011faSEmmanuel Vadot float. 94*0e8011faSEmmanuel Vadot 95*0e8011faSEmmanuel Vadot ti,micbias2-gpo: 96*0e8011faSEmmanuel Vadot type: boolean 97*0e8011faSEmmanuel Vadot description: | 98*0e8011faSEmmanuel Vadot When set, the MICBIAS2 pin may be controlled via the GPIO framework, 99*0e8011faSEmmanuel Vadot as pin number 4 on the device. 100*0e8011faSEmmanuel Vadot 101*0e8011faSEmmanuel Vadot In this mode, when the pin is activated, it will be set to the voltage 102*0e8011faSEmmanuel Vadot specified by the ti,micbias2-vg property. When deactivated, the pin will 103*0e8011faSEmmanuel Vadot float. 104*0e8011faSEmmanuel Vadot 105e67e8565SEmmanuel Vadot ti,micbias1-vg: 106e67e8565SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 107e67e8565SEmmanuel Vadot enum: 108e67e8565SEmmanuel Vadot - 0 # ADC3XXX_MICBIAS_OFF - Mic bias is powered down 109e67e8565SEmmanuel Vadot - 1 # ADC3XXX_MICBIAS_2_0V - Mic bias is set to 2.0V 110e67e8565SEmmanuel Vadot - 2 # ADC3XXX_MICBIAS_2_5V - Mic bias is set to 2.5V 111e67e8565SEmmanuel Vadot - 3 # ADC3XXX_MICBIAS_AVDD - Mic bias is same as AVDD supply 112e67e8565SEmmanuel Vadot default: 0 113e67e8565SEmmanuel Vadot description: | 114e67e8565SEmmanuel Vadot Mic bias voltage output on MICBIAS1 pin 115e67e8565SEmmanuel Vadot 116e67e8565SEmmanuel Vadot ti,micbias2-vg: 117e67e8565SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 118e67e8565SEmmanuel Vadot enum: 119e67e8565SEmmanuel Vadot - 0 # ADC3XXX_MICBIAS_OFF - Mic bias is powered down 120e67e8565SEmmanuel Vadot - 1 # ADC3XXX_MICBIAS_2_0V - Mic bias is set to 2.0V 121e67e8565SEmmanuel Vadot - 2 # ADC3XXX_MICBIAS_2_5V - Mic bias is set to 2.5V 122e67e8565SEmmanuel Vadot - 3 # ADC3XXX_MICBIAS_AVDD - Mic bias is same as AVDD supply 123e67e8565SEmmanuel Vadot default: 0 124e67e8565SEmmanuel Vadot description: | 125e67e8565SEmmanuel Vadot Mic bias voltage output on MICBIAS2 pin 126e67e8565SEmmanuel Vadot 127*0e8011faSEmmanuel Vadotdependencies: 128*0e8011faSEmmanuel Vadot ti,micbias1-gpo: ['ti,micbias1-vg'] 129*0e8011faSEmmanuel Vadot ti,micbias2-gpo: ['ti,micbias2-vg'] 130*0e8011faSEmmanuel Vadot 131e67e8565SEmmanuel Vadotrequired: 132e67e8565SEmmanuel Vadot - compatible 133e67e8565SEmmanuel Vadot - reg 134e67e8565SEmmanuel Vadot - clocks 135e67e8565SEmmanuel Vadot 1368bab661aSEmmanuel VadotunevaluatedProperties: false 137e67e8565SEmmanuel Vadot 138e67e8565SEmmanuel Vadotexamples: 139e67e8565SEmmanuel Vadot - | 140e67e8565SEmmanuel Vadot 141e67e8565SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 142e67e8565SEmmanuel Vadot #include <dt-bindings/sound/tlv320adc3xxx.h> 143e67e8565SEmmanuel Vadot 144e67e8565SEmmanuel Vadot i2c { 145e67e8565SEmmanuel Vadot #address-cells = <1>; 146e67e8565SEmmanuel Vadot #size-cells = <0>; 147e67e8565SEmmanuel Vadot tlv320adc3101: audio-codec@18 { 148e67e8565SEmmanuel Vadot compatible = "ti,tlv320adc3101"; 149e67e8565SEmmanuel Vadot reg = <0x18>; 150e67e8565SEmmanuel Vadot reset-gpios = <&gpio_pc 3 GPIO_ACTIVE_LOW>; 151e67e8565SEmmanuel Vadot clocks = <&audio_mclk>; 152e67e8565SEmmanuel Vadot gpio-controller; 153e67e8565SEmmanuel Vadot #gpio-cells = <2>; 154e67e8565SEmmanuel Vadot ti,dmdin-gpio1 = <ADC3XXX_GPIO_GPO>; 155e67e8565SEmmanuel Vadot ti,micbias1-vg = <ADC3XXX_MICBIAS_AVDD>; 156e67e8565SEmmanuel Vadot }; 157e67e8565SEmmanuel Vadot }; 158e67e8565SEmmanuel Vadot 159e67e8565SEmmanuel Vadot audio_mclk: clock { 160e67e8565SEmmanuel Vadot compatible = "fixed-clock"; 161e67e8565SEmmanuel Vadot #clock-cells = <0>; 162e67e8565SEmmanuel Vadot clock-frequency = <24576000>; 163e67e8565SEmmanuel Vadot }; 164e67e8565SEmmanuel Vadot... 165