Blame view
doc/README.mpc85xxads
10.1 KB
42d1f0394
|
1 |
Motorola MPC8540ADS and MPC8560ADS board |
9aea95307
|
2 3 |
Created 10/15/03 Xianghua Xiao Updated 13-July-2004 Jon Loeliger |
42d1f0394
|
4 |
----------------------------------------- |
4654af27b
|
5 |
0. Toolchain |
9aea95307
|
6 7 |
The Binutils in current ELDK toolchain will not support MPC85xx |
03f5c5502
|
8 |
chip. You need to use binutils-2.14.tar.bz2 (or newer) from |
9aea95307
|
9 10 11 12 |
http://ftp.gnu.org/gnu/binutils. The 8540/8560 ADS code base is known to compile using: gcc (GCC) 3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a) |
4654af27b
|
13 |
|
42d1f0394
|
14 |
1. SWITCH SETTINGS & JUMPERS |
48abe7bfa
|
15 |
|
9aea95307
|
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
1.0 Nomenclature For some reason, the HW designers describe the switch settings in terms of 0 and 1, and then map that to physical switches where the label "On" refers to logic 0 and "Off" (unlabeled) is logic 1. Luckily, we're SW types and virtual settings are handled daily. The switches for the Rev A board are numbered differently than for the Pilot board. Oh yeah. Switch bits are numbered 1 through, like, 4 6 8 or 10, but the bits may contribute to signals that are numbered based at 0, and some of those signals may be high-bit-number-0 too. Heed well the names and labels and do not get confused. "Off" == 1 "On" == 0 SW18 is switch 18 as silk-screened onto the board. |
c46bf09e0
|
35 |
SW4[8] is the bit labeled 8 on Switch 4. |
9aea95307
|
36 37 38 39 40 41 |
SW2[1:6] refers to bits labeled 1 through 6 in order on switch 2 SW3[7:1] refers to bits labeled 7 through 1 in order on switch 3 1.1 For the MPC85xxADS Pilot Board First, make sure the board default setting is consistent with the document |
42d1f0394
|
42 |
shipped with your board. Then apply the following changes: |
9aea95307
|
43 |
SW3[1-6]="all OFF" (boot from 32bit flash, no boot sequence is used) |
42d1f0394
|
44 |
SW10[2-6]="all OFF" (turn on CPM SCC for serial port,works for 8540/8560) |
0ac6f8b74
|
45 |
SW11[2]='OFF for 8560, ON for 8540' (toggle 8540.8560 mode) |
547b4cb25
|
46 |
SW11[7]='ON' (rev2), 'OFF' (rev1) |
42d1f0394
|
47 48 49 50 |
SW4[7-8]="OFF OFF" (enable serial ports,I'm using the top serial connector) SW22[1-4]="OFF OFF ON OFF" SW5[1-10[="ON ON OFF OFF OFF OFF OFF OFF OFF OFF" J1 = "Enable Prog" (Make sure your flash is programmable for development) |
48abe7bfa
|
51 |
|
9aea95307
|
52 |
If you want to test PCI functionality with a 33Mhz PCI card, you will |
547b4cb25
|
53 54 55 |
have to change the system clock from the default 66Mhz to 33Mhz by setting SW15[1]="OFF" and SW17[8]="OFF". After that you may also need double your platform clock(SW6) because the system clock is now only |
0ac6f8b74
|
56 57 |
half of its original value. For example, if at 66MHz your system clock showed SW6[0:1] = 01, then at 33MHz SW6[0:1] it should be 10. |
48abe7bfa
|
58 |
|
9aea95307
|
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
SW17[8] ------+ SW6 SW15[1] ----+ | [0:1] V V V V 33MHz 1 1 1 0 66MHz 0 0 0 1 Hmmm... That SW6 setting description is incomplete but it works. 1.3 For the MPC85xxADS Rev A Board As shipped, the board should be a 33MHz PCI bus with a CPU Clock rate of 825 +/- fuzz: Clocks: CPU: 825 MHz, CCB: 330 MHz, DDR: 165 MHz, LBC: 82 MHz For 33MHz PCI, the switch settings should be like this: SW18[7:1] = 0100001 = M==33 => 33MHz SW18[8] = 1 => PWD Divider == 16 SW16[1:2] = 11 => N == 16 as PWD==1 Use the magical formula: Fout (MHz) = 16 * M / N = 16 * 33 / 16 = 33 MHz SW7[1:4] = 1010 = 10 => 10 x 33 = 330 CCB Sysclk SW7[5:6] = 01 => 5:2 x 330 = 825 Core clock For 66MHz PCI, the switch settings should be like this: SW18[7:1] = 0100001 = M==33 => 33MHz SW18[8] = 0 => PWD Divider == 1 SW16[1:2] = 01 => N == 8 as PWD == 0 Use the magical formula: Fout (MHz) = 16 * M / N = 16 * 33 / 8 = 66 MHz SW7[1:4] = 0101 = 5 => 5 x 66 = 330 CCB Sysclk SW7[5:6] = 01 => 5:2 x 330 = 825 Core clock |
547b4cb25
|
99 |
|
38433ccc5
|
100 101 102 |
In order to use PCI-X (only in the first PCI slot. The one with the RIO connector), you need to set SW1[4] (config) to 1 (off). Also, configure the board to run PCI at 66 MHz. |
42d1f0394
|
103 104 |
2. MEMORY MAP TO WORK WITH LINUX KERNEL |
547b4cb25
|
105 106 |
2.1. For the initial bringup, we adopted a consistent memory scheme |
a187559e3
|
107 |
between U-Boot and linux kernel, you can customize it based on your |
547b4cb25
|
108 |
system requirements: |
9aea95307
|
109 110 111 112 113 114 115 116 |
0x0000_0000 0x7fff_ffff DDR 2G 0x8000_0000 0x9fff_ffff PCI MEM 512M 0xc000_0000 0xdfff_ffff Rapid IO 512M 0xe000_0000 0xe00f_ffff CCSR 1M 0xe200_0000 0xe2ff_ffff PCI IO 16M 0xf000_0000 0xf7ff_ffff SDRAM 128M 0xf800_0000 0xf80f_ffff BCSR 1M 0xff00_0000 0xffff_ffff FLASH (boot bank) 16M |
547b4cb25
|
117 118 119 120 121 122 |
2.2 We are submitting Linux kernel patches for MPC8540 and MPC8560. You can download them from linuxppc-2.4 public source. Please make sure the kernel's ppcboot.h is consistent with U-Boot's u-boot.h. You can use two default configuration files as your starting points to configure the kernel: |
a47a12bec
|
123 124 |
arch/powerpc/configs/mpc8540_ads_defconfig arch/powerpc/configs/mpc8560_ads_defconfig |
42d1f0394
|
125 126 |
3. DEFINITIONS AND COMPILATION |
48abe7bfa
|
127 |
|
0ac6f8b74
|
128 129 130 |
3.1 Explanation on NEW definitions in: include/configs/MPC8540ADS.h include/configs/MPC8560ADS.h |
0c8721a46
|
131 |
CONFIG_BOOKE BOOKE(e.g. Motorola MPC85xx, AMCC 440, etc) |
9aea95307
|
132 133 134 |
CONFIG_E500 BOOKE e500 family(Motorola) CONFIG_MPC85xx MPC8540,MPC8560 and their derivatives CONFIG_MPC8540 MPC8540 specific |
9aea95307
|
135 136 137 138 139 |
CONFIG_MPC8540ADS MPC8540ADS board specific CONFIG_MPC8560ADS MPC8560ADS board specific CONFIG_TSEC_ENET Use on-chip 10/100/1000 ethernet for networking CONFIG_SPD_EEPROM Use SPD EEPROM for DDR auto configuration, you can also manual config the DDR after undef this |
0ac6f8b74
|
140 |
definition. |
9aea95307
|
141 |
CONFIG_DDR_ECC only for ECC DDR module |
810c44274
|
142 143 |
CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN DLL fix on some ADS boards needed for more stability. |
d9b94f28a
|
144 |
CONFIG_HAS_FEC If an FEC is on chip, set to 1, else 0. |
0ac6f8b74
|
145 146 147 |
Other than the above definitions, the rest in the config files are straightforward. |
42d1f0394
|
148 |
|
42d1f0394
|
149 |
3.2 Compilation |
42d1f0394
|
150 |
|
0ac6f8b74
|
151 152 153 154 155 156 157 |
Assuming you're using BASH shell: export CROSS_COMPILE=your-cross-compile-prefix cd u-boot make distclean make MPC8560ADS_config (or make MPC8540ADS_config) make |
48abe7bfa
|
158 |
|
547b4cb25
|
159 |
4. Notes: |
48abe7bfa
|
160 |
|
547b4cb25
|
161 |
4.1 When connecting with kermit, the following commands must be present.in |
0ac6f8b74
|
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
your .kermrc file. These are especially important when booting as MPC8560, as the serial console will not work without them: set speed 115200 set carrier-watch off set handshake none set flow-control none robust 4.2 Sometimes after U-Boot is up, the 'tftp' won't work well with TSEC ethernet. If that happens, you can try the following steps to make network work: MPC8560ADS>tftp 1000000 pImage (if it hangs, use Ctrl-C to quit) MPC8560ADS>nm fdf24524 >0 >1 >. (to quit this memory operation) MPC8560ADS>tftp 1000000 pImage 4.3 If you're one of the early developers using the Rev1 8540/8560 chips, please use U-Boot 1.0.0, as the newer silicon will only support Rev2 and future revisions of 8540/8560. |
547b4cb25
|
187 |
|
a187559e3
|
188 |
4.4 Reflash U-Boot Image using U-Boot |
547b4cb25
|
189 |
|
d9b94f28a
|
190 191 192 193 |
tftp 10000 u-boot.bin protect off fff80000 ffffffff erase fff80000 ffffffff cp.b 10000 fff80000 80000 |
547b4cb25
|
194 |
|
42d1f0394
|
195 |
|
0ac6f8b74
|
196 |
4.5 Reflash U-Boot with a BDI-2000 |
48abe7bfa
|
197 |
|
9aea95307
|
198 |
BDI> erase 0xFFF80000 0x4000 0x20 |
0ac6f8b74
|
199 200 |
BDI> prog 0xfff80000 u-boot.bin.8560ads BDI> verify |
9aea95307
|
201 |
5. Screen dump MPC8540ADS board |
42d1f0394
|
202 |
|
9aea95307
|
203 204 205 206 207 208 209 210 211 |
U-Boot 1.1.2(pq3-20040707-0) (Jul 6 2004 - 17:34:25) Freescale PowerPC Core: E500, Version: 2.0, (0x80200020) System: 8540, Version: 2.0, (0x80300020) Clocks: CPU: 825 MHz, CCB: 330 MHz, DDR: 165 MHz, LBC: 82 MHz L1 D-cache 32KB, L1 I-cache 32KB enabled. Board: ADS PCI1: 32 bit, 66 MHz (compiled) |
42d1f0394
|
212 |
I2C: ready |
9aea95307
|
213 214 215 |
DRAM: Initializing SDRAM: 64 MB DDR: 256 MB |
42d1f0394
|
216 217 218 219 220 221 222 |
FLASH: 16 MB L2 cache enabled: 256KB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial |
9aea95307
|
223 224 225 226 |
Net: MOTO ENET0: PHY is Marvell 88E1011S (1410c62) MOTO ENET1: PHY is Marvell 88E1011S (1410c62) MOTO ENET2: PHY is Davicom DM9161E (181b881) MOTO ENET0, MOTO ENET1, MOTO ENET2 |
42d1f0394
|
227 |
Hit any key to stop autoboot: 0 |
9aea95307
|
228 229 |
=> => fli |
42d1f0394
|
230 231 232 233 |
Bank # 1: Intel 28F640J3A (64 Mbit, 64 x 128K) Size: 16 MB in 64 Sectors Sector Start Addresses: |
9aea95307
|
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
FF000000 FF040000 FF080000 FF0C0000 FF100000 FF140000 FF180000 FF1C0000 FF200000 FF240000 FF280000 FF2C0000 FF300000 FF340000 FF380000 FF3C0000 FF400000 FF440000 FF480000 FF4C0000 FF500000 FF540000 FF580000 FF5C0000 FF600000 FF640000 FF680000 FF6C0000 FF700000 FF740000 FF780000 FF7C0000 FF800000 FF840000 FF880000 FF8C0000 FF900000 FF940000 FF980000 FF9C0000 FFA00000 FFA40000 FFA80000 FFAC0000 FFB00000 FFB40000 FFB80000 FFBC0000 FFC00000 FFC40000 FFC80000 FFCC0000 FFD00000 FFD40000 FFD80000 FFDC0000 FFE00000 FFE40000 FFE80000 FFEC0000 FFF00000 FFF40000 FFF80000 (RO) FFFC0000 (RO) => bdinfo |
42d1f0394
|
249 |
memstart = 0x00000000 |
9aea95307
|
250 |
memsize = 0x10000000 |
42d1f0394
|
251 252 253 254 255 |
flashstart = 0xFF000000 flashsize = 0x01000000 flashoffset = 0x00000000 sramstart = 0x00000000 sramsize = 0x00000000 |
9aea95307
|
256 257 258 259 260 261 262 263 |
immr_base = 0xE0000000 bootflags = 0xE4013F80 intfreq = 825 MHz busfreq = 330 MHz ethaddr = 00:E0:0C:00:00:FD eth1addr = 00:E0:0C:00:01:FD eth2addr = 00:E0:0C:00:02:FD IP addr = 192.168.1.253 |
42d1f0394
|
264 |
baudrate = 115200 bps |
42d1f0394
|
265 |
|
42d1f0394
|
266 |
|
9aea95307
|
267 268 269 270 271 |
=> printenv bootcmd=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;bootm $loadaddr ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;bootm $loadaddr $ramdiskaddr nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;bootm $loadaddr bootdelay=10 |
42d1f0394
|
272 273 |
baudrate=115200 loads_echo=1 |
9aea95307
|
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
ethaddr=00:E0:0C:00:00:FD eth1addr=00:E0:0C:00:01:FD eth2addr=00:E0:0C:00:02:FD ipaddr=192.168.1.253 serverip=192.168.1.1 rootpath=/nfsroot gatewayip=192.168.1.1 netmask=255.255.255.0 hostname=unknown bootfile=your.uImage loadaddr=200000 netdev=eth0 consoledev=ttyS0 ramdiskaddr=400000 ramdiskfile=your.ramdisk.u-boot |
42d1f0394
|
289 290 291 |
stdin=serial stdout=serial stderr=serial |
9aea95307
|
292 |
ethact=MOTO ENET0 |
42d1f0394
|
293 |
|
9aea95307
|
294 |
Environment size: 1020/8188 bytes |