2 * @brief LPC18xx/43xx chip clock list used by CGU and CCU drivers
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\r
9 * Software that is described herein is for illustrative purposes only
\r
10 * which provides customers with programming information regarding the
\r
11 * LPC products. This software is supplied "AS IS" without any warranties of
\r
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
13 * all warranties, express or implied, including all implied warranties of
\r
14 * merchantability, fitness for a particular purpose and non-infringement of
\r
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
16 * or liability for the use of the software, conveys no license or rights under any
\r
17 * patent, copyright, mask work right, or any other intellectual property rights in
\r
18 * or to any products. NXP Semiconductors reserves the right to make changes
\r
19 * in the software without notification. NXP Semiconductors also makes no
\r
20 * representation or warranty that such application will be suitable for the
\r
21 * specified use without further testing or modification.
\r
24 * Permission to use, copy, modify, and distribute this software and its
\r
25 * documentation is hereby granted, under NXP Semiconductors' and its
\r
26 * licensor's relevant copyrights in the software, without fee, provided that it
\r
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
28 * copyright, permission, and disclaimer notice must appear in all copies of
\r
32 #ifndef __CHIP_CLOCKS_H_
\r
33 #define __CHIP_CLOCKS_H_
\r
35 #include "sys_config.h"
\r
41 /** @ingroup CLOCK_18XX_43XX
\r
46 * @brief CGU clock input list
\r
47 * These are possible input clocks for the CGU and can come
\r
48 * from both external (crystal) and internal (PLL) sources. These
\r
49 * clock inputs can be routed to the base clocks (@ref CHIP_CGU_BASE_CLK_T).
\r
51 typedef enum CHIP_CGU_CLKIN {
\r
52 CLKIN_32K, /*!< External 32KHz input */
\r
53 CLKIN_IRC, /*!< Internal IRC (12MHz) input */
\r
54 CLKIN_ENET_RX, /*!< External ENET_RX pin input */
\r
55 CLKIN_ENET_TX, /*!< External ENET_TX pin input */
\r
56 CLKIN_CLKIN, /*!< External GPCLKIN pin input */
\r
58 CLKIN_CRYSTAL, /*!< External (main) crystal pin input */
\r
59 CLKIN_USBPLL, /*!< Internal USB PLL input */
\r
60 CLKIN_AUDIOPLL, /*!< Internal Audio PLL input */
\r
61 CLKIN_MAINPLL, /*!< Internal Main PLL input */
\r
64 CLKIN_IDIVA, /*!< Internal divider A input */
\r
65 CLKIN_IDIVB, /*!< Internal divider B input */
\r
66 CLKIN_IDIVC, /*!< Internal divider C input */
\r
67 CLKIN_IDIVD, /*!< Internal divider D input */
\r
68 CLKIN_IDIVE, /*!< Internal divider E input */
\r
69 CLKINPUT_PD /*!< External 32KHz input */
\r
73 * @brief CGU base clocks
\r
74 * CGU base clocks are clocks that are associated with a single input clock
\r
75 * and are routed out to 1 or more peripherals. For example, the CLK_BASE_PERIPH
\r
76 * clock can be configured to use the CLKIN_MAINPLL input clock, which will in
\r
77 * turn route that clock to the CLK_PERIPH_BUS, CLK_PERIPH_CORE, and
\r
78 * CLK_PERIPH_SGPIO periphral clocks.
\r
80 typedef enum CHIP_CGU_BASE_CLK {
\r
81 CLK_BASE_SAFE, /*!< Base clock for WDT oscillator, IRC input only */
\r
82 CLK_BASE_USB0, /*!< Base USB clock for USB0, USB PLL input only */
\r
83 #if defined(CHIP_LPC43XX)
\r
84 CLK_BASE_PERIPH, /*!< Base clock for SGPIO */
\r
88 CLK_BASE_USB1, /*!< Base USB clock for USB1 */
\r
89 CLK_BASE_MX, /*!< Base clock for CPU core */
\r
90 CLK_BASE_SPIFI, /*!< Base clock for SPIFI */
\r
91 #if defined(CHIP_LPC43XX)
\r
92 CLK_BASE_SPI, /*!< Base clock for SPI */
\r
96 CLK_BASE_PHY_RX, /*!< Base clock for PHY RX */
\r
97 CLK_BASE_PHY_TX, /*!< Base clock for PHY TX */
\r
98 CLK_BASE_APB1, /*!< Base clock for APB1 group */
\r
99 CLK_BASE_APB3, /*!< Base clock for APB3 group */
\r
100 CLK_BASE_LCD, /*!< Base clock for LCD pixel clock */
\r
101 #if defined(CHIP_LPC43XX)
\r
102 CLK_BASE_VADC, /*!< Base clock for VADC */
\r
104 CLK_BASE_RESERVED3,
\r
106 CLK_BASE_SDIO, /*!< Base clock for SDIO */
\r
107 CLK_BASE_SSP0, /*!< Base clock for SSP0 */
\r
108 CLK_BASE_SSP1, /*!< Base clock for SSP1 */
\r
109 CLK_BASE_UART0, /*!< Base clock for UART0 */
\r
110 CLK_BASE_UART1, /*!< Base clock for UART1 */
\r
111 CLK_BASE_UART2, /*!< Base clock for UART2 */
\r
112 CLK_BASE_UART3, /*!< Base clock for UART3 */
\r
113 CLK_BASE_OUT, /*!< Base clock for CLKOUT pin */
\r
114 CLK_BASE_RESERVED4,
\r
115 CLK_BASE_RESERVED5,
\r
116 CLK_BASE_RESERVED6,
\r
117 CLK_BASE_RESERVED7,
\r
118 CLK_BASE_APLL, /*!< Base clock for audio PLL */
\r
119 CLK_BASE_CGU_OUT0, /*!< Base clock for CGUOUT0 pin */
\r
120 CLK_BASE_CGU_OUT1, /*!< Base clock for CGUOUT1 pin */
\r
122 CLK_BASE_NONE = CLK_BASE_LAST
\r
123 } CHIP_CGU_BASE_CLK_T;
\r
126 * @brief CGU dividers
\r
127 * CGU dividers provide an extra clock state where a specific clock can be
\r
128 * divided before being routed to a peripheral group. A divider accepts an
\r
129 * input clock and then divides it. To use the divided clock for a base clock
\r
130 * group, use the divider as the input clock for the base clock (for example,
\r
131 * use CLKIN_IDIVB, where CLKIN_MAINPLL might be the input into the divider).
\r
133 typedef enum CHIP_CGU_IDIV {
\r
134 CLK_IDIV_A, /*!< CGU clock divider A */
\r
135 CLK_IDIV_B, /*!< CGU clock divider B */
\r
136 CLK_IDIV_C, /*!< CGU clock divider A */
\r
137 CLK_IDIV_D, /*!< CGU clock divider D */
\r
138 CLK_IDIV_E, /*!< CGU clock divider E */
\r
143 * @brief Peripheral clocks
\r
144 * Peripheral clocks are individual clocks routed to peripherals. Although
\r
145 * multiple peripherals may share a same base clock, each peripheral's clock
\r
146 * can be enabled or disabled individually. Some peripheral clocks also have
\r
147 * additional dividers associated with them.
\r
149 typedef enum CHIP_CCU_CLK {
\r
151 CLK_APB3_BUS, /*!< APB3 bus clock from base clock CLK_BASE_APB3 */
\r
152 CLK_APB3_I2C1, /*!< I2C1 register/perigheral clock from base clock CLK_BASE_APB3 */
\r
153 CLK_APB3_DAC, /*!< DAC peripheral clock from base clock CLK_BASE_APB3 */
\r
154 CLK_APB3_ADC0, /*!< ADC0 register/perigheral clock from base clock CLK_BASE_APB3 */
\r
155 CLK_APB3_ADC1, /*!< ADC1 register/perigheral clock from base clock CLK_BASE_APB3 */
\r
156 CLK_APB3_CAN0, /*!< CAN0 register/perigheral clock from base clock CLK_BASE_APB3 */
\r
157 CLK_APB1_BUS = 32, /*!< APB1 bus clock clock from base clock CLK_BASE_APB1 */
\r
158 CLK_APB1_MOTOCON, /*!< Motor controller register/perigheral clock from base clock CLK_BASE_APB1 */
\r
159 CLK_APB1_I2C0, /*!< I2C0 register/perigheral clock from base clock CLK_BASE_APB1 */
\r
160 CLK_APB1_I2S, /*!< I2S register/perigheral clock from base clock CLK_BASE_APB1 */
\r
161 CLK_APB1_CAN1, /*!< CAN1 register/perigheral clock from base clock CLK_BASE_APB1 */
\r
162 CLK_SPIFI = 64, /*!< SPIFI SCKI input clock from base clock CLK_BASE_SPIFI */
\r
163 CLK_MX_BUS = 96, /*!< M3/M4 BUS core clock from base clock CLK_BASE_MX */
\r
164 CLK_MX_SPIFI, /*!< SPIFI register clock from base clock CLK_BASE_MX */
\r
165 CLK_MX_GPIO, /*!< GPIO register clock from base clock CLK_BASE_MX */
\r
166 CLK_MX_LCD, /*!< LCD register clock from base clock CLK_BASE_MX */
\r
167 CLK_MX_ETHERNET, /*!< ETHERNET register clock from base clock CLK_BASE_MX */
\r
168 CLK_MX_USB0, /*!< USB0 register clock from base clock CLK_BASE_MX */
\r
169 CLK_MX_EMC, /*!< EMC clock from base clock CLK_BASE_MX */
\r
170 CLK_MX_SDIO, /*!< SDIO register clock from base clock CLK_BASE_MX */
\r
171 CLK_MX_DMA, /*!< DMA register clock from base clock CLK_BASE_MX */
\r
172 CLK_MX_MXCORE, /*!< M3/M4 CPU core clock from base clock CLK_BASE_MX */
\r
173 RESERVED_ALIGN = CLK_MX_MXCORE + 3,
\r
174 CLK_MX_SCT, /*!< SCT register clock from base clock CLK_BASE_MX */
\r
175 CLK_MX_USB1, /*!< USB1 register clock from base clock CLK_BASE_MX */
\r
176 CLK_MX_EMC_DIV, /*!< ENC divider clock from base clock CLK_BASE_MX */
\r
177 CLK_MX_FLASHA, /*!< FLASHA bank clock from base clock CLK_BASE_MX */
\r
178 CLK_MX_FLASHB, /*!< FLASHB bank clock from base clock CLK_BASE_MX */
\r
179 #if defined(CHIP_LPC43XX)
\r
180 CLK_M4_M0APP, /*!< M0 app CPU core clock from base clock CLK_BASE_MX */
\r
181 CLK_MX_VADC, /*!< VADC clock from base clock CLK_BASE_MX */
\r
186 CLK_MX_EEPROM, /*!< EEPROM clock from base clock CLK_BASE_MX */
\r
187 CLK_MX_WWDT = 128, /*!< WWDT register clock from base clock CLK_BASE_MX */
\r
188 CLK_MX_UART0, /*!< UART0 register clock from base clock CLK_BASE_MX */
\r
189 CLK_MX_UART1, /*!< UART1 register clock from base clock CLK_BASE_MX */
\r
190 CLK_MX_SSP0, /*!< SSP0 register clock from base clock CLK_BASE_MX */
\r
191 CLK_MX_TIMER0, /*!< TIMER0 register/perigheral clock from base clock CLK_BASE_MX */
\r
192 CLK_MX_TIMER1, /*!< TIMER1 register/perigheral clock from base clock CLK_BASE_MX */
\r
193 CLK_MX_SCU, /*!< SCU register/perigheral clock from base clock CLK_BASE_MX */
\r
194 CLK_MX_CREG, /*!< CREG clock from base clock CLK_BASE_MX */
\r
195 CLK_MX_RITIMER = 160, /*!< RITIMER register/perigheral clock from base clock CLK_BASE_MX */
\r
196 CLK_MX_UART2, /*!< UART3 register clock from base clock CLK_BASE_MX */
\r
197 CLK_MX_UART3, /*!< UART4 register clock from base clock CLK_BASE_MX */
\r
198 CLK_MX_TIMER2, /*!< TIMER2 register/perigheral clock from base clock CLK_BASE_MX */
\r
199 CLK_MX_TIMER3, /*!< TIMER3 register/perigheral clock from base clock CLK_BASE_MX */
\r
200 CLK_MX_SSP1, /*!< SSP1 register clock from base clock CLK_BASE_MX */
\r
201 CLK_MX_QEI, /*!< QEI register/perigheral clock from base clock CLK_BASE_MX */
\r
202 #if defined(CHIP_LPC43XX)
\r
203 CLK_PERIPH_BUS = 192, /*!< Peripheral bus clock from base clock CLK_BASE_PERIPH */
\r
205 CLK_PERIPH_CORE, /*!< Peripheral core clock from base clock CLK_BASE_PERIPH */
\r
206 CLK_PERIPH_SGPIO, /*!< SGPIO clock from base clock CLK_BASE_PERIPH */
\r
208 CLK_RESERVED3 = 192,
\r
213 CLK_USB0 = 224, /*!< USB0 clock from base clock CLK_BASE_USB0 */
\r
214 CLK_USB1 = 256, /*!< USB1 clock from base clock CLK_BASE_USB1 */
\r
215 #if defined(CHIP_LPC43XX)
\r
216 CLK_SPI = 288, /*!< SPI clock from base clock CLK_BASE_SPI */
\r
217 CLK_VADC, /*!< VADC clock from base clock CLK_BASE_VADC */
\r
219 CLK_RESERVED7 = 320,
\r
226 CLK_APLL = CLK_CCU2_START, /*!< Audio PLL clock from base clock CLK_BASE_APLL */
\r
227 RESERVED_ALIGNB = CLK_CCU2_START + 31,
\r
228 CLK_APB2_UART3, /*!< UART3 clock from base clock CLK_BASE_UART3 */
\r
229 RESERVED_ALIGNC = CLK_CCU2_START + 63,
\r
230 CLK_APB2_UART2, /*!< UART2 clock from base clock CLK_BASE_UART2 */
\r
231 RESERVED_ALIGND = CLK_CCU2_START + 95,
\r
232 CLK_APB0_UART1, /*!< UART1 clock from base clock CLK_BASE_UART1 */
\r
233 RESERVED_ALIGNE = CLK_CCU2_START + 127,
\r
234 CLK_APB0_UART0, /*!< UART0 clock from base clock CLK_BASE_UART0 */
\r
235 RESERVED_ALIGNF = CLK_CCU2_START + 159,
\r
236 CLK_APB2_SSP1, /*!< SSP1 clock from base clock CLK_BASE_SSP1 */
\r
237 RESERVED_ALIGNG = CLK_CCU2_START + 191,
\r
238 CLK_APB0_SSP0, /*!< SSP0 clock from base clock CLK_BASE_SSP0 */
\r
239 RESERVED_ALIGNH = CLK_CCU2_START + 223,
\r
240 CLK_APB2_SDIO, /*!< SDIO clock from base clock CLK_BASE_SDIO */
\r
252 #endif /* __CHIP_CLOCKS_H_ */
\r