README.mpc85xxads 9.8 KB

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