devkit8000.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. /*
  2. * (C) Copyright 2006-2008
  3. * Texas Instruments.
  4. * Richard Woodruff <r-woodruff2@ti.com>
  5. * Syed Mohammed Khasim <x0khasim@ti.com>
  6. *
  7. * (C) Copyright 2009
  8. * Frederik Kriewitz <frederik@kriewitz.eu>
  9. *
  10. * Configuration settings for the DevKit8000 board.
  11. *
  12. * SPDX-License-Identifier: GPL-2.0+
  13. */
  14. #ifndef __CONFIG_H
  15. #define __CONFIG_H
  16. /* High Level Configuration Options */
  17. #define CONFIG_OMAP3_DEVKIT8000 1 /* working with DevKit8000 */
  18. #define CONFIG_MACH_TYPE MACH_TYPE_DEVKIT8000
  19. /*
  20. * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
  21. * 64 bytes before this address should be set aside for u-boot.img's
  22. * header. That is 0x800FFFC0--0x80100000 should not be used for any
  23. * other needs.
  24. */
  25. #define CONFIG_SYS_TEXT_BASE 0x80100000
  26. #define CONFIG_SPL_BSS_START_ADDR 0x80000500 /* leave space for bootargs*/
  27. #define CONFIG_SPL_BSS_MAX_SIZE 0x80000
  28. #define CONFIG_SYS_SPL_MALLOC_START 0x80208000
  29. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 /* 1 MB */
  30. #define CONFIG_NAND
  31. /* Physical Memory Map */
  32. #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
  33. #include <configs/ti_omap3_common.h>
  34. #define CONFIG_MISC_INIT_R
  35. #define CONFIG_REVISION_TAG 1
  36. /* Size of malloc() pool */
  37. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  38. /* Sector */
  39. #undef CONFIG_SYS_MALLOC_LEN
  40. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
  41. /* Hardware drivers */
  42. /* DM9000 */
  43. #define CONFIG_NET_RETRY_COUNT 20
  44. #define CONFIG_DRIVER_DM9000 1
  45. #define CONFIG_DM9000_BASE 0x2c000000
  46. #define DM9000_IO CONFIG_DM9000_BASE
  47. #define DM9000_DATA (CONFIG_DM9000_BASE + 0x400)
  48. #define CONFIG_DM9000_USE_16BIT 1
  49. #define CONFIG_DM9000_NO_SROM 1
  50. #undef CONFIG_DM9000_DEBUG
  51. /* SPI */
  52. #undef CONFIG_SPI
  53. #undef CONFIG_OMAP3_SPI
  54. /* I2C */
  55. #undef CONFIG_SYS_I2C_OMAP24XX
  56. #define CONFIG_SYS_I2C_OMAP34XX
  57. /* TWL4030 */
  58. #define CONFIG_TWL4030_LED 1
  59. /* Board NAND Info */
  60. #define MTDIDS_DEFAULT "nand0=nand"
  61. #define MTDPARTS_DEFAULT "mtdparts=nand:" \
  62. "512k(x-loader)," \
  63. "1920k(u-boot)," \
  64. "128k(u-boot-env)," \
  65. "4m(kernel)," \
  66. "-(fs)"
  67. #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
  68. /* to access nand */
  69. #define CONFIG_JFFS2_NAND
  70. /* nand device jffs2 lives on */
  71. #define CONFIG_JFFS2_DEV "nand0"
  72. /* start of jffs2 partition */
  73. #define CONFIG_JFFS2_PART_OFFSET 0x680000
  74. #define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 */
  75. /* partition */
  76. /* commands to include */
  77. #define CONFIG_CMD_JFFS2 /* JFFS2 Support */
  78. #define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
  79. #undef CONFIG_SUPPORT_RAW_INITRD
  80. #undef CONFIG_FAT_WRITE
  81. /* BOOTP/DHCP options */
  82. #define CONFIG_BOOTP_SUBNETMASK
  83. #define CONFIG_BOOTP_GATEWAY
  84. #define CONFIG_BOOTP_HOSTNAME
  85. #define CONFIG_BOOTP_NISDOMAIN
  86. #define CONFIG_BOOTP_BOOTPATH
  87. #define CONFIG_BOOTP_BOOTFILESIZE
  88. #define CONFIG_BOOTP_DNS
  89. #define CONFIG_BOOTP_DNS2
  90. #define CONFIG_BOOTP_SEND_HOSTNAME
  91. #define CONFIG_BOOTP_NTPSERVER
  92. #define CONFIG_BOOTP_TIMEOFFSET
  93. #undef CONFIG_BOOTP_VENDOREX
  94. /* Environment information */
  95. #define CONFIG_EXTRA_ENV_SETTINGS \
  96. "loadaddr=0x82000000\0" \
  97. "console=ttyO2,115200n8\0" \
  98. "mmcdev=0\0" \
  99. "vram=12M\0" \
  100. "dvimode=1024x768MR-16@60\0" \
  101. "defaultdisplay=dvi\0" \
  102. "nfsopts=hard,tcp,rsize=65536,wsize=65536\0" \
  103. "kernelopts=rw\0" \
  104. "commonargs=" \
  105. "setenv bootargs console=${console} " \
  106. "vram=${vram} " \
  107. "omapfb.mode=dvi:${dvimode} " \
  108. "omapdss.def_disp=${defaultdisplay}\0" \
  109. "mmcargs=" \
  110. "run commonargs; " \
  111. "setenv bootargs ${bootargs} " \
  112. "root=/dev/mmcblk0p2 " \
  113. "rootwait " \
  114. "${kernelopts}\0" \
  115. "nandargs=" \
  116. "run commonargs; " \
  117. "setenv bootargs ${bootargs} " \
  118. "omapfb.mode=dvi:${dvimode} " \
  119. "omapdss.def_disp=${defaultdisplay} " \
  120. "root=/dev/mtdblock4 " \
  121. "rootfstype=jffs2 " \
  122. "${kernelopts}\0" \
  123. "netargs=" \
  124. "run commonargs; " \
  125. "setenv bootargs ${bootargs} " \
  126. "root=/dev/nfs " \
  127. "nfsroot=${serverip}:${rootpath},${nfsopts} " \
  128. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off " \
  129. "${kernelopts} " \
  130. "dnsip1=${dnsip} " \
  131. "dnsip2=${dnsip2}\0" \
  132. "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
  133. "bootscript=echo Running bootscript from mmc ...; " \
  134. "source ${loadaddr}\0" \
  135. "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
  136. "eraseenv=nand unlock 0x260000 0x20000; nand erase 0x260000 0x20000\0" \
  137. "mmcboot=echo Booting from mmc ...; " \
  138. "run mmcargs; " \
  139. "bootm ${loadaddr}\0" \
  140. "nandboot=echo Booting from nand ...; " \
  141. "run nandargs; " \
  142. "nand read ${loadaddr} 280000 400000; " \
  143. "bootm ${loadaddr}\0" \
  144. "netboot=echo Booting from network ...; " \
  145. "dhcp ${loadaddr}; " \
  146. "run netargs; " \
  147. "bootm ${loadaddr}\0" \
  148. "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
  149. "if run loadbootscript; then " \
  150. "run bootscript; " \
  151. "else " \
  152. "if run loaduimage; then " \
  153. "run mmcboot; " \
  154. "else run nandboot; " \
  155. "fi; " \
  156. "fi; " \
  157. "else run nandboot; fi\0"
  158. #define CONFIG_BOOTCOMMAND "run autoboot"
  159. /* Boot Argument Buffer Size */
  160. #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0 + 0x07000000)
  161. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \
  162. 0x01000000) /* 16MB */
  163. /* NAND and environment organization */
  164. #define CONFIG_ENV_IS_IN_NAND 1
  165. #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
  166. #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
  167. /* SRAM config */
  168. #define CONFIG_SYS_SRAM_START 0x40200000
  169. #define CONFIG_SYS_SRAM_SIZE 0x10000
  170. /* Defines for SPL */
  171. #undef CONFIG_SPL_TEXT_BASE
  172. #define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/
  173. /* NAND boot config */
  174. #define CONFIG_SYS_NAND_BUSWIDTH_16BIT
  175. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  176. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  177. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  178. #define CONFIG_SYS_NAND_OOBSIZE 64
  179. #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
  180. #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
  181. #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
  182. 10, 11, 12, 13}
  183. #define CONFIG_SYS_NAND_ECCSIZE 512
  184. #define CONFIG_SYS_NAND_ECCBYTES 3
  185. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW
  186. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
  187. #define CONFIG_SYS_NAND_U_BOOT_SIZE 0x200000
  188. /* SPL OS boot options */
  189. #define CONFIG_CMD_SPL_WRITE_SIZE 0x400 /* 1024 byte */
  190. #define CONFIG_CMD_SPL_NAND_OFS (CONFIG_SYS_NAND_SPL_KERNEL_OFFS+\
  191. 0x400000)
  192. #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
  193. #undef CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
  194. #undef CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR
  195. #undef CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS
  196. #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x500 /* address 0xa0000 */
  197. #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x8 /* address 0x1000 */
  198. #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 8 /* 4KB */
  199. #undef CONFIG_SYS_SPL_ARGS_ADDR
  200. #define CONFIG_SYS_SPL_ARGS_ADDR (PHYS_SDRAM_1 + 0x100)
  201. #endif /* __CONFIG_H */