xref: /rk3399_rockchip-uboot/include/configs/MigoR.h (revision 0e8d158664a913392cb01fb11a948d83f72e105e)
1c2042f59Sgoda.yusuke /*
2c2042f59Sgoda.yusuke  * Configuation settings for the Renesas Solutions Migo-R board
3c2042f59Sgoda.yusuke  *
4c2042f59Sgoda.yusuke  * Copyright (C) 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5c2042f59Sgoda.yusuke  *
6c2042f59Sgoda.yusuke  * See file CREDITS for list of people who contributed to this
7c2042f59Sgoda.yusuke  * project.
8c2042f59Sgoda.yusuke  *
9c2042f59Sgoda.yusuke  * This program is free software; you can redistribute it and/or
10c2042f59Sgoda.yusuke  * modify it under the terms of the GNU General Public License as
11c2042f59Sgoda.yusuke  * published by the Free Software Foundation; either version 2 of
12c2042f59Sgoda.yusuke  * the License, or (at your option) any later version.
13c2042f59Sgoda.yusuke  *
14c2042f59Sgoda.yusuke  * This program is distributed in the hope that it will be useful,
15c2042f59Sgoda.yusuke  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16c2042f59Sgoda.yusuke  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17c2042f59Sgoda.yusuke  * GNU General Public License for more details.
18c2042f59Sgoda.yusuke  *
19c2042f59Sgoda.yusuke  * You should have received a copy of the GNU General Public License
20c2042f59Sgoda.yusuke  * along with this program; if not, write to the Free Software
21c2042f59Sgoda.yusuke  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22c2042f59Sgoda.yusuke  * MA 02111-1307 USA
23c2042f59Sgoda.yusuke  */
24c2042f59Sgoda.yusuke 
25c2042f59Sgoda.yusuke #ifndef __MIGO_R_H
26c2042f59Sgoda.yusuke #define __MIGO_R_H
27c2042f59Sgoda.yusuke 
28c2042f59Sgoda.yusuke #undef DEBUG
29c2042f59Sgoda.yusuke #define CONFIG_SH		1
30c2042f59Sgoda.yusuke #define CONFIG_SH4		1
31c2042f59Sgoda.yusuke #define CONFIG_CPU_SH7722	1
32c2042f59Sgoda.yusuke #define CONFIG_MIGO_R		1
33c2042f59Sgoda.yusuke 
34c2042f59Sgoda.yusuke #define CONFIG_CMD_LOADB
35c2042f59Sgoda.yusuke #define CONFIG_CMD_LOADS
36c2042f59Sgoda.yusuke #define CONFIG_CMD_FLASH
37c2042f59Sgoda.yusuke #define CONFIG_CMD_MEMORY
38c2042f59Sgoda.yusuke #define CONFIG_CMD_NET
39c2042f59Sgoda.yusuke #define CONFIG_CMD_PING
40c2042f59Sgoda.yusuke #define CONFIG_CMD_NFS
41c2042f59Sgoda.yusuke #define CONFIG_CMD_DFL
42c2042f59Sgoda.yusuke #define CONFIG_CMD_SDRAM
43c2042f59Sgoda.yusuke #define CONFIG_CMD_ENV
44c2042f59Sgoda.yusuke 
45c2042f59Sgoda.yusuke #define CONFIG_BAUDRATE		115200
46c2042f59Sgoda.yusuke #define CONFIG_BOOTDELAY	3
47c2042f59Sgoda.yusuke #define CONFIG_BOOTARGS		"console=ttySC0,115200 root=1f01"
48c2042f59Sgoda.yusuke 
49c2042f59Sgoda.yusuke #define CONFIG_VERSION_VARIABLE
50c2042f59Sgoda.yusuke #undef  CONFIG_SHOW_BOOT_PROGRESS
51c2042f59Sgoda.yusuke 
52c2042f59Sgoda.yusuke /* SMC9111 */
53c2042f59Sgoda.yusuke #define CONFIG_DRIVER_SMC91111
54c2042f59Sgoda.yusuke #define CONFIG_SMC91111_BASE    (0xB0000000)
55c2042f59Sgoda.yusuke 
56c2042f59Sgoda.yusuke /* MEMORY */
57c2042f59Sgoda.yusuke #define MIGO_R_SDRAM_BASE	(0x8C000000)
58c2042f59Sgoda.yusuke #define MIGO_R_FLASH_BASE_1	(0xA0000000)
59c2042f59Sgoda.yusuke #define MIGO_R_FLASH_BANK_SIZE	(64 * 1024 * 1024)
60c2042f59Sgoda.yusuke 
61c2042f59Sgoda.yusuke #define CFG_LONGHELP			/* undef to save memory	*/
62c2042f59Sgoda.yusuke #define CFG_PROMPT		"=> "	/* Monitor Command Prompt */
63c2042f59Sgoda.yusuke #define CFG_CBSIZE		256		/* Buffer size for input from the Console */
64c2042f59Sgoda.yusuke #define CFG_PBSIZE		256		/* Buffer size for Console output */
65c2042f59Sgoda.yusuke #define CFG_MAXARGS		16		/* max args accepted for monitor commands */
66c2042f59Sgoda.yusuke #define CFG_BARGSIZE	512		/* Buffer size for Boot Arguments passed to kernel */
67c2042f59Sgoda.yusuke #define CFG_BAUDRATE_TABLE	{ 115200 }	/* List of legal baudrate settings for this board */
68c2042f59Sgoda.yusuke 
69c2042f59Sgoda.yusuke /* SCIF */
706c58a030SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SCIF_CONSOLE	1
71c2042f59Sgoda.yusuke #define CONFIG_CONS_SCIF0	1
72c2042f59Sgoda.yusuke #undef  CFG_CONSOLE_INFO_QUIET	/* Suppress display of console
73c2042f59Sgoda.yusuke 								   information at boot */
74c2042f59Sgoda.yusuke #undef  CFG_CONSOLE_OVERWRITE_ROUTINE
75c2042f59Sgoda.yusuke #undef  CFG_CONSOLE_ENV_OVERWRITE
76c2042f59Sgoda.yusuke 
77c2042f59Sgoda.yusuke #define CFG_MEMTEST_START	(MIGO_R_SDRAM_BASE)
78c2042f59Sgoda.yusuke #define CFG_MEMTEST_END		(CFG_MEMTEST_START + (60 * 1024 * 1024))
79c2042f59Sgoda.yusuke 
80c2042f59Sgoda.yusuke /* Enable alternate, more extensive, memory test */
81c2042f59Sgoda.yusuke #undef  CFG_ALT_MEMTEST
82c2042f59Sgoda.yusuke /* Scratch address used by the alternate memory test */
83c2042f59Sgoda.yusuke #undef  CFG_MEMTEST_SCRATCH
84c2042f59Sgoda.yusuke 
85c2042f59Sgoda.yusuke /* Enable temporary baudrate change while serial download */
86c2042f59Sgoda.yusuke #undef  CFG_LOADS_BAUD_CHANGE
87c2042f59Sgoda.yusuke 
88c2042f59Sgoda.yusuke #define CFG_SDRAM_BASE	(MIGO_R_SDRAM_BASE)
89c2042f59Sgoda.yusuke /* maybe more, but if so u-boot doesn't know about it... */
90c2042f59Sgoda.yusuke #define CFG_SDRAM_SIZE	(64 * 1024 * 1024)
91c2042f59Sgoda.yusuke /* default load address for scripts ?!? */
92c2042f59Sgoda.yusuke #define CFG_LOAD_ADDR	(CFG_SDRAM_BASE + 16 * 1024 * 1024)
93c2042f59Sgoda.yusuke 
94c2042f59Sgoda.yusuke /* Address of u-boot image in Flash (NOT run time address in SDRAM) ?!? */
95c2042f59Sgoda.yusuke #define CFG_MONITOR_BASE	(MIGO_R_FLASH_BASE_1)
96c2042f59Sgoda.yusuke /* Monitor size */
97c2042f59Sgoda.yusuke #define CFG_MONITOR_LEN	(128 * 1024)
98c2042f59Sgoda.yusuke /* Size of DRAM reserved for malloc() use */
99c2042f59Sgoda.yusuke #define CFG_MALLOC_LEN	(256 * 1024)
100c2042f59Sgoda.yusuke /* size in bytes reserved for initial data */
101c2042f59Sgoda.yusuke #define CFG_GBL_DATA_SIZE	(256)
102c2042f59Sgoda.yusuke #define CFG_BOOTMAPSZ	(8 * 1024 * 1024)
103c2042f59Sgoda.yusuke 
104c2042f59Sgoda.yusuke /* FLASH */
105c2042f59Sgoda.yusuke #define CFG_FLASH_CFI
10600b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER
107c2042f59Sgoda.yusuke #undef  CFG_FLASH_QUIET_TEST
108c2042f59Sgoda.yusuke /* print 'E' for empty sector on flinfo */
109c2042f59Sgoda.yusuke #define CFG_FLASH_EMPTY_INFO
110c2042f59Sgoda.yusuke /* Physical start address of Flash memory */
111c2042f59Sgoda.yusuke #define CFG_FLASH_BASE	(MIGO_R_FLASH_BASE_1)
112c2042f59Sgoda.yusuke /* Max number of sectors on each Flash chip */
113c2042f59Sgoda.yusuke #define CFG_MAX_FLASH_SECT	512
114c2042f59Sgoda.yusuke 
115c2042f59Sgoda.yusuke /* if you use all NOR Flash , you change dip-switch. Please see MIGO_R01 Manual. */
116c2042f59Sgoda.yusuke #define CFG_MAX_FLASH_BANKS	1
117c2042f59Sgoda.yusuke #define CFG_FLASH_BANKS_LIST	{ CFG_FLASH_BASE + (0 * MIGO_R_FLASH_BANK_SIZE) }
118c2042f59Sgoda.yusuke 
119c2042f59Sgoda.yusuke /* Timeout for Flash erase operations (in ms) */
120c2042f59Sgoda.yusuke #define CFG_FLASH_ERASE_TOUT	(3 * 1000)
121c2042f59Sgoda.yusuke /* Timeout for Flash write operations (in ms) */
122c2042f59Sgoda.yusuke #define CFG_FLASH_WRITE_TOUT	(3 * 1000)
123c2042f59Sgoda.yusuke /* Timeout for Flash set sector lock bit operations (in ms) */
124c2042f59Sgoda.yusuke #define CFG_FLASH_LOCK_TOUT	(3 * 1000)
125c2042f59Sgoda.yusuke /* Timeout for Flash clear lock bit operations (in ms) */
126c2042f59Sgoda.yusuke #define CFG_FLASH_UNLOCK_TOUT	(3 * 1000)
127c2042f59Sgoda.yusuke 
128c2042f59Sgoda.yusuke /* Use hardware flash sectors protection instead of U-Boot software protection */
129c2042f59Sgoda.yusuke #undef  CFG_FLASH_PROTECTION
130c2042f59Sgoda.yusuke #undef  CFG_DIRECT_FLASH_TFTP
131c2042f59Sgoda.yusuke 
132c2042f59Sgoda.yusuke /* ENV setting */
1335a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH
134c2042f59Sgoda.yusuke #define CONFIG_ENV_OVERWRITE	1
135*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SECT_SIZE	(128 * 1024)
136*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
137*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CFG_FLASH_BASE + CFG_MONITOR_LEN)
138c2042f59Sgoda.yusuke /* Offset of env Flash sector relative to CFG_FLASH_BASE */
139*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_OFFSET		(CONFIG_ENV_ADDR - CFG_FLASH_BASE)
140*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SECT_SIZE)
141c2042f59Sgoda.yusuke 
142c2042f59Sgoda.yusuke /* Board Clock */
143c2042f59Sgoda.yusuke #define CONFIG_SYS_CLK_FREQ	33333333
144c2042f59Sgoda.yusuke #define TMU_CLK_DIVIDER		(4)	/* 4 (default), 16, 64, 256 or 1024 */
145c2042f59Sgoda.yusuke #define CFG_HZ			(CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER)
146c2042f59Sgoda.yusuke 
147c2042f59Sgoda.yusuke #endif	/* __MIGO_R_H */
148