1*6f0da497SNobuhiro Iwamatsu /* 2*6f0da497SNobuhiro Iwamatsu * Configuation settings for the Renesas Solutions AP-325RXA board 3*6f0da497SNobuhiro Iwamatsu * 4*6f0da497SNobuhiro Iwamatsu * Copyright (C) 2008 Renesas Solutions Corp. 5*6f0da497SNobuhiro Iwamatsu * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> 6*6f0da497SNobuhiro Iwamatsu * 7*6f0da497SNobuhiro Iwamatsu * See file CREDITS for list of people who contributed to this 8*6f0da497SNobuhiro Iwamatsu * project. 9*6f0da497SNobuhiro Iwamatsu * 10*6f0da497SNobuhiro Iwamatsu * This program is free software; you can redistribute it and/or 11*6f0da497SNobuhiro Iwamatsu * modify it under the terms of the GNU General Public License as 12*6f0da497SNobuhiro Iwamatsu * published by the Free Software Foundation; either version 2 of 13*6f0da497SNobuhiro Iwamatsu * the License, or (at your option) any later version. 14*6f0da497SNobuhiro Iwamatsu * 15*6f0da497SNobuhiro Iwamatsu * This program is distributed in the hope that it will be useful, 16*6f0da497SNobuhiro Iwamatsu * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*6f0da497SNobuhiro Iwamatsu * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*6f0da497SNobuhiro Iwamatsu * GNU General Public License for more details. 19*6f0da497SNobuhiro Iwamatsu * 20*6f0da497SNobuhiro Iwamatsu * You should have received a copy of the GNU General Public License 21*6f0da497SNobuhiro Iwamatsu * along with this program; if not, write to the Free Software 22*6f0da497SNobuhiro Iwamatsu * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23*6f0da497SNobuhiro Iwamatsu * MA 02111-1307 USA 24*6f0da497SNobuhiro Iwamatsu */ 25*6f0da497SNobuhiro Iwamatsu 26*6f0da497SNobuhiro Iwamatsu #ifndef __AP325RXA_H 27*6f0da497SNobuhiro Iwamatsu #define __AP325RXA_H 28*6f0da497SNobuhiro Iwamatsu 29*6f0da497SNobuhiro Iwamatsu #undef DEBUG 30*6f0da497SNobuhiro Iwamatsu #define CONFIG_SH 1 31*6f0da497SNobuhiro Iwamatsu #define CONFIG_SH4 1 32*6f0da497SNobuhiro Iwamatsu #define CONFIG_CPU_SH7723 1 33*6f0da497SNobuhiro Iwamatsu #define CONFIG_AP325RXA 1 34*6f0da497SNobuhiro Iwamatsu 35*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_LOADB 36*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_LOADS 37*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_FLASH 38*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_MEMORY 39*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_NET 40*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_PING 41*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_NFS 42*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_SDRAM 43*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_ENV 44*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_IDE 45*6f0da497SNobuhiro Iwamatsu #define CONFIG_CMD_EXT2 46*6f0da497SNobuhiro Iwamatsu #define CONFIG_DOS_PARTITION 47*6f0da497SNobuhiro Iwamatsu 48*6f0da497SNobuhiro Iwamatsu #define CONFIG_BAUDRATE 38400 49*6f0da497SNobuhiro Iwamatsu #define CONFIG_BOOTDELAY 3 50*6f0da497SNobuhiro Iwamatsu #define CONFIG_BOOTARGS "console=ttySC2,38400" 51*6f0da497SNobuhiro Iwamatsu 52*6f0da497SNobuhiro Iwamatsu #define CONFIG_VERSION_VARIABLE 53*6f0da497SNobuhiro Iwamatsu #undef CONFIG_SHOW_BOOT_PROGRESS 54*6f0da497SNobuhiro Iwamatsu 55*6f0da497SNobuhiro Iwamatsu /* SMC9118 */ 56*6f0da497SNobuhiro Iwamatsu #define CONFIG_DRIVER_SMC911X 1 57*6f0da497SNobuhiro Iwamatsu #define CONFIG_DRIVER_SMC911X_32_BIT 1 58*6f0da497SNobuhiro Iwamatsu #define CONFIG_DRIVER_SMC911X_BASE 0xB6080000 59*6f0da497SNobuhiro Iwamatsu 60*6f0da497SNobuhiro Iwamatsu /* MEMORY */ 61*6f0da497SNobuhiro Iwamatsu #define AP325RXA_SDRAM_BASE (0x88000000) 62*6f0da497SNobuhiro Iwamatsu #define AP325RXA_FLASH_BASE_1 (0xA0000000) 63*6f0da497SNobuhiro Iwamatsu #define AP325RXA_FLASH_BANK_SIZE (128 * 1024 * 1024) 64*6f0da497SNobuhiro Iwamatsu 65*6f0da497SNobuhiro Iwamatsu /* undef to save memory */ 66*6f0da497SNobuhiro Iwamatsu #define CFG_LONGHELP 67*6f0da497SNobuhiro Iwamatsu /* Monitor Command Prompt */ 68*6f0da497SNobuhiro Iwamatsu #define CFG_PROMPT "=> " 69*6f0da497SNobuhiro Iwamatsu /* Buffer size for input from the Console */ 70*6f0da497SNobuhiro Iwamatsu #define CFG_CBSIZE 256 71*6f0da497SNobuhiro Iwamatsu /* Buffer size for Console output */ 72*6f0da497SNobuhiro Iwamatsu #define CFG_PBSIZE 256 73*6f0da497SNobuhiro Iwamatsu /* max args accepted for monitor commands */ 74*6f0da497SNobuhiro Iwamatsu #define CFG_MAXARGS 16 75*6f0da497SNobuhiro Iwamatsu /* Buffer size for Boot Arguments passed to kernel */ 76*6f0da497SNobuhiro Iwamatsu #define CFG_BARGSIZE 512 77*6f0da497SNobuhiro Iwamatsu /* List of legal baudrate settings for this board */ 78*6f0da497SNobuhiro Iwamatsu #define CFG_BAUDRATE_TABLE { 38400 } 79*6f0da497SNobuhiro Iwamatsu 80*6f0da497SNobuhiro Iwamatsu /* SCIF */ 81*6f0da497SNobuhiro Iwamatsu #define CONFIG_SCIF_CONSOLE 1 82*6f0da497SNobuhiro Iwamatsu #define CONFIG_SCIF_A 1 /* SH7723 has SCIF and SCIFA */ 83*6f0da497SNobuhiro Iwamatsu #define CONFIG_CONS_SCIF5 1 84*6f0da497SNobuhiro Iwamatsu 85*6f0da497SNobuhiro Iwamatsu /* Suppress display of console information at boot */ 86*6f0da497SNobuhiro Iwamatsu #undef CFG_CONSOLE_INFO_QUIET 87*6f0da497SNobuhiro Iwamatsu #undef CFG_CONSOLE_OVERWRITE_ROUTINE 88*6f0da497SNobuhiro Iwamatsu #undef CFG_CONSOLE_ENV_OVERWRITE 89*6f0da497SNobuhiro Iwamatsu 90*6f0da497SNobuhiro Iwamatsu #define CFG_MEMTEST_START (AP325RXA_SDRAM_BASE) 91*6f0da497SNobuhiro Iwamatsu #define CFG_MEMTEST_END (CFG_MEMTEST_START + (60 * 1024 * 1024)) 92*6f0da497SNobuhiro Iwamatsu 93*6f0da497SNobuhiro Iwamatsu /* Enable alternate, more extensive, memory test */ 94*6f0da497SNobuhiro Iwamatsu #undef CFG_ALT_MEMTEST 95*6f0da497SNobuhiro Iwamatsu /* Scratch address used by the alternate memory test */ 96*6f0da497SNobuhiro Iwamatsu #undef CFG_MEMTEST_SCRATCH 97*6f0da497SNobuhiro Iwamatsu 98*6f0da497SNobuhiro Iwamatsu /* Enable temporary baudrate change while serial download */ 99*6f0da497SNobuhiro Iwamatsu #undef CFG_LOADS_BAUD_CHANGE 100*6f0da497SNobuhiro Iwamatsu 101*6f0da497SNobuhiro Iwamatsu #define CFG_SDRAM_BASE (AP325RXA_SDRAM_BASE) 102*6f0da497SNobuhiro Iwamatsu /* maybe more, but if so u-boot doesn't know about it... */ 103*6f0da497SNobuhiro Iwamatsu #define CFG_SDRAM_SIZE (128 * 1024 * 1024) 104*6f0da497SNobuhiro Iwamatsu /* default load address for scripts ?!? */ 105*6f0da497SNobuhiro Iwamatsu #define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 16 * 1024 * 1024) 106*6f0da497SNobuhiro Iwamatsu 107*6f0da497SNobuhiro Iwamatsu /* Address of u-boot image in Flash (NOT run time address in SDRAM) ?!? */ 108*6f0da497SNobuhiro Iwamatsu #define CFG_MONITOR_BASE (AP325RXA_FLASH_BASE_1) 109*6f0da497SNobuhiro Iwamatsu /* Monitor size */ 110*6f0da497SNobuhiro Iwamatsu #define CFG_MONITOR_LEN (128 * 1024) 111*6f0da497SNobuhiro Iwamatsu /* Size of DRAM reserved for malloc() use */ 112*6f0da497SNobuhiro Iwamatsu #define CFG_MALLOC_LEN (256 * 1024) 113*6f0da497SNobuhiro Iwamatsu /* size in bytes reserved for initial data */ 114*6f0da497SNobuhiro Iwamatsu #define CFG_GBL_DATA_SIZE (256) 115*6f0da497SNobuhiro Iwamatsu #define CFG_BOOTMAPSZ (8 * 1024 * 1024) 116*6f0da497SNobuhiro Iwamatsu 117*6f0da497SNobuhiro Iwamatsu /* FLASH */ 118*6f0da497SNobuhiro Iwamatsu #define CONFIG_FLASH_CFI_DRIVER 1 119*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_CFI 120*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_CFI_DRIVER 121*6f0da497SNobuhiro Iwamatsu #undef CFG_FLASH_QUIET_TEST 122*6f0da497SNobuhiro Iwamatsu /* print 'E' for empty sector on flinfo */ 123*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_EMPTY_INFO 124*6f0da497SNobuhiro Iwamatsu /* Physical start address of Flash memory */ 125*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_BASE (AP325RXA_FLASH_BASE_1) 126*6f0da497SNobuhiro Iwamatsu /* Max number of sectors on each Flash chip */ 127*6f0da497SNobuhiro Iwamatsu #define CFG_MAX_FLASH_SECT 512 128*6f0da497SNobuhiro Iwamatsu 129*6f0da497SNobuhiro Iwamatsu /* 130*6f0da497SNobuhiro Iwamatsu * IDE support 131*6f0da497SNobuhiro Iwamatsu */ 132*6f0da497SNobuhiro Iwamatsu #define CONFIG_IDE_RESET 1 133*6f0da497SNobuhiro Iwamatsu #define CFG_PIO_MODE 1 134*6f0da497SNobuhiro Iwamatsu #define CFG_IDE_MAXBUS 1 /* IDE bus */ 135*6f0da497SNobuhiro Iwamatsu #define CFG_IDE_MAXDEVICE 1 136*6f0da497SNobuhiro Iwamatsu #define CFG_ATA_BASE_ADDR 0xB4180000 137*6f0da497SNobuhiro Iwamatsu #define CFG_ATA_STRIDE 2 /* 1bit shift */ 138*6f0da497SNobuhiro Iwamatsu #define CFG_ATA_DATA_OFFSET 0x200 /* data reg offset */ 139*6f0da497SNobuhiro Iwamatsu #define CFG_ATA_REG_OFFSET 0x200 /* reg offset */ 140*6f0da497SNobuhiro Iwamatsu #define CFG_ATA_ALT_OFFSET 0x210 /* alternate register offset */ 141*6f0da497SNobuhiro Iwamatsu 142*6f0da497SNobuhiro Iwamatsu /* if you use all NOR Flash , you change dip-switch. Please see Manual. */ 143*6f0da497SNobuhiro Iwamatsu #define CFG_MAX_FLASH_BANKS 1 144*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE + (0 * AP325RXA_FLASH_BANK_SIZE)} 145*6f0da497SNobuhiro Iwamatsu 146*6f0da497SNobuhiro Iwamatsu /* Timeout for Flash erase operations (in ms) */ 147*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_ERASE_TOUT (3 * 1000) 148*6f0da497SNobuhiro Iwamatsu /* Timeout for Flash write operations (in ms) */ 149*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_WRITE_TOUT (3 * 1000) 150*6f0da497SNobuhiro Iwamatsu /* Timeout for Flash set sector lock bit operations (in ms) */ 151*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_LOCK_TOUT (3 * 1000) 152*6f0da497SNobuhiro Iwamatsu /* Timeout for Flash clear lock bit operations (in ms) */ 153*6f0da497SNobuhiro Iwamatsu #define CFG_FLASH_UNLOCK_TOUT (3 * 1000) 154*6f0da497SNobuhiro Iwamatsu 155*6f0da497SNobuhiro Iwamatsu /* 156*6f0da497SNobuhiro Iwamatsu * Use hardware flash sectors protection instead 157*6f0da497SNobuhiro Iwamatsu * of U-Boot software protection 158*6f0da497SNobuhiro Iwamatsu */ 159*6f0da497SNobuhiro Iwamatsu #undef CFG_FLASH_PROTECTION 160*6f0da497SNobuhiro Iwamatsu #undef CFG_DIRECT_FLASH_TFTP 161*6f0da497SNobuhiro Iwamatsu 162*6f0da497SNobuhiro Iwamatsu /* ENV setting */ 163*6f0da497SNobuhiro Iwamatsu #define CFG_ENV_IS_IN_FLASH 164*6f0da497SNobuhiro Iwamatsu #define CONFIG_ENV_OVERWRITE 1 165*6f0da497SNobuhiro Iwamatsu #define CFG_ENV_SECT_SIZE (128 * 1024) 166*6f0da497SNobuhiro Iwamatsu #define CFG_ENV_SIZE (CFG_ENV_SECT_SIZE) 167*6f0da497SNobuhiro Iwamatsu #define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN) 168*6f0da497SNobuhiro Iwamatsu /* Offset of env Flash sector relative to CFG_FLASH_BASE */ 169*6f0da497SNobuhiro Iwamatsu #define CFG_ENV_OFFSET (CFG_ENV_ADDR - CFG_FLASH_BASE) 170*6f0da497SNobuhiro Iwamatsu #define CFG_ENV_SIZE_REDUND (CFG_ENV_SECT_SIZE) 171*6f0da497SNobuhiro Iwamatsu 172*6f0da497SNobuhiro Iwamatsu /* Board Clock */ 173*6f0da497SNobuhiro Iwamatsu #define CONFIG_SYS_CLK_FREQ 33333333 174*6f0da497SNobuhiro Iwamatsu #define TMU_CLK_DIVIDER (4) /* 4 (default), 16, 64, 256 or 1024 */ 175*6f0da497SNobuhiro Iwamatsu #define CFG_HZ (CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER) 176*6f0da497SNobuhiro Iwamatsu 177*6f0da497SNobuhiro Iwamatsu #endif /* __AP325RXA_H */ 178