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