/****************************************************************************/
/* Copyright 2010, © Bendor Research Pty. Ltd. All rights reserved.			*/
/* Permission is granted to use this software for any purpose whatsoever	*/
/* as long as this copyright notice is preserved. The code is provided		*/
/* "as is", with no explicit, implicit or implied warranty or guarantee		*/
/* of any kind and Bendor Research Pty. Ltd. can not be held liable for		*/
/* any loss or damages arising out of the use of this software.				*/
/****************************************************************************/
/*																			*/
/*	Include file describing the NXP LPC2377 chip							*/
/*	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~							*/
/*																			*/
/*	2010 May	ZK		Original											*/
/*																			*/
/****************************************************************************/

#ifndef __LPC2377_H
#define __LPC2377_H

/*
*	Define the chip sepcific things.
*
*	The LPC2378:
*	- Has EMC (2x64K)
*	- Does not have USB controller (but has RAM)
*	- Does not have HCI for the USB
*	- Does not have OTG for the USB
*	- Has Ethernet controller with 16K of RAM
*	- Has MMC/SD controller
*	- Does not have CAN controller
*	- The ADC has 8 channels
*	- Has 504K of FLASH (in 27 sectors)
*	- Has 32K of RAM
*/

#define	LPC2377_CHIP_ID			(0x1700e825)
#define	LPC2377_HAS_EMC			(2)
#define	LPC2377_HAS_MCI			(1)
#define	LPC2377_HAS_CAN			(0)
#define	LPC2377_HAS_HCI			(0)
#define	LPC2377_HAS_OTG			(0)
#define	LPC2377_HAS_USB			(0)
#define	LPC2377_HAS_ETH			(1)
#define	LPC2377_HAS_ADC			(8)
#define	LPC2377_USB_RAM_SIZE	(8*1024)
#define	LPC2377_USB_RAM_BASE	(0x7fd00000)
#define	LPC2377_ETH_RAM_SIZE	(16*1024)
#define	LPC2377_ETH_RAM_BASE	(0x7fe00000)
#define LPC2377_RTC_RAM_SIZE	(2*1024)
#define	LPC2377_RTC_RAM_BASE	(0xe0084000)
#define	LPC2377_EMC_BANK_SIZE	(64*1024)
#define	LPC2377_EMC_BANK0		(0x80000000)
#define	LPC2377_EMC_BANK1		(0x81000000)
#define	LPC2377_RAM_BASE		(0x40000000)
#define	LPC2377_ROM_SIZE		(504*1024)
#define	LPC2377_RAM_SIZE		(32*1024)
#define	LPC2377_NUM_SECT		(27)
#define	LPC2377_SIZ_SECT				\
	{									\
		 4,  4,  4,  4,  4,  4,  4,  4,	\
		32, 32, 32, 32, 32, 32, 32, 32,	\
		32, 32, 32, 32, 32, 32,  4,  4,	\
		 4,  4,  4,  4					\
	}

#endif

