]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/configs/am335x_igep003x.h
igep003x: UBIize
[people/ms/u-boot.git] / include / configs / am335x_igep003x.h
CommitLineData
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" \
37 "dtbfile=am335x-base0033.dtb\0" \
5f5c1d13 38 "console=ttyO0,115200n8\0" \
5f5c1d13
EBS
39 "mmcdev=0\0" \
40 "mmcroot=/dev/mmcblk0p2 rw\0" \
41 "mmcrootfstype=ext4 rootwait\0" \
5f5c1d13 42 "mmcargs=setenv bootargs console=${console} " \
bf887208 43 "${optargs} " \
5f5c1d13
EBS
44 "root=${mmcroot} " \
45 "rootfstype=${mmcrootfstype}\0" \
bf887208 46 "bootenv=uEnv.txt\0" \
5f5c1d13
EBS
47 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
48 "importbootenv=echo Importing environment from mmc ...; " \
2e6bc670
EBS
49 "env import -t ${loadaddr} ${filesize}\0" \
50 "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \
bf887208
EBS
51 "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${dtbfile}\0" \
52 "mmcboot=mmc dev ${mmcdev}; " \
53 "if mmc rescan; then " \
54 "echo SD/MMC found on device ${mmcdev};" \
55 "if run loadbootenv; then " \
56 "echo Loaded environment from ${bootenv};" \
57 "run importbootenv;" \
58 "fi;" \
59 "if test -n $uenvcmd; then " \
60 "echo Running uenvcmd ...;" \
61 "run uenvcmd;" \
62 "fi;" \
63 "if run mmcload; then " \
64 "run mmcargs; " \
65 "bootz ${loadaddr} - ${fdtaddr};" \
66 "fi;" \
67 "fi;\0" \
68 "mtdids=" MTDIDS_DEFAULT "\0" \
69 "mtdparts=" MTDPARTS_DEFAULT "\0" \
3607e0f8 70 "nandroot=ubi0:rootfs rw ubi.mtd=1\0" \
bf887208 71 "nandrootfstype=ubifs rootwait\0" \
3607e0f8
LM
72 "nandload=ubi part UBI; " \
73 "ubi read ${loadaddr} kernel; " \
74 "ubi read ${fdtaddr} dtb \0" \
bf887208
EBS
75 "nandargs=setenv bootargs console=${console} " \
76 "${optargs} " \
77 "root=${nandroot} " \
78 "rootfstype=${nandrootfstype} \0" \
79 "nandboot=echo Booting from nand ...; " \
80 "run nandargs; " \
81 "run nandload; " \
82 "bootz ${loadaddr} - ${fdtaddr} \0"
83#endif
5f5c1d13
EBS
84
85#define CONFIG_BOOTCOMMAND \
bf887208
EBS
86 "run mmcboot;" \
87 "run nandboot;"
5f5c1d13
EBS
88
89/* NS16550 Configuration */
5f5c1d13 90#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* UART0 */
5f5c1d13 91#define CONFIG_CONS_INDEX 1
5f5c1d13 92
5f5c1d13 93/* Ethernet support */
5f5c1d13 94#define CONFIG_PHYLIB
5f5c1d13
EBS
95#define CONFIG_PHY_SMSC
96
97/* NAND support */
beba5f04 98#define CONFIG_NAND_OMAP_ELM
5f5c1d13 99#define CONFIG_SYS_NAND_ONFI_DETECTION 1
5f5c1d13
EBS
100
101#define CONFIG_MTD_PARTITIONS
102#define CONFIG_MTD_DEVICE
103#define CONFIG_RBTREE
104#define CONFIG_LZO
105
cf8d0057 106#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
3607e0f8 107#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(SPL),-(UBI)"
5f5c1d13 108
bf887208 109/* SPL */
983e3700 110#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
5f5c1d13 111
3607e0f8
LM
112/* UBI configuration */
113#define CONFIG_SPL_UBI 1
114#define CONFIG_SPL_UBI_MAX_VOL_LEBS 256
115#define CONFIG_SPL_UBI_MAX_PEB_SIZE (256*1024)
116#define CONFIG_SPL_UBI_MAX_PEBS 4096
117#define CONFIG_SPL_UBI_VOL_IDS 8
118#define CONFIG_SPL_UBI_LOAD_MONITOR_ID 0
119#define CONFIG_SPL_UBI_LOAD_KERNEL_ID 3
120#define CONFIG_SPL_UBI_LOAD_ARGS_ID 4
121#define CONFIG_SPL_UBI_PEB_OFFSET 4
122#define CONFIG_SPL_UBI_VID_OFFSET 512
123#define CONFIG_SPL_UBI_LEB_START 2048
124#define CONFIG_SPL_UBI_INFO_ADDR 0x88080000
125
126/* environment organization */
127#define CONFIG_ENV_IS_IN_UBI 1
128#define CONFIG_ENV_UBI_PART "UBI"
129#define CONFIG_ENV_UBI_VOLUME "config"
130#define CONFIG_ENV_UBI_VOLUME_REDUND "config_r"
131
132/* NAND config */
5f5c1d13
EBS
133#define CONFIG_SYS_NAND_5_ADDR_CYCLE
134#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
135 CONFIG_SYS_NAND_PAGE_SIZE)
136#define CONFIG_SYS_NAND_PAGE_SIZE 2048
137#define CONFIG_SYS_NAND_OOBSIZE 64
138#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
139#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
140#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
141 10, 11, 12, 13, 14, 15, 16, 17, \
142 18, 19, 20, 21, 22, 23, 24, 25, \
143 26, 27, 28, 29, 30, 31, 32, 33, \
144 34, 35, 36, 37, 38, 39, 40, 41, \
145 42, 43, 44, 45, 46, 47, 48, 49, \
146 50, 51, 52, 53, 54, 55, 56, 57, }
147
148#define CONFIG_SYS_NAND_ECCSIZE 512
149#define CONFIG_SYS_NAND_ECCBYTES 14
3f719069 150#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
5f5c1d13 151
a96c08f5 152#endif /* ! __CONFIG_IGEP003X_H */