xref: /OK3568_Linux_fs/u-boot/board/freescale/mpc8641hpcn/README (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFreescale MPC8641HPCN board
2*4882a593Smuzhiyun===========================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunCreated 05/24/2006 Haiying Wang
5*4882a593Smuzhiyun-------------------------------
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun1. Building U-Boot
8*4882a593Smuzhiyun------------------
9*4882a593SmuzhiyunThe 86xx HPCN code base is known to compile using:
10*4882a593Smuzhiyun    Binutils 2.15, Gcc 3.4.3, Glibc 2.3.3
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun    $ make MPC8641HPCN_config
13*4882a593Smuzhiyun    Configuring for MPC8641HPCN board...
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun    $ make
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun2. Switch and Jumper Setting
19*4882a593Smuzhiyun----------------------------
20*4882a593SmuzhiyunJumpers:
21*4882a593Smuzhiyun	J14 Pins 1-2 (near plcc32 socket)
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunSwitches:
24*4882a593Smuzhiyun	SW1(1-5) = 01100	CONFIG_SYS_COREPLL	= 01000 :: CORE =   2:1
25*4882a593Smuzhiyun						  01100 :: CORE = 2.5:1
26*4882a593Smuzhiyun						  10000 :: CORE =   3:1
27*4882a593Smuzhiyun						  11100 :: CORE = 3.5:1
28*4882a593Smuzhiyun						  10100 :: CORE =   4:1
29*4882a593Smuzhiyun						  01110 :: CORE = 4.5:1
30*4882a593Smuzhiyun	SW1(6-8) = 001		CONFIG_SYS_SYSCLK	= 000	:: SYSCLK = 33MHz
31*4882a593Smuzhiyun						  001	:: SYSCLK = 40MHz
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun	SW2(1-4) = 1100		CONFIG_SYS_CCBPLL	= 0010	:: 2X
34*4882a593Smuzhiyun						  0100	:: 4X
35*4882a593Smuzhiyun						  0110	:: 6X
36*4882a593Smuzhiyun						  1000	:: 8X
37*4882a593Smuzhiyun						  1010	:: 10X
38*4882a593Smuzhiyun						  1100	:: 12X
39*4882a593Smuzhiyun						  1110	:: 14X
40*4882a593Smuzhiyun						  0000	:: 16X
41*4882a593Smuzhiyun	SW2(5-8) = 1110		CONFIG_SYS_BOOTLOC	= 1110	:: boot 16-bit localbus
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun	SW3(1-7) = 0011000	CONFIG_SYS_VID		= 0011000 :: VCORE = 1.2V
44*4882a593Smuzhiyun						  0100000 :: VCORE = 1.11V
45*4882a593Smuzhiyun	SW3(8)	 = 0		VCC_PLAT	= 0	:: VCC_PLAT = 1.2V
46*4882a593Smuzhiyun						  1	:: VCC_PLAT = 1.0V
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun	SW4(1-2) = 11		CONFIG_SYS_HOSTMODE	= 11	:: both prots host/root
49*4882a593Smuzhiyun	SW4(3-4) = 11		CONFIG_SYS_BOOTSEQ	= 11	:: no boot seq
50*4882a593Smuzhiyun	SW4(5-8) = 0011		CONFIG_SYS_IOPORT	= 0011	:: both PEX
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun	SW5(1)	 = 1		CONFIG_SYS_FLASHMAP	= 1	:: boot from flash
53*4882a593Smuzhiyun						  0	:: boot from PromJet
54*4882a593Smuzhiyun	SW5(2)	 = 1		CONFIG_SYS_FLASHBANK	= 1	:: swap upper/lower
55*4882a593Smuzhiyun							 halves (virtual banks)
56*4882a593Smuzhiyun						  0	:: normal
57*4882a593Smuzhiyun	SW5(3)	 = 0		CONFIG_SYS_FLASHWP	= 0	:: not protected
58*4882a593Smuzhiyun	SW5(4)	 = 0		CONFIG_SYS_PORTDIV	= 1	:: 2:1 for PD4
59*4882a593Smuzhiyun							   1:1 for PD6
60*4882a593Smuzhiyun	SW5(5-6) = 11		CONFIG_SYS_PIXISOPT	= 11	:: s/w determined
61*4882a593Smuzhiyun	SW5(7-8) = 11		CONFIG_SYS_LADOPT	= 11	:: s/w determined
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun	SW6(1)	 = 1		CONFIG_SYS_CPUBOOT	= 1	:: no boot holdoff
64*4882a593Smuzhiyun	SW6(2)	 = 1		CONFIG_SYS_BOOTADDR	= 1	:: no traslation
65*4882a593Smuzhiyun	SW6(3-5) = 000		CONFIG_SYS_REFCLKSEL	= 000	:: 100MHZ
66*4882a593Smuzhiyun	SW6(6)	 = 1		CONFIG_SYS_SERROM_ADDR= 1	::
67*4882a593Smuzhiyun	SW6(7)	 = 1		CONFIG_SYS_MEMDEBUG	= 1	::
68*4882a593Smuzhiyun	SW6(8)	 = 1		CONFIG_SYS_DDRDEBUG	= 1	::
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun	SW8(1)	 = 1		ACZ_SYNC	= 1	:: 48MHz on TP49
71*4882a593Smuzhiyun	SW8(2)	 = 1		ACB_SYNC	= 1	:: THRMTRIP disabled
72*4882a593Smuzhiyun	SW8(3)	 = 1		ACZ_SDOUT	= 1	:: p4 mode
73*4882a593Smuzhiyun	SW8(4)	 = 1		ACB_SDOUT	= 1	:: PATA freq. = 133MHz
74*4882a593Smuzhiyun	SW8(5)	 = 0		SUSLED		= 0	:: SouthBridge Mode
75*4882a593Smuzhiyun	SW8(6)	 = 0		SPREAD		= 0	:: REFCLK SSCG Disabled
76*4882a593Smuzhiyun	SW8(7)	 = 1		ACPWR		= 1	:: non-battery
77*4882a593Smuzhiyun	SW8(8)	 = 0		CONFIG_SYS_IDWP	= 0	:: write enable
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun3. Flash U-Boot
81*4882a593Smuzhiyun---------------
82*4882a593SmuzhiyunThe flash range 0xEF800000 to 0xEFFFFFFF can be divided into 2 halves.
83*4882a593SmuzhiyunIt is possible to use either half to boot using U-Boot.  Switch 5 bit 2
84*4882a593Smuzhiyunis used for this purpose.
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun0xEF800000 to 0xEFBFFFFF - 4MB
87*4882a593Smuzhiyun0xEFC00000 to 0xEFFFFFFF - 4MB
88*4882a593SmuzhiyunWhen this bit is 0, U-Boot is at 0xEFF00000.
89*4882a593SmuzhiyunWhen this bit is 1, U-Boot is at 0xEFB00000.
90*4882a593Smuzhiyun
91*4882a593SmuzhiyunUse the above mentioned flash commands to program the other half, and
92*4882a593Smuzhiyunuse switch 5, bit 2 to alternate between the halves.  Note: The booting
93*4882a593Smuzhiyunversion of U-Boot will always be at 0xEFF00000.
94*4882a593Smuzhiyun
95*4882a593SmuzhiyunTo Flash U-Boot into the booting bank (0xEFC00000 - 0xEFFFFFFF):
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun	tftp 1000000 u-boot.bin
98*4882a593Smuzhiyun	protect off all
99*4882a593Smuzhiyun	erase eff00000 +$filesize
100*4882a593Smuzhiyun	cp.b 1000000 eff00000 $filesize
101*4882a593Smuzhiyun
102*4882a593Smuzhiyunor use tftpflash command:
103*4882a593Smuzhiyun	run tftpflash
104*4882a593Smuzhiyun
105*4882a593SmuzhiyunTo Flash U-Boot into the alternative bank (0xEF800000 - 0xEFBFFFFF):
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun	tftp 1000000 u-boot.bin
108*4882a593Smuzhiyun	erase efb00000 +$filesize
109*4882a593Smuzhiyun	cp.b 1000000 efb00000 $filesize
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun4. Memory Map
113*4882a593Smuzhiyun-------------
114*4882a593SmuzhiyunNOTE:  RIO and PCI are mutually exclusive, so they share an address
115*4882a593Smuzhiyun
116*4882a593SmuzhiyunFor 32-bit U-Boot, devices are mapped so that the virtual address ==
117*4882a593Smuzhiyunthe physical address, and the map looks liks this:
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun	Memory Range			Device		Size
120*4882a593Smuzhiyun	------------			------		----
121*4882a593Smuzhiyun	0x0000_0000	0x7fff_ffff	DDR		2G
122*4882a593Smuzhiyun	0x8000_0000	0x9fff_ffff	RIO MEM		512M
123*4882a593Smuzhiyun	0x8000_0000	0x9fff_ffff	PCI1/PEX1 MEM	512M
124*4882a593Smuzhiyun	0xa000_0000	0xbfff_ffff	PCI2/PEX2 MEM	512M
125*4882a593Smuzhiyun	0xffe0_0000	0xffef_ffff	CCSR		1M
126*4882a593Smuzhiyun	0xffdf_0000	0xffdf_7fff	PIXIS		8K
127*4882a593Smuzhiyun	0xffdf_8000	0xffdf_ffff	CF		8K
128*4882a593Smuzhiyun	0xf840_0000	0xf840_3fff	Stack space	32K
129*4882a593Smuzhiyun	0xffc0_0000	0xffc0_ffff	PCI1/PEX1 IO	64K
130*4882a593Smuzhiyun	0xffc1_0000	0xffc1_ffff	PCI2/PEX2 IO	64K
131*4882a593Smuzhiyun	0xef80_0000	0xefff_ffff	Flash		8M
132*4882a593Smuzhiyun
133*4882a593SmuzhiyunFor 36-bit-enabled U-Boot, the virtual map is the same as for 32-bit.
134*4882a593SmuzhiyunHowever, the physical map is altered to reside in 36-bit space, as follows.
135*4882a593SmuzhiyunAddresses are no longer mapped with VA == PA.  All accesses from
136*4882a593Smuzhiyunsoftware use the VA; the PA is only used for setting up windows
137*4882a593Smuzhiyunand mappings. Note that with the exception of PCI MEM and RIO, the low
138*4882a593Smuzhiyun 32 bits are the same as the VA above; only the top 4 bits vary:
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	Memory Range			Device		Size
141*4882a593Smuzhiyun	------------			------		----
142*4882a593Smuzhiyun	0x0_0000_0000	0x0_7fff_ffff	DDR		2G
143*4882a593Smuzhiyun	0xc_0000_0000	0xc_1fff_ffff	RIO MEM		512M
144*4882a593Smuzhiyun	0xc_0000_0000	0xc_1fff_ffff	PCI1/PEX1 MEM	512M
145*4882a593Smuzhiyun	0xc_2000_0000	0xc_3fff_ffff	PCI2/PEX2 MEM	512M
146*4882a593Smuzhiyun	0xf_ffe0_0000	0xf_ffef_ffff	CCSR		1M
147*4882a593Smuzhiyun	0xf_ffdf_0000	0xf_ffdf_7fff	PIXIS		8K
148*4882a593Smuzhiyun	0xf_ffdf_8000	0xf_ffdf_ffff	CF		8K
149*4882a593Smuzhiyun	0x0_f840_0000	0xf_f840_3fff	Stack space	32K
150*4882a593Smuzhiyun	0xf_ffc0_0000	0xf_ffc0_ffff	PCI1/PEX1 IO	64K
151*4882a593Smuzhiyun	0xf_ffc1_0000	0xf_ffc1_ffff	PCI2/PEX2 IO	64K
152*4882a593Smuzhiyun	0xf_ef80_0000	0xf_efff_ffff	Flash		8M
153*4882a593Smuzhiyun
154*4882a593Smuzhiyun5. pixis_reset command
155*4882a593Smuzhiyun--------------------
156*4882a593SmuzhiyunA new command, "pixis_reset", is introduced to reset mpc8641hpcn board
157*4882a593Smuzhiyunusing the FPGA sequencer.  When the board restarts, it has the option
158*4882a593Smuzhiyunof using either the current or alternate flash bank as the boot
159*4882a593Smuzhiyunimage, with or without the watchdog timer enabled, and finally with
160*4882a593Smuzhiyunor without frequency changes.
161*4882a593Smuzhiyun
162*4882a593SmuzhiyunUsage is;
163*4882a593Smuzhiyun
164*4882a593Smuzhiyun	pixis_reset
165*4882a593Smuzhiyun	pixis_reset altbank
166*4882a593Smuzhiyun	pixis_reset altbank wd
167*4882a593Smuzhiyun	pixis_reset altbank cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>
168*4882a593Smuzhiyun	pixis_reset cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>
169*4882a593Smuzhiyun
170*4882a593SmuzhiyunExamples;
171*4882a593Smuzhiyun
172*4882a593Smuzhiyun	/* reset to current bank, like "reset" command */
173*4882a593Smuzhiyun	pixis_reset
174*4882a593Smuzhiyun
175*4882a593Smuzhiyun	/* reset board but use the to alternate flash bank */
176*4882a593Smuzhiyun	pixis_reset altbank
177*4882a593Smuzhiyun
178*4882a593Smuzhiyun	/* reset board, use alternate flash bank with watchdog timer enabled*/
179*4882a593Smuzhiyun	pixis_reset altbank wd
180*4882a593Smuzhiyun
181*4882a593Smuzhiyun	/* reset board to alternate bank with frequency changed.
182*4882a593Smuzhiyun	 * 40 is SYSCLK, 2.5 is COREPLL ratio, 10 is MPXPLL ratio
183*4882a593Smuzhiyun	 */
184*4882a593Smuzhiyun	pixis-reset altbank cf 40 2.5 10
185*4882a593Smuzhiyun
186*4882a593SmuzhiyunValid clock choices are in the 8641 Reference Manuals.
187