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