xref: /openbmc/u-boot/include/configs/pm9263.h (revision 66c433ed4342e5761ee9b048c85fe47d31130b2e)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2f0a2c7b4SIlko Iliev /*
3f0a2c7b4SIlko Iliev  * (C) Copyright 2007-2008
4c9e798d3SStelian Pop  * Stelian Pop <stelian@popies.net>
5f0a2c7b4SIlko Iliev  * Lead Tech Design <www.leadtechdesign.com>
6f0a2c7b4SIlko Iliev  * Ilko Iliev <www.ronetix.at>
7f0a2c7b4SIlko Iliev  *
8f0a2c7b4SIlko Iliev  * Configuation settings for the RONETIX PM9263 board.
9f0a2c7b4SIlko Iliev  */
10f0a2c7b4SIlko Iliev 
11f0a2c7b4SIlko Iliev #ifndef __CONFIG_H
12f0a2c7b4SIlko Iliev #define __CONFIG_H
13f0a2c7b4SIlko Iliev 
14684a567aSAsen Dimov /*
15684a567aSAsen Dimov  * SoC must be defined first, before hardware.h is included.
16684a567aSAsen Dimov  * In this case SoC is defined in boards.cfg.
17684a567aSAsen Dimov  */
18684a567aSAsen Dimov #include <asm/hardware.h>
19684a567aSAsen Dimov 
20f0a2c7b4SIlko Iliev /* ARM asynchronous clock */
21f0a2c7b4SIlko Iliev 
2201550a2bSJean-Christophe PLAGNIOL-VILLARD #define MASTER_PLL_DIV		6
2301550a2bSJean-Christophe PLAGNIOL-VILLARD #define MASTER_PLL_MUL		65
24f0a2c7b4SIlko Iliev #define MAIN_PLL_DIV		2	/* 2 or 4 */
257c966a8bSAchim Ehrlich #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000
26684a567aSAsen Dimov #define CONFIG_SYS_AT91_SLOW_CLOCK	32768		/* slow clock xtal */
27f0a2c7b4SIlko Iliev 
28684a567aSAsen Dimov #define CONFIG_SYS_AT91_CPU_NAME	"AT91SAM9263"
29f0a2c7b4SIlko Iliev #define CONFIG_ARCH_CPU_INIT
30f0a2c7b4SIlko Iliev 
31a3e09cc2SAsen Dimov #define CONFIG_MACH_TYPE	MACH_TYPE_PM9263
32a3e09cc2SAsen Dimov 
33f0a2c7b4SIlko Iliev /* clocks */
3401550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MOR_VAL						\
3520d98c2cSAsen Dimov 		(AT91_PMC_MOR_MOSCEN |					\
3601550a2bSJean-Christophe PLAGNIOL-VILLARD 		 (255 << 8))		/* Main Oscillator Start-up Time */
37f0a2c7b4SIlko Iliev #define CONFIG_SYS_PLLAR_VAL						\
3820d98c2cSAsen Dimov 		(AT91_PMC_PLLAR_29 | /* Bit 29 must be 1 when prog */ \
3920d98c2cSAsen Dimov 		 AT91_PMC_PLLXR_OUT(3) |				\
4020d98c2cSAsen Dimov 		 AT91_PMC_PLLXR_PLLCOUNT(0x3f) |	/* PLL Counter */\
4101550a2bSJean-Christophe PLAGNIOL-VILLARD 		 (2 << 28) |		/* PLL Clock Frequency Range */	\
4201550a2bSJean-Christophe PLAGNIOL-VILLARD 		 ((MASTER_PLL_MUL - 1) << 16) | (MASTER_PLL_DIV))
43f0a2c7b4SIlko Iliev 
44f0a2c7b4SIlko Iliev #if (MAIN_PLL_DIV == 2)
45f0a2c7b4SIlko Iliev /* PCK/2 = MCK Master Clock from PLLA */
4601550a2bSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_MCKR1_VAL		\
4720d98c2cSAsen Dimov 		(AT91_PMC_MCKR_CSS_SLOW |	\
4820d98c2cSAsen Dimov 		 AT91_PMC_MCKR_PRES_1 |	\
4920d98c2cSAsen Dimov 		 AT91_PMC_MCKR_MDIV_2)
50f0a2c7b4SIlko Iliev /* PCK/2 = MCK Master Clock from PLLA */
5101550a2bSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_MCKR2_VAL		\
5220d98c2cSAsen Dimov 		(AT91_PMC_MCKR_CSS_PLLA |	\
5320d98c2cSAsen Dimov 		 AT91_PMC_MCKR_PRES_1 |	\
5420d98c2cSAsen Dimov 		 AT91_PMC_MCKR_MDIV_2)
55f0a2c7b4SIlko Iliev #else
56f0a2c7b4SIlko Iliev /* PCK/4 = MCK Master Clock from PLLA */
5701550a2bSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_MCKR1_VAL			\
5820d98c2cSAsen Dimov 		(AT91_PMC_MCKR_CSS_SLOW |		\
5920d98c2cSAsen Dimov 		 AT91_PMC_MCKR_PRES_1 |		\
6020d98c2cSAsen Dimov 		 AT91_PMC_MCKR_MDIV_4)
61f0a2c7b4SIlko Iliev /* PCK/4 = MCK Master Clock from PLLA */
6201550a2bSJean-Christophe PLAGNIOL-VILLARD #define	CONFIG_SYS_MCKR2_VAL			\
6320d98c2cSAsen Dimov 		(AT91_PMC_MCKR_CSS_PLLA |		\
6420d98c2cSAsen Dimov 		 AT91_PMC_MCKR_PRES_1 |		\
6520d98c2cSAsen Dimov 		 AT91_PMC_MCKR_MDIV_4)
66f0a2c7b4SIlko Iliev #endif
67f0a2c7b4SIlko Iliev /* define PDC[31:16] as DATA[31:16] */
68f0a2c7b4SIlko Iliev #define CONFIG_SYS_PIOD_PDR_VAL1	0xFFFF0000
69f0a2c7b4SIlko Iliev /* no pull-up for D[31:16] */
70f0a2c7b4SIlko Iliev #define CONFIG_SYS_PIOD_PPUDR_VAL	0xFFFF0000
71f0a2c7b4SIlko Iliev /* EBI0_CSA, CS1 SDRAM, CS3 NAND Flash, 3.3V memories */
7201550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MATRIX_EBI0CSA_VAL					\
7320d98c2cSAsen Dimov 	(AT91_MATRIX_CSA_DBPUC | AT91_MATRIX_CSA_VDDIOMSEL_3_3V |	\
7420d98c2cSAsen Dimov 	 AT91_MATRIX_CSA_EBI_CS1A)
75f0a2c7b4SIlko Iliev 
76f0a2c7b4SIlko Iliev /* SDRAM */
77f0a2c7b4SIlko Iliev /* SDRAMC_MR Mode register */
78f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRC_MR_VAL1		0
79f0a2c7b4SIlko Iliev /* SDRAMC_TR - Refresh Timer register */
8001550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRC_TR_VAL1		0x3AA
8101550a2bSJean-Christophe PLAGNIOL-VILLARD /* SDRAMC_CR - Configuration register*/
8201550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRC_CR_VAL							\
8301550a2bSJean-Christophe PLAGNIOL-VILLARD 		(AT91_SDRAMC_NC_9 |						\
8401550a2bSJean-Christophe PLAGNIOL-VILLARD 		 AT91_SDRAMC_NR_13 |						\
8501550a2bSJean-Christophe PLAGNIOL-VILLARD 		 AT91_SDRAMC_NB_4 |						\
8601550a2bSJean-Christophe PLAGNIOL-VILLARD 		 AT91_SDRAMC_CAS_2 |						\
8701550a2bSJean-Christophe PLAGNIOL-VILLARD 		 AT91_SDRAMC_DBW_32 |						\
8801550a2bSJean-Christophe PLAGNIOL-VILLARD 		 (2 <<  8) |	/* tWR -  Write Recovery Delay */		\
8901550a2bSJean-Christophe PLAGNIOL-VILLARD 		 (7 << 12) |	/* tRC -  Row Cycle Delay */			\
9001550a2bSJean-Christophe PLAGNIOL-VILLARD 		 (2 << 16) |	/* tRP -  Row Precharge Delay */		\
9101550a2bSJean-Christophe PLAGNIOL-VILLARD 		 (2 << 20) |	/* tRCD - Row to Column Delay */		\
9201550a2bSJean-Christophe PLAGNIOL-VILLARD 		 (5 << 24) |	/* tRAS - Active to Precharge Delay */		\
9301550a2bSJean-Christophe PLAGNIOL-VILLARD 		 (8 << 28))	/* tXSR - Exit Self Refresh to Active Delay */
9401550a2bSJean-Christophe PLAGNIOL-VILLARD 
95f0a2c7b4SIlko Iliev /* Memory Device Register -> SDRAM */
9601550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRC_MDR_VAL		AT91_SDRAMC_MD_SDRAM
9701550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRC_MR_VAL2		AT91_SDRAMC_MODE_PRECHARGE
98f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL1		0		/* SDRAM_BASE */
9901550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRC_MR_VAL3		AT91_SDRAMC_MODE_REFRESH
100f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL2		0		/* SDRAM_BASE */
101f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL3		0		/* SDRAM_BASE */
102f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL4		0		/* SDRAM_BASE */
103f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL5		0		/* SDRAM_BASE */
104f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL6		0		/* SDRAM_BASE */
105f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL7		0		/* SDRAM_BASE */
106f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL8		0		/* SDRAM_BASE */
107f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL9		0		/* SDRAM_BASE */
10801550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRC_MR_VAL4		AT91_SDRAMC_MODE_LMR
109f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL10		0		/* SDRAM_BASE */
11001550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRC_MR_VAL5		AT91_SDRAMC_MODE_NORMAL
111f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL11		0		/* SDRAM_BASE */
112f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRC_TR_VAL2		1200		/* SDRAM_TR */
113f0a2c7b4SIlko Iliev #define CONFIG_SYS_SDRAM_VAL12		0		/* SDRAM_BASE */
114f0a2c7b4SIlko Iliev 
115f0a2c7b4SIlko Iliev /* setup SMC0, CS0 (NOR Flash) - 16-bit, 15 WS */
11601550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SMC0_SETUP0_VAL					\
11720d98c2cSAsen Dimov 		(AT91_SMC_SETUP_NWE(10) | AT91_SMC_SETUP_NCS_WR(10) |	\
11820d98c2cSAsen Dimov 		 AT91_SMC_SETUP_NRD(10) | AT91_SMC_SETUP_NCS_RD(10))
11901550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SMC0_PULSE0_VAL					\
12020d98c2cSAsen Dimov 		(AT91_SMC_PULSE_NWE(11) | AT91_SMC_PULSE_NCS_WR(11) |	\
12120d98c2cSAsen Dimov 		 AT91_SMC_PULSE_NRD(11) | AT91_SMC_PULSE_NCS_RD(11))
12201550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SMC0_CYCLE0_VAL	\
12320d98c2cSAsen Dimov 		(AT91_SMC_CYCLE_NWE(22) | AT91_SMC_CYCLE_NRD(22))
12401550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SMC0_MODE0_VAL				\
12520d98c2cSAsen Dimov 		(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |	\
12620d98c2cSAsen Dimov 		 AT91_SMC_MODE_DBW_16 |				\
12720d98c2cSAsen Dimov 		 AT91_SMC_MODE_TDF |				\
12820d98c2cSAsen Dimov 		 AT91_SMC_MODE_TDF_CYCLE(6))
129f0a2c7b4SIlko Iliev 
13001550a2bSJean-Christophe PLAGNIOL-VILLARD /* user reset enable */
13101550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RSTC_RMR_VAL			\
13201550a2bSJean-Christophe PLAGNIOL-VILLARD 		(AT91_RSTC_KEY |		\
13320d98c2cSAsen Dimov 		AT91_RSTC_CR_PROCRST |		\
13420d98c2cSAsen Dimov 		AT91_RSTC_MR_ERSTL(1) |	\
13520d98c2cSAsen Dimov 		AT91_RSTC_MR_ERSTL(2))
136f0a2c7b4SIlko Iliev 
13701550a2bSJean-Christophe PLAGNIOL-VILLARD /* Disable Watchdog */
13801550a2bSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_WDTC_WDMR_VAL				\
13920d98c2cSAsen Dimov 		(AT91_WDT_MR_WDIDLEHLT | AT91_WDT_MR_WDDBGHLT |	\
14020d98c2cSAsen Dimov 		 AT91_WDT_MR_WDV(0xfff) |					\
14120d98c2cSAsen Dimov 		 AT91_WDT_MR_WDDIS |				\
14220d98c2cSAsen Dimov 		 AT91_WDT_MR_WDD(0xfff))
143f0a2c7b4SIlko Iliev 
144f0a2c7b4SIlko Iliev #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs */
145f0a2c7b4SIlko Iliev #define CONFIG_SETUP_MEMORY_TAGS 1
146f0a2c7b4SIlko Iliev #define CONFIG_INITRD_TAG	1
147f0a2c7b4SIlko Iliev 
148f0a2c7b4SIlko Iliev #undef CONFIG_SKIP_LOWLEVEL_INIT
149f0a2c7b4SIlko Iliev #define CONFIG_USER_LOWLEVEL_INIT	1
150f0a2c7b4SIlko Iliev 
151f0a2c7b4SIlko Iliev /*
152f0a2c7b4SIlko Iliev  * Hardware drivers
153f0a2c7b4SIlko Iliev  */
154f0a2c7b4SIlko Iliev /* LCD */
155f0a2c7b4SIlko Iliev #define LCD_BPP				LCD_COLOR8
156f0a2c7b4SIlko Iliev #define CONFIG_LCD_LOGO			1
157f0a2c7b4SIlko Iliev #undef LCD_TEST_PATTERN
158f0a2c7b4SIlko Iliev #define CONFIG_LCD_INFO			1
159f0a2c7b4SIlko Iliev #define CONFIG_LCD_INFO_BELOW_LOGO	1
160f0a2c7b4SIlko Iliev #define CONFIG_ATMEL_LCD		1
161f0a2c7b4SIlko Iliev #define CONFIG_ATMEL_LCD_BGR555		1
162f0a2c7b4SIlko Iliev 
163f0a2c7b4SIlko Iliev #define CONFIG_LCD_IN_PSRAM		1
164f0a2c7b4SIlko Iliev 
165f0a2c7b4SIlko Iliev /*
166f0a2c7b4SIlko Iliev  * BOOTP options
167f0a2c7b4SIlko Iliev  */
168f0a2c7b4SIlko Iliev #define CONFIG_BOOTP_BOOTFILESIZE	1
169f0a2c7b4SIlko Iliev 
170f0a2c7b4SIlko Iliev /* SDRAM */
171f0a2c7b4SIlko Iliev #define PHYS_SDRAM		0x20000000
172f0a2c7b4SIlko Iliev #define PHYS_SDRAM_SIZE		0x04000000	/* 64 megs */
173f0a2c7b4SIlko Iliev 
174f0a2c7b4SIlko Iliev /* NOR flash, if populated */
175f0a2c7b4SIlko Iliev #define PHYS_FLASH_1			0x10000000
176f0a2c7b4SIlko Iliev #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
177f0a2c7b4SIlko Iliev #define CONFIG_SYS_MAX_FLASH_SECT	256
178f0a2c7b4SIlko Iliev #define CONFIG_SYS_MAX_FLASH_BANKS	1
179f0a2c7b4SIlko Iliev 
180f0a2c7b4SIlko Iliev /* NAND flash */
181f0a2c7b4SIlko Iliev #ifdef CONFIG_CMD_NAND
182f0a2c7b4SIlko Iliev #define CONFIG_SYS_MAX_NAND_DEVICE	1
183f0a2c7b4SIlko Iliev #define CONFIG_SYS_NAND_BASE		0x40000000
184f0a2c7b4SIlko Iliev #define CONFIG_SYS_NAND_DBW_8		1
185f0a2c7b4SIlko Iliev /* our ALE is AD21 */
186f0a2c7b4SIlko Iliev #define CONFIG_SYS_NAND_MASK_ALE	(1 << 21)
187f0a2c7b4SIlko Iliev /* our CLE is AD22 */
188f0a2c7b4SIlko Iliev #define CONFIG_SYS_NAND_MASK_CLE	(1 << 22)
189ac45bb16SAndreas Bießmann #define CONFIG_SYS_NAND_ENABLE_PIN	GPIO_PIN_PD(15)
190ac45bb16SAndreas Bießmann #define CONFIG_SYS_NAND_READY_PIN	GPIO_PIN_PB(30)
1912eb99ca8SWolfgang Denk 
192f0a2c7b4SIlko Iliev #endif
193f0a2c7b4SIlko Iliev 
194f0a2c7b4SIlko Iliev #define CONFIG_JFFS2_CMDLINE		1
195f0a2c7b4SIlko Iliev #define CONFIG_JFFS2_NAND		1
196f0a2c7b4SIlko Iliev #define CONFIG_JFFS2_DEV		"nand0" /* NAND device jffs2 lives on */
197f0a2c7b4SIlko Iliev #define CONFIG_JFFS2_PART_OFFSET	0	/* start of jffs2 partition */
198f0a2c7b4SIlko Iliev #define CONFIG_JFFS2_PART_SIZE		(256 * 1024 * 1024) /* partition size*/
199f0a2c7b4SIlko Iliev 
200f0a2c7b4SIlko Iliev /* PSRAM */
201f0a2c7b4SIlko Iliev #define	PHYS_PSRAM			0x70000000
202f0a2c7b4SIlko Iliev #define	PHYS_PSRAM_SIZE			0x00400000	/* 4MB */
20320d98c2cSAsen Dimov /* Slave EBI1, PSRAM connected */
20420d98c2cSAsen Dimov #define CONFIG_PSRAM_SCFG		(AT91_MATRIX_SCFG_ARBT_FIXED_PRIORITY	| \
20520d98c2cSAsen Dimov 					 AT91_MATRIX_SCFG_FIXED_DEFMSTR(5)	| \
20620d98c2cSAsen Dimov 					 AT91_MATRIX_SCFG_DEFMSTR_TYPE_FIXED	| \
20720d98c2cSAsen Dimov 					 AT91_MATRIX_SCFG_SLOT_CYCLE(255))
208f0a2c7b4SIlko Iliev 
209f0a2c7b4SIlko Iliev /* Ethernet */
210f0a2c7b4SIlko Iliev #define CONFIG_MACB			1
211f0a2c7b4SIlko Iliev #define CONFIG_RMII			1
212f0a2c7b4SIlko Iliev #define CONFIG_NET_RETRY_COUNT		20
213f0a2c7b4SIlko Iliev #define CONFIG_RESET_PHY_R		1
214f0a2c7b4SIlko Iliev 
215f0a2c7b4SIlko Iliev /* USB */
216f0a2c7b4SIlko Iliev #define CONFIG_USB_ATMEL
217dcd2f1a0SBo Shen #define CONFIG_USB_ATMEL_CLK_SEL_PLLB
218f0a2c7b4SIlko Iliev #define CONFIG_USB_OHCI_NEW			1
219f0a2c7b4SIlko Iliev #define CONFIG_SYS_USB_OHCI_CPU_INIT		1
220f0a2c7b4SIlko Iliev #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00a00000	/* AT91SAM9263_UHP_BASE */
221f0a2c7b4SIlko Iliev #define CONFIG_SYS_USB_OHCI_SLOT_NAME		"at91sam9263"
222f0a2c7b4SIlko Iliev #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	2
223f0a2c7b4SIlko Iliev 
224f0a2c7b4SIlko Iliev #define CONFIG_SYS_LOAD_ADDR			0x22000000	/* load address */
225f0a2c7b4SIlko Iliev 
226f0a2c7b4SIlko Iliev #define CONFIG_SYS_MEMTEST_START		PHYS_SDRAM
227f0a2c7b4SIlko Iliev #define CONFIG_SYS_MEMTEST_END			0x23e00000
228f0a2c7b4SIlko Iliev 
229f0a2c7b4SIlko Iliev #define CONFIG_SYS_USE_FLASH	1
230f0a2c7b4SIlko Iliev #undef CONFIG_SYS_USE_DATAFLASH
231f0a2c7b4SIlko Iliev #undef CONFIG_SYS_USE_NANDFLASH
232f0a2c7b4SIlko Iliev 
233f0a2c7b4SIlko Iliev #ifdef CONFIG_SYS_USE_DATAFLASH
234f0a2c7b4SIlko Iliev 
235f0a2c7b4SIlko Iliev /* bootstrap + u-boot + env + linux in dataflash on CS0 */
236f0a2c7b4SIlko Iliev #define CONFIG_ENV_OFFSET	0x4200
237f0a2c7b4SIlko Iliev #define CONFIG_ENV_SIZE		0x4200
2380dfe3ffeSWenyou.Yang@microchip.com #define CONFIG_ENV_SECT_SIZE	0x210
2390dfe3ffeSWenyou.Yang@microchip.com #define CONFIG_BOOTCOMMAND	"sf probe 0; " \
2400dfe3ffeSWenyou.Yang@microchip.com 				"sf read 0x22000000 0x84000 0x294000; " \
2410dfe3ffeSWenyou.Yang@microchip.com 				"bootm 0x22000000"
242f0a2c7b4SIlko Iliev 
243f0a2c7b4SIlko Iliev #elif defined(CONFIG_SYS_USE_NANDFLASH) /* CFG_USE_NANDFLASH */
244f0a2c7b4SIlko Iliev 
245f0a2c7b4SIlko Iliev /* bootstrap + u-boot + env + linux in nandflash */
246f0a2c7b4SIlko Iliev #define CONFIG_ENV_OFFSET		0x60000
247f0a2c7b4SIlko Iliev #define CONFIG_ENV_OFFSET_REDUND	0x80000
248f0a2c7b4SIlko Iliev #define CONFIG_ENV_SIZE		0x20000		/* 1 sector = 128 kB */
249f0a2c7b4SIlko Iliev #define CONFIG_BOOTCOMMAND	"nand read 0x22000000 0xA0000 0x200000; bootm"
250f0a2c7b4SIlko Iliev 
251f0a2c7b4SIlko Iliev #elif defined(CONFIG_SYS_USE_FLASH) /* CFG_USE_FLASH */
252f0a2c7b4SIlko Iliev 
253f0a2c7b4SIlko Iliev #define CONFIG_ENV_OFFSET	0x40000
254f0a2c7b4SIlko Iliev #define CONFIG_ENV_SECT_SIZE	0x10000
255f0a2c7b4SIlko Iliev #define	CONFIG_ENV_SIZE		0x10000
256f0a2c7b4SIlko Iliev #define CONFIG_ENV_OVERWRITE	1
257f0a2c7b4SIlko Iliev 
258f0a2c7b4SIlko Iliev /* JFFS Partition offset set */
259f0a2c7b4SIlko Iliev #define CONFIG_SYS_JFFS2_FIRST_BANK	0
260f0a2c7b4SIlko Iliev #define CONFIG_SYS_JFFS2_NUM_BANKS	1
261f0a2c7b4SIlko Iliev 
262f0a2c7b4SIlko Iliev /* 512k reserved for u-boot */
263f0a2c7b4SIlko Iliev #define CONFIG_SYS_JFFS2_FIRST_SECTOR	11
264f0a2c7b4SIlko Iliev 
265f0a2c7b4SIlko Iliev #define CONFIG_BOOTCOMMAND		"run flashboot"
2668b3637c6SJoe Hershberger #define CONFIG_ROOTPATH			"/ronetix/rootfs"
267f0a2c7b4SIlko Iliev 
268f0a2c7b4SIlko Iliev #define CONFIG_CON_ROT			"fbcon=rotate:3 "
269f0a2c7b4SIlko Iliev 
270f0a2c7b4SIlko Iliev #define CONFIG_EXTRA_ENV_SETTINGS				\
27143ede0bcSTom Rini 	"mtdids=" CONFIG_MTDIDS_DEFAULT "\0"				\
27243ede0bcSTom Rini 	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"			\
273f0a2c7b4SIlko Iliev 	"partition=nand0,0\0"					\
274f0a2c7b4SIlko Iliev 	"ramargs=setenv bootargs $(bootargs) $(mtdparts)\0"	\
275f0a2c7b4SIlko Iliev 	"nfsargs=setenv bootargs root=/dev/nfs rw "		\
276f0a2c7b4SIlko Iliev 		CONFIG_CON_ROT					\
277f0a2c7b4SIlko Iliev 		"nfsroot=$(serverip):$(rootpath) $(mtdparts)\0"	\
278f0a2c7b4SIlko Iliev 	"addip=setenv bootargs $(bootargs) "			\
279f0a2c7b4SIlko Iliev 		"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)"\
280f0a2c7b4SIlko Iliev 		":$(hostname):eth0:off\0"			\
281f0a2c7b4SIlko Iliev 	"ramboot=tftpboot 0x22000000 vmImage;"			\
282f0a2c7b4SIlko Iliev 		"run ramargs;run addip;bootm 22000000\0"	\
283f0a2c7b4SIlko Iliev 	"nfsboot=tftpboot 0x22000000 vmImage;"			\
284f0a2c7b4SIlko Iliev 		"run nfsargs;run addip;bootm 22000000\0"	\
285f0a2c7b4SIlko Iliev 	"flashboot=run ramargs;run addip;bootm 0x10050000\0"	\
286f0a2c7b4SIlko Iliev 	""
287f0a2c7b4SIlko Iliev 
288f0a2c7b4SIlko Iliev #else
289f0a2c7b4SIlko Iliev #error "Undefined memory device"
290f0a2c7b4SIlko Iliev #endif
291f0a2c7b4SIlko Iliev 
292f0a2c7b4SIlko Iliev /*
293f0a2c7b4SIlko Iliev  * Size of malloc() pool
294f0a2c7b4SIlko Iliev  */
295f0a2c7b4SIlko Iliev #define CONFIG_SYS_MALLOC_LEN	ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
296f0a2c7b4SIlko Iliev 
2979a2a05a4SAsen Dimov #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM
2980dfe3ffeSWenyou.Yang@microchip.com #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_SDRAM_BASE + 16 * 1024 - \
2999a2a05a4SAsen Dimov 				GENERATED_GBL_DATA_SIZE)
3009a2a05a4SAsen Dimov 
301f0a2c7b4SIlko Iliev #endif
302