ixdp425.h 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. /*
  2. * (C) Copyright 2003
  3. * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
  4. *
  5. * Configuation settings for the IXDP425 board.
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef __CONFIG_H
  26. #define __CONFIG_H
  27. /*
  28. * High Level Configuration Options
  29. * (easy to change)
  30. */
  31. #define CONFIG_IXP425 1 /* This is an IXP425 CPU */
  32. #define CONFIG_IXDP425 1 /* on an IXDP425 Board */
  33. #define CONFIG_DISPLAY_CPUINFO 1 /* display cpu info (and speed) */
  34. #define CONFIG_DISPLAY_BOARDINFO 1 /* display board info */
  35. /*
  36. * select serial console configuration
  37. */
  38. #define CONFIG_IXP_SERIAL
  39. #define CONFIG_SYS_IXP425_CONSOLE IXP425_UART1
  40. #define CONFIG_BAUDRATE 115200
  41. #define CONFIG_BOARD_EARLY_INIT_F 1
  42. /***************************************************************
  43. * U-boot generic defines start here.
  44. ***************************************************************/
  45. /*
  46. * Size of malloc() pool
  47. */
  48. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
  49. /* allow to overwrite serial and ethaddr */
  50. #define CONFIG_ENV_OVERWRITE
  51. /*
  52. * BOOTP options
  53. */
  54. #define CONFIG_BOOTP_BOOTFILESIZE
  55. #define CONFIG_BOOTP_BOOTPATH
  56. #define CONFIG_BOOTP_GATEWAY
  57. #define CONFIG_BOOTP_HOSTNAME
  58. /* Command line configuration. */
  59. #include <config_cmd_default.h>
  60. #define CONFIG_CMD_ELF
  61. #define CONFIG_PCI
  62. #ifdef CONFIG_PCI
  63. #define CONFIG_CMD_PCI
  64. #define CONFIG_PCI_PNP
  65. #define CONFIG_IXP_PCI
  66. #define CONFIG_PCI_SCAN_SHOW
  67. #define CONFIG_CMD_PCI_ENUM
  68. #define CONFIG_EEPRO100
  69. #endif
  70. #define CONFIG_BOOTCOMMAND "run boot_flash"
  71. /* enable passing of ATAGs */
  72. #define CONFIG_CMDLINE_TAG 1
  73. #define CONFIG_SETUP_MEMORY_TAGS 1
  74. #define CONFIG_INITRD_TAG 1
  75. #if defined(CONFIG_CMD_KGDB)
  76. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  77. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  78. #endif
  79. /* Miscellaneous configurable options */
  80. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  81. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  82. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  83. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  84. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  85. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  86. #define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */
  87. #define CONFIG_SYS_MEMTEST_END 0x00800000 /* 4 ... 8 MB in DRAM */
  88. /* timer clock - 2* OSC_IN system clock */
  89. #define CONFIG_IXP425_TIMER_CLK 66666666
  90. #define CONFIG_SYS_HZ 1000
  91. /* default load address */
  92. #define CONFIG_SYS_LOAD_ADDR 0x00010000
  93. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  94. /*
  95. * Stack sizes
  96. *
  97. * The stack sizes are set up in start.S using the settings below
  98. */
  99. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  100. /***************************************************************
  101. * Platform/Board specific defines start here.
  102. ***************************************************************/
  103. /*
  104. * Hardware drivers
  105. */
  106. /*
  107. * Physical Memory Map
  108. */
  109. #define CONFIG_SYS_TEXT_BASE 0x50000000
  110. #define PHYS_FLASH_1 0x50000000 /* Flash Bank #1 */
  111. #define PHYS_FLASH_SIZE 0x00800000 /* 8 MB */
  112. #define PHYS_FLASH_BANK_SIZE 0x00800000 /* 8 MB Banks */
  113. #define PHYS_FLASH_SECT_SIZE 0x00020000 /* 128 KB sectors (x1) */
  114. #define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
  115. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  116. #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  117. #define CONFIG_BOARD_SIZE_LIMIT 262144
  118. /* Expansion bus settings */
  119. #define CONFIG_SYS_EXP_CS0 0xbcd23c42
  120. /* SDRAM settings */
  121. #define CONFIG_NR_DRAM_BANKS 1 /* we have 2 banks of DRAM */
  122. #define PHYS_SDRAM_1 0x00000000 /* SDRAM Bank #1 */
  123. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  124. #define CONFIG_SYS_SDR_CONFIG 0xd
  125. #define CONFIG_SYS_SDR_MODE_CONFIG 0x1
  126. #define CONFIG_SYS_SDRAM_REFRESH_CNT 0x81a
  127. /*
  128. * FLASH and environment organization
  129. */
  130. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  131. #define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
  132. #define CONFIG_ENV_IS_IN_FLASH 1
  133. #define CONFIG_SYS_FLASH_BANKS_LIST { PHYS_FLASH_1 }
  134. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  135. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  136. #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */
  137. #define CONFIG_ENV_ADDR (PHYS_FLASH_1 + 0x40000)
  138. #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */
  139. /* Use common CFI driver */
  140. #define CONFIG_SYS_FLASH_CFI
  141. #define CONFIG_FLASH_CFI_DRIVER
  142. /* no byte writes on IXP4xx */
  143. #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
  144. /* print 'E' for empty sector on flinfo */
  145. #define CONFIG_SYS_FLASH_EMPTY_INFO
  146. /* Ethernet */
  147. /* include IXP4xx NPE support */
  148. #define CONFIG_IXP4XX_NPE 1
  149. #define CONFIG_NET_MULTI 1
  150. /* NPE0 PHY address */
  151. #define CONFIG_PHY_ADDR 0
  152. /* NPE1 PHY address (HW Release E only) */
  153. #define CONFIG_PHY1_ADDR 1
  154. /* MII PHY management */
  155. #define CONFIG_MII 1
  156. /* Number of ethernet rx buffers & descriptors */
  157. #define CONFIG_SYS_RX_ETH_BUFFER 16
  158. #define CONFIG_HAS_ETH1 1
  159. #define CONFIG_CMD_DHCP
  160. #define CONFIG_CMD_NET
  161. #define CONFIG_CMD_MII
  162. #define CONFIG_CMD_PING
  163. #undef CONFIG_CMD_NFS
  164. /* Cache Configuration */
  165. #define CONFIG_SYS_CACHELINE_SIZE 32
  166. #define CONFIG_EXTRA_ENV_SETTINGS \
  167. "npe_ucode=50060000\0" \
  168. "mtd=IXP4XX-Flash.0:256k(uboot),128k(env),128k(ucode),2048k(linux),-(root)\0" \
  169. "kerneladdr=50080000\0" \
  170. "kernelfile=ixdp425/uImage\0" \
  171. "rootfile=ixdp425/rootfs\0" \
  172. "rootaddr=50280000\0" \
  173. "loadaddr=10000\0" \
  174. "updateboot_ser=mw.b 10000 ff 40000;" \
  175. " loady ${loadaddr};" \
  176. " run eraseboot writeboot\0" \
  177. "updateboot_net=mw.b 10000 ff 40000;" \
  178. " tftp ${loadaddr} ixdp425/u-boot.bin;" \
  179. " run eraseboot writeboot\0" \
  180. "eraseboot=protect off 50000000 5003ffff;" \
  181. " erase 50000000 5003ffff\0" \
  182. "writeboot=cp.b 10000 50000000 ${filesize}\0" \
  183. "updateucode=loady;" \
  184. " era ${npe_ucode} +${filesize};" \
  185. " cp.b ${loadaddr} ${npe_ucode} ${filesize}\0" \
  186. "updateroot=tftp ${loadaddr} ${rootfile};" \
  187. " era ${rootaddr} +${filesize};" \
  188. " cp.b ${loadaddr} ${rootaddr} ${filesize}\0" \
  189. "updatekern=tftp ${loadaddr} ${kernelfile};" \
  190. " era ${kerneladdr} +${filesize};" \
  191. " cp.b ${loadaddr} ${kerneladdr} ${filesize}\0" \
  192. "flashargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock4" \
  193. " rootfstype=squashfs,jffs2 init=/etc/preinit\0" \
  194. "netargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock4" \
  195. " rootfstype=squashfs,jffs2 init=/etc/preinit\0" \
  196. "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \
  197. "addeth=setenv bootargs ${bootargs} ethaddr=${ethaddr}\0" \
  198. "boot_flash=run flashargs addtty addeth;" \
  199. " bootm ${kerneladdr}\0" \
  200. "boot_net=run netargs addtty addeth;" \
  201. " tftpboot ${loadaddr} ${kernelfile};" \
  202. " bootm\0"
  203. /* additions for new relocation code, must be added to all boards */
  204. #define CONFIG_SYS_INIT_SP_ADDR \
  205. (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
  206. /*
  207. * GPIO settings
  208. */
  209. #define CONFIG_SYS_GPIO_UTOPIA_GPIO1 0
  210. #define CONFIG_SYS_GPIO_UTOPIA_IRQ_N 1
  211. #define CONFIG_SYS_GPIO_HSS1_IRQ_N 2
  212. #define CONFIG_SYS_GPIO_HSS0_IRQ_N 3
  213. #define CONFIG_SYS_GPIO_ETH0_IRQ_N 4
  214. #define CONFIG_SYS_GPIO_ETH1_IRQ_N 5
  215. #define CONFIG_SYS_GPIO_I2C_SCL 6
  216. #define CONFIG_SYS_GPIO_I2C_SDA 7
  217. #define CONFIG_SYS_GPIO_PCI_INTD_N 8
  218. #define CONFIG_SYS_GPIO_PCI_INTC_N 9
  219. #define CONFIG_SYS_GPIO_PCI_INTB_N 10
  220. #define CONFIG_SYS_GPIO_PCI_INTA_N 11
  221. #define CONFIG_SYS_GPIO_UTOPIA_GPIO0 12
  222. #define CONFIG_SYS_GPIO_PCI_RESET_N 13
  223. #define CONFIG_SYS_GPIO_PCI_CLK 14
  224. #define CONFIG_SYS_GPIO_EXTBUS_CLK 15
  225. #endif /* __CONFIG_H */