]>
Commit | Line | Data |
---|---|---|
5f5c1d13 EBS |
1 | /* |
2 | * Copyright (C) 2013, ISEE 2007 SL - http://www.isee.biz/ | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU General Public License as | |
6 | * published by the Free Software Foundation version 2. | |
7 | * | |
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | |
9 | * kind, whether express or implied; without even the implied warranty | |
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | */ | |
13 | ||
a96c08f5 LM |
14 | #ifndef __CONFIG_IGEP003X_H |
15 | #define __CONFIG_IGEP003X_H | |
5f5c1d13 | 16 | |
bf887208 EBS |
17 | #define CONFIG_NAND |
18 | #include <configs/ti_am335x_common.h> | |
5f5c1d13 | 19 | |
5f5c1d13 EBS |
20 | /* Clock defines */ |
21 | #define V_OSCK 24000000 /* Clock output from T2 */ | |
22 | #define V_SCLK (V_OSCK) | |
23 | ||
3607e0f8 | 24 | #define CONFIG_ENV_SIZE (96 << 10) /* 96 KiB */ |
5f5c1d13 | 25 | |
cf8d0057 EBS |
26 | /* Make the verbose messages from UBI stop printing */ |
27 | #define CONFIG_UBI_SILENCE_MSG | |
28 | #define CONFIG_UBIFS_SILENCE_MSG | |
29 | ||
5f5c1d13 | 30 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
bf887208 EBS |
31 | |
32 | #ifndef CONFIG_SPL_BUILD | |
5f5c1d13 | 33 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
bf887208 | 34 | DEFAULT_LINUX_BOOT_ENV \ |
2e6bc670 EBS |
35 | "bootdir=/boot\0" \ |
36 | "bootfile=zImage\0" \ | |
5f5c1d13 | 37 | "console=ttyO0,115200n8\0" \ |
5f5c1d13 EBS |
38 | "mmcdev=0\0" \ |
39 | "mmcroot=/dev/mmcblk0p2 rw\0" \ | |
40 | "mmcrootfstype=ext4 rootwait\0" \ | |
5f5c1d13 | 41 | "mmcargs=setenv bootargs console=${console} " \ |
bf887208 | 42 | "${optargs} " \ |
5f5c1d13 EBS |
43 | "root=${mmcroot} " \ |
44 | "rootfstype=${mmcrootfstype}\0" \ | |
bf887208 | 45 | "bootenv=uEnv.txt\0" \ |
5f5c1d13 EBS |
46 | "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ |
47 | "importbootenv=echo Importing environment from mmc ...; " \ | |
2e6bc670 EBS |
48 | "env import -t ${loadaddr} ${filesize}\0" \ |
49 | "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \ | |
09533e5d | 50 | "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \ |
bf887208 EBS |
51 | "mmcboot=mmc dev ${mmcdev}; " \ |
52 | "if mmc rescan; then " \ | |
53 | "echo SD/MMC found on device ${mmcdev};" \ | |
54 | "if run loadbootenv; then " \ | |
55 | "echo Loaded environment from ${bootenv};" \ | |
56 | "run importbootenv;" \ | |
57 | "fi;" \ | |
58 | "if test -n $uenvcmd; then " \ | |
59 | "echo Running uenvcmd ...;" \ | |
60 | "run uenvcmd;" \ | |
61 | "fi;" \ | |
62 | "if run mmcload; then " \ | |
63 | "run mmcargs; " \ | |
64 | "bootz ${loadaddr} - ${fdtaddr};" \ | |
65 | "fi;" \ | |
66 | "fi;\0" \ | |
67 | "mtdids=" MTDIDS_DEFAULT "\0" \ | |
68 | "mtdparts=" MTDPARTS_DEFAULT "\0" \ | |
3607e0f8 | 69 | "nandroot=ubi0:rootfs rw ubi.mtd=1\0" \ |
bf887208 | 70 | "nandrootfstype=ubifs rootwait\0" \ |
3607e0f8 LM |
71 | "nandload=ubi part UBI; " \ |
72 | "ubi read ${loadaddr} kernel; " \ | |
73 | "ubi read ${fdtaddr} dtb \0" \ | |
bf887208 EBS |
74 | "nandargs=setenv bootargs console=${console} " \ |
75 | "${optargs} " \ | |
76 | "root=${nandroot} " \ | |
77 | "rootfstype=${nandrootfstype} \0" \ | |
78 | "nandboot=echo Booting from nand ...; " \ | |
79 | "run nandargs; " \ | |
80 | "run nandload; " \ | |
09533e5d | 81 | "bootz ${loadaddr} - ${fdtaddr} \0" \ |
2e0c6f38 PP |
82 | "netload=tftpboot ${loadaddr} ${bootfile}; " \ |
83 | "tftpboot ${fdtaddr} ${fdtfile} \0" \ | |
84 | "netargs=setenv bootargs console=${console} " \ | |
85 | "${optargs} " \ | |
86 | "root=/dev/nfs " \ | |
87 | "ip=${ipaddr} nfsroot=${serverip}:${rootnfs},v3,tcp \0" \ | |
88 | "netboot=echo Booting from net ...; " \ | |
89 | "run netargs; " \ | |
90 | "run netload; " \ | |
91 | "bootz ${loadaddr} - ${fdtaddr} \0" \ | |
09533e5d PP |
92 | "findfdt="\ |
93 | "if test ${board_name} = igep0033; then " \ | |
94 | "setenv fdtfile am335x-igep-base0033.dtb; fi; " \ | |
95 | "if test ${board_name} = igep0034; then " \ | |
96 | "setenv fdtfile am335x-igep-base0040.dtb; fi; " \ | |
97 | "if test ${board_name} = igep0034-lite; then " \ | |
98 | "setenv fdtfile am335x-igep-base0040-lite.dtb; fi; " \ | |
99 | "if test ${fdtfile} = ''; then " \ | |
100 | "echo WARNING: Could not determine device tree to use; fi; \0" | |
bf887208 | 101 | #endif |
5f5c1d13 EBS |
102 | |
103 | #define CONFIG_BOOTCOMMAND \ | |
09533e5d | 104 | "run findfdt;" \ |
bf887208 | 105 | "run mmcboot;" \ |
2e0c6f38 PP |
106 | "run nandboot;" \ |
107 | "run netboot;" | |
5f5c1d13 EBS |
108 | |
109 | /* NS16550 Configuration */ | |
5f5c1d13 | 110 | #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* UART0 */ |
5f5c1d13 | 111 | #define CONFIG_CONS_INDEX 1 |
5f5c1d13 | 112 | |
5f5c1d13 | 113 | /* Ethernet support */ |
5f5c1d13 | 114 | #define CONFIG_PHYLIB |
5f5c1d13 EBS |
115 | #define CONFIG_PHY_SMSC |
116 | ||
117 | /* NAND support */ | |
beba5f04 | 118 | #define CONFIG_NAND_OMAP_ELM |
5f5c1d13 | 119 | #define CONFIG_SYS_NAND_ONFI_DETECTION 1 |
5f5c1d13 EBS |
120 | |
121 | #define CONFIG_MTD_PARTITIONS | |
122 | #define CONFIG_MTD_DEVICE | |
123 | #define CONFIG_RBTREE | |
124 | #define CONFIG_LZO | |
125 | ||
cf8d0057 | 126 | #define MTDIDS_DEFAULT "nand0=omap2-nand.0" |
3607e0f8 | 127 | #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(SPL),-(UBI)" |
5f5c1d13 | 128 | |
bf887208 | 129 | /* SPL */ |
3a517fdc | 130 | #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds" |
5f5c1d13 | 131 | |
3607e0f8 LM |
132 | /* UBI configuration */ |
133 | #define CONFIG_SPL_UBI 1 | |
134 | #define CONFIG_SPL_UBI_MAX_VOL_LEBS 256 | |
135 | #define CONFIG_SPL_UBI_MAX_PEB_SIZE (256*1024) | |
136 | #define CONFIG_SPL_UBI_MAX_PEBS 4096 | |
137 | #define CONFIG_SPL_UBI_VOL_IDS 8 | |
138 | #define CONFIG_SPL_UBI_LOAD_MONITOR_ID 0 | |
139 | #define CONFIG_SPL_UBI_LOAD_KERNEL_ID 3 | |
140 | #define CONFIG_SPL_UBI_LOAD_ARGS_ID 4 | |
141 | #define CONFIG_SPL_UBI_PEB_OFFSET 4 | |
142 | #define CONFIG_SPL_UBI_VID_OFFSET 512 | |
143 | #define CONFIG_SPL_UBI_LEB_START 2048 | |
144 | #define CONFIG_SPL_UBI_INFO_ADDR 0x88080000 | |
145 | ||
146 | /* environment organization */ | |
147 | #define CONFIG_ENV_IS_IN_UBI 1 | |
148 | #define CONFIG_ENV_UBI_PART "UBI" | |
149 | #define CONFIG_ENV_UBI_VOLUME "config" | |
150 | #define CONFIG_ENV_UBI_VOLUME_REDUND "config_r" | |
151 | ||
152 | /* NAND config */ | |
5f5c1d13 EBS |
153 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
154 | #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ | |
155 | CONFIG_SYS_NAND_PAGE_SIZE) | |
156 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 | |
157 | #define CONFIG_SYS_NAND_OOBSIZE 64 | |
158 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | |
159 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS | |
160 | #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ | |
161 | 10, 11, 12, 13, 14, 15, 16, 17, \ | |
162 | 18, 19, 20, 21, 22, 23, 24, 25, \ | |
163 | 26, 27, 28, 29, 30, 31, 32, 33, \ | |
164 | 34, 35, 36, 37, 38, 39, 40, 41, \ | |
165 | 42, 43, 44, 45, 46, 47, 48, 49, \ | |
166 | 50, 51, 52, 53, 54, 55, 56, 57, } | |
167 | ||
168 | #define CONFIG_SYS_NAND_ECCSIZE 512 | |
169 | #define CONFIG_SYS_NAND_ECCBYTES 14 | |
3f719069 | 170 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW |
5f5c1d13 | 171 | |
a96c08f5 | 172 | #endif /* ! __CONFIG_IGEP003X_H */ |