davinci_sffsdr.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /*
  2. * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. */
  19. #ifndef __CONFIG_H
  20. #define __CONFIG_H
  21. #include <asm/sizes.h>
  22. /*=======*/
  23. /* Board */
  24. /*=======*/
  25. #define SFFSDR
  26. #define CFG_NAND_LARGEPAGE
  27. #define CFG_USE_NAND
  28. /*===================*/
  29. /* SoC Configuration */
  30. /*===================*/
  31. #define CONFIG_ARM926EJS /* arm926ejs CPU core */
  32. #define CONFIG_SYS_CLK_FREQ 297000000 /* Arm Clock frequency */
  33. #define CFG_TIMERBASE 0x01c21400 /* use timer 0 */
  34. #define CFG_HZ_CLOCK 27000000 /* Timer Input clock freq */
  35. #define CFG_HZ 1000
  36. /*==================================================*/
  37. /* EEPROM definitions for Atmel 24LC64 EEPROM chip */
  38. /*==================================================*/
  39. #define CFG_I2C_EEPROM_ADDR_LEN 2
  40. #define CFG_I2C_EEPROM_ADDR 0x50
  41. #define CFG_EEPROM_PAGE_WRITE_BITS 5
  42. #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 20
  43. /*=============*/
  44. /* Memory Info */
  45. /*=============*/
  46. #define CFG_MALLOC_LEN (0x10000 + 256*1024) /* malloc() len */
  47. #define CFG_GBL_DATA_SIZE 128 /* reserved for initial data */
  48. #define CFG_MEMTEST_START 0x80000000 /* memtest start address */
  49. #define CFG_MEMTEST_END 0x81000000 /* 16MB RAM test */
  50. #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
  51. #define CONFIG_STACKSIZE (256*1024) /* regular stack */
  52. #define PHYS_SDRAM_1 0x80000000 /* DDR Start */
  53. #define PHYS_SDRAM_1_SIZE 0x08000000 /* DDR size 128MB */
  54. #define DDR_4BANKS /* 4-bank DDR2 (128MB) */
  55. /*====================*/
  56. /* Serial Driver info */
  57. /*====================*/
  58. #define CFG_NS16550
  59. #define CFG_NS16550_SERIAL
  60. #define CFG_NS16550_REG_SIZE 4 /* NS16550 register size */
  61. #define CFG_NS16550_COM1 0x01c20000 /* Base address of UART0 */
  62. #define CFG_NS16550_CLK 27000000 /* Input clock to NS16550 */
  63. #define CONFIG_CONS_INDEX 1 /* use UART0 for console */
  64. #define CONFIG_BAUDRATE 115200 /* Default baud rate */
  65. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  66. /*===================*/
  67. /* I2C Configuration */
  68. /*===================*/
  69. #define CONFIG_HARD_I2C
  70. #define CONFIG_DRIVER_DAVINCI_I2C
  71. #define CFG_I2C_SPEED 80000 /* 100Kbps won't work, silicon bug */
  72. #define CFG_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */
  73. /*==================================*/
  74. /* Network & Ethernet Configuration */
  75. /*==================================*/
  76. #define CONFIG_DRIVER_TI_EMAC
  77. #define CONFIG_MII
  78. #define CONFIG_BOOTP_DEFAULT
  79. #define CONFIG_BOOTP_DNS
  80. #define CONFIG_BOOTP_DNS2
  81. #define CONFIG_BOOTP_SEND_HOSTNAME
  82. #define CONFIG_NET_RETRY_COUNT 10
  83. #define CONFIG_OVERWRITE_ETHADDR_ONCE
  84. /*=====================*/
  85. /* Flash & Environment */
  86. /*=====================*/
  87. #undef CFG_ENV_IS_IN_FLASH
  88. #define CFG_NO_FLASH
  89. #define CFG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */
  90. #define CFG_ENV_SECT_SIZE 2048 /* Env sector Size */
  91. #define CFG_ENV_SIZE SZ_128K
  92. #define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is loaded by a bootloader */
  93. #define CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init done */
  94. #define CFG_NAND_BASE 0x02000000
  95. #define CFG_NAND_HW_ECC
  96. #define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
  97. #define NAND_MAX_CHIPS 1
  98. #define CFG_ENV_OFFSET 0x0 /* Block 0--not used by bootcode */
  99. /*=====================*/
  100. /* Board related stuff */
  101. /*=====================*/
  102. /*==========================================*/
  103. /* I2C switch definitions for PCA9543 chip */
  104. /* on Lyrtech SFF SDR board. */
  105. /* This chip has a single register. */
  106. /*==========================================*/
  107. #define CFG_I2C_PCA9543_ADDR 0x70
  108. #define CFG_I2C_PCA9543_ADDR_LEN 0
  109. #define CFG_I2C_PCA9543_ENABLE_CH0 0x01 /* Enable channel 0. */
  110. /*==============================*/
  111. /* U-Boot general configuration */
  112. /*==============================*/
  113. #undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */
  114. #define CONFIG_MISC_INIT_R
  115. #undef CONFIG_BOOTDELAY
  116. #define CONFIG_BOOTFILE "uImage" /* Boot file name */
  117. #define CFG_PROMPT "U-Boot > " /* Monitor Command Prompt */
  118. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  119. /* Print buffer size */
  120. #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
  121. #define CFG_MAXARGS 16 /* max number of command args */
  122. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  123. #define CFG_LOAD_ADDR 0x80700000 /* Default Linux kernel
  124. * load address. */
  125. #define CONFIG_VERSION_VARIABLE
  126. #define CONFIG_AUTO_COMPLETE /* Won't work with hush so far,
  127. * may be later */
  128. #define CFG_HUSH_PARSER
  129. #define CFG_PROMPT_HUSH_PS2 "> "
  130. #define CONFIG_CMDLINE_EDITING
  131. #define CFG_LONGHELP
  132. #define CONFIG_CRC32_VERIFY
  133. #define CONFIG_MX_CYCLIC
  134. /*
  135. * Define this to load an Integrity kernel.
  136. *
  137. #define CONFIG_CMD_ELF
  138. */
  139. /*===================*/
  140. /* Linux Information */
  141. /*===================*/
  142. #define LINUX_BOOT_PARAM_ADDR 0x80000100
  143. #define CONFIG_CMDLINE_TAG
  144. #define CONFIG_SETUP_MEMORY_TAGS
  145. #define CONFIG_BOOTARGS \
  146. "mem=56M console=ttyS0,115200n8 root=/dev/hda1 rw noinitrd ip=dhcp"
  147. #define CONFIG_BOOTCOMMAND "setenv setboot setenv bootargs \\$(bootargs) video=dm64xxfb:output=\\$(videostd);run setboot"
  148. /*=================*/
  149. /* U-Boot commands */
  150. /*=================*/
  151. #include <config_cmd_default.h>
  152. #define CONFIG_CMD_ASKENV
  153. #define CONFIG_CMD_DHCP
  154. #define CONFIG_CMD_DIAG
  155. #define CONFIG_CMD_I2C
  156. #define CONFIG_CMD_MII
  157. #define CONFIG_CMD_PING
  158. #define CONFIG_CMD_SAVES
  159. #define CONFIG_CMD_NAND
  160. #define CONFIG_CMD_EEPROM
  161. #undef CONFIG_CMD_BDI
  162. #undef CONFIG_CMD_FPGA
  163. #undef CONFIG_CMD_SETGETDCR
  164. #undef CONFIG_CMD_FLASH
  165. #undef CONFIG_CMD_IMLS
  166. /*=======================*/
  167. /* KGDB support (if any) */
  168. /*=======================*/
  169. #ifdef CONFIG_CMD_KGDB
  170. #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
  171. #define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */
  172. #endif
  173. #endif /* __CONFIG_H */