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