ARMV7: AM3517/05: Add support for CraneBoard.
[oweals/u-boot.git] / include / configs / suen3.h
1 /*
2  * (C) Copyright 2009
3  * Marvell Semiconductor <www.marvell.com>
4  * Prafulla Wadaskar <prafulla@marvell.com>
5  *
6  * (C) Copyright 2009
7  * Stefan Roese, DENX Software Engineering, sr@denx.de.
8  *
9  * See file CREDITS for list of people who contributed to this
10  * project.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License as
14  * published by the Free Software Foundation; either version 2 of
15  * the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
25  * MA 02110-1301 USA
26  */
27
28 /*
29  * for linking errors see
30  * http://lists.denx.de/pipermail/u-boot/2009-July/057350.html
31  */
32
33 #ifndef _CONFIG_SUEN3_H
34 #define _CONFIG_SUEN3_H
35
36 /* include common defines/options for all arm based Keymile boards */
37 #include "km_arm.h"
38
39 /*
40  * Version number information
41  */
42 #define CONFIG_IDENT_STRING     "\nKeymile SUEN3"
43
44 #define CONFIG_HOSTNAME                 suen3
45
46 /*
47  *  Environment variables configurations
48  */
49 #define CONFIG_ENV_IS_IN_EEPROM         /* use EEPROM for environment vars */
50 #define CONFIG_SYS_DEF_EEPROM_ADDR      0x50
51 #define CONFIG_ENV_EEPROM_IS_ON_I2C     1
52 #define CONFIG_SYS_EEPROM_WREN          1
53 #define CONFIG_ENV_OFFSET               0x0 /* no bracets! */
54 #undef  CONFIG_ENV_SIZE
55 #define CONFIG_ENV_SIZE                 (0x2000 - CONFIG_ENV_OFFSET)
56 #define CONFIG_I2C_ENV_EEPROM_BUS       "pca9547:70:d\0"
57
58 /* offset redund: (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) */
59 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
60 #define CONFIG_ENV_OFFSET_REDUND        0x2000 /* no bracets! */
61 #define CONFIG_ENV_SIZE_REDUND          (CONFIG_ENV_SIZE)
62
63 #define CONFIG_CMD_SF
64
65 #define CONFIG_SPI_FLASH
66 #define CONFIG_HARD_SPI
67 #define CONFIG_KIRKWOOD_SPI
68 #define CONFIG_SPI_FLASH_STMICRO
69 #define CONFIG_ENV_SPI_BUS              0
70 #define CONFIG_ENV_SPI_CS               0
71 #define CONFIG_ENV_SPI_MAX_HZ           50000000        /* 50Mhz */
72
73 #define FLASH_GPIO_PIN                  0x00010000
74
75 #define MTDIDS_DEFAULT          "nand0=orion_nand"
76 /* test-only: partitioning needs some tuning, this is just for tests */
77 #define MTDPARTS_DEFAULT        "mtdparts="                             \
78         "orion_nand:"                                                   \
79                 "-(" CONFIG_KM_UBI_PARTITION_NAME ")"
80
81 #define CONFIG_KM_DEF_ENV_UPDATE                                        \
82         "update="                                                       \
83                 "spi on;sf probe 0;sf erase 0 50000;"                   \
84                 "sf write ${u-boot_addr_r} 0 ${filesize};"              \
85                 "spi off\0"
86
87 /*
88  * Default environment variables
89  */
90 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
91         CONFIG_KM_DEF_ENV                                               \
92         "memsize=0x8000000\0"                                           \
93         "newenv=setenv addr 0x100000 && "                               \
94                 "i2c dev 1; mw.b ${addr} 0 4 && "                       \
95                 "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)        \
96                 " ${addr} " xstr(CONFIG_ENV_OFFSET) " 4 && "            \
97                 "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR)        \
98                 " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0"       \
99         "rootpath=/opt/eldk/arm\0"                                      \
100         "EEprom_ivm=pca9544a:70:9\0"                                    \
101         ""
102
103 #endif /* _CONFIG_SUEN3_H */