Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Jarkko Nikula | 5193d62 | 2010-05-05 13:02:03 +0300 | [diff] [blame] | 2 | /* |
| 3 | * Platform data for Texas Instruments TLV320AIC3x codec |
| 4 | * |
Jarkko Nikula | 7ec41ee | 2011-08-11 15:44:57 +0300 | [diff] [blame] | 5 | * Author: Jarkko Nikula <jarkko.nikula@bitmer.com> |
Jarkko Nikula | 5193d62 | 2010-05-05 13:02:03 +0300 | [diff] [blame] | 6 | */ |
| 7 | #ifndef __TLV320AIC3x_H__ |
| 8 | #define __TLV320AIC3x_H__ |
| 9 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 10 | /* GPIO API */ |
| 11 | enum { |
| 12 | AIC3X_GPIO1_FUNC_DISABLED = 0, |
| 13 | AIC3X_GPIO1_FUNC_AUDIO_WORDCLK_ADC = 1, |
| 14 | AIC3X_GPIO1_FUNC_CLOCK_MUX = 2, |
| 15 | AIC3X_GPIO1_FUNC_CLOCK_MUX_DIV2 = 3, |
| 16 | AIC3X_GPIO1_FUNC_CLOCK_MUX_DIV4 = 4, |
| 17 | AIC3X_GPIO1_FUNC_CLOCK_MUX_DIV8 = 5, |
| 18 | AIC3X_GPIO1_FUNC_SHORT_CIRCUIT_IRQ = 6, |
| 19 | AIC3X_GPIO1_FUNC_AGC_NOISE_IRQ = 7, |
| 20 | AIC3X_GPIO1_FUNC_INPUT = 8, |
| 21 | AIC3X_GPIO1_FUNC_OUTPUT = 9, |
| 22 | AIC3X_GPIO1_FUNC_DIGITAL_MIC_MODCLK = 10, |
| 23 | AIC3X_GPIO1_FUNC_AUDIO_WORDCLK = 11, |
| 24 | AIC3X_GPIO1_FUNC_BUTTON_IRQ = 12, |
| 25 | AIC3X_GPIO1_FUNC_HEADSET_DETECT_IRQ = 13, |
| 26 | AIC3X_GPIO1_FUNC_HEADSET_DETECT_OR_BUTTON_IRQ = 14, |
| 27 | AIC3X_GPIO1_FUNC_ALL_IRQ = 16 |
Jarkko Nikula | 5193d62 | 2010-05-05 13:02:03 +0300 | [diff] [blame] | 28 | }; |
| 29 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 30 | enum { |
| 31 | AIC3X_GPIO2_FUNC_DISABLED = 0, |
| 32 | AIC3X_GPIO2_FUNC_HEADSET_DETECT_IRQ = 2, |
| 33 | AIC3X_GPIO2_FUNC_INPUT = 3, |
| 34 | AIC3X_GPIO2_FUNC_OUTPUT = 4, |
| 35 | AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT = 5, |
| 36 | AIC3X_GPIO2_FUNC_AUDIO_BITCLK = 8, |
| 37 | AIC3X_GPIO2_FUNC_HEADSET_DETECT_OR_BUTTON_IRQ = 9, |
| 38 | AIC3X_GPIO2_FUNC_ALL_IRQ = 10, |
| 39 | AIC3X_GPIO2_FUNC_SHORT_CIRCUIT_OR_AGC_IRQ = 11, |
| 40 | AIC3X_GPIO2_FUNC_HEADSET_OR_BUTTON_PRESS_OR_SHORT_CIRCUIT_IRQ = 12, |
| 41 | AIC3X_GPIO2_FUNC_SHORT_CIRCUIT_IRQ = 13, |
| 42 | AIC3X_GPIO2_FUNC_AGC_NOISE_IRQ = 14, |
| 43 | AIC3X_GPIO2_FUNC_BUTTON_PRESS_IRQ = 15 |
| 44 | }; |
| 45 | |
Hebbar Gururaja | e2e8bfd | 2013-01-31 18:23:04 +0530 | [diff] [blame] | 46 | enum aic3x_micbias_voltage { |
| 47 | AIC3X_MICBIAS_OFF = 0, |
| 48 | AIC3X_MICBIAS_2_0V = 1, |
| 49 | AIC3X_MICBIAS_2_5V = 2, |
| 50 | AIC3X_MICBIAS_AVDDV = 3, |
| 51 | }; |
| 52 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 53 | struct aic3x_setup_data { |
| 54 | unsigned int gpio_func[2]; |
| 55 | }; |
| 56 | |
| 57 | struct aic3x_pdata { |
| 58 | int gpio_reset; /* < 0 if not used */ |
| 59 | struct aic3x_setup_data *setup; |
Hebbar Gururaja | e2e8bfd | 2013-01-31 18:23:04 +0530 | [diff] [blame] | 60 | |
| 61 | /* Selects the micbias voltage */ |
| 62 | enum aic3x_micbias_voltage micbias_vg; |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 63 | }; |
| 64 | |
| 65 | #endif |