ebony.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. /*
  2. * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com>
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. /************************************************************************
  23. * board/config_EBONY.h - configuration for AMCC 440GP Ref (Ebony)
  24. ***********************************************************************/
  25. #ifndef __CONFIG_H
  26. #define __CONFIG_H
  27. /*-----------------------------------------------------------------------
  28. * High Level Configuration Options
  29. *----------------------------------------------------------------------*/
  30. #define CONFIG_EBONY 1 /* Board is ebony */
  31. #define CONFIG_440GP 1 /* Specifc GP support */
  32. #define CONFIG_440 1 /* ... PPC440 family */
  33. #define CONFIG_4xx 1 /* ... PPC4xx family */
  34. #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
  35. #define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */
  36. /*
  37. * Include common defines/options for all AMCC eval boards
  38. */
  39. #define CONFIG_HOSTNAME ebony
  40. #include "amcc-common.h"
  41. /*
  42. * Define here the location of the environment variables (FLASH or NVRAM).
  43. * Note: DENX encourages to use redundant environment in FLASH. NVRAM is only
  44. * supported for backward compatibility.
  45. */
  46. #if 1
  47. #define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */
  48. #else
  49. #define CONFIG_ENV_IS_IN_NVRAM 1 /* use NVRAM for environment vars */
  50. #endif
  51. /*-----------------------------------------------------------------------
  52. * Base addresses -- Note these are effective addresses where the
  53. * actual resources get mapped (not physical addresses)
  54. *----------------------------------------------------------------------*/
  55. #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */
  56. #define CONFIG_SYS_FLASH_BASE 0xff800000 /* start of FLASH */
  57. #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */
  58. #define CONFIG_SYS_PERIPHERAL_BASE 0xe0000000 /* internal peripherals */
  59. #define CONFIG_SYS_ISRAM_BASE 0xc0000000 /* internal SRAM */
  60. #define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */
  61. #define CONFIG_SYS_NVRAM_BASE_ADDR (CONFIG_SYS_PERIPHERAL_BASE + 0x08000000)
  62. #define CONFIG_SYS_FPGA_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x08300000)
  63. /*-----------------------------------------------------------------------
  64. * Initial RAM & stack pointer (placed in internal SRAM)
  65. *----------------------------------------------------------------------*/
  66. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE /* Initial RAM address */
  67. #define CONFIG_SYS_INIT_RAM_END 0x2000 /* End of used area in RAM */
  68. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */
  69. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  70. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  71. /*-----------------------------------------------------------------------
  72. * Serial Port
  73. *----------------------------------------------------------------------*/
  74. #undef CONFIG_SERIAL_SOFTWARE_FIFO
  75. #define CONFIG_SYS_EXT_SERIAL_CLOCK (1843200 * 6) /* Ext clk @ 11.059 MHz */
  76. /*-----------------------------------------------------------------------
  77. * NVRAM/RTC
  78. *
  79. * NOTE: Upper 8 bytes of NVRAM is where the RTC registers are located.
  80. * The DS1743 code assumes this condition (i.e. -- it assumes the base
  81. * address for the RTC registers is:
  82. *
  83. * CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE
  84. *
  85. *----------------------------------------------------------------------*/
  86. #define CONFIG_SYS_NVRAM_SIZE (0x2000 - 8) /* NVRAM size(8k)- RTC regs */
  87. #define CONFIG_RTC_DS174x 1 /* DS1743 RTC */
  88. #ifdef CONFIG_ENV_IS_IN_NVRAM
  89. #define CONFIG_ENV_SIZE 0x1000 /* Size of Environment vars */
  90. #define CONFIG_ENV_ADDR \
  91. (CONFIG_SYS_NVRAM_BASE_ADDR+CONFIG_SYS_NVRAM_SIZE-CONFIG_ENV_SIZE)
  92. #endif /* CONFIG_ENV_IS_IN_NVRAM */
  93. /*-----------------------------------------------------------------------
  94. * FLASH related
  95. *----------------------------------------------------------------------*/
  96. #define CONFIG_SYS_MAX_FLASH_BANKS 3 /* number of banks */
  97. #define CONFIG_SYS_MAX_FLASH_SECT 32 /* sectors per device */
  98. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  99. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  100. #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
  101. #define CONFIG_SYS_FLASH_ADDR0 0x5555
  102. #define CONFIG_SYS_FLASH_ADDR1 0x2aaa
  103. #define CONFIG_SYS_FLASH_WORD_SIZE unsigned char
  104. #ifdef CONFIG_ENV_IS_IN_FLASH
  105. #define CONFIG_ENV_SECT_SIZE 0x10000 /* size of one complete sector */
  106. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE)
  107. #define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
  108. /* Address and size of Redundant Environment Sector */
  109. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
  110. #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
  111. #endif /* CONFIG_ENV_IS_IN_FLASH */
  112. /*-----------------------------------------------------------------------
  113. * DDR SDRAM
  114. *----------------------------------------------------------------------*/
  115. #define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */
  116. #define SPD_EEPROM_ADDRESS {0x53,0x52} /* SPD i2c spd addresses */
  117. #define CONFIG_PROG_SDRAM_TLB 1 /* setup SDRAM TLB's dynamically*/
  118. /*-----------------------------------------------------------------------
  119. * I2C
  120. *----------------------------------------------------------------------*/
  121. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  122. #define CONFIG_SYS_I2C_MULTI_EEPROMS
  123. #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)
  124. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  125. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
  126. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
  127. /*
  128. * Default environment variables
  129. */
  130. #define CONFIG_EXTRA_ENV_SETTINGS \
  131. CONFIG_AMCC_DEF_ENV \
  132. CONFIG_AMCC_DEF_ENV_POWERPC \
  133. CONFIG_AMCC_DEF_ENV_PPC_OLD \
  134. CONFIG_AMCC_DEF_ENV_NOR_UPD \
  135. "kernel_addr=ff800000\0" \
  136. "ramdisk_addr=ff810000\0" \
  137. ""
  138. #define CONFIG_PHY_ADDR 8 /* PHY address */
  139. #define CONFIG_HAS_ETH0
  140. #define CONFIG_HAS_ETH1
  141. #define CONFIG_PHY1_ADDR 9 /* EMAC1 PHY address */
  142. /*
  143. * Commands additional to the ones defined in amcc-common.h
  144. */
  145. #define CONFIG_CMD_DATE
  146. #define CONFIG_CMD_PCI
  147. #define CONFIG_CMD_SDRAM
  148. #define CONFIG_CMD_SNTP
  149. /*-----------------------------------------------------------------------
  150. * PCI stuff
  151. *-----------------------------------------------------------------------
  152. */
  153. /* General PCI */
  154. #define CONFIG_PCI /* include pci support */
  155. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  156. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  157. #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */
  158. /* Board-specific PCI */
  159. #define CONFIG_SYS_PCI_TARGET_INIT /* let board init pci target */
  160. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */
  161. #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe /* Whatever */
  162. #endif /* __CONFIG_H */