1*702e6014SWolfgang DenkFreescale MPC8313ERDB Board
2*702e6014SWolfgang Denk-----------------------------------------
3*702e6014SWolfgang Denk
4*702e6014SWolfgang Denk1.	Board Switches and Jumpers
5*702e6014SWolfgang Denk
6*702e6014SWolfgang Denk	S3 is used to set CONFIG_SYS_RESET_SOURCE.
7*702e6014SWolfgang Denk
8*702e6014SWolfgang Denk	To boot the image at 0xFE000000 in NOR flash, use these DIP
9*702e6014SWolfgang Denk	switch settings for S3 S4:
10*702e6014SWolfgang Denk
11*702e6014SWolfgang Denk	+------+	+------+
12*702e6014SWolfgang Denk	|      |	| **** |
13*702e6014SWolfgang Denk	| **** |	|      |
14*702e6014SWolfgang Denk	+------+ ON	+------+ ON
15*702e6014SWolfgang Denk	  4321		  4321
16*702e6014SWolfgang Denk	(where the '*' indicates the position of the tab of the switch.)
17*702e6014SWolfgang Denk
18*702e6014SWolfgang Denk	To boot the image at the beginning of NAND flash, use these
19*702e6014SWolfgang Denk	DIP switch settings for S3 S4:
20*702e6014SWolfgang Denk
21*702e6014SWolfgang Denk	+------+	+------+
22*702e6014SWolfgang Denk	| *    |	|  *** |
23*702e6014SWolfgang Denk	|  *** |	| *    |
24*702e6014SWolfgang Denk	+------+ ON	+------+ ON
25*702e6014SWolfgang Denk	  4321		  4321
26*702e6014SWolfgang Denk	(where the '*' indicates the position of the tab of the switch.)
27*702e6014SWolfgang Denk
28*702e6014SWolfgang Denk	When booting from NAND, use u-boot-nand.bin, not u-boot.bin.
29*702e6014SWolfgang Denk
30*702e6014SWolfgang Denk2.	Memory Map
31*702e6014SWolfgang Denk	The memory map looks like this:
32*702e6014SWolfgang Denk
33*702e6014SWolfgang Denk	0x0000_0000	0x07ff_ffff	DDR		 128M
34*702e6014SWolfgang Denk	0x8000_0000	0x8fff_ffff	PCI MEM		 256M
35*702e6014SWolfgang Denk	0x9000_0000	0x9fff_ffff	PCI_MMIO	 256M
36*702e6014SWolfgang Denk	0xe000_0000	0xe00f_ffff	IMMR		 1M
37*702e6014SWolfgang Denk	0xe200_0000	0xe20f_ffff	PCI IO		 16M
38*702e6014SWolfgang Denk	0xe280_0000	0xe280_7fff	NAND FLASH (CS1) 32K
39*702e6014SWolfgang Denk	0xf000_0000	0xf001_ffff	VSC7385 (CS2)	 128K
40*702e6014SWolfgang Denk	0xfa00_0000	0xfa00_7fff	Board Status/	 32K
41*702e6014SWolfgang Denk					LED Control (CS3)
42*702e6014SWolfgang Denk	0xfe00_0000	0xfe7f_ffff	NOR FLASH (CS0)	 8M
43*702e6014SWolfgang Denk
44*702e6014SWolfgang Denk	When booting from NAND, NAND flash is CS0 and NOR flash
45*702e6014SWolfgang Denk	is CS1.
46*702e6014SWolfgang Denk
47*702e6014SWolfgang Denk3.	Definitions
48*702e6014SWolfgang Denk
49*702e6014SWolfgang Denk3.1	Explanation of NEW definitions in:
50*702e6014SWolfgang Denk
51*702e6014SWolfgang Denk	include/configs/MPC8313ERDB.h
52*702e6014SWolfgang Denk
53*702e6014SWolfgang Denk	CONFIG_MPC83xx		MPC83xx family
54*702e6014SWolfgang Denk	CONFIG_MPC831x		MPC831x specific
55*702e6014SWolfgang Denk	CONFIG_MPC8313ERDB	MPC8313ERDB board specific
56*702e6014SWolfgang Denk
57*702e6014SWolfgang Denk4.	Compilation
58*702e6014SWolfgang Denk
59*702e6014SWolfgang Denk	Assuming you're using BASH (or similar) as your shell:
60*702e6014SWolfgang Denk
61*702e6014SWolfgang Denk	export CROSS_COMPILE=your-cross-compiler-prefix-
62*702e6014SWolfgang Denk	make distclean
63*702e6014SWolfgang Denk	make MPC8313ERDB_XXX_config
64*702e6014SWolfgang Denk	(where XXX is:
65*702e6014SWolfgang Denk	   33 - 33 MHz oscillator, boot from NOR flash
66*702e6014SWolfgang Denk	   66 - 66 MHz oscillator, boot from NOR flash
67*702e6014SWolfgang Denk	   NAND_33 - 33 MHz oscillator, boot from NAND flash
68*702e6014SWolfgang Denk	   NAND_66 - 66 MHz oscillator, boot from NAND flash)
69*702e6014SWolfgang Denk	make
70*702e6014SWolfgang Denk
71*702e6014SWolfgang Denk5.	Downloading and Flashing Images
72*702e6014SWolfgang Denk
73*702e6014SWolfgang Denk5.1	Reflash U-boot Image using U-boot
74*702e6014SWolfgang Denk
75*702e6014SWolfgang Denk	NOR flash:
76*702e6014SWolfgang Denk
77*702e6014SWolfgang Denk	=>run tftpflash
78*702e6014SWolfgang Denk
79*702e6014SWolfgang Denk	You may want to try
80*702e6014SWolfgang Denk	=>tftpboot $loadaddr $uboot
81*702e6014SWolfgang Denk	first, to make sure that the TFTP load will succeed before it
82*702e6014SWolfgang Denk	goes ahead and wipes out your current firmware.  And of course,
83*702e6014SWolfgang Denk	have an alternate means of programming the flash available
84*702e6014SWolfgang Denk	if the new u-boot doesn't boot.
85*702e6014SWolfgang Denk
86*702e6014SWolfgang Denk	NAND flash:
87*702e6014SWolfgang Denk
88*702e6014SWolfgang Denk	=>tftpboot $loadaddr <filename>
89*702e6014SWolfgang Denk	=>nand erase 0 0x80000
90*702e6014SWolfgang Denk	=>nand write $loadaddr 0 0x80000
91*702e6014SWolfgang Denk
92*702e6014SWolfgang Denk	...where 0x80000 is the filesize rounded up to
93*702e6014SWolfgang Denk	the next 0x20000 increment.
94*702e6014SWolfgang Denk
95*702e6014SWolfgang Denk5.2	Downloading and Booting Linux Kernel
96*702e6014SWolfgang Denk
97*702e6014SWolfgang Denk	Ensure that all networking-related environment variables are set
98*702e6014SWolfgang Denk	properly (including ipaddr, serverip, gatewayip (if needed),
99*702e6014SWolfgang Denk	netmask, ethaddr, eth1addr, rootpath (if using NFS root),
100*702e6014SWolfgang Denk	fdtfile, and bootfile).
101*702e6014SWolfgang Denk
102*702e6014SWolfgang Denk	Then, do one of the following, depending on whether you
103*702e6014SWolfgang Denk	want an NFS root or a ramdisk root:
104*702e6014SWolfgang Denk
105*702e6014SWolfgang Denk	=>run nfsboot
106*702e6014SWolfgang Denk	or
107*702e6014SWolfgang Denk	=>run ramboot
108*702e6014SWolfgang Denk
109*702e6014SWolfgang Denk6	Notes
110*702e6014SWolfgang Denk
111*702e6014SWolfgang Denk	The console baudrate for MPC8313ERDB is 115200bps.
112