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 346d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_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 46bdab39d3SMike Frysinger #define CONFIG_CMD_SAVEENV 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 636d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE (0x08000000) 646d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_SIZE (128 * 1024 * 1024) 65c133c1fbSYusuke Goda 666d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP 676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT "=> " 686d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE 256 696d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE 256 706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAXARGS 16 716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BARGSIZE 512 72c133c1fbSYusuke Goda /* List of legal baudrate settings for this board */ 736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BAUDRATE_TABLE { 115200, 57600, 38400, 19200, 9600 } 74c133c1fbSYusuke Goda 756d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE) 766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END (TEXT_BASE - 0x100000) 77c133c1fbSYusuke Goda 78ec39d479SNobuhiro Iwamatsu /* Flash board support */ 796d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE (0xA0000000) 806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #ifdef CONFIG_SYS_R7780MP_OLD_FLASH 81ec39d479SNobuhiro Iwamatsu /* NOR Flash (S29PL127J60TFI130) */ 826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_32BIT 836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_BANKS (2) 846d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_SECT 270 856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE,\ 866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD CONFIG_SYS_FLASH_BASE + 0x100000,\ 876d0f6bcfSJean-Christophe PLAGNIOL-VILLARD CONFIG_SYS_FLASH_BASE + 0x400000,\ 886d0f6bcfSJean-Christophe PLAGNIOL-VILLARD CONFIG_SYS_FLASH_BASE + 0x700000, } 896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #else /* CONFIG_SYS_R7780MP_OLD_FLASH */ 90ec39d479SNobuhiro Iwamatsu /* NOR Flash (Spantion S29GL256P) */ 916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_BANKS (1) 926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_MAX_FLASH_SECT 256 936d0f6bcfSJean-Christophe PLAGNIOL-VILLARD # define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } 946d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #endif /* CONFIG_SYS_R7780MP_OLD_FLASH */ 95c133c1fbSYusuke Goda 966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 4 * 1024 * 1024) 97c133c1fbSYusuke Goda /* Address of u-boot image in Flash */ 986d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE) 996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN (256 * 1024) 100c133c1fbSYusuke Goda /* Size of DRAM reserved for malloc() use */ 1016d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN (1204 * 1024) 102c133c1fbSYusuke Goda 103c133c1fbSYusuke Goda /* size in bytes reserved for initial data */ 1046d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_GBL_DATA_SIZE (256) 1056d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024) 1066d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_RX_ETH_BUFFER (8) 107c133c1fbSYusuke Goda 1086d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI 10900b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER 1106d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef CONFIG_SYS_FLASH_CFI_BROKEN_TABLE 1116d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #undef CONFIG_SYS_FLASH_QUIET_TEST 112c133c1fbSYusuke Goda /* print 'E' for empty sector on flinfo */ 1136d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_EMPTY_INFO 114c133c1fbSYusuke Goda 1155a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH 1160e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SECT_SIZE (256 * 1024) 1170e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE) 1186d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) 1196d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 1206d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_WRITE_TOUT 500 121c133c1fbSYusuke Goda 122c133c1fbSYusuke Goda /* Board Clock */ 123c133c1fbSYusuke Goda #define CONFIG_SYS_CLK_FREQ 33333333 124be45c632SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_TMU_CLK_DIV 4 1258dd29c87SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HZ 1000 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 13206b18163SYoshihiro Shimoda #define CONFIG_SH7780_PCI_LSR 0x07f00001 13306b18163SYoshihiro Shimoda #define CONFIG_SH7780_PCI_LAR CONFIG_SYS_SDRAM_SIZE 13406b18163SYoshihiro Shimoda #define CONFIG_SH7780_PCI_BAR CONFIG_SYS_SDRAM_SIZE 135c133c1fbSYusuke Goda #define CONFIG_PCI_PNP 136c133c1fbSYusuke Goda #define CONFIG_PCI_SCAN_SHOW 1 137c133c1fbSYusuke Goda #define __io 138c133c1fbSYusuke Goda #define __mem_pci 139c133c1fbSYusuke Goda 140c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_BUS 0xFD000000 /* Memory space base addr */ 141c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS 142c133c1fbSYusuke Goda #define CONFIG_PCI_MEM_SIZE 0x01000000 /* Size of Memory window */ 143c133c1fbSYusuke Goda 144c133c1fbSYusuke Goda #define CONFIG_PCI_IO_BUS 0xFE200000 /* IO space base address */ 145c133c1fbSYusuke Goda #define CONFIG_PCI_IO_PHYS CONFIG_PCI_IO_BUS 146c133c1fbSYusuke Goda #define CONFIG_PCI_IO_SIZE 0x00200000 /* Size of IO window */ 147*04366d07SNobuhiro Iwamatsu #define CONFIG_PCI_SYS_PHYS CONFIG_SYS_SDRAM_BASE 148*04366d07SNobuhiro Iwamatsu #define CONFIG_PCI_SYS_BUS CONFIG_SYS_SDRAM_BASE 149*04366d07SNobuhiro Iwamatsu #define CONFIG_PCI_SYS_SIZE CONFIG_SYS_SDRAM_SIZE 150c133c1fbSYusuke Goda #endif /* CONFIG_CMD_PCI */ 151c133c1fbSYusuke Goda 152c133c1fbSYusuke Goda #if defined(CONFIG_CMD_NET) 153ec39d479SNobuhiro Iwamatsu /* 154ec39d479SNobuhiro Iwamatsu #define CONFIG_NET_MULTI 155ec39d479SNobuhiro Iwamatsu #define CONFIG_RTL8169 156ec39d479SNobuhiro Iwamatsu */ 157c133c1fbSYusuke Goda /* AX88696L Support(NE2000 base chip) */ 158c133c1fbSYusuke Goda #define CONFIG_DRIVER_NE2000 159c133c1fbSYusuke Goda #define CONFIG_DRIVER_AX88796L 160c133c1fbSYusuke Goda #define CONFIG_DRIVER_NE2000_BASE 0xA4100000 161c133c1fbSYusuke Goda #endif 162c133c1fbSYusuke Goda 163c133c1fbSYusuke Goda /* Compact flash Support */ 164c133c1fbSYusuke Goda #if defined(CONFIG_CMD_IDE) 165c133c1fbSYusuke Goda #define CONFIG_IDE_RESET 1 1666d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PIO_MODE 1 1676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXBUS 1 /* IDE bus */ 1686d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXDEVICE 1 1696d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_BASE_ADDR 0xb4000000 1706d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_STRIDE 2 /* 1bit shift */ 1716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_DATA_OFFSET 0x1000 /* data reg offset */ 1726d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_REG_OFFSET 0x1000 /* reg offset */ 1736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_ALT_OFFSET 0x800 /* alternate register offset */ 174c133c1fbSYusuke Goda #endif /* CONFIG_CMD_IDE */ 175c133c1fbSYusuke Goda 176c133c1fbSYusuke Goda #endif /* __R7780RP_H */ 177