]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/tk71.h
mtd: nand: kirkwood: add RS-ECC encoding support
[karo-tx-uboot.git] / include / configs / tk71.h
1 /*
2  * Copyright (C) 2012 Marek Vasut <marex@denx.de>
3  * on behalf of DENX Software Engineering GmbH
4  *
5  * See file CREDITS for list of people who contributed to this
6  * project.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23
24 #ifndef __CONFIG_TK71_H__
25 #define __CONFIG_TK71_H__
26
27 /*
28  * Version number information
29  */
30 #define CONFIG_IDENT_STRING     "\nKa-Ro TK71"
31
32 /*
33  * High Level Configuration Options (easy to change)
34  */
35 #define CONFIG_FEROCEON_88FR131 1       /* CPU Core subversion */
36 #define CONFIG_KIRKWOOD         1       /* SOC Family Name */
37 #define CONFIG_KW88F6281        1       /* SOC Name */
38 #define CONFIG_SKIP_LOWLEVEL_INIT       /* disable board lowlevel_init */
39 #define CONFIG_NR_DRAM_BANKS    1
40
41 #define MACH_TYPE_TK71          2399
42 #define CONFIG_MACH_TYPE        MACH_TYPE_TK71
43
44 /*
45  * Commands configuration
46  */
47 #define CONFIG_SYS_HUSH_PARSER
48
49 #define CONFIG_SYS_NO_FLASH
50 #define CONFIG_DOS_PARTITION
51 #define CONFIG_SUPPORT_VFAT
52
53 #include <config_cmd_default.h>
54 #define CONFIG_CMD_DHCP
55 #define CONFIG_CMD_ENV
56 #define CONFIG_CMD_EXT2
57 #define CONFIG_CMD_FAT
58 #define CONFIG_CMD_MTDPARTS
59 #define CONFIG_CMD_NAND
60 #define CONFIG_CMD_PING
61 #define CONFIG_CMD_USB
62
63 /*
64  * mv-common.h should be defined after CMD configs since it used them
65  * to enable certain macros
66  */
67 #include "mv-common.h"
68
69 #undef CONFIG_SYS_PROMPT
70 #define CONFIG_SYS_PROMPT "TK71>> "
71
72 /*
73  * NAND flash
74  */
75 #ifdef CONFIG_CMD_NAND
76 #define CONFIG_NAND_ECC_SOFT_RS
77 #define CONFIG_NAND_ECC_BCH
78 #define CONFIG_BCH
79 #define CONFIG_MTD_DEVICE
80 #define CONFIG_MTD_PARTITIONS
81 #define CONFIG_JFFS2_NAND
82 #define CONFIG_JFFS2_DEV                "nand0,3"
83 #endif
84
85 /*
86  * Ethernet Driver configuration
87  */
88 #ifdef CONFIG_CMD_NET
89 #define CONFIG_MVGBE_PORTS      {1, 0}
90 #define CONFIG_PHY_BASE_ADR     0x08
91 #endif
92
93 /*
94  * USB/EHCI
95  */
96 #ifdef CONFIG_CMD_USB
97 #define CONFIG_USB_EHCI
98 #define CONFIG_USB_EHCI_KIRKWOOD
99 #define CONFIG_EHCI_IS_TDI
100 #define CONFIG_USB_STORAGE
101 #endif
102
103 /*
104  *  Environment variables configurations
105  */
106 #ifdef CONFIG_CMD_NAND
107 #define CONFIG_ENV_IS_IN_NAND
108 #define CONFIG_ENV_SECT_SIZE            0x20000
109 #else
110 #define CONFIG_ENV_IS_NOWHERE
111 #endif
112
113 #define CONFIG_ENV_SIZE                 0x20000
114 #define CONFIG_ENV_ADDR                 0x80000
115 #define CONFIG_ENV_OFFSET               0x80000
116
117 /*
118  * Default environment variables
119  */
120 #define CONFIG_BOOTCOMMAND "nand read 0x800000 kernel 0x300000; bootm;"
121 #define CONFIG_MTDPARTS         "512K(u-boot),512K(u-boot-env),3M(kernel),-(root)"
122 #define CONFIG_EXTRA_ENV_SETTINGS \
123         "update_uboot=dhcp u-boot.kwb; nand erase.part u-boot; nand write ${fileaddr} u-boot ${filesize}\0" \
124         "update_kernel=dhcp uImage-tk71; nand erase.part kernel; nand write ${fileaddr} kernel ${filesize} \0" \
125         "update_rootfs=dhcp rootfs-tk71; nand erase.part root; nand write ${fileaddr} root ${filesize}\0" \
126         "update_all=run update_uboot; run update_kernel; run update_rootfs; reset\0" \
127         "mtdids=nand0=orion_nand\0" \
128         "mtdparts=mtdparts=orion_nand:"CONFIG_MTDPARTS"\0" \
129         "bootargs=console=ttyS0,115200 mtdparts=orion_nand:"CONFIG_MTDPARTS" rootfstype=jffs2 root=/dev/mtdblock3 rw\0"
130 #define MTDIDS_DEFAULT                  "nand0=orion_nand"
131 #define MTDPARTS_DEFAULT                "mtdparts=orion_nand:"CONFIG_MTDPARTS
132
133 #define CONFIG_SYS_BOARD_DRAM_INIT
134 #define PHYS_SDRAM_1            0x00000000      /* Base address */
135 #define PHYS_SDRAM_1_SIZE       0x20000000      /* Max 512 MB RAM */
136
137 #endif  /* __CONFIG_TK71_H__ */