xref: /OK3568_Linux_fs/u-boot/board/freescale/mpc8349itx/README (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFreescale MPC8349E-mITX and MPC8349E-mITX-GP Boards
2*4882a593Smuzhiyun---------------------------------------------------
3*4882a593Smuzhiyun
4*4882a593Smuzhiyun1.	Board Description
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun	The MPC8349E-mITX and MPC8349E-mITX-GP are reference boards featuring
7*4882a593Smuzhiyun	the Freescale MPC8349E processor in a Mini-ITX form factor.
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun	The MPC8349E-mITX-GP is an MPC8349E-mITX with the following differences:
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun	A) One 8MB on-board flash EEPROM chip, instead of two.
12*4882a593Smuzhiyun	B) No SATA controller
13*4882a593Smuzhiyun	C) No Compact Flash slot
14*4882a593Smuzhiyun	D) No Mini-PCI slot
15*4882a593Smuzhiyun	E) No Vitesse 7385 5-port Ethernet switch
16*4882a593Smuzhiyun	F) No 4-port USB Type-A interface
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun2.	Board Switches and Jumpers
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun2.0	Descriptions for all of the board jumpers can be found in the User
21*4882a593Smuzhiyun	Guide.  Of particular interest to U-Boot developers is jumper J22:
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun	Pos.	Name		Default		Description
24*4882a593Smuzhiyun	-----------------------------------------------------------------------
25*4882a593Smuzhiyun	A	LGPL0		ON (0)          HRCW source, bit 0
26*4882a593Smuzhiyun	B       LGPL1           ON (0)          HRCW source, bit 1
27*4882a593Smuzhiyun	C       LGPL3           ON (0)		HRCW source, bit 2
28*4882a593Smuzhiyun	D       LGPL5           OFF (1)         PCI_SYNC_OUT frequency
29*4882a593Smuzhiyun	E       BOOT1           ON (0)          Flash EEPROM boot device
30*4882a593Smuzhiyun	F       PCI_M66EN       ON (0)          PCI 66MHz enable
31*4882a593Smuzhiyun	G       I2C-WP          ON (0)          I2C EEPROM write protection
32*4882a593Smuzhiyun	H       F_WP            OFF (1)         Flash EEPROM write protection
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun	Jumper J22.E is only for the ITX, and it decides the configuration
35*4882a593Smuzhiyun	of the flash chips.  If J22.E is ON (i.e. jumpered), then flash chip
36*4882a593Smuzhiyun	U4 is located at address FE000000 and flash chip U7 is at FE800000.
37*4882a593Smuzhiyun	If J22.E is OFF, then U7 is at FE000000 and U4 is at FE800000.
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun	For U-Boot development, J22.E can be used to switch back-and-forth
40*4882a593Smuzhiyun	between two U-Boot images.
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun3.	Memory Map
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun3.1.	The memory map should look pretty much like this:
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun	0x0000_0000 - 0x0FFF_FFFF DDR SDRAM (256 MB)
47*4882a593Smuzhiyun	0x8000_0000 - 0x9FFF_FFFF PCI1 memory space (512 MB)
48*4882a593Smuzhiyun	0xA000_0000 - 0xBFFF_FFFF PCI2 memory space (512 MB)
49*4882a593Smuzhiyun	0xE000_0000 - 0xEFFF_FFFF IMMR (1 MB)
50*4882a593Smuzhiyun	0xE200_0000 - 0xE2FF_FFFF PCI1 I/O space (16 MB)
51*4882a593Smuzhiyun	0xE300_0000 - 0xE3FF_FFFF PCI2 I/O space (16 MB)
52*4882a593Smuzhiyun	0xF000_0000 - 0xF000_FFFF Compact Flash (ITX only)
53*4882a593Smuzhiyun	0xF001_0000 - 0xF001_FFFF Local bus expansion slot
54*4882a593Smuzhiyun	0xF800_0000 - 0xF801_FFFF Vitesse 7385 Parallel Interface (ITX only)
55*4882a593Smuzhiyun	0xFE00_0000 - 0xFE7F_FFFF First 8MB bank of Flash memory
56*4882a593Smuzhiyun	0xFE80_0000 - 0xFEFF_FFFF Second 8MB bank of Flash memory (ITX only)
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun3.2	Flash EEPROM layout.
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun	On the ITX, jumper J22.E is used to determine which flash chips are
61*4882a593Smuzhiyun	at which address.  When J22.E is switched, addresses from FE000000
62*4882a593Smuzhiyun	to FE7FFFFF are swapped with addresses from FE800000 to FEFFFFFF.
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun	On the ITX, at the normal boot address (aka HIGHBOOT):
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun	FE00_0000	HRCW
67*4882a593Smuzhiyun	FE70_0000	Alternative U-Boot image
68*4882a593Smuzhiyun	FE80_0000	Alternative HRCW
69*4882a593Smuzhiyun	FEF0_0000	U-Boot image
70*4882a593Smuzhiyun	FEFF_FFFF	End of flash
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun	On the ITX, at the low boot address (LOWBOOT)
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun	FE00_0000	HRCW and U-Boot image
75*4882a593Smuzhiyun	FE04_0000	U-Boot environment variables
76*4882a593Smuzhiyun	FE80_0000	Alternative HRCW and U-Boot image
77*4882a593Smuzhiyun	FEFF_FFFF	End of flash
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun	On the ITX-GP, the only option is LOWBOOT and there is only one chip
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun	FE00_0000	HRCW and U-Boot image
82*4882a593Smuzhiyun	FE04_0000	U-Boot environment variables
83*4882a593Smuzhiyun	F7FF_FFFF	End of flash
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun4. Definitions
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun4.1 Explanation of NEW definitions in:
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun	include/configs/MPC8349ITX.h
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun	CONFIG_MPC83xx		MPC83xx family
92*4882a593Smuzhiyun	CONFIG_MPC8349		MPC8349 specific
93*4882a593Smuzhiyun	CONFIG_MPC8349ITX		MPC8349E-mITX
94*4882a593Smuzhiyun	CONFIG_MPC8349ITXGP		MPC8349E-mITX-GP
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun5. Compilation
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun	Assuming you're using BASH shell:
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun		export CROSS_COMPILE=your-cross-compile-prefix
101*4882a593Smuzhiyun		cd u-boot
102*4882a593Smuzhiyun		make distclean
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun		make MPC8349ITX_config
105*4882a593Smuzhiyun	or:
106*4882a593Smuzhiyun		make MPC8349ITXGP_config
107*4882a593Smuzhiyun	or:
108*4882a593Smuzhiyun		make MPC8349ITX_LOWBOOT_config
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun		make
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun6. Downloading and Flashing Images
113*4882a593Smuzhiyun
114*4882a593Smuzhiyun6.1 Download via tftp:
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun	tftp $loadaddr <uboot>
117*4882a593Smuzhiyun
118*4882a593Smuzhiyun	where "<uboot>" is the path and filename, on the TFTP server, of
119*4882a593Smuzhiyun	the U-Boot image.
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun6.1 Reflash U-Boot Image using U-Boot
122*4882a593Smuzhiyun
123*4882a593Smuzhiyun	setenv uboot <uboot>
124*4882a593Smuzhiyun	run tftpflash
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun	where "<uboot>" is the path and filename, on the TFTP server, of
127*4882a593Smuzhiyun	the U-Boot image.
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun6.2 Using the HRCW to switch between two different U-Boot images on the ITX
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun	Because the ITX has 16MB of flash, it is possible to keep two U-Boot
132*4882a593Smuzhiyun	images in flash, and use the HRCW to specify which one is to be used
133*4882a593Smuzhiyun	when the board boots.  This trick is especially effective with a
134*4882a593Smuzhiyun	hardware debugger that can override the HRCW, such as the BDI-2000.
135*4882a593Smuzhiyun
136*4882a593Smuzhiyun	When the BMS bit in the HRCW is 0, the ITX will boot the U-Boot image
137*4882a593Smuzhiyun	at address FE000000.  When the BMS bit is 1, the ITX will boot the
138*4882a593Smuzhiyun	image at address FEF00000.
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	Therefore, just put a U-Boot image at both FE000000 and FEF00000 and
141*4882a593Smuzhiyun	change the BMS bit whenever you want to boot the other image.
142*4882a593Smuzhiyun
143*4882a593Smuzhiyun	Step-by-step instructions:
144*4882a593Smuzhiyun
145*4882a593Smuzhiyun	1) Build an ITX image to be loaded at FEF00000
146*4882a593Smuzhiyun
147*4882a593Smuzhiyun		make distclean
148*4882a593Smuzhiyun		make MPC8349ITX_config
149*4882a593Smuzhiyun		make
150*4882a593Smuzhiyun
151*4882a593Smuzhiyun	2) Take the u-boot.bin image and flash it at FEF00000.
152*4882a593Smuzhiyun
153*4882a593Smuzhiyun		tftp $loadaddr u-boot.bin
154*4882a593Smuzhiyun		protect off all
155*4882a593Smuzhiyun		erase FEF00000 +$filesize
156*4882a593Smuzhiyun		cp.b $loadaddr FEF00000 $filesize
157*4882a593Smuzhiyun
158*4882a593Smuzhiyun	3) Build an ITX image to be loaded at FE000000
159*4882a593Smuzhiyun
160*4882a593Smuzhiyun		make distclean
161*4882a593Smuzhiyun		make MPC8349ITX_LOWBOOT_config
162*4882a593Smuzhiyun		make
163*4882a593Smuzhiyun
164*4882a593Smuzhiyun	4) Take the u-boot.bin image and flash it at FE000000.
165*4882a593Smuzhiyun
166*4882a593Smuzhiyun		tftp $loadaddr u-boot.bin
167*4882a593Smuzhiyun		protect off FE000000 +$filesize
168*4882a593Smuzhiyun		erase FE000000 +$filesize
169*4882a593Smuzhiyun		cp.b $loadaddr FE000000 $filesize
170*4882a593Smuzhiyun
171*4882a593Smuzhiyun	The HRCW in flash is currently set to boot the image at FE000000.
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun	If you have a hardware debugger, configure it to set the HRCW to
174*4882a593Smuzhiyun	B460A000 04040000 if you want to boot the image at FEF00000, or set
175*4882a593Smuzhiyun	it to B060A000 04040000 if you want to boot the image at FE000000.
176*4882a593Smuzhiyun
177*4882a593Smuzhiyun	To change the HRCW in flash to boot the image at FEF00000, use these
178*4882a593Smuzhiyun	U-Boot commands:
179*4882a593Smuzhiyun
180*4882a593Smuzhiyun		cp.b FE000000 1000 10000	; copy 1st flash sector to 1000
181*4882a593Smuzhiyun		mw.b 1020 b4 8			; modify BMS bit
182*4882a593Smuzhiyun		protect off FE000000 +10000
183*4882a593Smuzhiyun		erase FE000000 +10000
184*4882a593Smuzhiyun		cp.b 1000 FE000000 10000
185*4882a593Smuzhiyun
186*4882a593Smuzhiyun7. Notes
187*4882a593Smuzhiyun	1) The console baudrate for MPC8349EITX is 115200bps.
188