omap3_igep00x0.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. * Common configuration settings for IGEP technology based boards
  3. *
  4. * (C) Copyright 2012
  5. * ISEE 2007 SL, <www.iseebcn.com>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #ifndef __IGEP00X0_H
  10. #define __IGEP00X0_H
  11. #define CONFIG_NR_DRAM_BANKS 2
  12. #include <configs/ti_omap3_common.h>
  13. /*
  14. * We are only ever GP parts and will utilize all of the "downloaded image"
  15. * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB).
  16. */
  17. #undef CONFIG_SPL_TEXT_BASE
  18. #define CONFIG_SPL_TEXT_BASE 0x40200000
  19. #define CONFIG_MISC_INIT_R
  20. #define CONFIG_REVISION_TAG 1
  21. /* GPIO banks */
  22. #define CONFIG_OMAP3_GPIO_2 /* GPIO32..63 is in GPIO bank 2 */
  23. #define CONFIG_OMAP3_GPIO_4 /* GPIO96..127 is in GPIO bank 4 */
  24. /* TPS65950 */
  25. #define PBIASLITEVMODE1 (1 << 8)
  26. /* LED */
  27. #define IGEP0020_GPIO_LED 27
  28. #define IGEP0030_GPIO_LED 16
  29. /* Board and revision detection GPIOs */
  30. #define IGEP0030_USB_TRANSCEIVER_RESET 54
  31. #define GPIO_IGEP00X0_BOARD_DETECTION 28
  32. #define GPIO_IGEP00X0_REVISION_DETECTION 129
  33. /* USB device configuration */
  34. #define CONFIG_USB_DEVICE 1
  35. #define CONFIG_USB_TTY 1
  36. /* Change these to suit your needs */
  37. #define CONFIG_USBD_VENDORID 0x0451
  38. #define CONFIG_USBD_PRODUCTID 0x5678
  39. #define CONFIG_USBD_MANUFACTURER "Texas Instruments"
  40. #define CONFIG_USBD_PRODUCT_NAME "IGEP"
  41. #ifndef CONFIG_SPL_BUILD
  42. /* Environment */
  43. #define ENV_DEVICE_SETTINGS \
  44. "stdin=serial\0" \
  45. "stdout=serial\0" \
  46. "stderr=serial\0"
  47. #define MEM_LAYOUT_SETTINGS \
  48. DEFAULT_LINUX_BOOT_ENV \
  49. "scriptaddr=0x87E00000\0" \
  50. "pxefile_addr_r=0x87F00000\0"
  51. #define BOOT_TARGET_DEVICES(func) \
  52. func(MMC, mmc, 0)
  53. #include <config_distro_bootcmd.h>
  54. #define ENV_FINDFDT \
  55. "findfdt="\
  56. "if test ${board_name} = igep0020; then " \
  57. "if test ${board_rev} = F; then " \
  58. "setenv fdtfile omap3-igep0020-rev-f.dtb; " \
  59. "else " \
  60. "setenv fdtfile omap3-igep0020.dtb; fi; fi; " \
  61. "if test ${board_name} = igep0030; then " \
  62. "if test ${board_rev} = G; then " \
  63. "setenv fdtfile omap3-igep0030-rev-g.dtb; " \
  64. "else " \
  65. "setenv fdtfile omap3-igep0030.dtb; fi; fi; " \
  66. "if test ${fdtfile} = ''; then " \
  67. "echo WARNING: Could not determine device tree to use; fi; \0"
  68. #define CONFIG_EXTRA_ENV_SETTINGS \
  69. ENV_FINDFDT \
  70. ENV_DEVICE_SETTINGS \
  71. MEM_LAYOUT_SETTINGS \
  72. BOOTENV
  73. #endif
  74. #define CONFIG_MTD_PARTITIONS
  75. #define CONFIG_SYS_MTDPARTS_RUNTIME
  76. /* OneNAND config */
  77. #define CONFIG_USE_ONENAND_BOARD_INIT
  78. #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
  79. #define CONFIG_SYS_ONENAND_BLOCK_SIZE (128*1024)
  80. /* NAND config */
  81. #define CONFIG_SYS_NAND_5_ADDR_CYCLE
  82. #define CONFIG_SYS_NAND_PAGE_COUNT 64
  83. #define CONFIG_SYS_NAND_PAGE_SIZE 2048
  84. #define CONFIG_SYS_NAND_OOBSIZE 64
  85. #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
  86. #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  87. #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
  88. 10, 11, 12, 13, 14, 15, 16, 17, \
  89. 18, 19, 20, 21, 22, 23, 24, 25, \
  90. 26, 27, 28, 29, 30, 31, 32, 33, \
  91. 34, 35, 36, 37, 38, 39, 40, 41, \
  92. 42, 43, 44, 45, 46, 47, 48, 49, \
  93. 50, 51, 52, 53, 54, 55, 56, 57, }
  94. #define CONFIG_SYS_NAND_ECCSIZE 512
  95. #define CONFIG_SYS_NAND_ECCBYTES 14
  96. #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
  97. /* UBI configuration */
  98. #define CONFIG_SPL_UBI 1
  99. #define CONFIG_SPL_UBI_MAX_VOL_LEBS 256
  100. #define CONFIG_SPL_UBI_MAX_PEB_SIZE (256*1024)
  101. #define CONFIG_SPL_UBI_MAX_PEBS 4096
  102. #define CONFIG_SPL_UBI_VOL_IDS 8
  103. #define CONFIG_SPL_UBI_LOAD_MONITOR_ID 0
  104. #define CONFIG_SPL_UBI_LOAD_KERNEL_ID 3
  105. #define CONFIG_SPL_UBI_LOAD_ARGS_ID 4
  106. #define CONFIG_SPL_UBI_PEB_OFFSET 4
  107. #define CONFIG_SPL_UBI_VID_OFFSET 512
  108. #define CONFIG_SPL_UBI_LEB_START 2048
  109. #define CONFIG_SPL_UBI_INFO_ADDR 0x88080000
  110. /* environment organization */
  111. #define CONFIG_ENV_UBI_PART "UBI"
  112. #define CONFIG_ENV_UBI_VOLUME "config"
  113. #define CONFIG_ENV_UBI_VOLUME_REDUND "config_r"
  114. #define CONFIG_UBI_SILENCE_MSG 1
  115. #define CONFIG_ENV_SIZE (32*1024)
  116. #endif /* __IGEP00X0_H */