Suriyan Ramasami | f0ec8af | 2013-04-11 07:17:25 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2013 Suriyan Ramasami <suriyan.r@gmail.com> |
| 3 | * |
| 4 | * Based on dockstar.h originally written by |
| 5 | * Copyright (C) 2010 Eric C. Cooper <ecc@cmu.edu> |
| 6 | * |
| 7 | * Based on sheevaplug.h originally written by |
| 8 | * Prafulla Wadaskar <prafulla@marvell.com> |
| 9 | * (C) Copyright 2009 |
| 10 | * Marvell Semiconductor <www.marvell.com> |
| 11 | * |
| 12 | * See file CREDITS for list of people who contributed to this |
| 13 | * project. |
| 14 | * |
| 15 | * This program is free software; you can redistribute it and/or |
| 16 | * modify it under the terms of the GNU General Public License as |
| 17 | * published by the Free Software Foundation; either version 2 of |
| 18 | * the License, or (at your option) any later version. |
| 19 | * |
| 20 | * This program is distributed in the hope that it will be useful, |
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | * GNU General Public License for more details. |
| 24 | * |
| 25 | * You should have received a copy of the GNU General Public License |
| 26 | * along with this program; if not, write to the Free Software |
| 27 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 28 | * MA 02110-1301 USA |
| 29 | */ |
| 30 | |
| 31 | #ifndef _CONFIG_GOFLEXHOME_H |
| 32 | #define _CONFIG_GOFLEXHOME_H |
| 33 | |
| 34 | /* |
| 35 | * Version number information |
| 36 | */ |
| 37 | #define CONFIG_IDENT_STRING "\nSeagate GoFlex Home" |
| 38 | |
| 39 | /* |
| 40 | * High Level Configuration Options (easy to change) |
| 41 | */ |
| 42 | #define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */ |
| 43 | #define CONFIG_KIRKWOOD 1 /* SOC Family Name */ |
| 44 | #define CONFIG_KW88F6281 1 /* SOC Name */ |
| 45 | #define CONFIG_MACH_GOFLEXHOME /* Machine type */ |
| 46 | #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ |
| 47 | |
| 48 | /* |
| 49 | * Default GPIO configuration and LED status |
| 50 | */ |
| 51 | #define GOFLEXHOME_OE_LOW (~(0)) |
| 52 | #define GOFLEXHOME_OE_HIGH (~(0)) |
| 53 | #define GOFLEXHOME_OE_VAL_LOW (1 << 29) /* USB_PWEN low */ |
| 54 | #define GOFLEXHOME_OE_VAL_HIGH (1 << 17) /* LED pin high */ |
| 55 | |
| 56 | /* PHY related */ |
| 57 | #define MV88E1116_LED_FCTRL_REG 10 |
| 58 | #define MV88E1116_CPRSP_CR3_REG 21 |
| 59 | #define MV88E1116_MAC_CTRL_REG 21 |
| 60 | #define MV88E1116_PGADR_REG 22 |
| 61 | #define MV88E1116_RGMII_TXTM_CTRL (1 << 4) |
| 62 | #define MV88E1116_RGMII_RXTM_CTRL (1 << 5) |
| 63 | |
| 64 | /* |
| 65 | * Commands configuration |
| 66 | */ |
| 67 | #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ |
| 68 | #define CONFIG_CONSOLE_MUX |
| 69 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
| 70 | |
| 71 | #include <config_cmd_default.h> |
| 72 | #define CONFIG_CMD_DHCP |
| 73 | #define CONFIG_CMD_ENV |
| 74 | #define CONFIG_CMD_MII |
| 75 | #define CONFIG_CMD_NAND |
| 76 | #define CONFIG_CMD_PING |
| 77 | #define CONFIG_CMD_USB |
| 78 | #define CONFIG_CMD_IDE |
| 79 | #define CONFIG_CMD_DATE |
| 80 | #define CONFIG_CMD_EXT4 |
| 81 | #define CONFIG_SYS_MVFS /* Picks up Filesystem from mv-common.h */ |
| 82 | |
| 83 | /* |
| 84 | * mv-common.h should be defined after CMD configs since it used them |
| 85 | * to enable certain macros |
| 86 | */ |
| 87 | #include "mv-common.h" |
| 88 | |
| 89 | #undef CONFIG_SYS_PROMPT /* previously defined in mv-common.h */ |
| 90 | #define CONFIG_SYS_PROMPT "GoFlexHome> " /* Command Prompt */ |
| 91 | |
| 92 | /* |
| 93 | * Environment variables configurations |
| 94 | */ |
| 95 | #ifdef CONFIG_CMD_NAND |
| 96 | #define CONFIG_ENV_IS_IN_NAND 1 |
| 97 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */ |
| 98 | #else |
| 99 | #define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */ |
| 100 | #endif |
| 101 | /* |
| 102 | * max 4k env size is enough, but in case of nand |
| 103 | * it has to be rounded to sector size |
| 104 | */ |
| 105 | #define CONFIG_ENV_SIZE 0x20000 /* 128k */ |
| 106 | #define CONFIG_ENV_ADDR 0xC0000 |
| 107 | #define CONFIG_ENV_OFFSET 0xC0000 /* env starts here */ |
| 108 | |
| 109 | /* |
| 110 | * Default environment variables |
| 111 | */ |
| 112 | #define CONFIG_BOOTCOMMAND \ |
| 113 | "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \ |
| 114 | "ubi part root; " \ |
| 115 | "ubifsmount ubi:root; " \ |
| 116 | "ubifsload 0x800000 ${kernel}; " \ |
| 117 | "bootm 0x800000" |
| 118 | |
| 119 | #define CONFIG_MTDPARTS \ |
| 120 | "mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0" |
| 121 | |
| 122 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 123 | "console=console=ttyS0,115200\0" \ |
| 124 | "mtdids=nand0=orion_nand\0" \ |
| 125 | "mtdparts="CONFIG_MTDPARTS \ |
| 126 | "kernel=/boot/uImage\0" \ |
| 127 | "bootargs_root=ubi.mtd=root root=ubi0:root rootfstype=ubifs ro\0" |
| 128 | |
| 129 | /* |
| 130 | * Ethernet Driver configuration |
| 131 | */ |
| 132 | #ifdef CONFIG_CMD_NET |
| 133 | #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ |
| 134 | #define CONFIG_PHY_BASE_ADR 0 |
| 135 | #endif /* CONFIG_CMD_NET */ |
| 136 | |
| 137 | /* |
| 138 | * * SATA Driver configuration |
| 139 | * */ |
| 140 | #ifdef CONFIG_MVSATA_IDE |
| 141 | #define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET |
| 142 | #endif /*CONFIG_MVSATA_IDE*/ |
| 143 | |
| 144 | /* |
| 145 | * * RTC driver configuration |
| 146 | * */ |
| 147 | #ifdef CONFIG_CMD_DATE |
| 148 | #define CONFIG_RTC_MV |
| 149 | #endif /* CONFIG_CMD_DATE */ |
| 150 | |
| 151 | #endif /* _CONFIG_GOFLEXHOME_H */ |