1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Common definitions for LPC32XX board configurations
5 * Copyright (C) 2011-2015 Vladimir Zapolskiy <vz@mleia.com>
8 #ifndef _LPC32XX_CONFIG_H
9 #define _LPC32XX_CONFIG_H
12 /* Basic CPU architecture */
14 /* UART configuration */
15 #if (CONFIG_CONS_INDEX == 1) || (CONFIG_CONS_INDEX == 2) || \
16 (CONFIG_CONS_INDEX == 7)
17 #if !defined(CONFIG_LPC32XX_HSUART)
18 #define CONFIG_LPC32XX_HSUART
22 #if !defined(CFG_SYS_NS16550_CLK)
23 #define CFG_SYS_NS16550_CLK 13000000
26 #define CFG_SYS_BAUDRATE_TABLE \
27 { 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
30 #if defined(CONFIG_NAND_LPC32XX_SLC)
31 #define NAND_LARGE_BLOCK_PAGE_SIZE 0x800
32 #define NAND_SMALL_BLOCK_PAGE_SIZE 0x200
34 #if (CONFIG_SYS_NAND_PAGE_SIZE == NAND_LARGE_BLOCK_PAGE_SIZE)
35 #define CFG_SYS_NAND_ECCPOS { 40, 41, 42, 43, 44, 45, 46, 47, \
36 48, 49, 50, 51, 52, 53, 54, 55, \
37 56, 57, 58, 59, 60, 61, 62, 63, }
38 #elif (CONFIG_SYS_NAND_PAGE_SIZE == NAND_SMALL_BLOCK_PAGE_SIZE)
39 #define CFG_SYS_NAND_ECCPOS { 10, 11, 12, 13, 14, 15, }
41 #error "CONFIG_SYS_NAND_PAGE_SIZE set to an invalid value"
44 #define CFG_SYS_NAND_ECCSIZE 0x100
45 #define CFG_SYS_NAND_ECCBYTES 3
46 #endif /* CONFIG_NAND_LPC32XX_SLC */
51 #if defined(CONFIG_USB_OHCI_LPC32XX)
52 #define CFG_SYS_USB_OHCI_REGS_BASE USB_BASE
55 #endif /* _LPC32XX_CONFIG_H */