am335x_igep0033.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /*
  2. * Copyright (C) 2013, ISEE 2007 SL - http://www.isee.biz/
  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 version 2.
  7. *
  8. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  9. * kind, whether express or implied; without even the implied warranty
  10. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef __CONFIG_IGEP0033_H
  14. #define __CONFIG_IGEP0033_H
  15. #define CONFIG_NAND
  16. #include <configs/ti_am335x_common.h>
  17. /* Mach type */
  18. #define MACH_TYPE_IGEP0033 4521 /* Until the next sync */
  19. #define CONFIG_MACH_TYPE MACH_TYPE_IGEP0033
  20. /* Clock defines */
  21. #define V_OSCK 24000000 /* Clock output from T2 */
  22. #define V_SCLK (V_OSCK)
  23. #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
  24. /* Make the verbose messages from UBI stop printing */
  25. #define CONFIG_UBI_SILENCE_MSG
  26. #define CONFIG_UBIFS_SILENCE_MSG
  27. #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
  28. #ifndef CONFIG_SPL_BUILD
  29. #define CONFIG_EXTRA_ENV_SETTINGS \
  30. DEFAULT_LINUX_BOOT_ENV \
  31. "bootdir=/boot\0" \
  32. "bootfile=zImage\0" \
  33. "dtbfile=am335x-base0033.dtb\0" \
  34. "console=ttyO0,115200n8\0" \
  35. "mmcdev=0\0" \
  36. "mmcroot=/dev/mmcblk0p2 rw\0" \
  37. "mmcrootfstype=ext4 rootwait\0" \
  38. "mmcargs=setenv bootargs console=${console} " \
  39. "${optargs} " \
  40. "root=${mmcroot} " \
  41. "rootfstype=${mmcrootfstype}\0" \
  42. "bootenv=uEnv.txt\0" \
  43. "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
  44. "importbootenv=echo Importing environment from mmc ...; " \
  45. "env import -t ${loadaddr} ${filesize}\0" \
  46. "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \
  47. "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${dtbfile}\0" \
  48. "mmcboot=mmc dev ${mmcdev}; " \
  49. "if mmc rescan; then " \
  50. "echo SD/MMC found on device ${mmcdev};" \
  51. "if run loadbootenv; then " \
  52. "echo Loaded environment from ${bootenv};" \
  53. "run importbootenv;" \
  54. "fi;" \
  55. "if test -n $uenvcmd; then " \
  56. "echo Running uenvcmd ...;" \
  57. "run uenvcmd;" \
  58. "fi;" \
  59. "if run mmcload; then " \
  60. "run mmcargs; " \
  61. "bootz ${loadaddr} - ${fdtaddr};" \
  62. "fi;" \
  63. "fi;\0" \
  64. "mtdids=" MTDIDS_DEFAULT "\0" \
  65. "mtdparts=" MTDPARTS_DEFAULT "\0" \
  66. "nandroot=ubi0:filesystem rw ubi.mtd=3,2048\0" \
  67. "nandrootfstype=ubifs rootwait\0" \
  68. "nandload=ubi part filesystem 2048; ubifsmount ubi0; " \
  69. "ubifsload ${loadaddr} ${bootdir}/${bootfile}; " \
  70. "ubifsload ${fdtaddr} ${bootdir}/${dtbfile} \0" \
  71. "nandargs=setenv bootargs console=${console} " \
  72. "${optargs} " \
  73. "root=${nandroot} " \
  74. "rootfstype=${nandrootfstype} \0" \
  75. "nandboot=echo Booting from nand ...; " \
  76. "run nandargs; " \
  77. "run nandload; " \
  78. "bootz ${loadaddr} - ${fdtaddr} \0"
  79. #endif
  80. #define CONFIG_BOOTCOMMAND \
  81. "run mmcboot;" \
  82. "run nandboot;"
  83. /* NS16550 Configuration */
  84. #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* UART0 */
  85. #define CONFIG_CONS_INDEX 1
  86. #define CONFIG_BAUDRATE 115200
  87. /* Ethernet support */
  88. #define CONFIG_PHYLIB
  89. #define CONFIG_PHY_SMSC
  90. /* NAND support */
  91. #define CONFIG_NAND_OMAP_ELM
  92. #define CONFIG_SYS_NAND_ONFI_DETECTION 1
  93. #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
  94. #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  95. #define CONFIG_ENV_IS_IN_NAND
  96. #define CONFIG_ENV_OFFSET 0x180000 /* environment starts here */
  97. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_OFFSET + CONFIG_SYS_ENV_SECT_SIZE)
  98. #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
  99. #define CONFIG_MTD_PARTITIONS
  100. #define CONFIG_MTD_DEVICE
  101. #define CONFIG_RBTREE
  102. #define CONFIG_LZO
  103. #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
  104. #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(spl),"\
  105. "1m(uboot),256k(environment),"\
  106. "-(filesystem)"
  107. /* Unsupported features */
  108. #undef CONFIG_USE_IRQ
  109. /* SPL */
  110. #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
  111. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  112. #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
  113. CONFIG_SYS_NAND_PAGE_SIZE)
  114. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  115. #define CONFIG_SYS_NAND_OOBSIZE 64
  116. #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
  117. #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  118. #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
  119. 10, 11, 12, 13, 14, 15, 16, 17, \
  120. 18, 19, 20, 21, 22, 23, 24, 25, \
  121. 26, 27, 28, 29, 30, 31, 32, 33, \
  122. 34, 35, 36, 37, 38, 39, 40, 41, \
  123. 42, 43, 44, 45, 46, 47, 48, 49, \
  124. 50, 51, 52, 53, 54, 55, 56, 57, }
  125. #define CONFIG_SYS_NAND_ECCSIZE 512
  126. #define CONFIG_SYS_NAND_ECCBYTES 14
  127. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
  128. #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
  129. #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
  130. #endif /* ! __CONFIG_IGEP0033_H */