README.omap3 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. Summary
  2. =======
  3. This README is about U-Boot support for TI's ARM Cortex-A8 based OMAP3 [1]
  4. family of SoCs. TI's OMAP3 SoC family contains an ARM Cortex-A8. Additionally,
  5. some family members contain a TMS320C64x+ DSP and/or an Imagination SGX 2D/3D
  6. graphics processor and various other standard peripherals.
  7. Currently the following boards are supported:
  8. * OMAP3530 BeagleBoard [2]
  9. * Gumstix Overo [3]
  10. * TI EVM [4]
  11. * OpenPandora Ltd. Pandora [5]
  12. * TI/Logic PD Zoom MDK [6]
  13. * TI/Logic PD Zoom 2 [7]
  14. * CompuLab Ltd. CM-T35 [8]
  15. Build
  16. =====
  17. * BeagleBoard:
  18. make omap3_beagle_config
  19. make
  20. * Gumstix Overo:
  21. make omap3_overo_config
  22. make
  23. * TI EVM:
  24. make omap3_evm_config
  25. make
  26. * Zoom 2:
  27. make omap3_zoom2_config
  28. make
  29. * CM-T35:
  30. make cm_t35_config
  31. make
  32. Custom commands
  33. ===============
  34. To make U-Boot for OMAP3 support NAND device SW or HW ECC calculation, U-Boot
  35. for OMAP3 supports custom user command
  36. nandecc hw/sw
  37. To be compatible with NAND drivers using SW ECC (e.g. kernel code)
  38. nandecc sw
  39. enables SW ECC calculation. HW ECC enabled with
  40. nandecc hw
  41. is typically used to write 2nd stage bootloader (known as 'x-loader') which is
  42. executed by OMAP3's boot rom and therefore has to be written with HW ECC.
  43. For all other commands see
  44. help
  45. Interfaces
  46. ==========
  47. gpio
  48. ----
  49. To set a bit :
  50. if (!gpio_request(N, "")) {
  51. gpio_direction_output(N, 0);
  52. gpio_set_value(N, 1);
  53. }
  54. To clear a bit :
  55. if (!gpio_request(N, "")) {
  56. gpio_direction_output(N, 0);
  57. gpio_set_value(N, 0);
  58. }
  59. To read a bit :
  60. if (!gpio_request(N, "")) {
  61. gpio_direction_input(N);
  62. val = gpio_get_value(N);
  63. gpio_free(N);
  64. }
  65. if (val)
  66. printf("GPIO N is set\n");
  67. else
  68. printf("GPIO N is clear\n");
  69. dma
  70. ---
  71. void omap3_dma_init(void)
  72. Init the DMA module
  73. int omap3_dma_get_conf_chan(uint32_t chan, struct dma4_chan *config);
  74. Read config of the channel
  75. int omap3_dma_conf_chan(uint32_t chan, struct dma4_chan *config);
  76. Write config to the channel
  77. int omap3_dma_conf_transfer(uint32_t chan, uint32_t *src, uint32_t *dst,
  78. uint32_t sze)
  79. Config source, destination and size of a transfer
  80. int omap3_dma_wait_for_transfer(uint32_t chan)
  81. Wait for a transfer to end - this hast to be called before a channel
  82. or the data the channel transferd are used.
  83. int omap3_dma_get_revision(uint32_t *minor, uint32_t *major)
  84. Read silicon Revision of the DMA module
  85. NAND
  86. ====
  87. There are some OMAP3 devices out there with NAND attached. Due to the fact that
  88. OMAP3 ROM code can only handle 1-bit hamming ECC for accessing first page
  89. (place where SPL lives) we require this setup for u-boot at least when reading
  90. the second progam within SPL. A lot of newer NAND chips however require more
  91. than 1-bit ECC for the pages, some can live with 1-bit for the first page. To
  92. handle this we can switch to another ECC algorithm after reading the payload
  93. within SPL.
  94. BCH8
  95. ----
  96. To enable hardware assisted BCH8 (8-bit BCH [Bose, Chaudhuri, Hocquenghem]) on
  97. OMAP3 devices we can use the BCH library in lib/bch.c. To do so add CONFIG_BCH
  98. and set CONFIG_NAND_OMAP_ECCSCHEME=5 (refer README.nand) for selecting BCH8_SW.
  99. The NAND OOB layout is the same as in linux kernel, if the linux kernel BCH8
  100. implementation for OMAP3 works for you so the u-boot version should also.
  101. When you require the SPL to read with BCH8 there are two more configs to
  102. change:
  103. * CONFIG_SYS_NAND_ECCPOS (must be the same as .eccpos in
  104. GPMC_NAND_HW_BCH8_ECC_LAYOUT defined in
  105. arch/arm/include/asm/arch-omap3/omap_gpmc.h)
  106. * CONFIG_SYS_NAND_ECCSIZE must be 512
  107. * CONFIG_SYS_NAND_ECCBYTES must be 13 for this BCH8 setup
  108. Acknowledgements
  109. ================
  110. OMAP3 U-Boot is based on U-Boot tar ball [9] for BeagleBoard and EVM done by
  111. several TI employees.
  112. Links
  113. =====
  114. [1] OMAP3:
  115. http://www.ti.com/omap3 (high volume) and
  116. http://www.ti.com/omap35x (broad market)
  117. [2] OMAP3530 BeagleBoard:
  118. http://beagleboard.org/
  119. [3] Gumstix Overo:
  120. http://www.gumstix.net/Overo/
  121. [4] TI EVM:
  122. http://focus.ti.com/docs/toolsw/folders/print/tmdxevm3503.html
  123. [5] OpenPandora Ltd. Pandora:
  124. http://openpandora.org/
  125. [6] TI/Logic PD Zoom MDK:
  126. http://www.logicpd.com/products/devkit/ti/zoom_mobile_development_kit
  127. [7] TI/Logic PD Zoom 2
  128. http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf
  129. [8] CompuLab Ltd. CM-T35:
  130. http://www.compulab.co.il/t3530/html/t3530-cm-datasheet.htm
  131. [9] TI OMAP3 U-Boot:
  132. http://beagleboard.googlecode.com/files/u-boot_beagle_revb.tar.gz