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