xref: /openbmc/u-boot/include/configs/ap325rxa.h (revision 0e8d1586)
16f0da497SNobuhiro Iwamatsu /*
26f0da497SNobuhiro Iwamatsu  * Configuation settings for the Renesas Solutions AP-325RXA board
36f0da497SNobuhiro Iwamatsu  *
46f0da497SNobuhiro Iwamatsu  * Copyright (C) 2008 Renesas Solutions Corp.
56f0da497SNobuhiro Iwamatsu  * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
66f0da497SNobuhiro Iwamatsu  *
76f0da497SNobuhiro Iwamatsu  * See file CREDITS for list of people who contributed to this
86f0da497SNobuhiro Iwamatsu  * project.
96f0da497SNobuhiro Iwamatsu  *
106f0da497SNobuhiro Iwamatsu  * This program is free software; you can redistribute it and/or
116f0da497SNobuhiro Iwamatsu  * modify it under the terms of the GNU General Public License as
126f0da497SNobuhiro Iwamatsu  * published by the Free Software Foundation; either version 2 of
136f0da497SNobuhiro Iwamatsu  * the License, or (at your option) any later version.
146f0da497SNobuhiro Iwamatsu  *
156f0da497SNobuhiro Iwamatsu  * This program is distributed in the hope that it will be useful,
166f0da497SNobuhiro Iwamatsu  * but WITHOUT ANY WARRANTY; without even the implied warranty of
176f0da497SNobuhiro Iwamatsu  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
186f0da497SNobuhiro Iwamatsu  * GNU General Public License for more details.
196f0da497SNobuhiro Iwamatsu  *
206f0da497SNobuhiro Iwamatsu  * You should have received a copy of the GNU General Public License
216f0da497SNobuhiro Iwamatsu  * along with this program; if not, write to the Free Software
226f0da497SNobuhiro Iwamatsu  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
236f0da497SNobuhiro Iwamatsu  * MA 02111-1307 USA
246f0da497SNobuhiro Iwamatsu  */
256f0da497SNobuhiro Iwamatsu 
266f0da497SNobuhiro Iwamatsu #ifndef __AP325RXA_H
276f0da497SNobuhiro Iwamatsu #define __AP325RXA_H
286f0da497SNobuhiro Iwamatsu 
296f0da497SNobuhiro Iwamatsu #undef DEBUG
306f0da497SNobuhiro Iwamatsu #define CONFIG_SH		1
316f0da497SNobuhiro Iwamatsu #define CONFIG_SH4		1
326f0da497SNobuhiro Iwamatsu #define CONFIG_CPU_SH7723	1
336f0da497SNobuhiro Iwamatsu #define CONFIG_AP325RXA	1
346f0da497SNobuhiro Iwamatsu 
356f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_LOADB
366f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_LOADS
376f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_FLASH
386f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_MEMORY
396f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_NET
406f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_PING
416f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_NFS
426f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_SDRAM
436f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_ENV
446f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_IDE
456f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_EXT2
466f0da497SNobuhiro Iwamatsu #define CONFIG_DOS_PARTITION
476f0da497SNobuhiro Iwamatsu 
486f0da497SNobuhiro Iwamatsu #define CONFIG_BAUDRATE		38400
496f0da497SNobuhiro Iwamatsu #define CONFIG_BOOTDELAY	3
506f0da497SNobuhiro Iwamatsu #define CONFIG_BOOTARGS		"console=ttySC2,38400"
516f0da497SNobuhiro Iwamatsu 
526f0da497SNobuhiro Iwamatsu #define CONFIG_VERSION_VARIABLE
536f0da497SNobuhiro Iwamatsu #undef  CONFIG_SHOW_BOOT_PROGRESS
546f0da497SNobuhiro Iwamatsu 
556f0da497SNobuhiro Iwamatsu /* SMC9118 */
566f0da497SNobuhiro Iwamatsu #define CONFIG_DRIVER_SMC911X 1
576f0da497SNobuhiro Iwamatsu #define CONFIG_DRIVER_SMC911X_32_BIT 1
586f0da497SNobuhiro Iwamatsu #define CONFIG_DRIVER_SMC911X_BASE 0xB6080000
596f0da497SNobuhiro Iwamatsu 
606f0da497SNobuhiro Iwamatsu /* MEMORY */
616f0da497SNobuhiro Iwamatsu #define AP325RXA_SDRAM_BASE		(0x88000000)
626f0da497SNobuhiro Iwamatsu #define AP325RXA_FLASH_BASE_1		(0xA0000000)
636f0da497SNobuhiro Iwamatsu #define AP325RXA_FLASH_BANK_SIZE	(128 * 1024 * 1024)
646f0da497SNobuhiro Iwamatsu 
656f0da497SNobuhiro Iwamatsu /* undef to save memory	*/
666f0da497SNobuhiro Iwamatsu #define CFG_LONGHELP
676f0da497SNobuhiro Iwamatsu /* Monitor Command Prompt */
686f0da497SNobuhiro Iwamatsu #define CFG_PROMPT		"=> "
696f0da497SNobuhiro Iwamatsu /* Buffer size for input from the Console */
706f0da497SNobuhiro Iwamatsu #define CFG_CBSIZE		256
716f0da497SNobuhiro Iwamatsu /* Buffer size for Console output */
726f0da497SNobuhiro Iwamatsu #define CFG_PBSIZE		256
736f0da497SNobuhiro Iwamatsu /* max args accepted for monitor commands */
746f0da497SNobuhiro Iwamatsu #define CFG_MAXARGS		16
756f0da497SNobuhiro Iwamatsu /* Buffer size for Boot Arguments passed to kernel */
766f0da497SNobuhiro Iwamatsu #define CFG_BARGSIZE	512
776f0da497SNobuhiro Iwamatsu /* List of legal baudrate settings for this board */
786f0da497SNobuhiro Iwamatsu #define CFG_BAUDRATE_TABLE	{ 38400 }
796f0da497SNobuhiro Iwamatsu 
806f0da497SNobuhiro Iwamatsu /* SCIF */
816f0da497SNobuhiro Iwamatsu #define CONFIG_SCIF_CONSOLE 1
826f0da497SNobuhiro Iwamatsu #define CONFIG_SCIF_A		1 /* SH7723 has SCIF and SCIFA */
836f0da497SNobuhiro Iwamatsu #define CONFIG_CONS_SCIF5	1
846f0da497SNobuhiro Iwamatsu 
856f0da497SNobuhiro Iwamatsu /* Suppress display of console information at boot */
866f0da497SNobuhiro Iwamatsu #undef  CFG_CONSOLE_INFO_QUIET
876f0da497SNobuhiro Iwamatsu #undef  CFG_CONSOLE_OVERWRITE_ROUTINE
886f0da497SNobuhiro Iwamatsu #undef  CFG_CONSOLE_ENV_OVERWRITE
896f0da497SNobuhiro Iwamatsu 
906f0da497SNobuhiro Iwamatsu #define CFG_MEMTEST_START	(AP325RXA_SDRAM_BASE)
916f0da497SNobuhiro Iwamatsu #define CFG_MEMTEST_END		(CFG_MEMTEST_START + (60 * 1024 * 1024))
926f0da497SNobuhiro Iwamatsu 
936f0da497SNobuhiro Iwamatsu /* Enable alternate, more extensive, memory test */
946f0da497SNobuhiro Iwamatsu #undef  CFG_ALT_MEMTEST
956f0da497SNobuhiro Iwamatsu /* Scratch address used by the alternate memory test */
966f0da497SNobuhiro Iwamatsu #undef  CFG_MEMTEST_SCRATCH
976f0da497SNobuhiro Iwamatsu 
986f0da497SNobuhiro Iwamatsu /* Enable temporary baudrate change while serial download */
996f0da497SNobuhiro Iwamatsu #undef  CFG_LOADS_BAUD_CHANGE
1006f0da497SNobuhiro Iwamatsu 
1016f0da497SNobuhiro Iwamatsu #define CFG_SDRAM_BASE	(AP325RXA_SDRAM_BASE)
1026f0da497SNobuhiro Iwamatsu /* maybe more, but if so u-boot doesn't know about it... */
1036f0da497SNobuhiro Iwamatsu #define CFG_SDRAM_SIZE	(128 * 1024 * 1024)
1046f0da497SNobuhiro Iwamatsu /* default load address for scripts ?!? */
1056f0da497SNobuhiro Iwamatsu #define CFG_LOAD_ADDR	(CFG_SDRAM_BASE + 16 * 1024 * 1024)
1066f0da497SNobuhiro Iwamatsu 
1076f0da497SNobuhiro Iwamatsu /* Address of u-boot image in Flash (NOT run time address in SDRAM) ?!? */
1086f0da497SNobuhiro Iwamatsu #define CFG_MONITOR_BASE	(AP325RXA_FLASH_BASE_1)
1096f0da497SNobuhiro Iwamatsu /* Monitor size */
1106f0da497SNobuhiro Iwamatsu #define CFG_MONITOR_LEN	(128 * 1024)
1116f0da497SNobuhiro Iwamatsu /* Size of DRAM reserved for malloc() use */
1126f0da497SNobuhiro Iwamatsu #define CFG_MALLOC_LEN	(256 * 1024)
1136f0da497SNobuhiro Iwamatsu /* size in bytes reserved for initial data */
1146f0da497SNobuhiro Iwamatsu #define CFG_GBL_DATA_SIZE	(256)
1156f0da497SNobuhiro Iwamatsu #define CFG_BOOTMAPSZ	(8 * 1024 * 1024)
1166f0da497SNobuhiro Iwamatsu 
1176f0da497SNobuhiro Iwamatsu /* FLASH */
1186f0da497SNobuhiro Iwamatsu #define CONFIG_FLASH_CFI_DRIVER 1
1196f0da497SNobuhiro Iwamatsu #define CFG_FLASH_CFI
120ee9536a2SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER
1216f0da497SNobuhiro Iwamatsu #undef  CFG_FLASH_QUIET_TEST
1226f0da497SNobuhiro Iwamatsu /* print 'E' for empty sector on flinfo */
1236f0da497SNobuhiro Iwamatsu #define CFG_FLASH_EMPTY_INFO
1246f0da497SNobuhiro Iwamatsu /* Physical start address of Flash memory */
1256f0da497SNobuhiro Iwamatsu #define CFG_FLASH_BASE	(AP325RXA_FLASH_BASE_1)
1266f0da497SNobuhiro Iwamatsu /* Max number of sectors on each Flash chip */
1276f0da497SNobuhiro Iwamatsu #define CFG_MAX_FLASH_SECT	512
1286f0da497SNobuhiro Iwamatsu 
1296f0da497SNobuhiro Iwamatsu /*
1306f0da497SNobuhiro Iwamatsu  * IDE support
1316f0da497SNobuhiro Iwamatsu  */
1326f0da497SNobuhiro Iwamatsu #define CONFIG_IDE_RESET	1
1336f0da497SNobuhiro Iwamatsu #define CFG_PIO_MODE		1
1346f0da497SNobuhiro Iwamatsu #define CFG_IDE_MAXBUS		1	/* IDE bus */
1356f0da497SNobuhiro Iwamatsu #define CFG_IDE_MAXDEVICE	1
1366f0da497SNobuhiro Iwamatsu #define CFG_ATA_BASE_ADDR	0xB4180000
1376f0da497SNobuhiro Iwamatsu #define CFG_ATA_STRIDE		2	/* 1bit shift */
1386f0da497SNobuhiro Iwamatsu #define CFG_ATA_DATA_OFFSET	0x200	/* data reg offset */
1396f0da497SNobuhiro Iwamatsu #define CFG_ATA_REG_OFFSET	0x200	/* reg offset */
1406f0da497SNobuhiro Iwamatsu #define CFG_ATA_ALT_OFFSET	0x210	/* alternate register offset */
1416f0da497SNobuhiro Iwamatsu 
1426f0da497SNobuhiro Iwamatsu /* if you use all NOR Flash , you change dip-switch. Please see Manual. */
1436f0da497SNobuhiro Iwamatsu #define CFG_MAX_FLASH_BANKS	1
1446f0da497SNobuhiro Iwamatsu #define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE + (0 * AP325RXA_FLASH_BANK_SIZE)}
1456f0da497SNobuhiro Iwamatsu 
1466f0da497SNobuhiro Iwamatsu /* Timeout for Flash erase operations (in ms) */
1476f0da497SNobuhiro Iwamatsu #define CFG_FLASH_ERASE_TOUT	(3 * 1000)
1486f0da497SNobuhiro Iwamatsu /* Timeout for Flash write operations (in ms) */
1496f0da497SNobuhiro Iwamatsu #define CFG_FLASH_WRITE_TOUT	(3 * 1000)
1506f0da497SNobuhiro Iwamatsu /* Timeout for Flash set sector lock bit operations (in ms) */
1516f0da497SNobuhiro Iwamatsu #define CFG_FLASH_LOCK_TOUT	(3 * 1000)
1526f0da497SNobuhiro Iwamatsu /* Timeout for Flash clear lock bit operations (in ms) */
1536f0da497SNobuhiro Iwamatsu #define CFG_FLASH_UNLOCK_TOUT	(3 * 1000)
1546f0da497SNobuhiro Iwamatsu 
1556f0da497SNobuhiro Iwamatsu /*
1566f0da497SNobuhiro Iwamatsu  * Use hardware flash sectors protection instead
1576f0da497SNobuhiro Iwamatsu  * of U-Boot software protection
1586f0da497SNobuhiro Iwamatsu  */
1596f0da497SNobuhiro Iwamatsu #undef  CFG_FLASH_PROTECTION
1606f0da497SNobuhiro Iwamatsu #undef  CFG_DIRECT_FLASH_TFTP
1616f0da497SNobuhiro Iwamatsu 
1626f0da497SNobuhiro Iwamatsu /* ENV setting */
1635a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH
1646f0da497SNobuhiro Iwamatsu #define CONFIG_ENV_OVERWRITE	1
165*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SECT_SIZE	(128 * 1024)
166*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
167*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CFG_FLASH_BASE + CFG_MONITOR_LEN)
1686f0da497SNobuhiro Iwamatsu /* Offset of env Flash sector relative to CFG_FLASH_BASE */
169*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_OFFSET		(CONFIG_ENV_ADDR - CFG_FLASH_BASE)
170*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SECT_SIZE)
1716f0da497SNobuhiro Iwamatsu 
1726f0da497SNobuhiro Iwamatsu /* Board Clock */
1736f0da497SNobuhiro Iwamatsu #define CONFIG_SYS_CLK_FREQ	33333333
1746f0da497SNobuhiro Iwamatsu #define TMU_CLK_DIVIDER		(4)	/* 4 (default), 16, 64, 256 or 1024 */
1756f0da497SNobuhiro Iwamatsu #define CFG_HZ			(CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER)
1766f0da497SNobuhiro Iwamatsu 
1776f0da497SNobuhiro Iwamatsu #endif	/* __AP325RXA_H */
178