blob: 2a42e7c62ed96260c0592974da6d3afe9e93d5c7 [file] [log] [blame]
Suriyan Ramasami0ad6c342013-04-11 07:17:25 +00001/*
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 *
Wolfgang Denk1a459662013-07-08 09:37:19 +020012 * SPDX-License-Identifier: GPL-2.0+
Suriyan Ramasami0ad6c342013-04-11 07:17:25 +000013 */
14
15#ifndef _CONFIG_GOFLEXHOME_H
16#define _CONFIG_GOFLEXHOME_H
17
Luka Perkov15155b42014-11-30 02:40:51 +010018#define CONFIG_SYS_GENERIC_BOARD
19
Suriyan Ramasami0ad6c342013-04-11 07:17:25 +000020/*
21 * Version number information
22 */
23#define CONFIG_IDENT_STRING "\nSeagate GoFlex Home"
24
25/*
26 * High Level Configuration Options (easy to change)
27 */
28#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
Suriyan Ramasami0ad6c342013-04-11 07:17:25 +000029#define CONFIG_KW88F6281 1 /* SOC Name */
30#define CONFIG_MACH_GOFLEXHOME /* Machine type */
31#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
32
33/*
34 * Default GPIO configuration and LED status
35 */
36#define GOFLEXHOME_OE_LOW (~(0))
37#define GOFLEXHOME_OE_HIGH (~(0))
38#define GOFLEXHOME_OE_VAL_LOW (1 << 29) /* USB_PWEN low */
39#define GOFLEXHOME_OE_VAL_HIGH (1 << 17) /* LED pin high */
40
41/* PHY related */
42#define MV88E1116_LED_FCTRL_REG 10
43#define MV88E1116_CPRSP_CR3_REG 21
44#define MV88E1116_MAC_CTRL_REG 21
45#define MV88E1116_PGADR_REG 22
46#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
47#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
48
49/*
50 * Commands configuration
51 */
52#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
53#define CONFIG_CONSOLE_MUX
54#define CONFIG_SYS_CONSOLE_IS_IN_ENV
55
Suriyan Ramasami0ad6c342013-04-11 07:17:25 +000056#define CONFIG_CMD_DHCP
57#define CONFIG_CMD_ENV
58#define CONFIG_CMD_MII
59#define CONFIG_CMD_NAND
60#define CONFIG_CMD_PING
61#define CONFIG_CMD_USB
62#define CONFIG_CMD_IDE
63#define CONFIG_CMD_DATE
64#define CONFIG_CMD_EXT4
65#define CONFIG_SYS_MVFS /* Picks up Filesystem from mv-common.h */
66
67/*
68 * mv-common.h should be defined after CMD configs since it used them
69 * to enable certain macros
70 */
71#include "mv-common.h"
72
Suriyan Ramasami0ad6c342013-04-11 07:17:25 +000073/*
74 * Environment variables configurations
75 */
76#ifdef CONFIG_CMD_NAND
77#define CONFIG_ENV_IS_IN_NAND 1
78#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
79#else
80#define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
81#endif
82/*
83 * max 4k env size is enough, but in case of nand
84 * it has to be rounded to sector size
85 */
86#define CONFIG_ENV_SIZE 0x20000 /* 128k */
87#define CONFIG_ENV_ADDR 0xC0000
88#define CONFIG_ENV_OFFSET 0xC0000 /* env starts here */
89
90/*
91 * Default environment variables
92 */
93#define CONFIG_BOOTCOMMAND \
94 "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
95 "ubi part root; " \
96 "ubifsmount ubi:root; " \
97 "ubifsload 0x800000 ${kernel}; " \
98 "bootm 0x800000"
99
100#define CONFIG_MTDPARTS \
101 "mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0"
102
103#define CONFIG_EXTRA_ENV_SETTINGS \
104 "console=console=ttyS0,115200\0" \
105 "mtdids=nand0=orion_nand\0" \
106 "mtdparts="CONFIG_MTDPARTS \
107 "kernel=/boot/uImage\0" \
108 "bootargs_root=ubi.mtd=root root=ubi0:root rootfstype=ubifs ro\0"
109
110/*
111 * Ethernet Driver configuration
112 */
113#ifdef CONFIG_CMD_NET
114#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
115#define CONFIG_PHY_BASE_ADR 0
116#endif /* CONFIG_CMD_NET */
117
118/*
119 * * SATA Driver configuration
120 * */
121#ifdef CONFIG_MVSATA_IDE
122#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
123#endif /*CONFIG_MVSATA_IDE*/
124
125/*
126 * * RTC driver configuration
127 * */
128#ifdef CONFIG_CMD_DATE
129#define CONFIG_RTC_MV
130#endif /* CONFIG_CMD_DATE */
131
132#endif /* _CONFIG_GOFLEXHOME_H */