| /******************************************************************************** |
| * Marvell GPL License Option |
| * |
| * If you received this File from Marvell, you may opt to use, redistribute and/or |
| * modify this File in accordance with the terms and conditions of the General |
| * Public License Version 2, June 1991 (the "GPL License"), a copy of which is |
| * available along with the File in the license.txt file or by writing to the Free |
| * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or |
| * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. |
| * |
| * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED |
| * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY |
| * DISCLAIMED. The GPL License provides additional details about this warranty |
| * disclaimer. |
| ******************************************************************************/ |
| |
| #ifndef _AVPLL_H_ |
| #define _AVPLL_H_ |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| // audio channel frequency |
| typedef enum |
| { |
| AUDIO_FREQ_8P4672_MHZ=0, |
| AUDIO_FREQ_11P2896_MHZ, |
| AUDIO_FREQ_16P9344_MHZ, |
| AUDIO_FREQ_22P5792_MHZ, |
| AUDIO_FREQ_12P288_MHZ, |
| AUDIO_FREQ_24P576_MHZ, |
| AUDIO_FREQ_16P384_MHZ, |
| AUDIO_FREQ_65P536_MHZ, |
| AUDIO_FREQ_90P3168_MHZ, |
| AUDIO_FREQ_98P304_MHZ, |
| |
| AUDIO_FREQ_22P636_MHZ, |
| AUDIO_FREQ_24P636_MHZ, |
| AUDIO_FREQ_16P424_MHZ, |
| AUDIO_FREQ_90P544_MHZ, |
| AUDIO_FREQ_98P544_MHZ, |
| AUDIO_FREQ_65P696_MHZ, |
| |
| AUDIO_FREQ_22P522_MHZ, |
| AUDIO_FREQ_24P514_MHZ, |
| AUDIO_FREQ_16P342_MHZ, |
| AUDIO_FREQ_90P088_MHZ, |
| AUDIO_FREQ_98P056_MHZ, |
| AUDIO_FREQ_65P368_MHZ, |
| } AUDIO_CLK_FREQ; |
| |
| typedef enum |
| { |
| AVPLL_VCO_FREQ_1_080G=0, |
| AVPLL_VCO_FREQ_1_260G, |
| AVPLL_VCO_FREQ_1_350G, |
| AVPLL_VCO_FREQ_1_485G, |
| AVPLL_VCO_FREQ_1_512G, |
| AVPLL_VCO_FREQ_1_620G, |
| AVPLL_VCO_FREQ_1_856G, |
| AVPLL_VCO_FREQ_2_227G, |
| AVPLL_VCO_FREQ_1_353G, |
| AVPLL_VCO_FREQ_MAX |
| }AVPLL_VCO_FREQ; |
| |
| #if ((BERLIN_CHIP_VERSION >= BERLIN_BG2_Q)) |
| typedef enum |
| { |
| AVPLL_A = 0, |
| AVPLL_B, |
| AVPLL_MAX |
| }AVPLL_TREE; |
| |
| typedef enum |
| { |
| AVPLL_E_OK = 0, |
| AVPLL_E_BADPARAM = 2, |
| AVPLL_E_MAX |
| }AVPLL_ERROR_CODES; |
| #endif |
| |
| void AVPLL_InitClock(void); |
| void AVPLL_Enable(void); |
| void AVPLL_EnableChannel(int avpll, int id, int on); |
| void AVPLL_EnableMicClk(int en); |
| #if (BERLIN_CHIP_VERSION == BERLIN_BG2CDP) |
| int AVPLL_Set(int groupId, int chanId, unsigned int avFreq); |
| #else |
| int AVPLL_Set(int groupId, int chanId, int avFreqIndex); |
| #endif |
| int AVPLL_SetWithPPM1K(int groupId, int chanId, int refFreqIndex, float avFreq, int ppm1k_en); |
| void AVPLL_GetPPM(int grp, double *ppm_base, double *ppm_now); |
| double AVPLL_AdjustPPM(double ppm_delta, int grp); |
| |
| #if (BERLIN_CHIP_VERSION >= BERLIN_BG2_Q) |
| int AVPLL_SetVideoFreq(int avpllGroupId, int freqIndex, int hdmiMode, int frameRate, float overSampleRate, int chId); |
| int AVPLL_GetChannelOutputFreq(int AVPLLIndex, int chID); |
| int AVPLL_GetVcoFreq(int hdmiMode, int freqIndex); |
| #else |
| int diag_getVCOFreq(int hdmiMode, int freqIndex); |
| int diag_getChannelOutputFreq(int AVPLLIndex, int chID); |
| void diag_videoFreq_A(int freqIndex, int hdmiMode, int frameRate, float overSampleRate, int chId); |
| void diag_videoFreq_B(int freqIndex, int hdmiMode, int frameRate, float overSampleRate, int chId); |
| #endif |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif |
| |