xref: /openbmc/u-boot/include/configs/r7780mp.h (revision 18a40e8470246da3ee4cdef721524140f54cc6c9)
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  *
71a459660SWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0+
8c133c1fbSYusuke Goda  */
9c133c1fbSYusuke Goda 
10c133c1fbSYusuke Goda #ifndef __R7780RP_H
11c133c1fbSYusuke Goda #define __R7780RP_H
12c133c1fbSYusuke Goda 
13c133c1fbSYusuke Goda #define CONFIG_CPU_SH7780	1
14c133c1fbSYusuke Goda #define CONFIG_R7780MP		1
156d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_R7780MP_OLD_FLASH	1
16ec39d479SNobuhiro Iwamatsu #define __LITTLE_ENDIAN__ 1
17c133c1fbSYusuke Goda 
18*18a40e84SVladimir Zapolskiy #define CONFIG_DISPLAY_BOARDINFO
19*18a40e84SVladimir Zapolskiy 
20c133c1fbSYusuke Goda /*
21c133c1fbSYusuke Goda  * Command line configuration.
22c133c1fbSYusuke Goda  */
23c133c1fbSYusuke Goda #define CONFIG_CMD_SDRAM
24c133c1fbSYusuke Goda #define CONFIG_CMD_PCI
25c133c1fbSYusuke Goda #define CONFIG_CMD_IDE
26c133c1fbSYusuke Goda #define CONFIG_DOS_PARTITION
27c133c1fbSYusuke Goda 
286c58a030SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SCIF_CONSOLE	1
29c133c1fbSYusuke Goda #define CONFIG_BAUDRATE		115200
30c133c1fbSYusuke Goda #define CONFIG_CONS_SCIF0	1
31c133c1fbSYusuke Goda 
32c133c1fbSYusuke Goda #define CONFIG_BOOTARGS		"console=ttySC0,115200"
33c133c1fbSYusuke Goda #define CONFIG_ENV_OVERWRITE	1
34c133c1fbSYusuke Goda 
35913c8910SNobuhiro Iwamatsu #define CONFIG_SYS_TEXT_BASE		0x0FFC0000
366d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE		(0x08000000)
376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_SIZE		(128 * 1024 * 1024)
38c133c1fbSYusuke Goda 
396d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP
406d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE		256
416d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE		256
426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAXARGS		16
436d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BARGSIZE	512
44c133c1fbSYusuke Goda 
456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START	(CONFIG_SYS_SDRAM_BASE)
4614d0a02aSWolfgang Denk #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_TEXT_BASE - 0x100000)
47c133c1fbSYusuke Goda 
48ec39d479SNobuhiro Iwamatsu /* Flash board support */
496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE		(0xA0000000)
506d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef CONFIG_SYS_R7780MP_OLD_FLASH
51ec39d479SNobuhiro Iwamatsu /* NOR Flash (S29PL127J60TFI130) */
526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_32BIT
536d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_BANKS	(2)
546d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_SECT	270
556d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_BANKS_LIST	{ CONFIG_SYS_FLASH_BASE,\
566d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 				CONFIG_SYS_FLASH_BASE + 0x100000,\
576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 				CONFIG_SYS_FLASH_BASE + 0x400000,\
586d0f6bcfSJean-Christophe PLAGNIOL-VILLARD 				CONFIG_SYS_FLASH_BASE + 0x700000, }
596d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #else /* CONFIG_SYS_R7780MP_OLD_FLASH */
60ec39d479SNobuhiro Iwamatsu /* NOR Flash (Spantion S29GL256P) */
616d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_BANKS	(1)
626d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_SECT		256
636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_BANKS_LIST	{ CONFIG_SYS_FLASH_BASE }
646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #endif /* CONFIG_SYS_R7780MP_OLD_FLASH */
65c133c1fbSYusuke Goda 
666d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 4 * 1024 * 1024)
67c133c1fbSYusuke Goda /* Address of u-boot image in Flash */
686d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_BASE	(CONFIG_SYS_FLASH_BASE)
696d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN		(256 * 1024)
70c133c1fbSYusuke Goda /* Size of DRAM reserved for malloc() use */
716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN		(1204 * 1024)
72c133c1fbSYusuke Goda 
736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTMAPSZ		(8 * 1024 * 1024)
746d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RX_ETH_BUFFER	(8)
75c133c1fbSYusuke Goda 
766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI
7700b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER
786d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef CONFIG_SYS_FLASH_CFI_BROKEN_TABLE
796d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef  CONFIG_SYS_FLASH_QUIET_TEST
80c133c1fbSYusuke Goda /* print 'E' for empty sector on flinfo */
816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_EMPTY_INFO
82c133c1fbSYusuke Goda 
835a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH
840e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SECT_SIZE	(256 * 1024)
850e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_ERASE_TOUT	120000
886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_WRITE_TOUT	500
89c133c1fbSYusuke Goda 
90c133c1fbSYusuke Goda /* Board Clock */
91c133c1fbSYusuke Goda #define CONFIG_SYS_CLK_FREQ	33333333
92684a501eSNobuhiro Iwamatsu #define CONFIG_SH_TMU_CLK_FREQ CONFIG_SYS_CLK_FREQ
93684a501eSNobuhiro Iwamatsu #define CONFIG_SH_SCIF_CLK_FREQ CONFIG_SYS_CLK_FREQ
94be45c632SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TMU_CLK_DIV		4
95c133c1fbSYusuke Goda 
96c133c1fbSYusuke Goda /* PCI Controller */
97c133c1fbSYusuke Goda #if defined(CONFIG_CMD_PCI)
98c133c1fbSYusuke Goda #define CONFIG_SH4_PCI
99ab8f4d40SNobuhiro Iwamatsu #define CONFIG_SH7780_PCI
10006b18163SYoshihiro Shimoda #define CONFIG_SH7780_PCI_LSR	0x07f00001
10106b18163SYoshihiro Shimoda #define CONFIG_SH7780_PCI_LAR	CONFIG_SYS_SDRAM_SIZE
10206b18163SYoshihiro Shimoda #define CONFIG_SH7780_PCI_BAR	CONFIG_SYS_SDRAM_SIZE
103c133c1fbSYusuke Goda #define CONFIG_PCI_SCAN_SHOW	1
104c133c1fbSYusuke Goda #define __mem_pci
105c133c1fbSYusuke Goda 
106c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_BUS	0xFD000000	/* Memory space base addr */
107c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_PHYS	CONFIG_PCI_MEM_BUS
108c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_SIZE	0x01000000	/* Size of Memory window */
109c133c1fbSYusuke Goda 
110c133c1fbSYusuke Goda #define CONFIG_PCI_IO_BUS	0xFE200000	/* IO space base address */
111c133c1fbSYusuke Goda #define CONFIG_PCI_IO_PHYS	CONFIG_PCI_IO_BUS
112c133c1fbSYusuke Goda #define CONFIG_PCI_IO_SIZE	0x00200000	/* Size of IO window */
11304366d07SNobuhiro Iwamatsu #define CONFIG_PCI_SYS_PHYS CONFIG_SYS_SDRAM_BASE
11404366d07SNobuhiro Iwamatsu #define CONFIG_PCI_SYS_BUS  CONFIG_SYS_SDRAM_BASE
11504366d07SNobuhiro Iwamatsu #define CONFIG_PCI_SYS_SIZE CONFIG_SYS_SDRAM_SIZE
116c133c1fbSYusuke Goda #endif /* CONFIG_CMD_PCI */
117c133c1fbSYusuke Goda 
118c133c1fbSYusuke Goda #if defined(CONFIG_CMD_NET)
119c7c1dbbfSMarcel Ziswiler /* AX88796L Support(NE2000 base chip) */
120c133c1fbSYusuke Goda #define CONFIG_DRIVER_AX88796L
121c133c1fbSYusuke Goda #define CONFIG_DRIVER_NE2000_BASE	0xA4100000
122c133c1fbSYusuke Goda #endif
123c133c1fbSYusuke Goda 
124c133c1fbSYusuke Goda /* Compact flash Support */
125c133c1fbSYusuke Goda #if defined(CONFIG_CMD_IDE)
126c133c1fbSYusuke Goda #define CONFIG_IDE_RESET        1
1276d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PIO_MODE            1
1286d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXBUS          1   /* IDE bus */
1296d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXDEVICE       1
1306d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_BASE_ADDR       0xb4000000
1316d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_STRIDE          2               /* 1bit shift */
1326d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_DATA_OFFSET     0x1000          /* data reg offset */
1336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_REG_OFFSET      0x1000          /* reg offset */
1346d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_ALT_OFFSET      0x800           /* alternate register offset */
135f2a37fcdSAlbert Aribaud #define CONFIG_IDE_SWAP_IO
136c133c1fbSYusuke Goda #endif /* CONFIG_CMD_IDE */
137c133c1fbSYusuke Goda 
138c133c1fbSYusuke Goda #endif /* __R7780RP_H */
139