Dirk Behme | f904cdb | 2009-01-27 18:19:12 +0100 | [diff] [blame] | 1 | |
| 2 | Summary |
| 3 | ======= |
| 4 | |
| 5 | This README is about U-Boot support for TI's ARM Cortex-A8 based OMAP3 [1] |
| 6 | family of SoCs. TI's OMAP3 SoC family contains an ARM Cortex-A8. Additionally, |
| 7 | some family members contain a TMS320C64x+ DSP and/or an Imagination SGX 2D/3D |
| 8 | graphics processor and various other standard peripherals. |
| 9 | |
| 10 | Currently the following boards are supported: |
| 11 | |
| 12 | * OMAP3530 BeagleBoard [2] |
| 13 | |
Dirk Behme | 9d0fc81 | 2009-01-28 21:39:57 +0100 | [diff] [blame] | 14 | * Gumstix Overo [3] |
| 15 | |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 16 | * TI EVM [4] |
| 17 | |
Dirk Behme | 2be2c6c | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 18 | * OpenPandora Ltd. Pandora [5] |
| 19 | |
Dirk Behme | 7379f45 | 2009-01-28 21:40:16 +0100 | [diff] [blame] | 20 | * TI/Logic PD Zoom MDK [6] |
| 21 | |
Tom Rix | 376aee7 | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 22 | * TI/Logic PD Zoom 2 [7] |
| 23 | |
Mike Rapoport | 36b4e2d | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 24 | * CompuLab Ltd. CM-T35 [8] |
| 25 | |
Dirk Behme | f904cdb | 2009-01-27 18:19:12 +0100 | [diff] [blame] | 26 | Toolchain |
| 27 | ========= |
| 28 | |
| 29 | While ARM Cortex-A8 support ARM v7 instruction set (-march=armv7a) we compile |
| 30 | with -march=armv5 to allow more compilers to work. For U-Boot code this has |
| 31 | no performance impact. |
| 32 | |
| 33 | Build |
| 34 | ===== |
| 35 | |
| 36 | * BeagleBoard: |
| 37 | |
| 38 | make omap3_beagle_config |
| 39 | make |
| 40 | |
Dirk Behme | 9d0fc81 | 2009-01-28 21:39:57 +0100 | [diff] [blame] | 41 | * Gumstix Overo: |
| 42 | |
| 43 | make omap3_overo_config |
| 44 | make |
| 45 | |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 46 | * TI EVM: |
| 47 | |
| 48 | make omap3_evm_config |
| 49 | make |
| 50 | |
Dirk Behme | 2be2c6c | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 51 | * Pandora: |
| 52 | |
| 53 | make omap3_pandora_config |
| 54 | make |
| 55 | |
Dirk Behme | 7379f45 | 2009-01-28 21:40:16 +0100 | [diff] [blame] | 56 | * Zoom MDK: |
| 57 | |
| 58 | make omap3_zoom1_config |
| 59 | make |
| 60 | |
Tom Rix | 376aee7 | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 61 | * Zoom 2: |
| 62 | |
| 63 | make omap3_zoom2_config |
| 64 | make |
| 65 | |
Mike Rapoport | 36b4e2d | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 66 | * CM-T35: |
| 67 | |
| 68 | make cm_t35_config |
| 69 | make |
| 70 | |
Michael Jones | 84d7a01 | 2011-11-04 13:53:44 -0400 | [diff] [blame] | 71 | * BlueLYNX-X: |
| 72 | |
| 73 | make omap3_mvblx_config |
| 74 | make |
| 75 | |
Dirk Behme | f904cdb | 2009-01-27 18:19:12 +0100 | [diff] [blame] | 76 | Custom commands |
| 77 | =============== |
| 78 | |
| 79 | To make U-Boot for OMAP3 support NAND device SW or HW ECC calculation, U-Boot |
| 80 | for OMAP3 supports custom user command |
| 81 | |
| 82 | nandecc hw/sw |
| 83 | |
| 84 | To be compatible with NAND drivers using SW ECC (e.g. kernel code) |
| 85 | |
| 86 | nandecc sw |
| 87 | |
| 88 | enables SW ECC calculation. HW ECC enabled with |
| 89 | |
| 90 | nandecc hw |
| 91 | |
| 92 | is typically used to write 2nd stage bootloader (known as 'x-loader') which is |
| 93 | executed by OMAP3's boot rom and therefore has to be written with HW ECC. |
| 94 | |
| 95 | For all other commands see |
| 96 | |
| 97 | help |
| 98 | |
Tom Rix | 0c872ec | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 99 | Interfaces |
| 100 | ========== |
| 101 | |
| 102 | gpio |
Simon Schwarz | 4c4bb19 | 2011-09-28 05:00:26 +0000 | [diff] [blame] | 103 | ---- |
Tom Rix | 0c872ec | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 104 | |
| 105 | To set a bit : |
| 106 | |
Sanjeev Premi | 3b690eb | 2011-09-08 10:48:39 -0400 | [diff] [blame] | 107 | if (!gpio_request(N, "")) { |
| 108 | gpio_direction_output(N, 0); |
| 109 | gpio_set_value(N, 1); |
Tom Rix | 0c872ec | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | To clear a bit : |
| 113 | |
Sanjeev Premi | 3b690eb | 2011-09-08 10:48:39 -0400 | [diff] [blame] | 114 | if (!gpio_request(N, "")) { |
| 115 | gpio_direction_output(N, 0); |
| 116 | gpio_set_value(N, 0); |
Tom Rix | 0c872ec | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | To read a bit : |
| 120 | |
Sanjeev Premi | 3b690eb | 2011-09-08 10:48:39 -0400 | [diff] [blame] | 121 | if (!gpio_request(N, "")) { |
| 122 | gpio_direction_input(N); |
| 123 | val = gpio_get_value(N); |
| 124 | gpio_free(N); |
Tom Rix | 0c872ec | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 125 | } |
| 126 | if (val) |
| 127 | printf("GPIO N is set\n"); |
| 128 | else |
| 129 | printf("GPIO N is clear\n"); |
| 130 | |
Simon Schwarz | 4c4bb19 | 2011-09-28 05:00:26 +0000 | [diff] [blame] | 131 | dma |
| 132 | --- |
| 133 | void omap3_dma_init(void) |
| 134 | Init the DMA module |
| 135 | int omap3_dma_get_conf_chan(uint32_t chan, struct dma4_chan *config); |
| 136 | Read config of the channel |
| 137 | int omap3_dma_conf_chan(uint32_t chan, struct dma4_chan *config); |
| 138 | Write config to the channel |
| 139 | int omap3_dma_conf_transfer(uint32_t chan, uint32_t *src, uint32_t *dst, |
| 140 | uint32_t sze) |
| 141 | Config source, destination and size of a transfer |
| 142 | int omap3_dma_wait_for_transfer(uint32_t chan) |
| 143 | Wait for a transfer to end - this hast to be called before a channel |
| 144 | or the data the channel transferd are used. |
| 145 | int omap3_dma_get_revision(uint32_t *minor, uint32_t *major) |
| 146 | Read silicon Revision of the DMA module |
| 147 | |
Andreas Bießmann | 4a09300 | 2013-04-05 04:55:21 +0000 | [diff] [blame] | 148 | NAND |
| 149 | ==== |
| 150 | |
| 151 | There are some OMAP3 devices out there with NAND attached. Due to the fact that |
| 152 | OMAP3 ROM code can only handle 1-bit hamming ECC for accessing first page |
| 153 | (place where SPL lives) we require this setup for u-boot at least when reading |
| 154 | the second progam within SPL. A lot of newer NAND chips however require more |
| 155 | than 1-bit ECC for the pages, some can live with 1-bit for the first page. To |
| 156 | handle this we can switch to another ECC algorithm after reading the payload |
| 157 | within SPL. |
| 158 | |
| 159 | BCH8 |
| 160 | ---- |
| 161 | |
| 162 | To enable hardware assisted BCH8 (8-bit BCH [Bose, Chaudhuri, Hocquenghem]) on |
| 163 | OMAP3 devices we can use the BCH library in lib/bch.c. To do so add CONFIG_BCH |
pekon gupta | 3f71906 | 2013-11-18 19:03:01 +0530 | [diff] [blame^] | 164 | and set CONFIG_NAND_OMAP_ECCSCHEME=5 (refer README.nand) for selecting BCH8_SW. |
Andreas Bießmann | 4a09300 | 2013-04-05 04:55:21 +0000 | [diff] [blame] | 165 | The NAND OOB layout is the same as in linux kernel, if the linux kernel BCH8 |
| 166 | implementation for OMAP3 works for you so the u-boot version should also. |
| 167 | When you require the SPL to read with BCH8 there are two more configs to |
| 168 | change: |
| 169 | |
| 170 | * CONFIG_SYS_NAND_ECCPOS (must be the same as .eccpos in |
| 171 | GPMC_NAND_HW_BCH8_ECC_LAYOUT defined in |
| 172 | arch/arm/include/asm/arch-omap3/omap_gpmc.h) |
| 173 | * CONFIG_SYS_NAND_ECCSIZE must be 512 |
| 174 | * CONFIG_SYS_NAND_ECCBYTES must be 13 for this BCH8 setup |
Tom Rix | 0c872ec | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 175 | |
Dirk Behme | f904cdb | 2009-01-27 18:19:12 +0100 | [diff] [blame] | 176 | Acknowledgements |
| 177 | ================ |
| 178 | |
Mike Rapoport | 36b4e2d | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 179 | OMAP3 U-Boot is based on U-Boot tar ball [9] for BeagleBoard and EVM done by |
Dirk Behme | f904cdb | 2009-01-27 18:19:12 +0100 | [diff] [blame] | 180 | several TI employees. |
| 181 | |
| 182 | Links |
| 183 | ===== |
| 184 | |
| 185 | [1] OMAP3: |
| 186 | |
| 187 | http://www.ti.com/omap3 (high volume) and |
| 188 | http://www.ti.com/omap35x (broad market) |
| 189 | |
| 190 | [2] OMAP3530 BeagleBoard: |
| 191 | |
| 192 | http://beagleboard.org/ |
| 193 | |
Dirk Behme | 9d0fc81 | 2009-01-28 21:39:57 +0100 | [diff] [blame] | 194 | [3] Gumstix Overo: |
| 195 | |
| 196 | http://www.gumstix.net/Overo/ |
| 197 | |
Dirk Behme | ad9bc8e | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 198 | [4] TI EVM: |
| 199 | |
| 200 | http://focus.ti.com/docs/toolsw/folders/print/tmdxevm3503.html |
| 201 | |
Dirk Behme | 2be2c6c | 2009-01-28 21:39:58 +0100 | [diff] [blame] | 202 | [5] OpenPandora Ltd. Pandora: |
| 203 | |
| 204 | http://openpandora.org/ |
| 205 | |
Dirk Behme | 7379f45 | 2009-01-28 21:40:16 +0100 | [diff] [blame] | 206 | [6] TI/Logic PD Zoom MDK: |
| 207 | |
| 208 | http://www.logicpd.com/products/devkit/ti/zoom_mobile_development_kit |
| 209 | |
Tom Rix | 376aee7 | 2009-05-15 23:48:36 +0200 | [diff] [blame] | 210 | [7] TI/Logic PD Zoom 2 |
| 211 | |
| 212 | http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf |
Mike Rapoport | 36b4e2d | 2010-12-18 17:43:19 -0500 | [diff] [blame] | 213 | |
| 214 | [8] CompuLab Ltd. CM-T35: |
| 215 | |
| 216 | http://www.compulab.co.il/t3530/html/t3530-cm-datasheet.htm |
| 217 | |
| 218 | [9] TI OMAP3 U-Boot: |
Dirk Behme | f904cdb | 2009-01-27 18:19:12 +0100 | [diff] [blame] | 219 | |
| 220 | http://beagleboard.googlecode.com/files/u-boot_beagle_revb.tar.gz |