am335x_igep003x.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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_IGEP003X_H
  14. #define __CONFIG_IGEP003X_H
  15. #include <configs/ti_am335x_common.h>
  16. /* Clock defines */
  17. #define V_OSCK 24000000 /* Clock output from T2 */
  18. #define V_SCLK (V_OSCK)
  19. #ifndef CONFIG_SPL_BUILD
  20. #define CONFIG_EXTRA_ENV_SETTINGS \
  21. DEFAULT_LINUX_BOOT_ENV \
  22. "bootdir=/boot\0" \
  23. "bootfile=zImage\0" \
  24. "console=ttyO0,115200n8\0" \
  25. "mmcdev=0\0" \
  26. "mmcroot=/dev/mmcblk0p2 rw\0" \
  27. "mmcrootfstype=ext4 rootwait\0" \
  28. "mmcargs=setenv bootargs console=${console} " \
  29. "${optargs} " \
  30. "root=${mmcroot} " \
  31. "rootfstype=${mmcrootfstype}\0" \
  32. "bootenv=uEnv.txt\0" \
  33. "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
  34. "importbootenv=echo Importing environment from mmc ...; " \
  35. "env import -t ${loadaddr} ${filesize}\0" \
  36. "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \
  37. "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \
  38. "mmcboot=mmc dev ${mmcdev}; " \
  39. "if mmc rescan; then " \
  40. "echo SD/MMC found on device ${mmcdev};" \
  41. "if run loadbootenv; then " \
  42. "echo Loaded environment from ${bootenv};" \
  43. "run importbootenv;" \
  44. "fi;" \
  45. "if test -n $uenvcmd; then " \
  46. "echo Running uenvcmd ...;" \
  47. "run uenvcmd;" \
  48. "fi;" \
  49. "if run mmcload; then " \
  50. "run mmcargs; " \
  51. "bootz ${loadaddr} - ${fdtaddr};" \
  52. "fi;" \
  53. "fi;\0" \
  54. "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
  55. "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
  56. "nandroot=ubi0:rootfs rw ubi.mtd=1\0" \
  57. "nandrootfstype=ubifs rootwait\0" \
  58. "nandload=ubi part UBI; " \
  59. "ubi read ${loadaddr} kernel; " \
  60. "ubi read ${fdtaddr} dtb \0" \
  61. "nandargs=setenv bootargs console=${console} " \
  62. "${optargs} " \
  63. "root=${nandroot} " \
  64. "rootfstype=${nandrootfstype} \0" \
  65. "nandboot=echo Booting from nand ...; " \
  66. "run nandargs; " \
  67. "run nandload; " \
  68. "bootz ${loadaddr} - ${fdtaddr} \0" \
  69. "netload=tftpboot ${loadaddr} ${bootfile}; " \
  70. "tftpboot ${fdtaddr} ${fdtfile} \0" \
  71. "netargs=setenv bootargs console=${console} " \
  72. "${optargs} " \
  73. "root=/dev/nfs " \
  74. "ip=${ipaddr} nfsroot=${serverip}:${rootnfs},v3,tcp \0" \
  75. "netboot=echo Booting from net ...; " \
  76. "run netargs; " \
  77. "run netload; " \
  78. "bootz ${loadaddr} - ${fdtaddr} \0" \
  79. "findfdt="\
  80. "if test ${board_name} = igep0033; then " \
  81. "setenv fdtfile am335x-igep-base0033.dtb; fi; " \
  82. "if test ${board_name} = igep0034; then " \
  83. "setenv fdtfile am335x-igep-base0040.dtb; fi; " \
  84. "if test ${board_name} = igep0034-lite; then " \
  85. "setenv fdtfile am335x-igep-base0040-lite.dtb; fi; " \
  86. "if test ${fdtfile} = ''; then " \
  87. "echo WARNING: Could not determine device tree to use; fi; \0"
  88. #endif
  89. #define CONFIG_BOOTCOMMAND \
  90. "run findfdt;" \
  91. "run mmcboot;" \
  92. "run nandboot;" \
  93. "run netboot;"
  94. /* NS16550 Configuration */
  95. #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* UART0 */
  96. /* Ethernet support */
  97. #define CONFIG_PHY_SMSC
  98. /* NAND support */
  99. #define CONFIG_SYS_NAND_ONFI_DETECTION 1
  100. /* NAND config */
  101. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  102. #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
  103. CONFIG_SYS_NAND_PAGE_SIZE)
  104. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  105. #define CONFIG_SYS_NAND_OOBSIZE 64
  106. #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
  107. #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  108. #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
  109. 10, 11, 12, 13, 14, 15, 16, 17, \
  110. 18, 19, 20, 21, 22, 23, 24, 25, \
  111. 26, 27, 28, 29, 30, 31, 32, 33, \
  112. 34, 35, 36, 37, 38, 39, 40, 41, \
  113. 42, 43, 44, 45, 46, 47, 48, 49, \
  114. 50, 51, 52, 53, 54, 55, 56, 57, }
  115. #define CONFIG_SYS_NAND_ECCSIZE 512
  116. #define CONFIG_SYS_NAND_ECCBYTES 14
  117. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
  118. #endif /* ! __CONFIG_IGEP003X_H */