提交 7a78f148 编写于 作者: T Timur Tabi 提交者: Kim Phillips

mpc83xx: Add support for the MPC8349E-mITX-GP

Add support for the MPC8349E-mITX-GP, a stripped-down version of the
MPC8349E-mITX.  Bonus features include support for low-boot (BMS bit in
HRCW is 0) for the ITX and a README for the ITX and the ITX-GP.
Signed-off-by: NTimur Tabi <timur@freescale.com>
上级 fab16807
......@@ -350,6 +350,7 @@ John Zhan <zhanz@sinovee.com>
Timur Tabi <timur@freescale.com>
MPC8349E-mITX MPC8349
MPC8349E-mITX-GP MPC8349
Kim Phillips <kim.phillips@freescale.com>
......
......@@ -132,8 +132,8 @@ LIST_8260=" \
#########################################################################
LIST_83xx=" \
MPC832XEMDS MPC8349EMDS MPC8349ITX MPC8360EMDS \
sbc8349 TQM834x \
MPC832XEMDS MPC8349EMDS MPC8349ITX MPC8349ITXGP \
MPC8360EMDS sbc8349 TQM834x \
"
......
......@@ -1642,8 +1642,19 @@ MPC832XEMDS_SLAVE_config: unconfig
MPC8349EMDS_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc83xx mpc8349emds
MPC8349ITX_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc83xx mpc8349itx
MPC8349ITX_config \
MPC8349ITX_LOWBOOT_config \
MPC8349ITXGP_config: unconfig
@mkdir -p $(obj)include
@mkdir -p $(obj)board/mpc8349itx
@echo "#define CONFIG_$(subst _LOWBOOT,,$(@:_config=))" >> $(obj)include/config.h
@if [ "$(findstring GP,$@)" ] ; then \
echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8349itx/config.tmp ; \
fi
@if [ "$(findstring LOWBOOT,$@)" ] ; then \
echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8349itx/config.tmp ; \
fi
@$(MKCONFIG) -a -n $(@:_config=) MPC8349ITX ppc mpc83xx mpc8349itx
MPC8360EMDS_config \
MPC8360EMDS_HOST_33_config \
......
......@@ -21,10 +21,14 @@
#
#
# MPC8349ITX
# MPC8349E-mITX and MPC8349E-mITX-GP
#
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
TEXT_BASE = 0xFEF00000
endif
ifneq ($(OBJTREE),$(SRCTREE))
# We are building u-boot in a separate directory, use generated
......
......@@ -168,7 +168,11 @@ long int initdram(int board_type)
int checkboard(void)
{
#ifdef CONFIG_MPC8349ITX
puts("Board: Freescale MPC8349E-mITX\n");
#else
puts("Board: Freescale MPC8349E-mITX-GP\n");
#endif
return 0;
}
......@@ -181,6 +185,7 @@ int checkboard(void)
*/
int misc_init_f(void)
{
#ifdef CONFIG_VSC7385
volatile u32 *vsc7385_cpuctrl;
/* 0x1c0c0 is the VSC7385 CPU Control (CPUCTRL) Register. The power up
......@@ -200,6 +205,7 @@ int misc_init_f(void)
vsc7385_cpuctrl = (volatile u32 *)(CFG_VSC7385_BASE + 0x1c0c0);
*vsc7385_cpuctrl |= 0x0c;
#endif
#ifdef CONFIG_COMPACT_FLASH
/* UPM Table Configuration Code */
......@@ -269,9 +275,19 @@ int misc_init_r(void)
#ifdef CFG_I2C_EEPROM_ADDR
static u8 eeprom_data[] = /* HRCW data */
{
0xaa, 0x55, 0xaa,
0x7c, 0x02, 0x40, 0x05, 0x04, 0x00, 0x00,
0x7c, 0x02, 0x41, 0xb4, 0x60, 0xa0, 0x00,
0xAA, 0x55, 0xAA, /* Preamble */
0x7C, /* ACS=0, BYTE_EN=1111, CONT=1 */
0x02, 0x40, /* RCWL ADDR=0x0_0900 */
(CFG_HRCW_LOW >> 24) & 0xFF,
(CFG_HRCW_LOW >> 16) & 0xFF,
(CFG_HRCW_LOW >> 8) & 0xFF,
CFG_HRCW_LOW & 0xFF,
0x7C, /* ACS=0, BYTE_EN=1111, CONT=1 */
0x02, 0x41, /* RCWH ADDR=0x0_0904 */
(CFG_HRCW_HIGH >> 24) & 0xFF,
(CFG_HRCW_HIGH >> 16) & 0xFF,
(CFG_HRCW_HIGH >> 8) & 0xFF,
CFG_HRCW_HIGH & 0xFF
};
u8 data[sizeof(eeprom_data)];
......
Freescale MPC8349E-mITX and MPC8349E-mITX-GP Boards
---------------------------------------------------
1. Board Description
The MPC8349E-mITX and MPC8349E-mITX-GP are reference boards featuring
the Freescale MPC8349E processor in a Mini-ITX form factor.
The MPC8349E-mITX-GP is an MPC8349E-mITX with the following differences:
A) One 8MB on-board flash EEPROM chip, instead of two.
B) No SATA controller
C) No Compact Flash slot
D) No Mini-PCI slot
E) No Vitesse 7385 5-port Ethernet switch
F) No 4-port USB Type-A interface
2. Board Switches and Jumpers
2.0 Descriptions for all of the board jumpers can be found in the User
Guide. Of particular interest to U-Boot developers is jumper J22:
Pos. Name Default Description
-----------------------------------------------------------------------
A LGPL0 ON (0) HRCW source, bit 0
B LGPL1 ON (0) HRCW source, bit 1
C LGPL3 ON (0) HRCW source, bit 2
D LGPL5 OFF (1) PCI_SYNC_OUT frequency
E BOOT1 ON (0) Flash EEPROM boot device
F PCI_M66EN ON (0) PCI 66MHz enable
G I2C-WP ON (0) I2C EEPROM write protection
H F_WP OFF (1) Flash EEPROM write protection
Jumper J22.E is only for the ITX, and it decides the configuration
of the flash chips. If J22.E is ON (i.e. jumpered), then flash chip
U4 is located at address FE000000 and flash chip U7 is at FE800000.
If J22.E is OFF, then U7 is at FE000000 and U4 is at FE800000.
For U-Boot development, J22.E can be used to switch back-and-forth
between two U-Boot images.
3. Memory Map
3.1. The memory map should look pretty much like this:
0x0000_0000 - 0x0FFF_FFFF DDR SDRAM (256 MB)
0x8000_0000 - 0x9FFF_FFFF PCI1 memory space (512 MB)
0xA000_0000 - 0xBFFF_FFFF PCI2 memory space (512 MB)
0xE000_0000 - 0xEFFF_FFFF IMMR (1 MB)
0xE200_0000 - 0xE2FF_FFFF PCI1 I/O space (16 MB)
0xE300_0000 - 0xE3FF_FFFF PCI2 I/O space (16 MB)
0xF000_0000 - 0xF000_FFFF Compact Flash (ITX only)
0xF001_0000 - 0xF001_FFFF Local bus expansion slot
0xF800_0000 - 0xF801_FFFF Vitesse 7385 Parallel Interface (ITX only)
0xFE00_0000 - 0xFE7F_FFFF First 8MB bank of Flash memory
0xFE80_0000 - 0xFEFF_FFFF Second 8MB bank of Flash memory (ITX only)
3.2 Flash EEPROM layout.
On the ITX, jumper J22.E is used to determine which flash chips are
at which address. When J22.E is switched, addresses from FE000000
to FE7FFFFF are swapped with addresses from FE800000 to FEFFFFFF.
On the ITX, at the normal boot address (aka HIGHBOOT):
FE00_0000 HRCW
FE70_0000 Alternative U-Boot image
FE80_0000 Alternative HRCW
FEF0_0000 U-Boot image
FEFF_FFFF End of flash
On the ITX, at the low boot address (LOWBOOT)
FE00_0000 HRCW and U-Boot image
FE04_0000 U-Boot environment variables
FE80_0000 Alternative HRCW and U-Boot image
FEFF_FFFF End of flash
On the ITX-GP, the only option is LOWBOOT and there is only one chip
FE00_0000 HRCW and U-Boot image
FE04_0000 U-Boot environment variables
F7FF_FFFF End of flash
4. Definitions
4.1 Explanation of NEW definitions in:
include/configs/MPC8349ITX.h
CONFIG_MPC83XX MPC83xx family
CONFIG_MPC8349 MPC8349 specific
CONFIG_MPC8349ITX MPC8349E-mITX
CONFIG_MPC8349ITXGP MPC8349E-mITX-GP
5. Compilation
Assuming you're using BASH shell:
export CROSS_COMPILE=your-cross-compile-prefix
cd u-boot
make distclean
make MPC8349ITX_config
or:
make MPC8349ITXGP_config
or:
make MPC8349ITX_LOWBOOT_config
make
6. Downloading and Flashing Images
6.1 Download via tftp:
tftp $loadaddr <uboot>
where "<uboot>" is the path and filename, on the TFTP server, of
the U-Boot image.
6.1 Reflash U-Boot Image using U-Boot
setenv uboot <uboot>
run tftpflash
where "<uboot>" is the path and filename, on the TFTP server, of
the U-Boot image.
6.2 Using the HRCW to switch between two different U-Boot images on the ITX
Because the ITX has 16MB of flash, it is possible to keep two U-Boot
images in flash, and use the HRCW to specify which one is to be used
when the board boots. This trick is especially effective with a
hardware debugger that can override the HRCW, such as the BDI-2000.
When the BMS bit in the HRCW is 0, the ITX will boot the U-Boot image
at address FE000000. When the BMS bit is 1, the ITX will boot the
image at address FEF00000.
Therefore, just put a U-Boot image at both FE000000 and FEF00000 and
change the BMS bit whenever you want to boot the other image.
Step-by-step instructions:
1) Build an ITX image to be loaded at FEF00000
make distclean
make MPC8349ITX_config
make
2) Take the u-boot.bin image and flash it at FEF00000.
tftp $loadaddr u-boot.bin
protect off all
erase FEF00000 +$filesize
cp.b $loadaddr FEF00000 $filesize
3) Build an ITX image to be loaded at FE000000
make distclean
make MPC8349ITX_LOWBOOT_config
make
4) Take the u-boot.bin image and flash it at FE000000.
tftp $loadaddr u-boot.bin
protect off FE000000 +$filesize
erase FE000000 +$filesize
cp.b $loadaddr FE000000 $filesize
The HRCW in flash is currently set to boot the image at FE000000.
If you have a hardware debugger, configure it to set the HRCW to
B460A000 04040000 if you want to boot the image at FEF00000, or set
it to B060A000 04040000 if you want to boot the image at FE000000.
To change the HRCW in flash to boot the image at FEF00000, use these
U-Boot commands:
cp.b FE000000 1000 10000 ; copy 1st flash sector to 1000
mw.b 1020 b4 8 ; modify BMS bit
protect off FE000000 +10000
erase FE000000 +10000
cp.b 1000 FE000000 10000
7. Notes
1) The console baudrate for MPC8349EITX is 115200bps.
此差异已折叠。
......@@ -825,6 +825,47 @@
#define OR_SDRAM_EAD 0x00000001
#define OR_SDRAM_EAD_SHIFT 0
#define OR_AM_32KB 0xFFFF8000
#define OR_AM_64KB 0xFFFF0000
#define OR_AM_128KB 0xFFFE0000
#define OR_AM_256KB 0xFFFC0000
#define OR_AM_512KB 0xFFF80000
#define OR_AM_1MB 0xFFF00000
#define OR_AM_2MB 0xFFE00000
#define OR_AM_4MB 0xFFC00000
#define OR_AM_8MB 0xFF800000
#define OR_AM_16MB 0xFF000000
#define OR_AM_32MB 0xFE000000
#define OR_AM_64MB 0xFC000000
#define OR_AM_128MB 0xF8000000
#define OR_AM_256MB 0xF0000000
#define OR_AM_512MB 0xE0000000
#define OR_AM_1GB 0xC0000000
#define OR_AM_2GB 0x80000000
#define OR_AM_4GB 0x00000000
#define LBLAWAR_EN 0x80000000
#define LBLAWAR_4KB 0x0000000B
#define LBLAWAR_8KB 0x0000000C
#define LBLAWAR_16KB 0x0000000D
#define LBLAWAR_32KB 0x0000000E
#define LBLAWAR_64KB 0x0000000F
#define LBLAWAR_128KB 0x00000010
#define LBLAWAR_256KB 0x00000011
#define LBLAWAR_512KB 0x00000012
#define LBLAWAR_1MB 0x00000013
#define LBLAWAR_2MB 0x00000014
#define LBLAWAR_4MB 0x00000015
#define LBLAWAR_8MB 0x00000016
#define LBLAWAR_16MB 0x00000017
#define LBLAWAR_32MB 0x00000018
#define LBLAWAR_64MB 0x00000019
#define LBLAWAR_128MB 0x0000001A
#define LBLAWAR_256MB 0x0000001B
#define LBLAWAR_512MB 0x0000001C
#define LBLAWAR_1GB 0x0000001D
#define LBLAWAR_2GB 0x0000001E
/* LBCR - Local Bus Configuration Register
*/
#define LBCR_LDIS 0x80000000
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册