xref: /openbmc/u-boot/include/configs/km/km-powerpc.h (revision 8d773c4a)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2011
4  * Heiko Schocher, DENX Software Engineering, hs@denx.de.
5  */
6 
7 #ifndef __CONFIG_KEYMILE_POWERPC_H
8 #define __CONFIG_KEYMILE_POWERPC_H
9 
10 /* Do boardspecific init for all boards */
11 
12 #define CONFIG_JFFS2_CMDLINE
13 
14 /* standard km ethernet_present for piggy */
15 #define CONFIG_KM_COMMON_ETH_INIT
16 
17 /* EEprom support 24C08, 24C16, 24C64 */
18 #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE
19 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	3  /* 8 Byte write page */
20 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	10
21 
22 #define CONFIG_ENV_SIZE		0x04000		/* Size of Environment */
23 
24 #define CONFIG_SYS_MEMTEST_START 0x00100000	/* memtest works on */
25 
26 #define CONFIG_SYS_MEMTEST_END	0x00f00000	/* 1 ... 15 MB in DRAM	*/
27 
28 #define CONFIG_SYS_LOAD_ADDR	0x100000	/* default load address */
29 
30 /* Reserve 4 MB for malloc */
31 #define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
32 
33 /******************************************************************************
34  * (PRAM usage)
35  * ... -------------------------------------------------------
36  * ... |ROOTFSSIZE | PNVRAM |PHRAM |RESERVED_PRAM | END_OF_RAM
37  * ... |<------------------- pram -------------------------->|
38  * ... -------------------------------------------------------
39  * @END_OF_RAM:
40  * @CONFIG_KM_RESERVED_PRAM: reserved pram for special purpose
41  * @CONFIG_KM_PHRAM: address for /var
42  * @CONFIG_KM_PNVRAM: address for PNVRAM (for the application)
43  * @CONFIG_KM_ROOTFSSIZE: address for rootfilesystem in RAM
44  */
45 
46 /* size of rootfs in RAM */
47 #define CONFIG_KM_ROOTFSSIZE	0x0
48 /* pseudo-non volatile RAM [hex] */
49 #define CONFIG_KM_PNVRAM	0x80000
50 /* physical RAM MTD size [hex] */
51 #define CONFIG_KM_PHRAM		0x100000
52 /* resereved pram area at the end of memroy [hex] */
53 #define CONFIG_KM_RESERVED_PRAM	0x0
54 /* set the default PRAM value to at least PNVRAM + PHRAM when pram env variable
55  * is not valid yet, which is the case for when u-boot copies itself to RAM */
56 #define CONFIG_PRAM		((CONFIG_KM_PNVRAM + CONFIG_KM_PHRAM)>>10)
57 
58 #define CONFIG_KM_CRAMFS_ADDR	0xC00000
59 #define CONFIG_KM_KERNEL_ADDR	0x400000	/* 7680Kbytes */
60 #define CONFIG_KM_FDT_ADDR	0xB80000	/* 512Kbytes */
61 
62 /* architecture specific default bootargs */
63 #define CONFIG_KM_DEF_BOOT_ARGS_CPU		""
64 
65 #define CONFIG_KM_DEF_ENV_CPU						\
66 	"u-boot="CONFIG_HOSTNAME "/u-boot.bin\0"		\
67 	"update="							\
68 		"protect off " __stringify(BOOTFLASH_START) " +${filesize} && "\
69 		"erase " __stringify(BOOTFLASH_START) "  +${filesize} && "\
70 		"cp.b ${load_addr_r} " __stringify(BOOTFLASH_START)	\
71 		"  ${filesize} && "					\
72 		"protect on " __stringify(BOOTFLASH_START) "  +${filesize}\0"\
73 	"set_fdthigh=true\0"						\
74 	"checkfdt=true\0"						\
75 	""
76 
77 #endif /* __CONFIG_KEYMILE_POWERPC_H */
78