blob: 41160384a4dc37fb78205d0e78f9ffc898093c02 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +00002/*
3 * Common definitions for LPC32XX board configurations
4 *
Vladimir Zapolskiydb6a14f2015-02-12 00:24:20 +02005 * Copyright (C) 2011-2015 Vladimir Zapolskiy <vz@mleia.com>
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +00006 */
7
8#ifndef _LPC32XX_CONFIG_H
9#define _LPC32XX_CONFIG_H
10
Vladimir Zapolskiydb6a14f2015-02-12 00:24:20 +020011
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +000012/* Basic CPU architecture */
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +000013
Tom Rinidf6a2152022-11-16 13:10:28 -050014#if !defined(CFG_SYS_NS16550_CLK)
15#define CFG_SYS_NS16550_CLK 13000000
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +000016#endif
Vladimir Zapolskiy8bf94502015-12-19 23:29:25 +020017
Tom Rini6a5dccc2022-11-16 13:10:41 -050018#define CFG_SYS_BAUDRATE_TABLE \
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +000019 { 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
20
Vladimir Zapolskiya6e30ef2015-08-11 19:57:09 +030021/* 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 Zapolskiya6e30ef2015-08-11 19:57:09 +030026#if (CONFIG_SYS_NAND_PAGE_SIZE == NAND_LARGE_BLOCK_PAGE_SIZE)
Tom Rinib4213492022-11-12 17:36:51 -050027#define CFG_SYS_NAND_ECCPOS { 40, 41, 42, 43, 44, 45, 46, 47, \
Vladimir Zapolskiya6e30ef2015-08-11 19:57:09 +030028 48, 49, 50, 51, 52, 53, 54, 55, \
29 56, 57, 58, 59, 60, 61, 62, 63, }
Vladimir Zapolskiya6e30ef2015-08-11 19:57:09 +030030#elif (CONFIG_SYS_NAND_PAGE_SIZE == NAND_SMALL_BLOCK_PAGE_SIZE)
Tom Rinib4213492022-11-12 17:36:51 -050031#define CFG_SYS_NAND_ECCPOS { 10, 11, 12, 13, 14, 15, }
Vladimir Zapolskiya6e30ef2015-08-11 19:57:09 +030032#else
33#error "CONFIG_SYS_NAND_PAGE_SIZE set to an invalid value"
34#endif
35
Tom Rinib4213492022-11-12 17:36:51 -050036#define CFG_SYS_NAND_ECCSIZE 0x100
37#define CFG_SYS_NAND_ECCBYTES 3
Vladimir Zapolskiya6e30ef2015-08-11 19:57:09 +030038#endif /* CONFIG_NAND_LPC32XX_SLC */
39
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +000040/* NOR Flash */
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +000041
Vladimir Zapolskiy69ec0752015-08-12 20:32:08 +030042/* USB OHCI */
43#if defined(CONFIG_USB_OHCI_LPC32XX)
Tom Rini6a5dccc2022-11-16 13:10:41 -050044#define CFG_SYS_USB_OHCI_REGS_BASE USB_BASE
Vladimir Zapolskiy69ec0752015-08-12 20:32:08 +030045#endif
46
Vladimir Zapolskiy6b20ef82012-04-19 04:33:08 +000047#endif /* _LPC32XX_CONFIG_H */