km-mpc83xx.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /*
  2. * Internal Definitions
  3. */
  4. #define BOOTFLASH_START 0xF0000000
  5. /*
  6. * DDR Setup
  7. */
  8. #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* DDR is system memory */
  9. #define CONFIG_SYS_SDRAM_BASE2 (CONFIG_SYS_SDRAM_BASE + 0x10000000) /* +256M */
  10. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
  11. DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
  12. #define CFG_83XX_DDR_USES_CS0
  13. /*
  14. * Manually set up DDR parameters
  15. */
  16. #define CONFIG_DDR_II
  17. #define CONFIG_SYS_DDR_SIZE 2048 /* MB */
  18. /*
  19. * The reserved memory
  20. */
  21. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  22. #define CONFIG_SYS_FLASH_BASE 0xF0000000
  23. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  24. #define CONFIG_SYS_RAMBOOT
  25. #endif
  26. /* Reserve 768 kB for Mon */
  27. #define CONFIG_SYS_MONITOR_LEN (768 * 1024)
  28. /*
  29. * Initial RAM Base Address Setup
  30. */
  31. #define CONFIG_SYS_INIT_RAM_LOCK
  32. #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
  33. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* End of used area in RAM */
  34. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
  35. GENERATED_GBL_DATA_SIZE)
  36. /*
  37. * Init Local Bus Memory Controller:
  38. *
  39. * Bank Bus Machine PortSz Size Device
  40. * ---- --- ------- ------ ----- ------
  41. * 0 Local GPCM 16 bit 256MB FLASH
  42. * 1 Local GPCM 8 bit 128MB GPIO/PIGGY
  43. *
  44. */
  45. /*
  46. * FLASH on the Local Bus
  47. */
  48. #define CONFIG_SYS_FLASH_SIZE 256 /* max FLASH size is 256M */
  49. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks */
  50. #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max num of sects on one chip */
  51. #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
  52. /*
  53. * Serial Port
  54. */
  55. #define CONFIG_SYS_NS16550_SERIAL
  56. #define CONFIG_SYS_NS16550_REG_SIZE 1
  57. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  58. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500)
  59. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600)
  60. /* I2C */
  61. #define CONFIG_SYS_I2C
  62. #define CONFIG_SYS_NUM_I2C_BUSES 4
  63. #define CONFIG_SYS_I2C_MAX_HOPS 1
  64. #define CONFIG_SYS_I2C_FSL
  65. #define CONFIG_SYS_FSL_I2C_SPEED 200000
  66. #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
  67. #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
  68. #define CONFIG_SYS_I2C_OFFSET 0x3000
  69. #define CONFIG_SYS_FSL_I2C2_SPEED 200000
  70. #define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F
  71. #define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100
  72. #define CONFIG_SYS_I2C_BUSES {{0, {I2C_NULL_HOP} }, \
  73. {0, {{I2C_MUX_PCA9547, 0x70, 2} } }, \
  74. {0, {{I2C_MUX_PCA9547, 0x70, 1} } }, \
  75. {1, {I2C_NULL_HOP} } }
  76. #if defined(CONFIG_CMD_NAND)
  77. #define CONFIG_NAND_KMETER1
  78. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  79. #define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE
  80. #endif
  81. /*
  82. * For booting Linux, the board info and command line data
  83. * have to be in the first 8 MB of memory, since this is
  84. * the maximum mapped by the Linux kernel during initialization.
  85. */
  86. #define CONFIG_SYS_BOOTMAPSZ (8 << 20)
  87. /*
  88. * Environment
  89. */
  90. #ifndef CONFIG_SYS_RAMBOOT
  91. #ifndef CONFIG_ENV_ADDR
  92. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \
  93. CONFIG_SYS_MONITOR_LEN)
  94. #endif
  95. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
  96. #ifndef CONFIG_ENV_OFFSET
  97. #define CONFIG_ENV_OFFSET (CONFIG_SYS_MONITOR_LEN)
  98. #endif
  99. /* Address and size of Redundant Environment Sector */
  100. #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
  101. CONFIG_ENV_SECT_SIZE)
  102. #else /* CFG_SYS_RAMBOOT */
  103. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  104. #define CONFIG_ENV_SIZE 0x2000
  105. #endif /* CFG_SYS_RAMBOOT */
  106. /*
  107. * Environment Configuration
  108. */
  109. #define CONFIG_ENV_OVERWRITE
  110. #ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */
  111. #define CONFIG_KM_DEF_ENV "km-common=empty\0"
  112. #endif
  113. #ifndef CONFIG_KM_DEF_ARCH
  114. #define CONFIG_KM_DEF_ARCH "arch=ppc_82xx\0"
  115. #endif
  116. #define CONFIG_EXTRA_ENV_SETTINGS \
  117. CONFIG_KM_DEF_ENV \
  118. CONFIG_KM_DEF_ARCH \
  119. "newenv=" \
  120. "prot off " __stringify(CONFIG_ENV_ADDR) " +0x40000 && " \
  121. "era " __stringify(CONFIG_ENV_ADDR) " +0x40000\0" \
  122. "unlock=yes\0" \
  123. ""
  124. #if defined(CONFIG_UEC_ETH)
  125. #define CONFIG_HAS_ETH0
  126. #endif
  127. /*
  128. * QE UEC ethernet configuration
  129. */
  130. #define CONFIG_UEC_ETH
  131. #define CONFIG_ETHPRIME "UEC0"