Marek Vasut | f809da4 | 2012-07-03 03:02:20 +0000 | [diff] [blame] | 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 | /* |
| 70 | * NAND flash |
| 71 | */ |
| 72 | #ifdef CONFIG_CMD_NAND |
| 73 | #define CONFIG_MTD_DEVICE |
| 74 | #define CONFIG_MTD_PARTITIONS |
| 75 | #define CONFIG_JFFS2_NAND |
| 76 | #define CONFIG_JFFS2_DEV "nand0,3" |
| 77 | #endif |
| 78 | |
| 79 | /* |
| 80 | * Ethernet Driver configuration |
| 81 | */ |
| 82 | #ifdef CONFIG_CMD_NET |
| 83 | #define CONFIG_MVGBE_PORTS {1, 0} |
| 84 | #define CONFIG_PHY_BASE_ADR 0x08 |
| 85 | #endif |
| 86 | |
| 87 | /* |
| 88 | * USB/EHCI |
| 89 | */ |
| 90 | #ifdef CONFIG_CMD_USB |
| 91 | #define CONFIG_USB_EHCI |
| 92 | #define CONFIG_USB_EHCI_KIRKWOOD |
| 93 | #define CONFIG_EHCI_IS_TDI |
| 94 | #define CONFIG_USB_STORAGE |
| 95 | #endif |
| 96 | |
| 97 | /* |
| 98 | * Environment variables configurations |
| 99 | */ |
| 100 | #ifdef CONFIG_CMD_NAND |
| 101 | #define CONFIG_ENV_IS_IN_NAND |
| 102 | #define CONFIG_ENV_SECT_SIZE 0x20000 |
| 103 | #else |
| 104 | #define CONFIG_ENV_IS_NOWHERE |
| 105 | #endif |
| 106 | |
| 107 | #define CONFIG_ENV_SIZE 0x20000 |
| 108 | #define CONFIG_ENV_ADDR 0x80000 |
| 109 | #define CONFIG_ENV_OFFSET 0x80000 |
| 110 | |
| 111 | /* |
| 112 | * Default environment variables |
| 113 | */ |
| 114 | #define CONFIG_BOOTCOMMAND "nand read 0x800000 kernel 0x300000; bootm;" |
| 115 | #define CONFIG_MTDPARTS "512K(u-boot),512K(u-boot-env),3M(kernel),-(root)" |
| 116 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 117 | "update_uboot=dhcp u-boot.kwb; nand erase.part u-boot; nand write ${fileaddr} u-boot ${filesize}\0" \ |
| 118 | "update_kernel=dhcp uImage-tk71; nand erase.part kernel; nand write ${fileaddr} kernel ${filesize} \0" \ |
| 119 | "update_rootfs=dhcp rootfs-tk71; nand erase.part root; nand write ${fileaddr} root ${filesize}\0" \ |
| 120 | "update_all=run update_uboot; run update_kernel; run update_rootfs; reset\0" \ |
| 121 | "mtdids=nand0=orion_nand\0" \ |
| 122 | "mtdparts=mtdparts=orion_nand:"CONFIG_MTDPARTS"\0" \ |
| 123 | "bootargs=console=ttyS0,115200 mtdparts=orion_nand:"CONFIG_MTDPARTS" rootfstype=jffs2 root=/dev/mtdblock3 rw\0" |
| 124 | #define MTDIDS_DEFAULT "nand0=orion_nand" |
| 125 | #define MTDPARTS_DEFAULT "mtdparts=orion_nand:"CONFIG_MTDPARTS |
| 126 | |
| 127 | #define PHYS_SDRAM_1 0x00000000 /* Base address */ |
| 128 | #define PHYS_SDRAM_1_SIZE 0x20000000 /* Max 512 MB RAM */ |
| 129 | |
| 130 | #endif /* __CONFIG_TK71_H__ */ |