1702e6014SWolfgang DenkFreescale MPC8313ERDB Board
2702e6014SWolfgang Denk-----------------------------------------
3702e6014SWolfgang Denk
4702e6014SWolfgang Denk1.	Board Switches and Jumpers
5702e6014SWolfgang Denk
6702e6014SWolfgang Denk	S3 is used to set CONFIG_SYS_RESET_SOURCE.
7702e6014SWolfgang Denk
8702e6014SWolfgang Denk	To boot the image at 0xFE000000 in NOR flash, use these DIP
9702e6014SWolfgang Denk	switch settings for S3 S4:
10702e6014SWolfgang Denk
11702e6014SWolfgang Denk	+------+	+------+
12702e6014SWolfgang Denk	|      |	| **** |
13702e6014SWolfgang Denk	| **** |	|      |
14702e6014SWolfgang Denk	+------+ ON	+------+ ON
15702e6014SWolfgang Denk	  4321		  4321
16702e6014SWolfgang Denk	(where the '*' indicates the position of the tab of the switch.)
17702e6014SWolfgang Denk
18702e6014SWolfgang Denk	To boot the image at the beginning of NAND flash, use these
19702e6014SWolfgang Denk	DIP switch settings for S3 S4:
20702e6014SWolfgang Denk
21702e6014SWolfgang Denk	+------+	+------+
22702e6014SWolfgang Denk	| *    |	|  *** |
23702e6014SWolfgang Denk	|  *** |	| *    |
24702e6014SWolfgang Denk	+------+ ON	+------+ ON
25702e6014SWolfgang Denk	  4321		  4321
26702e6014SWolfgang Denk	(where the '*' indicates the position of the tab of the switch.)
27702e6014SWolfgang Denk
28702e6014SWolfgang Denk	When booting from NAND, use u-boot-nand.bin, not u-boot.bin.
29702e6014SWolfgang Denk
30702e6014SWolfgang Denk2.	Memory Map
31702e6014SWolfgang Denk	The memory map looks like this:
32702e6014SWolfgang Denk
33702e6014SWolfgang Denk	0x0000_0000	0x07ff_ffff	DDR		 128M
34702e6014SWolfgang Denk	0x8000_0000	0x8fff_ffff	PCI MEM		 256M
35702e6014SWolfgang Denk	0x9000_0000	0x9fff_ffff	PCI_MMIO	 256M
36702e6014SWolfgang Denk	0xe000_0000	0xe00f_ffff	IMMR		 1M
37702e6014SWolfgang Denk	0xe200_0000	0xe20f_ffff	PCI IO		 16M
38702e6014SWolfgang Denk	0xe280_0000	0xe280_7fff	NAND FLASH (CS1) 32K
39702e6014SWolfgang Denk	0xf000_0000	0xf001_ffff	VSC7385 (CS2)	 128K
40702e6014SWolfgang Denk	0xfa00_0000	0xfa00_7fff	Board Status/	 32K
41702e6014SWolfgang Denk					LED Control (CS3)
42702e6014SWolfgang Denk	0xfe00_0000	0xfe7f_ffff	NOR FLASH (CS0)	 8M
43702e6014SWolfgang Denk
44702e6014SWolfgang Denk	When booting from NAND, NAND flash is CS0 and NOR flash
45702e6014SWolfgang Denk	is CS1.
46702e6014SWolfgang Denk
47702e6014SWolfgang Denk3.	Definitions
48702e6014SWolfgang Denk
49702e6014SWolfgang Denk3.1	Explanation of NEW definitions in:
50702e6014SWolfgang Denk
51702e6014SWolfgang Denk	include/configs/MPC8313ERDB.h
52702e6014SWolfgang Denk
53702e6014SWolfgang Denk	CONFIG_MPC83xx		MPC83xx family
54702e6014SWolfgang Denk	CONFIG_MPC831x		MPC831x specific
55702e6014SWolfgang Denk	CONFIG_MPC8313ERDB	MPC8313ERDB board specific
56702e6014SWolfgang Denk
57702e6014SWolfgang Denk4.	Compilation
58702e6014SWolfgang Denk
59702e6014SWolfgang Denk	Assuming you're using BASH (or similar) as your shell:
60702e6014SWolfgang Denk
61702e6014SWolfgang Denk	export CROSS_COMPILE=your-cross-compiler-prefix-
62702e6014SWolfgang Denk	make distclean
63702e6014SWolfgang Denk	make MPC8313ERDB_XXX_config
64702e6014SWolfgang Denk	(where XXX is:
65702e6014SWolfgang Denk	   33 - 33 MHz oscillator, boot from NOR flash
66702e6014SWolfgang Denk	   66 - 66 MHz oscillator, boot from NOR flash
67702e6014SWolfgang Denk	   NAND_33 - 33 MHz oscillator, boot from NAND flash
68702e6014SWolfgang Denk	   NAND_66 - 66 MHz oscillator, boot from NAND flash)
69702e6014SWolfgang Denk	make
70702e6014SWolfgang Denk
71702e6014SWolfgang Denk5.	Downloading and Flashing Images
72702e6014SWolfgang Denk
73*a187559eSBin Meng5.1	Reflash U-Boot Image using U-Boot
74702e6014SWolfgang Denk
75702e6014SWolfgang Denk	NOR flash:
76702e6014SWolfgang Denk
77702e6014SWolfgang Denk	=>run tftpflash
78702e6014SWolfgang Denk
79702e6014SWolfgang Denk	You may want to try
80702e6014SWolfgang Denk	=>tftpboot $loadaddr $uboot
81702e6014SWolfgang Denk	first, to make sure that the TFTP load will succeed before it
82702e6014SWolfgang Denk	goes ahead and wipes out your current firmware.  And of course,
83702e6014SWolfgang Denk	have an alternate means of programming the flash available
84*a187559eSBin Meng	if the new U-Boot doesn't boot.
85702e6014SWolfgang Denk
86702e6014SWolfgang Denk	NAND flash:
87702e6014SWolfgang Denk
88702e6014SWolfgang Denk	=>tftpboot $loadaddr <filename>
89702e6014SWolfgang Denk	=>nand erase 0 0x80000
90702e6014SWolfgang Denk	=>nand write $loadaddr 0 0x80000
91702e6014SWolfgang Denk
92702e6014SWolfgang Denk	...where 0x80000 is the filesize rounded up to
93702e6014SWolfgang Denk	the next 0x20000 increment.
94702e6014SWolfgang Denk
95702e6014SWolfgang Denk5.2	Downloading and Booting Linux Kernel
96702e6014SWolfgang Denk
97702e6014SWolfgang Denk	Ensure that all networking-related environment variables are set
98702e6014SWolfgang Denk	properly (including ipaddr, serverip, gatewayip (if needed),
99702e6014SWolfgang Denk	netmask, ethaddr, eth1addr, rootpath (if using NFS root),
100702e6014SWolfgang Denk	fdtfile, and bootfile).
101702e6014SWolfgang Denk
102702e6014SWolfgang Denk	Then, do one of the following, depending on whether you
103702e6014SWolfgang Denk	want an NFS root or a ramdisk root:
104702e6014SWolfgang Denk
105702e6014SWolfgang Denk	=>run nfsboot
106702e6014SWolfgang Denk	or
107702e6014SWolfgang Denk	=>run ramboot
108702e6014SWolfgang Denk
109702e6014SWolfgang Denk6	Notes
110702e6014SWolfgang Denk
111702e6014SWolfgang Denk	The console baudrate for MPC8313ERDB is 115200bps.
112