#ifndef __AON_PLL_H__
#define __AON_PLL_H__

#include "sp2cw3.h"

/*******************************************************************************
 * Auto-generated Content
 ******************************************************************************/


/***********************************PLL_CORE_CTL***********************************/
#define AON_PLL_CORE_CTL_BYPASS                                 (0x1UL<<30)
#define AON_PLL_CORE_CTL_PREDIV_MASK                            (0x1fUL<<25)
#define AON_PLL_CORE_CTL_LOOPDIV_MASK                           (0x1ffUL<<16)
#define AON_PLL_CORE_CTL_POSTDIV_MASK                           (0xfUL<<12)
#define AON_PLL_CORE_CTL_FREQ_MASK                              (0x7fUL<<4)
#define AON_PLL_CORE_CTL_CUST_HARDWAREMODE                      (0x0UL<<3)
#define AON_PLL_CORE_CTL_CUST_SOFTWAREMODE                      (0x1UL<<3)
#define AON_PLL_CORE_CTL_CUST_MASK                              (0x1UL<<3)
#define AON_PLL_CORE_CTL_SEL_MASK                               (0x3UL<<1)
#define AON_PLL_CORE_CTL_EN                                     (0x1UL<<0)
/****PLL_CORE_CTL end****/


/***********************************PLL_CORE_DBG***********************************/
#define AON_PLL_CORE_DBG_TSTEN                                  (0x1UL<<10)
#define AON_PLL_CORE_DBG_TSTSEL_MASK                            (0x3UL<<8)
#define AON_PLL_CORE_DBG_SETVC_MASK                             (0x7UL<<5)
#define AON_PLL_CORE_DBG_FORCEVC                                (0x1UL<<4)
#define AON_PLL_CORE_DBG_LPF_RS_MASK                            (0x3UL<<2)
#define AON_PLL_CORE_DBG_ICHP_MASK                              (0x3UL<<0)
/****PLL_CORE_DBG end****/


/***********************************PLL_AUDIO_CTL0***********************************/
#define AON_PLL_AUDIO_CTL0_INTEG_MASK                           (0x1fUL<<16)
#define AON_PLL_AUDIO_CTL0_POSTDIV_32                           (0x0UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_33                           (0x1UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_DONOTSUPPORT                 (0x2UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_03                           (0x3UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_04                           (0x4UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_05                           (0x5UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_06                           (0x6UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_07                           (0x7UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_08                           (0x8UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_09                           (0x9UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_10                           (0xaUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_11                           (0xbUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_12                           (0xcUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_13                           (0xdUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_14                           (0xeUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_15                           (0xfUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_16                           (0x10UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_17                           (0x11UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_18                           (0x12UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_19                           (0x13UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_20                           (0x14UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_21                           (0x15UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_22                           (0x16UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_23                           (0x17UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_24                           (0x18UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_25                           (0x19UL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_26                           (0x1aUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_27                           (0x1bUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_28                           (0x1cUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_29                           (0x1dUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_30                           (0x1eUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_31                           (0x1fUL<<8)
#define AON_PLL_AUDIO_CTL0_POSTDIV_MASK                         (0x1fUL<<8)
#define AON_PLL_AUDIO_CTL0_ICP_0UA                              (0x0UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_1UA                              (0x1UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_2UA                              (0x2UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_3UA                              (0x3UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_4UA                              (0x4UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_5UA                              (0x5UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_6UA                              (0x6UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_7UA                              (0x7UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_8UA                              (0x8UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_9UA                              (0x9UL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_10UA                             (0xaUL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_11UA                             (0xbUL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_12UA                             (0xcUL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_13UA                             (0xdUL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_14UA                             (0xeUL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_15UA                             (0xfUL<<4)
#define AON_PLL_AUDIO_CTL0_ICP_MASK                             (0xfUL<<4)
#define AON_PLL_AUDIO_CTL0_SEL_OSC_DEV                          (0x0UL<<2)
#define AON_PLL_AUDIO_CTL0_SEL_OSC_XTAL                         (0x1UL<<2)
#define AON_PLL_AUDIO_CTL0_SEL_OSC_USB                          (0x2UL<<2)
#define AON_PLL_AUDIO_CTL0_SEL_EXT_CLK2                         (0x3UL<<2)
#define AON_PLL_AUDIO_CTL0_SEL_MASK                             (0x3UL<<2)
#define AON_PLL_AUDIO_CTL0_FRAC_EN_DISABLE                      (0x0UL<<1)
#define AON_PLL_AUDIO_CTL0_FRAC_EN_ENABLE                       (0x1UL<<1)
#define AON_PLL_AUDIO_CTL0_FRAC_EN_MASK                         (0x1UL<<1)
#define AON_PLL_AUDIO_CTL0_EN_DISABLE                           (0x0UL<<0)
#define AON_PLL_AUDIO_CTL0_EN_ENABLE                            (0x1UL<<0)
#define AON_PLL_AUDIO_CTL0_EN_MASK                              (0x1UL<<0)
/****PLL_AUDIO_CTL0 end****/


/***********************************PLL_AUDIO_CTL1***********************************/
#define AON_PLL_AUDIO_CTL1_FRAC(_m)                             (((_m)*2)<<0)
#define AON_PLL_AUDIO_CTL1_FRAC_MASK                            (0xfffffUL<<0)
/****PLL_AUDIO_CTL1 end****/


/***********************************PLL_LOCK_STAT***********************************/
#define AON_PLL_LOCK_STAT_PLL_AUDIO_LOCK_DIR                    (0x1UL<<3)
#define AON_PLL_LOCK_STAT_PLL_AUDIO_UNLOCK                      (0x1UL<<2)
#define AON_PLL_LOCK_STAT_PLL_AUDIO_LOCK                        (0x1UL<<1)
#define AON_PLL_LOCK_STAT_PLL_CORE_LOCK                         (0x1UL<<0)
/****PLL_LOCK_STAT end****/


/***********************************AON_PLL register***********************************/
typedef struct
{
    __IO    uint32_t    CORE_CTL;                                /* 0x0    Core PLL Control */
    __IO    uint32_t    CORE_DBG;                                /* 0x4    Core PLL Debug */
    uint32_t    RESERVED0[2];
    __IO    uint32_t    AUDIO_CTL0;                              /* 0x10    Audio PLL Control0 */
    __IO    uint32_t    AUDIO_CTL1;                              /* 0x14    Audio PLL Control1 */
    uint32_t    RESERVED1[2];
    __I     uint32_t    LOCK_STAT;                               /* 0x20    PLL Lock State */
} AON_PLL_RegDef;
/****AON_PLL end****/

/*******************************************************************************
 * User-defined Contents
 ******************************************************************************/



#endif
