Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 1 | /* |
| 2 | * U-boot - Configuration file for CSP Minotaur board |
| 3 | * |
| 4 | * Thu Oct 25 15:30:44 CEST 2007 <hackfin@section5.ch> |
| 5 | * Minotaur config, brushed up for official uClinux dist. |
| 6 | * Parallel flash support disabled, SPI flash boot command |
| 7 | * added ('run flashboot'). |
| 8 | * |
| 9 | * Flash image map: |
| 10 | * |
| 11 | * 0x00000000 u-boot bootstrap |
| 12 | * 0x00010000 environment |
| 13 | * 0x00020000 u-boot code |
| 14 | * 0x00030000 uImage.initramfs |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #ifndef __CONFIG_BF537_MINOTAUR_H__ |
| 19 | #define __CONFIG_BF537_MINOTAUR_H__ |
| 20 | |
Mike Frysinger | f348ab8 | 2009-04-24 17:22:40 -0400 | [diff] [blame] | 21 | #include <asm/config-pre.h> |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 22 | |
| 23 | |
| 24 | /* |
| 25 | * Processor Settings |
| 26 | */ |
Mike Frysinger | fbcf8e8 | 2010-12-23 14:58:37 -0500 | [diff] [blame] | 27 | #define CONFIG_BFIN_CPU bf537-0.2 |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 28 | #define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_SPI_MASTER |
| 29 | |
| 30 | |
| 31 | /* |
| 32 | * Clock Settings |
| 33 | * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV |
| 34 | * SCLK = (CLKIN * VCO_MULT) / SCLK_DIV |
| 35 | */ |
| 36 | /* CONFIG_CLKIN_HZ is any value in Hz */ |
| 37 | #define CONFIG_CLKIN_HZ 25000000 |
| 38 | /* CLKIN_HALF controls the DF bit in PLL_CTL 0 = CLKIN */ |
| 39 | /* 1 = CLKIN / 2 */ |
| 40 | #define CONFIG_CLKIN_HALF 0 |
| 41 | /* PLL_BYPASS controls the BYPASS bit in PLL_CTL 0 = do not bypass */ |
| 42 | /* 1 = bypass PLL */ |
| 43 | #define CONFIG_PLL_BYPASS 0 |
| 44 | /* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL */ |
| 45 | /* Values can range from 0-63 (where 0 means 64) */ |
| 46 | #define CONFIG_VCO_MULT 20 |
| 47 | /* CCLK_DIV controls the core clock divider */ |
| 48 | /* Values can be 1, 2, 4, or 8 ONLY */ |
| 49 | #define CONFIG_CCLK_DIV 1 |
| 50 | /* SCLK_DIV controls the system clock divider */ |
| 51 | /* Values can range from 1-15 */ |
| 52 | #define CONFIG_SCLK_DIV 5 |
| 53 | |
| 54 | |
| 55 | /* |
| 56 | * Memory Settings |
| 57 | */ |
| 58 | #define CONFIG_MEM_SIZE 32 |
| 59 | #define CONFIG_MEM_ADD_WDTH 9 |
| 60 | |
| 61 | #define CONFIG_EBIU_SDRRC_VAL 0x306 |
| 62 | #define CONFIG_EBIU_SDGCTL_VAL 0x91114d |
| 63 | |
| 64 | #define CONFIG_EBIU_AMGCTL_VAL 0xFF |
| 65 | #define CONFIG_EBIU_AMBCTL0_VAL 0x7BB07BB0 |
| 66 | #define CONFIG_EBIU_AMBCTL1_VAL 0xFFC27BB0 |
| 67 | |
| 68 | #define CONFIG_SYS_MONITOR_LEN (256 << 10) |
| 69 | #define CONFIG_SYS_MALLOC_LEN (128 << 10) |
| 70 | |
| 71 | |
| 72 | /* |
| 73 | * Network Settings |
| 74 | */ |
| 75 | #ifndef __ADSPBF534__ |
| 76 | #define CONFIG_BFIN_MAC |
| 77 | #define CONFIG_NETCONSOLE 1 |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 78 | #endif |
| 79 | #ifdef CONFIG_BFIN_MAC |
| 80 | #define CONFIG_IPADDR 192.168.0.15 |
| 81 | #define CONFIG_NETMASK 255.255.255.0 |
| 82 | #define CONFIG_GATEWAYIP 192.168.0.1 |
| 83 | #define CONFIG_SERVERIP 192.168.0.2 |
| 84 | #define CONFIG_HOSTNAME bf537-minotaur |
| 85 | #endif |
| 86 | |
| 87 | #define CONFIG_SYS_AUTOLOAD "no" |
Joe Hershberger | 8b3637c | 2011-10-13 13:03:47 +0000 | [diff] [blame] | 88 | #define CONFIG_ROOTPATH "/romfs" |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 89 | |
| 90 | |
| 91 | /* |
| 92 | * Flash Settings |
| 93 | */ |
| 94 | /* We don't have a parallel flash chip there */ |
| 95 | #define CONFIG_SYS_NO_FLASH |
| 96 | |
| 97 | |
| 98 | /* |
| 99 | * SPI Settings |
| 100 | */ |
| 101 | #define CONFIG_BFIN_SPI |
| 102 | #define CONFIG_ENV_SPI_MAX_HZ 30000000 |
Mike Frysinger | afac8b0 | 2009-06-14 22:29:35 -0400 | [diff] [blame] | 103 | #define CONFIG_SF_DEFAULT_SPEED 30000000 |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 104 | |
| 105 | |
| 106 | /* |
| 107 | * Env Storage Settings |
| 108 | */ |
| 109 | #define CONFIG_ENV_IS_IN_SPI_FLASH |
| 110 | #define CONFIG_ENV_OFFSET 0x10000 |
| 111 | #define CONFIG_ENV_SIZE 0x10000 |
| 112 | #define CONFIG_ENV_SECT_SIZE 0x10000 |
Mike Frysinger | 76d8218 | 2009-07-21 22:17:36 -0400 | [diff] [blame] | 113 | #define CONFIG_ENV_IS_EMBEDDED_IN_LDR |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 114 | |
| 115 | |
| 116 | /* |
| 117 | * I2C settings |
| 118 | */ |
Scott Jiang | c469703 | 2014-11-13 15:30:55 +0800 | [diff] [blame] | 119 | #define CONFIG_SYS_I2C |
Scott Jiang | fea9b69 | 2014-11-13 15:30:53 +0800 | [diff] [blame] | 120 | #define CONFIG_SYS_I2C_ADI |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 121 | #define CONFIG_SYS_I2C_SPEED 50000 |
| 122 | #define CONFIG_SYS_I2C_SLAVE 0 |
| 123 | |
| 124 | |
| 125 | /* |
| 126 | * Misc Settings |
| 127 | */ |
| 128 | #define CONFIG_SYS_LONGHELP 1 |
| 129 | #define CONFIG_CMDLINE_EDITING 1 |
| 130 | #define CONFIG_ENV_OVERWRITE 1 |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 131 | |
| 132 | #define CONFIG_BAUDRATE 57600 |
| 133 | #define CONFIG_UART_CONSOLE 0 |
Sonic Zhang | 7a58eb9 | 2013-11-18 14:50:19 +0800 | [diff] [blame] | 134 | #define CONFIG_BFIN_SERIAL |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 135 | |
| 136 | #define CONFIG_PANIC_HANG 1 |
| 137 | #define CONFIG_RTC_BFIN 1 |
| 138 | #define CONFIG_BOOT_RETRY_TIME -1 |
| 139 | #define CONFIG_LOADS_ECHO 1 |
| 140 | |
| 141 | #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART) |
| 142 | # define CONFIG_BOOTDELAY -1 |
| 143 | #else |
| 144 | # define CONFIG_BOOTDELAY 5 |
| 145 | #endif |
| 146 | |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 147 | #ifdef CONFIG_BFIN_MAC |
| 148 | # define CONFIG_CMD_DHCP |
| 149 | # define CONFIG_CMD_PING |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 150 | #endif |
| 151 | |
| 152 | #define CONFIG_CMD_BOOTLDR |
| 153 | #define CONFIG_CMD_CACHE |
| 154 | #define CONFIG_CMD_DATE |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 155 | #define CONFIG_CMD_I2C |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 156 | #define CONFIG_CMD_SF |
| 157 | |
| 158 | #define CONFIG_BOOTCOMMAND "run ramboot" |
| 159 | #define CONFIG_BOOTARGS "root=/dev/mtdblock0 rw" |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 160 | |
| 161 | #define BOOT_ENV_SETTINGS \ |
| 162 | "update=tftpboot $(loadaddr) u-boot.ldr;" \ |
Marek Vasut | 5368c55 | 2012-09-23 17:41:24 +0200 | [diff] [blame] | 163 | "sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \ |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 164 | "sf erase 0 0x30000;" \ |
| 165 | "sf write $(loadaddr) 0 $(filesize)" \ |
| 166 | "flashboot=sf read 0x1000000 0x30000 0x320000;" \ |
| 167 | "bootm 0x1000000\0" |
| 168 | #ifdef CONFIG_BFIN_MAC |
| 169 | # define NETWORK_ENV_SETTINGS \ |
| 170 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
| 171 | "nfsroot=$(serverip):$(rootpath)\0" \ |
| 172 | "addip=setenv bootargs $(bootargs) " \ |
| 173 | "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)" \ |
| 174 | ":$(hostname):eth0:off\0" \ |
| 175 | "ramboot=tftpboot $(loadaddr) linux;" \ |
| 176 | "run ramargs;run addip;bootelf\0" \ |
| 177 | "nfsboot=tftpboot $(loadaddr) linux;" \ |
| 178 | "run nfsargs;run addip;bootelf\0" |
| 179 | #else |
| 180 | # define NETWORK_ENV_SETTINGS |
| 181 | #endif |
| 182 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 183 | NETWORK_ENV_SETTINGS \ |
| 184 | "ramargs=setenv bootargs " CONFIG_BOOTARGS "\0" \ |
| 185 | BOOT_ENV_SETTINGS |
| 186 | |
Mike Frysinger | d7fdc14 | 2008-10-12 23:16:52 -0400 | [diff] [blame] | 187 | #endif |