1 /*
2 ** ###################################################################
3 **     Version:             rev. 1.2, 2017-06-08
4 **     Build:               b220714
5 **
6 **     Abstract:
7 **         Chip specific module features.
8 **
9 **     Copyright 2016 Freescale Semiconductor, Inc.
10 **     Copyright 2016-2022 NXP
11 **     All rights reserved.
12 **
13 **     SPDX-License-Identifier: BSD-3-Clause
14 **
15 **     http:                 www.nxp.com
16 **     mail:                 support@nxp.com
17 **
18 **     Revisions:
19 **     - rev. 1.0 (2016-08-12)
20 **         Initial version.
21 **     - rev. 1.1 (2016-11-25)
22 **         Update CANFD and Classic CAN register.
23 **         Add MAC TIMERSTAMP registers.
24 **     - rev. 1.2 (2017-06-08)
25 **         Remove RTC_CTRL_RTC_OSC_BYPASS.
26 **         SYSCON_ARMTRCLKDIV rename to SYSCON_ARMTRACECLKDIV.
27 **         Remove RESET and HALT from SYSCON_AHBCLKDIV.
28 **
29 ** ###################################################################
30 */
31 
32 #ifndef _LPC54606_FEATURES_H_
33 #define _LPC54606_FEATURES_H_
34 
35 /* SOC module features */
36 
37 /* @brief ADC availability on the SoC. */
38 #define FSL_FEATURE_SOC_ADC_COUNT (1)
39 /* @brief ASYNC_SYSCON availability on the SoC. */
40 #define FSL_FEATURE_SOC_ASYNC_SYSCON_COUNT (1)
41 /* @brief LPC_CAN availability on the SoC. */
42 #define FSL_FEATURE_SOC_LPC_CAN_COUNT (2)
43 /* @brief CRC availability on the SoC. */
44 #define FSL_FEATURE_SOC_CRC_COUNT (1)
45 /* @brief CTIMER availability on the SoC. */
46 #define FSL_FEATURE_SOC_CTIMER_COUNT (5)
47 /* @brief DMA availability on the SoC. */
48 #define FSL_FEATURE_SOC_DMA_COUNT (1)
49 /* @brief DMIC availability on the SoC. */
50 #define FSL_FEATURE_SOC_DMIC_COUNT (1)
51 /* @brief EEPROM availability on the SoC. */
52 #define FSL_FEATURE_SOC_EEPROM_COUNT (1)
53 /* @brief EMC availability on the SoC. */
54 #define FSL_FEATURE_SOC_EMC_COUNT (1)
55 /* @brief LPC_ENET availability on the SoC. */
56 #define FSL_FEATURE_SOC_LPC_ENET_COUNT (1)
57 /* @brief FLEXCOMM availability on the SoC. */
58 #define FSL_FEATURE_SOC_FLEXCOMM_COUNT (10)
59 /* @brief FMC availability on the SoC. */
60 #define FSL_FEATURE_SOC_FMC_COUNT (1)
61 /* @brief GINT availability on the SoC. */
62 #define FSL_FEATURE_SOC_GINT_COUNT (2)
63 /* @brief GPIO availability on the SoC. */
64 #define FSL_FEATURE_SOC_GPIO_COUNT (1)
65 /* @brief I2C availability on the SoC. */
66 #define FSL_FEATURE_SOC_I2C_COUNT (10)
67 /* @brief I2S availability on the SoC. */
68 #define FSL_FEATURE_SOC_I2S_COUNT (2)
69 /* @brief INPUTMUX availability on the SoC. */
70 #define FSL_FEATURE_SOC_INPUTMUX_COUNT (1)
71 /* @brief IOCON availability on the SoC. */
72 #define FSL_FEATURE_SOC_IOCON_COUNT (1)
73 /* @brief MPU availability on the SoC. */
74 #define FSL_FEATURE_SOC_MPU_COUNT (1)
75 /* @brief MRT availability on the SoC. */
76 #define FSL_FEATURE_SOC_MRT_COUNT (1)
77 /* @brief PINT availability on the SoC. */
78 #define FSL_FEATURE_SOC_PINT_COUNT (1)
79 /* @brief RIT availability on the SoC. */
80 #define FSL_FEATURE_SOC_RIT_COUNT (1)
81 /* @brief LPC_RNG availability on the SoC. */
82 #define FSL_FEATURE_SOC_LPC_RNG_COUNT (1)
83 /* @brief RTC availability on the SoC. */
84 #define FSL_FEATURE_SOC_RTC_COUNT (1)
85 /* @brief SCT availability on the SoC. */
86 #define FSL_FEATURE_SOC_SCT_COUNT (1)
87 /* @brief SDIF availability on the SoC. */
88 #define FSL_FEATURE_SOC_SDIF_COUNT (1)
89 /* @brief SMARTCARD availability on the SoC. */
90 #define FSL_FEATURE_SOC_SMARTCARD_COUNT (2)
91 /* @brief SPI availability on the SoC. */
92 #define FSL_FEATURE_SOC_SPI_COUNT (10)
93 /* @brief SPIFI availability on the SoC. */
94 #define FSL_FEATURE_SOC_SPIFI_COUNT (1)
95 /* @brief SYSCON availability on the SoC. */
96 #define FSL_FEATURE_SOC_SYSCON_COUNT (1)
97 /* @brief USART availability on the SoC. */
98 #define FSL_FEATURE_SOC_USART_COUNT (10)
99 /* @brief USB availability on the SoC. */
100 #define FSL_FEATURE_SOC_USB_COUNT (1)
101 /* @brief USBFSH availability on the SoC. */
102 #define FSL_FEATURE_SOC_USBFSH_COUNT (1)
103 /* @brief USBHSD availability on the SoC. */
104 #define FSL_FEATURE_SOC_USBHSD_COUNT (1)
105 /* @brief USBHSH availability on the SoC. */
106 #define FSL_FEATURE_SOC_USBHSH_COUNT (1)
107 /* @brief UTICK availability on the SoC. */
108 #define FSL_FEATURE_SOC_UTICK_COUNT (1)
109 /* @brief WWDT availability on the SoC. */
110 #define FSL_FEATURE_SOC_WWDT_COUNT (1)
111 
112 /* ADC module features */
113 
114 /* @brief Do not has input select (register INSEL). */
115 #define FSL_FEATURE_ADC_HAS_NO_INSEL  (0)
116 /* @brief Has ASYNMODE bitfile in CTRL reigster. */
117 #define FSL_FEATURE_ADC_HAS_CTRL_ASYNMODE (1)
118 /* @brief Has ASYNMODE bitfile in CTRL reigster. */
119 #define FSL_FEATURE_ADC_HAS_CTRL_RESOL (1)
120 /* @brief Has ASYNMODE bitfile in CTRL reigster. */
121 #define FSL_FEATURE_ADC_HAS_CTRL_BYPASSCAL (1)
122 /* @brief Has ASYNMODE bitfile in CTRL reigster. */
123 #define FSL_FEATURE_ADC_HAS_CTRL_TSAMP (1)
124 /* @brief Has ASYNMODE bitfile in CTRL reigster. */
125 #define FSL_FEATURE_ADC_HAS_CTRL_LPWRMODE (0)
126 /* @brief Has ASYNMODE bitfile in CTRL reigster. */
127 #define FSL_FEATURE_ADC_HAS_CTRL_CALMODE (0)
128 /* @brief Has startup register. */
129 #define FSL_FEATURE_ADC_HAS_STARTUP_REG (1)
130 /* @brief Has ADC Trim register */
131 #define FSL_FEATURE_ADC_HAS_TRIM_REG (0)
132 /* @brief Has Calibration register. */
133 #define FSL_FEATURE_ADC_HAS_CALIB_REG (1)
134 
135 /* CAN module features */
136 
137 /* @brief Support CANFD or not */
138 #define FSL_FEATURE_CAN_SUPPORT_CANFD (0)
139 
140 /* CTIMER module features */
141 
142 /* @brief CTIMER has no capture channel. */
143 #define FSL_FEATURE_CTIMER_HAS_NO_INPUT_CAPTURE (0)
144 /* @brief CTIMER has no capture 2 interrupt. */
145 #define FSL_FEATURE_CTIMER_HAS_NO_IR_CR2INT (0)
146 /* @brief CTIMER capture 3 interrupt. */
147 #define FSL_FEATURE_CTIMER_HAS_IR_CR3INT (1)
148 /* @brief Has CTIMER CCR_CAP2 (register bits CCR[CAP2RE][CAP2FE][CAP2I]. */
149 #define FSL_FEATURE_CTIMER_HAS_NO_CCR_CAP2 (0)
150 /* @brief Has CTIMER CCR_CAP3 (register bits CCR[CAP3RE][CAP3FE][CAP3I]). */
151 #define FSL_FEATURE_CTIMER_HAS_CCR_CAP3 (1)
152 /* @brief CTIMER Has register MSR */
153 #define FSL_FEATURE_CTIMER_HAS_MSR (1)
154 
155 /* DMA module features */
156 
157 /* @brief Number of channels */
158 #define FSL_FEATURE_DMA_NUMBER_OF_CHANNELS (30)
159 /* @brief Align size of DMA descriptor */
160 #define FSL_FEATURE_DMA_DESCRIPTOR_ALIGN_SIZE (512)
161 /* @brief DMA head link descriptor table align size */
162 #define FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE (16U)
163 
164 /* EEPROM module features */
165 
166 /* @brief Size of the EEPROM */
167 #define FSL_FEATURE_EEPROM_SIZE (0x00004000)
168 /* @brief Base address of the EEPROM */
169 #define FSL_FEATURE_EEPROM_BASE_ADDRESS (0x40108000)
170 /* @brief Page count of the EEPROM */
171 #define FSL_FEATURE_EEPROM_PAGE_COUNT (128)
172 /* @brief Command number for eeprom program */
173 #define FSL_FEATURE_EEPROM_PROGRAM_CMD (6)
174 /* @brief EEPROM internal clock freqency */
175 #define FSL_FEATURE_EEPROM_INTERNAL_FREQ (1500000)
176 
177 /* FLEXCOMM module features */
178 
179 /* @brief FLEXCOMM0 USART INDEX 0 */
180 #define FSL_FEATURE_FLEXCOMM0_USART_INDEX  (0)
181 /* @brief FLEXCOMM0 SPI INDEX 0 */
182 #define FSL_FEATURE_FLEXCOMM0_SPI_INDEX  (0)
183 /* @brief FLEXCOMM0 I2C INDEX 0 */
184 #define FSL_FEATURE_FLEXCOMM0_I2C_INDEX  (0)
185 /* @brief FLEXCOMM1 USART INDEX 1 */
186 #define FSL_FEATURE_FLEXCOMM1_USART_INDEX  (1)
187 /* @brief FLEXCOMM1 SPI INDEX 1 */
188 #define FSL_FEATURE_FLEXCOMM1_SPI_INDEX  (1)
189 /* @brief FLEXCOMM1 I2C INDEX 1 */
190 #define FSL_FEATURE_FLEXCOMM1_I2C_INDEX  (1)
191 /* @brief FLEXCOMM2 USART INDEX 2 */
192 #define FSL_FEATURE_FLEXCOMM2_USART_INDEX  (2)
193 /* @brief FLEXCOMM2 SPI INDEX 2 */
194 #define FSL_FEATURE_FLEXCOMM2_SPI_INDEX  (2)
195 /* @brief FLEXCOMM2 I2C INDEX 2 */
196 #define FSL_FEATURE_FLEXCOMM2_I2C_INDEX  (2)
197 /* @brief FLEXCOMM3 USART INDEX 3 */
198 #define FSL_FEATURE_FLEXCOMM3_USART_INDEX  (3)
199 /* @brief FLEXCOMM3 SPI INDEX 3 */
200 #define FSL_FEATURE_FLEXCOMM3_SPI_INDEX  (3)
201 /* @brief FLEXCOMM3 I2C INDEX 3 */
202 #define FSL_FEATURE_FLEXCOMM3_I2C_INDEX  (3)
203 /* @brief FLEXCOMM4 USART INDEX 4 */
204 #define FSL_FEATURE_FLEXCOMM4_USART_INDEX  (4)
205 /* @brief FLEXCOMM4 SPI INDEX 4 */
206 #define FSL_FEATURE_FLEXCOMM4_SPI_INDEX  (4)
207 /* @brief FLEXCOMM4 I2C INDEX 4 */
208 #define FSL_FEATURE_FLEXCOMM4_I2C_INDEX  (4)
209 /* @brief FLEXCOMM5 USART INDEX 5 */
210 #define FSL_FEATURE_FLEXCOMM5_USART_INDEX  (5)
211 /* @brief FLEXCOMM5 SPI INDEX 5 */
212 #define FSL_FEATURE_FLEXCOMM5_SPI_INDEX  (5)
213 /* @brief FLEXCOMM5 I2C INDEX 5 */
214 #define FSL_FEATURE_FLEXCOMM5_I2C_INDEX  (5)
215 /* @brief FLEXCOMM6 USART INDEX 6 */
216 #define FSL_FEATURE_FLEXCOMM6_USART_INDEX  (6)
217 /* @brief FLEXCOMM6 SPI INDEX 6 */
218 #define FSL_FEATURE_FLEXCOMM6_SPI_INDEX  (6)
219 /* @brief FLEXCOMM6 I2C INDEX 6 */
220 #define FSL_FEATURE_FLEXCOMM6_I2C_INDEX  (6)
221 /* @brief FLEXCOMM7 I2S INDEX 0 */
222 #define FSL_FEATURE_FLEXCOMM6_I2S_INDEX  (0)
223 /* @brief FLEXCOMM7 USART INDEX 7 */
224 #define FSL_FEATURE_FLEXCOMM7_USART_INDEX  (7)
225 /* @brief FLEXCOMM7 SPI INDEX 7 */
226 #define FSL_FEATURE_FLEXCOMM7_SPI_INDEX  (7)
227 /* @brief FLEXCOMM7 I2C INDEX 7 */
228 #define FSL_FEATURE_FLEXCOMM7_I2C_INDEX  (7)
229 /* @brief FLEXCOMM7 I2S INDEX 1 */
230 #define FSL_FEATURE_FLEXCOMM7_I2S_INDEX  (1)
231 /* @brief FLEXCOMM4 USART INDEX 8 */
232 #define FSL_FEATURE_FLEXCOMM8_USART_INDEX  (8)
233 /* @brief FLEXCOMM4 SPI INDEX 8 */
234 #define FSL_FEATURE_FLEXCOMM8_SPI_INDEX  (8)
235 /* @brief FLEXCOMM4 I2C INDEX 8 */
236 #define FSL_FEATURE_FLEXCOMM8_I2C_INDEX  (8)
237 /* @brief FLEXCOMM5 USART INDEX 9 */
238 #define FSL_FEATURE_FLEXCOMM9_USART_INDEX  (9)
239 /* @brief FLEXCOMM5 SPI INDEX 9 */
240 #define FSL_FEATURE_FLEXCOMM9_SPI_INDEX  (9)
241 /* @brief FLEXCOMM5 I2C INDEX 9 */
242 #define FSL_FEATURE_FLEXCOMM9_I2C_INDEX  (9)
243 /* @brief I2S has DMIC interconnection */
244 #define FSL_FEATURE_FLEXCOMM_INSTANCE_I2S_HAS_DMIC_INTERCONNECTIONn(x) \
245     (((x) == FLEXCOMM0) ? (0) : \
246     (((x) == FLEXCOMM1) ? (0) : \
247     (((x) == FLEXCOMM2) ? (0) : \
248     (((x) == FLEXCOMM3) ? (0) : \
249     (((x) == FLEXCOMM4) ? (0) : \
250     (((x) == FLEXCOMM5) ? (0) : \
251     (((x) == FLEXCOMM6) ? (0) : \
252     (((x) == FLEXCOMM7) ? (1) : \
253     (((x) == FLEXCOMM8) ? (0) : \
254     (((x) == FLEXCOMM9) ? (0) : (-1)))))))))))
255 
256 /* I2S module features */
257 
258 /* @brief I2S support dual channel transfer. */
259 #define FSL_FEATURE_I2S_SUPPORT_SECONDARY_CHANNEL (1)
260 /* @brief I2S has DMIC interconnection */
261 #define FSL_FEATURE_FLEXCOMM_I2S_HAS_DMIC_INTERCONNECTION (1)
262 
263 /* IOCON module features */
264 
265 /* @brief Func bit field width */
266 #define FSL_FEATURE_IOCON_FUNC_FIELD_WIDTH (4)
267 
268 /* MRT module features */
269 
270 /* @brief number of channels. */
271 #define FSL_FEATURE_MRT_NUMBER_OF_CHANNELS  (4)
272 
273 /* interrupt module features */
274 
275 /* @brief Lowest interrupt request number. */
276 #define FSL_FEATURE_INTERRUPT_IRQ_MIN (-14)
277 /* @brief Highest interrupt request number. */
278 #define FSL_FEATURE_INTERRUPT_IRQ_MAX (105)
279 
280 /* PINT module features */
281 
282 /* @brief Number of connected outputs */
283 #define FSL_FEATURE_PINT_NUMBER_OF_CONNECTED_OUTPUTS (8)
284 
285 /* RTC module features */
286 
287 /* @brief RTC has no reset control */
288 #define FSL_FEATURE_RTC_HAS_NO_RESET (1)
289 
290 /* SCT module features */
291 
292 /* @brief Number of events */
293 #define FSL_FEATURE_SCT_NUMBER_OF_EVENTS (10)
294 /* @brief Number of states */
295 #define FSL_FEATURE_SCT_NUMBER_OF_STATES (10)
296 /* @brief Number of match capture */
297 #define FSL_FEATURE_SCT_NUMBER_OF_MATCH_CAPTURE (10)
298 /* @brief Number of outputs */
299 #define FSL_FEATURE_SCT_NUMBER_OF_OUTPUTS (10)
300 
301 /* SDIF module features */
302 
303 /* @brief FIFO depth, every location is a WORD */
304 #define FSL_FEATURE_SDIF_FIFO_DEPTH_64_32BITS (64)
305 /* @brief Max DMA buffer size */
306 #define FSL_FEATURE_SDIF_INTERNAL_DMA_MAX_BUFFER_SIZE (4096)
307 /* @brief Max source clock in HZ */
308 #define FSL_FEATURE_SDIF_MAX_SOURCE_CLOCK (52000000)
309 
310 /* SPI module features */
311 
312 /* @brief SSEL pin count. */
313 #define FSL_FEATURE_SPI_SSEL_COUNT (4)
314 
315 /* SPIFI module features */
316 
317 /* @brief SPIFI start address */
318 #define FSL_FEATURE_SPIFI_START_ADDR (0x10000000)
319 /* @brief SPIFI end address */
320 #define FSL_FEATURE_SPIFI_END_ADDR (0x17FFFFFF)
321 
322 /* SYSCON module features */
323 
324 #if defined(CPU_LPC54606J256BD100) || defined(CPU_LPC54606J256ET100) || defined(CPU_LPC54606J256ET180)
325     /* @brief Pointer to ROM IAP entry functions */
326     #define FSL_FEATURE_SYSCON_IAP_ENTRY_LOCATION (0x03000205)
327     /* @brief IAP Reinvoke ISP command parameter is pointer */
328     #define FSL_FEATURE_SYSCON_IAP_REINVOKE_ISP_PARAM_POINTER (1)
329     /* @brief Flash page size in bytes */
330     #define FSL_FEATURE_SYSCON_FLASH_PAGE_SIZE_BYTES (256)
331     /* @brief Flash sector size in bytes */
332     #define FSL_FEATURE_SYSCON_FLASH_SECTOR_SIZE_BYTES (32768)
333     /* @brief Flash size in bytes */
334     #define FSL_FEATURE_SYSCON_FLASH_SIZE_BYTES (262144)
335     /* @brief IAP has Flash read & write function */
336     #define FSL_FEATURE_IAP_HAS_FLASH_FUNCTION (1)
337     /* @brief IAP has EEPROM read & write function */
338     #define FSL_FEATURE_IAP_HAS_EEPROM_FUNCTION (1)
339     /* @brief IAP has read Flash signature function  */
340     #define FSL_FEATURE_IAP_HAS_FLASH_SIGNATURE_READ (0)
341     /* @brief IAP has read extended Flash signature function */
342     #define FSL_FEATURE_IAP_HAS_FLASH_EXTENDED_SIGNATURE_READ (1)
343     /* @brief RIT has no reset control */
344     #define FSL_FEATURE_RIT_HAS_NO_RESET (1)
345 #elif defined(CPU_LPC54606J512BD100) || defined(CPU_LPC54606J512BD208) || defined(CPU_LPC54606J512ET100)
346     /* @brief Pointer to ROM IAP entry functions */
347     #define FSL_FEATURE_SYSCON_IAP_ENTRY_LOCATION (0x03000205)
348     /* @brief IAP Reinvoke ISP command parameter is pointer */
349     #define FSL_FEATURE_SYSCON_IAP_REINVOKE_ISP_PARAM_POINTER (1)
350     /* @brief Flash page size in bytes */
351     #define FSL_FEATURE_SYSCON_FLASH_PAGE_SIZE_BYTES (256)
352     /* @brief Flash sector size in bytes */
353     #define FSL_FEATURE_SYSCON_FLASH_SECTOR_SIZE_BYTES (32768)
354     /* @brief Flash size in bytes */
355     #define FSL_FEATURE_SYSCON_FLASH_SIZE_BYTES (524288)
356     /* @brief IAP has Flash read & write function */
357     #define FSL_FEATURE_IAP_HAS_FLASH_FUNCTION (1)
358     /* @brief IAP has EEPROM read & write function */
359     #define FSL_FEATURE_IAP_HAS_EEPROM_FUNCTION (1)
360     /* @brief IAP has read Flash signature function  */
361     #define FSL_FEATURE_IAP_HAS_FLASH_SIGNATURE_READ (0)
362     /* @brief IAP has read extended Flash signature function */
363     #define FSL_FEATURE_IAP_HAS_FLASH_EXTENDED_SIGNATURE_READ (1)
364     /* @brief RIT has no reset control */
365     #define FSL_FEATURE_RIT_HAS_NO_RESET (1)
366 #endif /* defined(CPU_LPC54606J256BD100) || defined(CPU_LPC54606J256ET100) || defined(CPU_LPC54606J256ET180) */
367 
368 /* SysTick module features */
369 
370 /* @brief Systick has external reference clock. */
371 #define FSL_FEATURE_SYSTICK_HAS_EXT_REF (0)
372 /* @brief Systick external reference clock is core clock divided by this value. */
373 #define FSL_FEATURE_SYSTICK_EXT_REF_CORE_DIV (0)
374 
375 /* USB module features */
376 
377 /* @brief Size of the USB dedicated RAM */
378 #define FSL_FEATURE_USB_USB_RAM (0x00002000)
379 /* @brief Base address of the USB dedicated RAM */
380 #define FSL_FEATURE_USB_USB_RAM_BASE_ADDRESS (0x40100000)
381 /* @brief Number of the endpoint in USB FS */
382 #define FSL_FEATURE_USB_EP_NUM (5)
383 
384 /* USBFSH module features */
385 
386 /* @brief Size of the USB dedicated RAM */
387 #define FSL_FEATURE_USBFSH_USB_RAM (0x00002000)
388 /* @brief Base address of the USB dedicated RAM */
389 #define FSL_FEATURE_USBFSH_USB_RAM_BASE_ADDRESS (0x40100000)
390 
391 /* USBHSD module features */
392 
393 /* @brief Size of the USB dedicated RAM */
394 #define FSL_FEATURE_USBHSD_USB_RAM (0x00002000)
395 /* @brief Base address of the USB dedicated RAM */
396 #define FSL_FEATURE_USBHSD_USB_RAM_BASE_ADDRESS (0x40100000)
397 /* @brief Number of the endpoint in USB HS */
398 #define FSL_FEATURE_USBHSD_EP_NUM (6)
399 
400 /* USBHSH module features */
401 
402 /* @brief Size of the USB dedicated RAM */
403 #define FSL_FEATURE_USBHSH_USB_RAM (0x00002000)
404 /* @brief Base address of the USB dedicated RAM */
405 #define FSL_FEATURE_USBHSH_USB_RAM_BASE_ADDRESS (0x40100000)
406 
407 /* WWDT module features */
408 
409 /* @brief Has no RESET register. */
410 #define FSL_FEATURE_WWDT_HAS_NO_RESET (1)
411 
412 #endif /* _LPC54606_FEATURES_H_ */
413 
414