1e047d037SRicard Wanderlof# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2e047d037SRicard Wanderlof%YAML 1.2 3e047d037SRicard Wanderlof--- 4e047d037SRicard Wanderlof$id: http://devicetree.org/schemas/sound/ti,tlv320adc3xxx.yaml# 5e047d037SRicard Wanderlof$schema: http://devicetree.org/meta-schemas/core.yaml# 6e047d037SRicard Wanderlof 7e047d037SRicard Wanderloftitle: Texas Instruments TLV320ADC3001/TLV320ADC3101 Stereo ADC 8e047d037SRicard Wanderlof 9e047d037SRicard Wanderlofmaintainers: 10e047d037SRicard Wanderlof - Ricard Wanderlof <ricardw@axis.com> 11e047d037SRicard Wanderlof 12e047d037SRicard Wanderlofdescription: | 13e047d037SRicard Wanderlof Texas Instruments TLV320ADC3001 and TLV320ADC3101 Stereo ADC 14e047d037SRicard Wanderlof https://www.ti.com/product/TLV320ADC3001 15e047d037SRicard Wanderlof https://www.ti.com/product/TLV320ADC3101 16e047d037SRicard Wanderlof 1758ae9a2aSKrzysztof KozlowskiallOf: 1858ae9a2aSKrzysztof Kozlowski - $ref: dai-common.yaml# 1958ae9a2aSKrzysztof Kozlowski 20e047d037SRicard Wanderlofproperties: 21e047d037SRicard Wanderlof compatible: 22e047d037SRicard Wanderlof enum: 23e047d037SRicard Wanderlof - ti,tlv320adc3001 24e047d037SRicard Wanderlof - ti,tlv320adc3101 25e047d037SRicard Wanderlof 26e047d037SRicard Wanderlof reg: 27e047d037SRicard Wanderlof maxItems: 1 28e047d037SRicard Wanderlof description: I2C address 29e047d037SRicard Wanderlof 30e047d037SRicard Wanderlof '#sound-dai-cells': 31e047d037SRicard Wanderlof const: 0 32e047d037SRicard Wanderlof 33e047d037SRicard Wanderlof '#gpio-cells': 34e047d037SRicard Wanderlof const: 2 35e047d037SRicard Wanderlof 36e047d037SRicard Wanderlof gpio-controller: true 37e047d037SRicard Wanderlof 38e047d037SRicard Wanderlof reset-gpios: 39e047d037SRicard Wanderlof maxItems: 1 40e047d037SRicard Wanderlof description: GPIO pin used for codec reset (RESET pin) 41e047d037SRicard Wanderlof 42e047d037SRicard Wanderlof clocks: 43e047d037SRicard Wanderlof maxItems: 1 44e047d037SRicard Wanderlof description: Master clock (MCLK) 45e047d037SRicard Wanderlof 46e047d037SRicard Wanderlof ti,dmdin-gpio1: 47e047d037SRicard Wanderlof $ref: /schemas/types.yaml#/definitions/uint32 48e047d037SRicard Wanderlof enum: 49e047d037SRicard Wanderlof - 0 # ADC3XXX_GPIO_DISABLED - I/O buffers powered down and not used 50e047d037SRicard Wanderlof - 1 # ADC3XXX_GPIO_INPUT - Various non-GPIO input functions 51e047d037SRicard Wanderlof - 2 # ADC3XXX_GPIO_GPI - General purpose input 52e047d037SRicard Wanderlof - 3 # ADC3XXX_GPIO_GPO - General purpose output 53e047d037SRicard Wanderlof - 4 # ADC3XXX_GPIO_CLKOUT - Clock source set in CLKOUT_MUX reg 54e047d037SRicard Wanderlof - 5 # ADC3XXX_GPIO_INT1 - INT1 output 55e047d037SRicard Wanderlof - 6 # ADC3XXX_GPIO_SECONDARY_BCLK - Codec interface secondary BCLK 56e047d037SRicard Wanderlof - 7 # ADC3XXX_GPIO_SECONDARY_WCLK - Codec interface secondary WCLK 57e047d037SRicard Wanderlof default: 0 58e047d037SRicard Wanderlof description: | 59e047d037SRicard Wanderlof Configuration for DMDIN/GPIO1 pin. 60e047d037SRicard Wanderlof 6139d762edSRicard Wanderlof When ADC3XXX_GPIO_GPO is selected, the pin may be controlled via the 6239d762edSRicard Wanderlof GPIO framework, as pin number 0 on the device. 63e047d037SRicard Wanderlof 64e047d037SRicard Wanderlof ti,dmclk-gpio2: 65e047d037SRicard Wanderlof $ref: /schemas/types.yaml#/definitions/uint32 66e047d037SRicard Wanderlof enum: 67e047d037SRicard Wanderlof - 0 # ADC3XXX_GPIO_DISABLED - I/O buffers powered down and not used 68e047d037SRicard Wanderlof - 1 # ADC3XXX_GPIO_INPUT - Various non-GPIO input functions 69e047d037SRicard Wanderlof - 2 # ADC3XXX_GPIO_GPI - General purpose input 70e047d037SRicard Wanderlof - 3 # ADC3XXX_GPIO_GPO - General purpose output 71e047d037SRicard Wanderlof - 4 # ADC3XXX_GPIO_CLKOUT - Clock source set in CLKOUT_MUX reg 72e047d037SRicard Wanderlof - 5 # ADC3XXX_GPIO_INT1 - INT1 output 73e047d037SRicard Wanderlof - 6 # ADC3XXX_GPIO_SECONDARY_BCLK - Codec interface secondary BCLK 74e047d037SRicard Wanderlof - 7 # ADC3XXX_GPIO_SECONDARY_WCLK - Codec interface secondary WCLK 75e047d037SRicard Wanderlof default: 0 76e047d037SRicard Wanderlof description: | 77e047d037SRicard Wanderlof Configuration for DMCLK/GPIO2 pin. 78e047d037SRicard Wanderlof 7939d762edSRicard Wanderlof When ADC3XXX_GPIO_GPO is selected, the pin may be controlled via the 8039d762edSRicard Wanderlof GPIO framework, as pin number 1 on the device. 81e047d037SRicard Wanderlof 82e047d037SRicard Wanderlof Note that there is currently no support for reading the GPIO pins as 83e047d037SRicard Wanderlof inputs. 84e047d037SRicard Wanderlof 85*4e617f0cSRicard Wanderlof ti,micbias1-gpo: 86*4e617f0cSRicard Wanderlof type: boolean 87*4e617f0cSRicard Wanderlof description: | 88*4e617f0cSRicard Wanderlof When set, the MICBIAS1 pin may be controlled via the GPIO framework, 89*4e617f0cSRicard Wanderlof as pin number 3 on the device. 90*4e617f0cSRicard Wanderlof 91*4e617f0cSRicard Wanderlof In this mode, when the pin is activated, it will be set to the voltage 92*4e617f0cSRicard Wanderlof specified by the ti,micbias1-vg property. When deactivated, the pin will 93*4e617f0cSRicard Wanderlof float. 94*4e617f0cSRicard Wanderlof 95*4e617f0cSRicard Wanderlof ti,micbias2-gpo: 96*4e617f0cSRicard Wanderlof type: boolean 97*4e617f0cSRicard Wanderlof description: | 98*4e617f0cSRicard Wanderlof When set, the MICBIAS2 pin may be controlled via the GPIO framework, 99*4e617f0cSRicard Wanderlof as pin number 4 on the device. 100*4e617f0cSRicard Wanderlof 101*4e617f0cSRicard Wanderlof In this mode, when the pin is activated, it will be set to the voltage 102*4e617f0cSRicard Wanderlof specified by the ti,micbias2-vg property. When deactivated, the pin will 103*4e617f0cSRicard Wanderlof float. 104*4e617f0cSRicard Wanderlof 105e047d037SRicard Wanderlof ti,micbias1-vg: 106e047d037SRicard Wanderlof $ref: /schemas/types.yaml#/definitions/uint32 107e047d037SRicard Wanderlof enum: 108e047d037SRicard Wanderlof - 0 # ADC3XXX_MICBIAS_OFF - Mic bias is powered down 109e047d037SRicard Wanderlof - 1 # ADC3XXX_MICBIAS_2_0V - Mic bias is set to 2.0V 110e047d037SRicard Wanderlof - 2 # ADC3XXX_MICBIAS_2_5V - Mic bias is set to 2.5V 111e047d037SRicard Wanderlof - 3 # ADC3XXX_MICBIAS_AVDD - Mic bias is same as AVDD supply 112e047d037SRicard Wanderlof default: 0 113e047d037SRicard Wanderlof description: | 114e047d037SRicard Wanderlof Mic bias voltage output on MICBIAS1 pin 115e047d037SRicard Wanderlof 116e047d037SRicard Wanderlof ti,micbias2-vg: 117e047d037SRicard Wanderlof $ref: /schemas/types.yaml#/definitions/uint32 118e047d037SRicard Wanderlof enum: 119e047d037SRicard Wanderlof - 0 # ADC3XXX_MICBIAS_OFF - Mic bias is powered down 120e047d037SRicard Wanderlof - 1 # ADC3XXX_MICBIAS_2_0V - Mic bias is set to 2.0V 121e047d037SRicard Wanderlof - 2 # ADC3XXX_MICBIAS_2_5V - Mic bias is set to 2.5V 122e047d037SRicard Wanderlof - 3 # ADC3XXX_MICBIAS_AVDD - Mic bias is same as AVDD supply 123e047d037SRicard Wanderlof default: 0 124e047d037SRicard Wanderlof description: | 125e047d037SRicard Wanderlof Mic bias voltage output on MICBIAS2 pin 126e047d037SRicard Wanderlof 127*4e617f0cSRicard Wanderlofdependencies: 128*4e617f0cSRicard Wanderlof ti,micbias1-gpo: ['ti,micbias1-vg'] 129*4e617f0cSRicard Wanderlof ti,micbias2-gpo: ['ti,micbias2-vg'] 130*4e617f0cSRicard Wanderlof 131e047d037SRicard Wanderlofrequired: 132e047d037SRicard Wanderlof - compatible 133e047d037SRicard Wanderlof - reg 134e047d037SRicard Wanderlof - clocks 135e047d037SRicard Wanderlof 13658ae9a2aSKrzysztof KozlowskiunevaluatedProperties: false 137e047d037SRicard Wanderlof 138e047d037SRicard Wanderlofexamples: 139e047d037SRicard Wanderlof - | 140e047d037SRicard Wanderlof 141e047d037SRicard Wanderlof #include <dt-bindings/gpio/gpio.h> 142e047d037SRicard Wanderlof #include <dt-bindings/sound/tlv320adc3xxx.h> 143e047d037SRicard Wanderlof 144e047d037SRicard Wanderlof i2c { 145e047d037SRicard Wanderlof #address-cells = <1>; 146e047d037SRicard Wanderlof #size-cells = <0>; 147e047d037SRicard Wanderlof tlv320adc3101: audio-codec@18 { 148e047d037SRicard Wanderlof compatible = "ti,tlv320adc3101"; 149e047d037SRicard Wanderlof reg = <0x18>; 150e047d037SRicard Wanderlof reset-gpios = <&gpio_pc 3 GPIO_ACTIVE_LOW>; 151e047d037SRicard Wanderlof clocks = <&audio_mclk>; 152e047d037SRicard Wanderlof gpio-controller; 153e047d037SRicard Wanderlof #gpio-cells = <2>; 154e047d037SRicard Wanderlof ti,dmdin-gpio1 = <ADC3XXX_GPIO_GPO>; 155e047d037SRicard Wanderlof ti,micbias1-vg = <ADC3XXX_MICBIAS_AVDD>; 156e047d037SRicard Wanderlof }; 157e047d037SRicard Wanderlof }; 158e047d037SRicard Wanderlof 159e047d037SRicard Wanderlof audio_mclk: clock { 160e047d037SRicard Wanderlof compatible = "fixed-clock"; 161e047d037SRicard Wanderlof #clock-cells = <0>; 162e047d037SRicard Wanderlof clock-frequency = <24576000>; 163e047d037SRicard Wanderlof }; 164e047d037SRicard Wanderlof... 165