Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Common definitions for LPC32XX board configurations |
| 4 | * |
Vladimir Zapolskiy | db6a14f | 2015-02-12 00:24:20 +0200 | [diff] [blame] | 5 | * Copyright (C) 2011-2015 Vladimir Zapolskiy <vz@mleia.com> |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef _LPC32XX_CONFIG_H |
| 9 | #define _LPC32XX_CONFIG_H |
| 10 | |
Vladimir Zapolskiy | db6a14f | 2015-02-12 00:24:20 +0200 | [diff] [blame] | 11 | |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 12 | /* Basic CPU architecture */ |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 13 | |
Tom Rini | df6a215 | 2022-11-16 13:10:28 -0500 | [diff] [blame] | 14 | #if !defined(CFG_SYS_NS16550_CLK) |
| 15 | #define CFG_SYS_NS16550_CLK 13000000 |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 16 | #endif |
Vladimir Zapolskiy | 8bf9450 | 2015-12-19 23:29:25 +0200 | [diff] [blame] | 17 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 18 | #define CFG_SYS_BAUDRATE_TABLE \ |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 19 | { 9600, 19200, 38400, 57600, 115200, 230400, 460800 } |
| 20 | |
Vladimir Zapolskiy | a6e30ef | 2015-08-11 19:57:09 +0300 | [diff] [blame] | 21 | /* NAND */ |
| 22 | #if defined(CONFIG_NAND_LPC32XX_SLC) |
| 23 | #define NAND_LARGE_BLOCK_PAGE_SIZE 0x800 |
| 24 | #define NAND_SMALL_BLOCK_PAGE_SIZE 0x200 |
| 25 | |
Vladimir Zapolskiy | a6e30ef | 2015-08-11 19:57:09 +0300 | [diff] [blame] | 26 | #if (CONFIG_SYS_NAND_PAGE_SIZE == NAND_LARGE_BLOCK_PAGE_SIZE) |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 27 | #define CFG_SYS_NAND_ECCPOS { 40, 41, 42, 43, 44, 45, 46, 47, \ |
Vladimir Zapolskiy | a6e30ef | 2015-08-11 19:57:09 +0300 | [diff] [blame] | 28 | 48, 49, 50, 51, 52, 53, 54, 55, \ |
| 29 | 56, 57, 58, 59, 60, 61, 62, 63, } |
Vladimir Zapolskiy | a6e30ef | 2015-08-11 19:57:09 +0300 | [diff] [blame] | 30 | #elif (CONFIG_SYS_NAND_PAGE_SIZE == NAND_SMALL_BLOCK_PAGE_SIZE) |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 31 | #define CFG_SYS_NAND_ECCPOS { 10, 11, 12, 13, 14, 15, } |
Vladimir Zapolskiy | a6e30ef | 2015-08-11 19:57:09 +0300 | [diff] [blame] | 32 | #else |
| 33 | #error "CONFIG_SYS_NAND_PAGE_SIZE set to an invalid value" |
| 34 | #endif |
| 35 | |
Tom Rini | b421349 | 2022-11-12 17:36:51 -0500 | [diff] [blame] | 36 | #define CFG_SYS_NAND_ECCSIZE 0x100 |
| 37 | #define CFG_SYS_NAND_ECCBYTES 3 |
Vladimir Zapolskiy | a6e30ef | 2015-08-11 19:57:09 +0300 | [diff] [blame] | 38 | #endif /* CONFIG_NAND_LPC32XX_SLC */ |
| 39 | |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 40 | /* NOR Flash */ |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 41 | |
Vladimir Zapolskiy | 69ec075 | 2015-08-12 20:32:08 +0300 | [diff] [blame] | 42 | /* USB OHCI */ |
| 43 | #if defined(CONFIG_USB_OHCI_LPC32XX) |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 44 | #define CFG_SYS_USB_OHCI_REGS_BASE USB_BASE |
Vladimir Zapolskiy | 69ec075 | 2015-08-12 20:32:08 +0300 | [diff] [blame] | 45 | #endif |
| 46 | |
Vladimir Zapolskiy | 6b20ef8 | 2012-04-19 04:33:08 +0000 | [diff] [blame] | 47 | #endif /* _LPC32XX_CONFIG_H */ |