luan.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /*
  2. * (C) Copyright 2005
  3. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  4. * John Otken, jotken@softadvances.com
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. /************************************************************************
  25. * luan.h - configuration for LUAN board
  26. ***********************************************************************/
  27. #ifndef __CONFIG_H
  28. #define __CONFIG_H
  29. /*-----------------------------------------------------------------------
  30. * High Level Configuration Options
  31. *----------------------------------------------------------------------*/
  32. #define CONFIG_LUAN 1 /* Board is Luan */
  33. #define CONFIG_440SP 1 /* Specific PPC440SP support */
  34. #define CONFIG_4xx 1 /* PPC4xx family */
  35. #define CONFIG_440 1
  36. #define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */
  37. /*
  38. * Include common defines/options for all AMCC eval boards
  39. */
  40. #define CONFIG_HOSTNAME luan
  41. #include "amcc-common.h"
  42. #define CONFIG_BOARD_EARLY_INIT_F 1 /* call board_early_init_f() */
  43. #define CONFIG_MISC_INIT_R 1 /* call misc_init_r() */
  44. /*-----------------------------------------------------------------------
  45. * Base addresses -- Note these are effective addresses where the
  46. * actual resources get mapped (not physical addresses)
  47. *----------------------------------------------------------------------*/
  48. #define CONFIG_SYS_LARGE_FLASH 0xffc00000 /* 4MB flash address CS0 */
  49. #define CONFIG_SYS_SMALL_FLASH 0xff900000 /* 1MB flash address CS2 */
  50. #define CONFIG_SYS_SRAM_BASE 0xff800000 /* 1MB SRAM address CS2 */
  51. #define CONFIG_SYS_EPLD_BASE 0xff000000 /* EPLD and FRAM CS1 */
  52. #define CONFIG_SYS_ISRAM_BASE 0xf8000000 /* internal 8k SRAM (L2 cache) */
  53. #define CONFIG_SYS_PERIPHERAL_BASE 0xf0000000 /* internal peripherals */
  54. #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */
  55. #define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */
  56. #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */
  57. #if CONFIG_SYS_LARGE_FLASH == 0xffc00000
  58. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_LARGE_FLASH
  59. #else
  60. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_SMALL_FLASH
  61. #endif
  62. #if CONFIG_SYS_SRAM_BASE
  63. #define CONFIG_SYS_KBYTES_SDRAM 1024*2
  64. #else
  65. #define CONFIG_SYS_KBYTES_SDRAM 1024
  66. #endif
  67. /*-----------------------------------------------------------------------
  68. * Initial RAM & stack pointer (placed in SDRAM)
  69. *----------------------------------------------------------------------*/
  70. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE
  71. #define CONFIG_SYS_INIT_RAM_END (8 << 10)
  72. #define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */
  73. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  74. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  75. /*-----------------------------------------------------------------------
  76. * Serial Port
  77. *----------------------------------------------------------------------*/
  78. #define CONFIG_SYS_EXT_SERIAL_CLOCK 11059200 /* external 11.059MHz clk */
  79. #undef CONFIG_UART1_CONSOLE /* define if you want console on UART1 */
  80. /*-----------------------------------------------------------------------
  81. * Environment
  82. *----------------------------------------------------------------------*/
  83. /*
  84. * Define here the location of the environment variables (FLASH or EEPROM).
  85. * Note: DENX encourages to use redundant environment in FLASH.
  86. */
  87. #define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
  88. /*-----------------------------------------------------------------------
  89. * FLASH related
  90. *----------------------------------------------------------------------*/
  91. #define CONFIG_SYS_MAX_FLASH_BANKS 3 /* max number of memory banks */
  92. #define CONFIG_SYS_MAX_FLASH_SECT 64 /* max number of sectors on one chip */
  93. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  94. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  95. #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
  96. #define CONFIG_SYS_FLASH_ADDR0 0x555
  97. #define CONFIG_SYS_FLASH_ADDR1 0x2aa
  98. #define CONFIG_SYS_FLASH_WORD_SIZE unsigned char
  99. #ifdef CONFIG_ENV_IS_IN_FLASH
  100. #define CONFIG_ENV_SECT_SIZE 0x10000 /* size of one complete sector */
  101. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE)
  102. #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */
  103. /* Address and size of Redundant Environment Sector */
  104. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
  105. #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
  106. #endif /* CONFIG_ENV_IS_IN_FLASH */
  107. /*-----------------------------------------------------------------------
  108. * DDR SDRAM
  109. *----------------------------------------------------------------------*/
  110. #define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */
  111. #define SPD_EEPROM_ADDRESS {0x53, 0x52} /* SPD i2c spd addresses*/
  112. #define CONFIG_DDR_ECC 1 /* with ECC support */
  113. /*-----------------------------------------------------------------------
  114. * I2C
  115. *----------------------------------------------------------------------*/
  116. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  117. #define CONFIG_SYS_I2C_MULTI_EEPROMS
  118. #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)
  119. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  120. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
  121. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
  122. /*
  123. * Default environment variables
  124. */
  125. #define CONFIG_EXTRA_ENV_SETTINGS \
  126. CONFIG_AMCC_DEF_ENV \
  127. CONFIG_AMCC_DEF_ENV_PPC \
  128. CONFIG_AMCC_DEF_ENV_NOR_UPD \
  129. "kernel_addr=fc000000\0" \
  130. "ramdisk_addr=fc100000\0" \
  131. ""
  132. #define CONFIG_HAS_ETH0
  133. #define CONFIG_PHY_ADDR 1
  134. #define CONFIG_CIS8201_PHY 1 /* Enable 'special' RGMII mode for Cicada phy */
  135. #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
  136. #ifdef DEBUG
  137. #define CONFIG_PANIC_HANG
  138. #else
  139. #define CONFIG_HW_WATCHDOG /* watchdog */
  140. #endif
  141. /*
  142. * Commands additional to the ones defined in amcc-common.h
  143. */
  144. #define CONFIG_CMD_PCI
  145. #define CONFIG_CMD_SDRAM
  146. /*-----------------------------------------------------------------------
  147. * PCI stuff
  148. *-----------------------------------------------------------------------
  149. */
  150. #if defined(CONFIG_CMD_PCI)
  151. /* General PCI */
  152. #define CONFIG_PCI /* include pci support */
  153. #define CONFIG_PCI_PNP /* do (not) pci plug-and-play */
  154. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  155. /* Board-specific PCI */
  156. #define CONFIG_SYS_PCI_TARGET_INIT
  157. #undef CONFIG_SYS_PCI_MASTER_INIT
  158. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */
  159. #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0x4403 /* whatever */
  160. #endif
  161. #endif /* __CONFIG_H */