xref: /OK3568_Linux_fs/u-boot/board/freescale/mpc8572ds/README (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunOverview
2*4882a593Smuzhiyun--------
3*4882a593SmuzhiyunMPC8572DS is a high-performance computing, evaluation and development platform
4*4882a593Smuzhiyunsupporting the mpc8572 PowerTM processor.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunBuilding U-Boot
7*4882a593Smuzhiyun-----------
8*4882a593Smuzhiyun	make MPC8572DS_config
9*4882a593Smuzhiyun	make
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunFlash Banks
12*4882a593Smuzhiyun-----------
13*4882a593SmuzhiyunMPC8572DS board has two flash banks. They are both present on boot, but their
14*4882a593Smuzhiyunlocations can be swapped using the dip-switch SW9[1:2].
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunBooting is always from the boot bank at 0xec00_0000.
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunMemory Map
20*4882a593Smuzhiyun----------
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun0xe800_0000 - 0xebff_ffff	Alternate bank		64MB
23*4882a593Smuzhiyun0xec00_0000 - 0xefff_ffff	Boot bank		64MB
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun0xebf8_0000 - 0xebff_ffff	Alternate U-Boot address	512KB
26*4882a593Smuzhiyun0xeff8_0000 - 0xefff_ffff	Boot U-Boot address		512KB
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunFlashing Images
30*4882a593Smuzhiyun---------------
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunTo place a new U-Boot image in the alternate flash bank and then reset with that
33*4882a593Smuzhiyun new image temporarily, use this:
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun	tftp 1000000 u-boot.bin
36*4882a593Smuzhiyun	erase ebf80000 ebffffff
37*4882a593Smuzhiyun	cp.b 1000000 ebf80000 80000
38*4882a593Smuzhiyun	pixis_reset altbank
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunTo program the image in the boot flash bank:
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun	tftp 1000000 u-boot.bin
44*4882a593Smuzhiyun	protect off all
45*4882a593Smuzhiyun	erase eff80000 ffffffff
46*4882a593Smuzhiyun	cp.b 1000000 eff80000 80000
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunThe pixis_reset command
50*4882a593Smuzhiyun-----------------------
51*4882a593SmuzhiyunThe command - "pixis_reset", is introduced to reset mpc8572ds board
52*4882a593Smuzhiyunusing the FPGA sequencer.  When the board restarts, it has the option
53*4882a593Smuzhiyunof using either the current or alternate flash bank as the boot
54*4882a593Smuzhiyunimage, with or without the watchdog timer enabled, and finally with
55*4882a593Smuzhiyunor without frequency changes.
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunUsage is;
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun	pixis_reset
60*4882a593Smuzhiyun	pixis_reset altbank
61*4882a593Smuzhiyun	pixis_reset altbank wd
62*4882a593Smuzhiyun	pixis_reset altbank cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>
63*4882a593Smuzhiyun	pixis_reset cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>
64*4882a593Smuzhiyun
65*4882a593SmuzhiyunExamples:
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun	/* reset to current bank, like "reset" command */
68*4882a593Smuzhiyun	pixis_reset
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun	/* reset board but use the to alternate flash bank */
71*4882a593Smuzhiyun	pixis_reset altbank
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunUsing the Device Tree Source File
75*4882a593Smuzhiyun---------------------------------
76*4882a593SmuzhiyunTo create the DTB (Device Tree Binary) image file,
77*4882a593Smuzhiyunuse a command similar to this:
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun	dtc -b 0 -f -I dts -O dtb mpc8572ds.dts > mpc8572ds.dtb
80*4882a593Smuzhiyun
81*4882a593SmuzhiyunLikely, that .dts file will come from here;
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun	linux-2.6/arch/powerpc/boot/dts/mpc8572ds.dts
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun
86*4882a593SmuzhiyunBooting Linux
87*4882a593Smuzhiyun-------------
88*4882a593Smuzhiyun
89*4882a593SmuzhiyunPlace a linux uImage in the TFTP disk area.
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun	tftp 1000000 uImage.8572
92*4882a593Smuzhiyun	tftp c00000 mpc8572ds.dtb
93*4882a593Smuzhiyun	bootm 1000000 - c00000
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun
96*4882a593SmuzhiyunImplementing AMP(Asymmetric MultiProcessing)
97*4882a593Smuzhiyun-------------
98*4882a593Smuzhiyun1. Build kernel image for core0:
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun	a. $ make 85xx/mpc8572_ds_defconfig
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun	b. $ make menuconfig
103*4882a593Smuzhiyun	   - un-select "Processor support"->"Symetric multi-processing support"
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun	c. $ make uImage
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun	d. $ cp arch/powerpc/boot/uImage /tftpboot/uImage.core0
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun2. Build kernel image for core1:
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun	a. $ make 85xx/mpc8572_ds_defconfig
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun	b. $ make menuconfig
114*4882a593Smuzhiyun	   - Un-select "Processor support"->"Symetric multi-processing support"
115*4882a593Smuzhiyun	   - Select "Advanced setup" -> " Prompt for advanced kernel
116*4882a593Smuzhiyun	     configuration options"
117*4882a593Smuzhiyun		- Select "Set physical address where the kernel is loaded" and
118*4882a593Smuzhiyun		  set it to 0x20000000, assuming core1 will start from 512MB.
119*4882a593Smuzhiyun		- Select "Set custom page offset address"
120*4882a593Smuzhiyun		- Select "Set custom kernel base address"
121*4882a593Smuzhiyun		- Select "Set maximum low memory"
122*4882a593Smuzhiyun	   - "Exit" and save the selection.
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun	c. $ make uImage
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun	d. $ cp arch/powerpc/boot/uImage /tftpboot/uImage.core1
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun3. Create dtb for core0:
129*4882a593Smuzhiyun
130*4882a593Smuzhiyun	$ dtc -I dts -O dtb -f -b 0 arch/powerpc/boot/dts/mpc8572ds_core0.dts > /tftpboot/mpc8572ds_core0.dtb
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun4. Create dtb for core1:
133*4882a593Smuzhiyun
134*4882a593Smuzhiyun	$ dtc -I dts -O dtb -f -b 1 arch/powerpc/boot/dts/mpc8572ds_core1.dts > /tftpboot/mpc8572ds_core1.dtb
135*4882a593Smuzhiyun
136*4882a593Smuzhiyun5. Bring up two cores separately:
137*4882a593Smuzhiyun
138*4882a593Smuzhiyun	a. Power on the board, under U-Boot prompt:
139*4882a593Smuzhiyun		=> setenv <serverip>
140*4882a593Smuzhiyun		=> setenv <ipaddr>
141*4882a593Smuzhiyun		=> setenv bootargs root=/dev/ram rw console=ttyS0,115200
142*4882a593Smuzhiyun	b. Bring up core1's kernel first:
143*4882a593Smuzhiyun		=> setenv bootm_low 0x20000000
144*4882a593Smuzhiyun		=> setenv bootm_size 0x10000000
145*4882a593Smuzhiyun		=> tftp 21000000 8572/uImage.core1
146*4882a593Smuzhiyun		=> tftp 22000000 8572/ramdiskfile
147*4882a593Smuzhiyun		=> tftp 20c00000 8572/mpc8572ds_core1.dtb
148*4882a593Smuzhiyun		=> interrupts off
149*4882a593Smuzhiyun		=> bootm start 21000000 22000000 20c00000
150*4882a593Smuzhiyun		=> bootm loados
151*4882a593Smuzhiyun		=> bootm ramdisk
152*4882a593Smuzhiyun		=> bootm fdt
153*4882a593Smuzhiyun		=> fdt boardsetup
154*4882a593Smuzhiyun		=> fdt chosen $initrd_start $initrd_end
155*4882a593Smuzhiyun		=> bootm prep
156*4882a593Smuzhiyun		=> cpu 1 release $bootm_low - $fdtaddr -
157*4882a593Smuzhiyun	c. Bring up core0's kernel(on the same U-Boot console):
158*4882a593Smuzhiyun		=> setenv bootm_low 0
159*4882a593Smuzhiyun		=> setenv bootm_size 0x20000000
160*4882a593Smuzhiyun		=> tftp 1000000 8572/uImage.core0
161*4882a593Smuzhiyun		=> tftp 2000000 8572/ramdiskfile
162*4882a593Smuzhiyun		=> tftp c00000 8572/mpc8572ds_core0.dtb
163*4882a593Smuzhiyun		=> bootm 1000000 2000000 c00000
164*4882a593Smuzhiyun
165*4882a593SmuzhiyunPlease note only core0 will run U-Boot, core1 starts kernel directly after
166*4882a593Smuzhiyun"cpu release" command is issued.
167