xref: /openbmc/u-boot/include/configs/r7780mp.h (revision 0e8d158664a913392cb01fb11a948d83f72e105e)
1c133c1fbSYusuke Goda /*
2c133c1fbSYusuke Goda  * Configuation settings for the Renesas R7780MP board
3c133c1fbSYusuke Goda  *
4ec39d479SNobuhiro Iwamatsu  * Copyright (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5c133c1fbSYusuke Goda  * Copyright (C) 2008 Yusuke Goda <goda.yusuke@renesas.com>
6c133c1fbSYusuke Goda  *
7c133c1fbSYusuke Goda  * See file CREDITS for list of people who contributed to this
8c133c1fbSYusuke Goda  * project.
9c133c1fbSYusuke Goda  *
10c133c1fbSYusuke Goda  * This program is free software; you can redistribute it and/or
11c133c1fbSYusuke Goda  * modify it under the terms of the GNU General Public License as
12c133c1fbSYusuke Goda  * published by the Free Software Foundation; either version 2 of
13c133c1fbSYusuke Goda  * the License, or (at your option) any later version.
14c133c1fbSYusuke Goda  *
15c133c1fbSYusuke Goda  * This program is distributed in the hope that it will be useful,
16c133c1fbSYusuke Goda  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17c133c1fbSYusuke Goda  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18c133c1fbSYusuke Goda  * GNU General Public License for more details.
19c133c1fbSYusuke Goda  *
20c133c1fbSYusuke Goda  * You should have received a copy of the GNU General Public License
21c133c1fbSYusuke Goda  * along with this program; if not, write to the Free Software
22c133c1fbSYusuke Goda  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23c133c1fbSYusuke Goda  * MA 02111-1307 USA
24c133c1fbSYusuke Goda  */
25c133c1fbSYusuke Goda 
26c133c1fbSYusuke Goda #ifndef __R7780RP_H
27c133c1fbSYusuke Goda #define __R7780RP_H
28c133c1fbSYusuke Goda 
29c133c1fbSYusuke Goda #undef DEBUG
30c133c1fbSYusuke Goda #define CONFIG_SH		1
31c133c1fbSYusuke Goda #define CONFIG_SH4A		1
32c133c1fbSYusuke Goda #define CONFIG_CPU_SH7780	1
33c133c1fbSYusuke Goda #define CONFIG_R7780MP		1
34ec39d479SNobuhiro Iwamatsu #define CFG_R7780MP_OLD_FLASH	1
35ec39d479SNobuhiro Iwamatsu #define __LITTLE_ENDIAN__ 1
36c133c1fbSYusuke Goda 
37c133c1fbSYusuke Goda /*
38c133c1fbSYusuke Goda  * Command line configuration.
39c133c1fbSYusuke Goda  */
40c133c1fbSYusuke Goda #define CONFIG_CMD_SDRAM
41c133c1fbSYusuke Goda #define CONFIG_CMD_FLASH
42c133c1fbSYusuke Goda #define CONFIG_CMD_MEMORY
43c133c1fbSYusuke Goda #define CONFIG_CMD_PCI
44c133c1fbSYusuke Goda #define CONFIG_CMD_NET
45c133c1fbSYusuke Goda #define CONFIG_CMD_PING
46c133c1fbSYusuke Goda #define CONFIG_CMD_ENV
47c133c1fbSYusuke Goda #define CONFIG_CMD_NFS
48c133c1fbSYusuke Goda #define CONFIG_CMD_IDE
49c133c1fbSYusuke Goda #define CONFIG_CMD_EXT2
50c133c1fbSYusuke Goda #define CONFIG_DOS_PARTITION
51c133c1fbSYusuke Goda 
526c58a030SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SCIF_CONSOLE	1
53c133c1fbSYusuke Goda #define CONFIG_BAUDRATE		115200
54c133c1fbSYusuke Goda #define CONFIG_CONS_SCIF0	1
55c133c1fbSYusuke Goda 
56c133c1fbSYusuke Goda #define CONFIG_BOOTDELAY	3
57c133c1fbSYusuke Goda #define CONFIG_BOOTARGS		"console=ttySC0,115200"
58c133c1fbSYusuke Goda #define CONFIG_ENV_OVERWRITE	1
59c133c1fbSYusuke Goda 
60c133c1fbSYusuke Goda /* check for keypress on bootdelay==0 */
61c133c1fbSYusuke Goda /*#define CONFIG_ZERO_BOOTDELAY_CHECK*/
62c133c1fbSYusuke Goda 
63c133c1fbSYusuke Goda #define CFG_SDRAM_BASE		(0x08000000)
64c133c1fbSYusuke Goda #define CFG_SDRAM_SIZE		(128 * 1024 * 1024)
65c133c1fbSYusuke Goda 
66c133c1fbSYusuke Goda #define CFG_LONGHELP
67c133c1fbSYusuke Goda #define CFG_PROMPT		"=> "
68c133c1fbSYusuke Goda #define CFG_CBSIZE		256
69c133c1fbSYusuke Goda #define CFG_PBSIZE		256
70c133c1fbSYusuke Goda #define CFG_MAXARGS		16
71c133c1fbSYusuke Goda #define CFG_BARGSIZE	512
72c133c1fbSYusuke Goda /* List of legal baudrate settings for this board */
73c133c1fbSYusuke Goda #define CFG_BAUDRATE_TABLE	{ 115200, 57600, 38400, 19200, 9600 }
74c133c1fbSYusuke Goda 
75c133c1fbSYusuke Goda #define CFG_MEMTEST_START	(CFG_SDRAM_BASE)
76c133c1fbSYusuke Goda #define CFG_MEMTEST_END		(TEXT_BASE - 0x100000)
77c133c1fbSYusuke Goda 
78ec39d479SNobuhiro Iwamatsu /* Flash board support */
79c133c1fbSYusuke Goda #define CFG_FLASH_BASE		(0xA0000000)
80ec39d479SNobuhiro Iwamatsu #ifdef CFG_R7780MP_OLD_FLASH
81ec39d479SNobuhiro Iwamatsu /* NOR Flash (S29PL127J60TFI130) */
82c133c1fbSYusuke Goda # define CFG_FLASH_CFI_WIDTH	FLASH_CFI_32BIT
83c133c1fbSYusuke Goda # define CFG_MAX_FLASH_BANKS	(2)
84c133c1fbSYusuke Goda # define CFG_MAX_FLASH_SECT	270
85c133c1fbSYusuke Goda # define CFG_FLASH_BANKS_LIST	{ CFG_FLASH_BASE,\
86c133c1fbSYusuke Goda 				CFG_FLASH_BASE + 0x100000,\
87c133c1fbSYusuke Goda 				CFG_FLASH_BASE + 0x400000,\
88c133c1fbSYusuke Goda 				CFG_FLASH_BASE + 0x700000, }
89ec39d479SNobuhiro Iwamatsu #else /* CFG_R7780MP_OLD_FLASH */
90ec39d479SNobuhiro Iwamatsu /* NOR Flash (Spantion S29GL256P) */
91ec39d479SNobuhiro Iwamatsu # define CFG_MAX_FLASH_BANKS	(1)
92ec39d479SNobuhiro Iwamatsu # define CFG_MAX_FLASH_SECT		256
93ec39d479SNobuhiro Iwamatsu # define CFG_FLASH_BANKS_LIST	{ CFG_FLASH_BASE }
94ec39d479SNobuhiro Iwamatsu #endif /* CFG_R7780MP_OLD_FLASH */
95c133c1fbSYusuke Goda 
96c133c1fbSYusuke Goda #define CFG_LOAD_ADDR		(CFG_SDRAM_BASE + 4 * 1024 * 1024)
97c133c1fbSYusuke Goda /* Address of u-boot image in Flash */
98c133c1fbSYusuke Goda #define CFG_MONITOR_BASE	(CFG_FLASH_BASE)
99ec39d479SNobuhiro Iwamatsu #define CFG_MONITOR_LEN		(256 * 1024)
100c133c1fbSYusuke Goda /* Size of DRAM reserved for malloc() use */
101ec39d479SNobuhiro Iwamatsu #define CFG_MALLOC_LEN		(1204 * 1024)
102c133c1fbSYusuke Goda 
103c133c1fbSYusuke Goda /* size in bytes reserved for initial data */
104c133c1fbSYusuke Goda #define CFG_GBL_DATA_SIZE	(256)
105c133c1fbSYusuke Goda #define CFG_BOOTMAPSZ		(8 * 1024 * 1024)
106c133c1fbSYusuke Goda #define CFG_RX_ETH_BUFFER	(8)
107c133c1fbSYusuke Goda 
108c133c1fbSYusuke Goda #define CFG_FLASH_CFI
10900b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER
110c133c1fbSYusuke Goda #undef CFG_FLASH_CFI_BROKEN_TABLE
111c133c1fbSYusuke Goda #undef  CFG_FLASH_QUIET_TEST
112c133c1fbSYusuke Goda /* print 'E' for empty sector on flinfo */
113c133c1fbSYusuke Goda #define CFG_FLASH_EMPTY_INFO
114c133c1fbSYusuke Goda 
1155a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH
116*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SECT_SIZE	(256 * 1024)
117*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
118*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CFG_MONITOR_BASE + CFG_MONITOR_LEN)
119c133c1fbSYusuke Goda #define CFG_FLASH_ERASE_TOUT	120000
120c133c1fbSYusuke Goda #define CFG_FLASH_WRITE_TOUT	500
121c133c1fbSYusuke Goda 
122c133c1fbSYusuke Goda /* Board Clock */
123c133c1fbSYusuke Goda #define CONFIG_SYS_CLK_FREQ	33333333
124c133c1fbSYusuke Goda #define TMU_CLK_DIVIDER		4
125c133c1fbSYusuke Goda #define CFG_HZ	(CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER)
126c133c1fbSYusuke Goda 
127c133c1fbSYusuke Goda /* PCI Controller */
128c133c1fbSYusuke Goda #if defined(CONFIG_CMD_PCI)
129c133c1fbSYusuke Goda #define CONFIG_PCI
130c133c1fbSYusuke Goda #define CONFIG_SH4_PCI
131ab8f4d40SNobuhiro Iwamatsu #define CONFIG_SH7780_PCI
132c133c1fbSYusuke Goda #define CONFIG_PCI_PNP
133c133c1fbSYusuke Goda #define CONFIG_PCI_SCAN_SHOW	1
134c133c1fbSYusuke Goda #define __io
135c133c1fbSYusuke Goda #define __mem_pci
136c133c1fbSYusuke Goda 
137c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_BUS	0xFD000000	/* Memory space base addr */
138c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_PHYS	CONFIG_PCI_MEM_BUS
139c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_SIZE	0x01000000	/* Size of Memory window */
140c133c1fbSYusuke Goda 
141c133c1fbSYusuke Goda #define CONFIG_PCI_IO_BUS	0xFE200000	/* IO space base address */
142c133c1fbSYusuke Goda #define CONFIG_PCI_IO_PHYS	CONFIG_PCI_IO_BUS
143c133c1fbSYusuke Goda #define CONFIG_PCI_IO_SIZE	0x00200000	/* Size of IO window */
144c133c1fbSYusuke Goda #endif /* CONFIG_CMD_PCI */
145c133c1fbSYusuke Goda 
146c133c1fbSYusuke Goda #if defined(CONFIG_CMD_NET)
147ec39d479SNobuhiro Iwamatsu /*
148ec39d479SNobuhiro Iwamatsu #define CONFIG_NET_MULTI
149ec39d479SNobuhiro Iwamatsu #define CONFIG_RTL8169
150ec39d479SNobuhiro Iwamatsu */
151c133c1fbSYusuke Goda /* AX88696L Support(NE2000 base chip) */
152c133c1fbSYusuke Goda #define CONFIG_DRIVER_NE2000
153c133c1fbSYusuke Goda #define CONFIG_DRIVER_AX88796L
154c133c1fbSYusuke Goda #define CONFIG_DRIVER_NE2000_BASE	0xA4100000
155c133c1fbSYusuke Goda #endif
156c133c1fbSYusuke Goda 
157c133c1fbSYusuke Goda /* Compact flash Support */
158c133c1fbSYusuke Goda #if defined(CONFIG_CMD_IDE)
159c133c1fbSYusuke Goda #define CONFIG_IDE_RESET        1
160c133c1fbSYusuke Goda #define CFG_PIO_MODE            1
161c133c1fbSYusuke Goda #define CFG_IDE_MAXBUS          1   /* IDE bus */
162c133c1fbSYusuke Goda #define CFG_IDE_MAXDEVICE       1
163c133c1fbSYusuke Goda #define CFG_ATA_BASE_ADDR       0xb4000000
164c133c1fbSYusuke Goda #define CFG_ATA_STRIDE          2               /* 1bit shift */
165c133c1fbSYusuke Goda #define CFG_ATA_DATA_OFFSET     0x1000          /* data reg offset */
166c133c1fbSYusuke Goda #define CFG_ATA_REG_OFFSET      0x1000          /* reg offset */
167c133c1fbSYusuke Goda #define CFG_ATA_ALT_OFFSET      0x800           /* alternate register offset */
168c133c1fbSYusuke Goda #endif /* CONFIG_CMD_IDE */
169c133c1fbSYusuke Goda 
170c133c1fbSYusuke Goda #endif /* __R7780RP_H */
171