blob: 61af61f190bc2b1ec792ac37784115e1f44745ac [file] [log] [blame]
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +01001/*
2 * Copyright (C) 2014 Evgeni Dobrev <evgeni@studio-punkt.com>
3 *
4 * based on work from:
5 * (C) Copyright 2009
6 * Marvell Semiconductor <www.marvell.com>
7 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 */
11
12#ifndef _CONFIG_NAS220_H
13#define _CONFIG_NAS220_H
14
15/*
16 * Machine type definition and ID
17 */
18#define MACH_TYPE_NAS220 MACH_TYPE_RD88F6192_NAS
19#define CONFIG_MACH_TYPE MACH_TYPE_NAS220
20#define CONFIG_IDENT_STRING "\nNAS 220"
21
22/*
23 * High Level Configuration Options (easy to change)
24 */
25#define CONFIG_FEROCEON_88FR131 /* #define CPU Core subversion */
26#define CONFIG_KW88F6192 /* SOC Name */
27#define CONFIG_SYS_GENERIC_BOARD
28#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
29
30/* power-on led, regulator, sata0, sata1 */
31#define NAS220_GE_OE_VAL_LOW ((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28))
32#define NAS220_GE_OE_VAL_HIGH (0)
33#define NAS220_GE_OE_LOW (~((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28)))
34#define NAS220_GE_OE_HIGH (~(0))
35
36/* PHY related */
37#define MV88E1116_LED_FCTRL_REG 10
38#define MV88E1116_CPRSP_CR3_REG 21
39#define MV88E1116_MAC_CTRL_REG 21
40#define MV88E1116_PGADR_REG 22
41#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
42#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
43
44/*
45 * Commands configuration
46 */
47#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010048#define CONFIG_CMD_DHCP
49#define CONFIG_CMD_MII
50#define CONFIG_CMD_NAND
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010051#define CONFIG_CMD_PING
52#define CONFIG_CMD_USB
53#define CONFIG_CMD_DATE
54#define CONFIG_CMD_IDE
55#define CONFIG_SYS_LONGHELP
56#define CONFIG_AUTO_COMPLETE
57#define CONFIG_CMDLINE_EDITING
58#define CONFIG_SYS_HUSH_PARSER
59#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
60
61/*
62 * mv-common.h should be defined after CMD configs since it used them
63 * to enable certain macros
64 */
65#include "mv-common.h"
66
67/* Remove or override few declarations from mv-common.h */
68#undef CONFIG_SYS_PROMPT /* previously defined in mv-common.h */
69#define CONFIG_SYS_PROMPT "nas220> "
70
71/*
72 * Environment variables configurations
73 */
74#ifdef CONFIG_CMD_NAND
75#define CONFIG_ENV_IS_IN_NAND
76#define CONFIG_ENV_SECT_SIZE 0x10000
77#else
78#define CONFIG_ENV_IS_NOWHERE
79#endif
80
81#define CONFIG_ENV_SIZE 0x10000
82#define CONFIG_ENV_OFFSET 0xa0000
83
84/*
85 * Default environment variables
86 */
87#define CONFIG_BOOTCOMMAND ""
88
89#define CONFIG_EXTRA_ENV_SETTINGS \
90 "bootargs=console=ttyS0,115200\0" \
91 "mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\
92 "0x010000@0xa0000(env),"\
93 "0x500000@0xc0000(uimage),"\
94 "0x1a40000@0x5c0000(rootfs)\0" \
95 "mtdids=nand0=orion_nand\0"\
96 "bootdelay=-1\0"\
97 "autostart=no\0"\
98 "autoload=no\0"
99
100/*
101 * Ethernet Driver configuration
102 */
103#ifdef CONFIG_CMD_NET
104#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
105#define CONFIG_PHY_BASE_ADR 8
106#endif /* CONFIG_CMD_NET */
107
108/*
109 * USB/EHCI
110 */
111#ifdef CONFIG_CMD_USB
112#define CONFIG_USB_EHCI /* Enable EHCI USB support */
113#define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */
114#define CONFIG_EHCI_IS_TDI
115#define CONFIG_USB_STORAGE
116#define CONFIG_DOS_PARTITION
117#define CONFIG_SUPPORT_VFAT
118#endif /* CONFIG_CMD_USB */
119
120/*
121 * File system
122 */
123#define CONFIG_CMD_EXT2
124#define CONFIG_CMD_EXT4
125#define CONFIG_CMD_FAT
126#define CONFIG_CMD_JFFS2
127#define CONFIG_JFFS2_NAND
128#define CONFIG_JFFS2_LZO
129#define CONFIG_CMD_UBI
130#define CONFIG_CMD_UBIFS
131#define CONFIG_RBTREE
132#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
133#define CONFIG_MTD_PARTITIONS
134#define CONFIG_CMD_MTDPARTS
135#define CONFIG_LZO
136
137/*
138 * SATA
139 */
140#ifdef CONFIG_MVSATA_IDE
141#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
142#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
143#endif
144
145
146/*
147 * Device Tree
148 */
149#define CONFIG_OF_LIBFDT
150
151/*
152 * EFI partition
153 */
154#define CONFIG_EFI_PARTITION
155
156/*
157 * Date Time
158 */
159#ifdef CONFIG_CMD_DATE
160#define CONFIG_RTC_MV
161#endif /* CONFIG_CMD_DATE */
162
163#define CONFIG_KIRKWOOD_GPIO
164
165#endif /* _CONFIG_NAS220_H */
166