blob: 7cfdacd789e2915e1e94e7982da2ec6ddcfa2b46 [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
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010020
21/*
22 * High Level Configuration Options (easy to change)
23 */
24#define CONFIG_FEROCEON_88FR131 /* #define CPU Core subversion */
25#define CONFIG_KW88F6192 /* SOC Name */
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010026#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
27
28/* power-on led, regulator, sata0, sata1 */
29#define NAS220_GE_OE_VAL_LOW ((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28))
30#define NAS220_GE_OE_VAL_HIGH (0)
31#define NAS220_GE_OE_LOW (~((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28)))
32#define NAS220_GE_OE_HIGH (~(0))
33
34/* PHY related */
35#define MV88E1116_LED_FCTRL_REG 10
36#define MV88E1116_CPRSP_CR3_REG 21
37#define MV88E1116_MAC_CTRL_REG 21
38#define MV88E1116_PGADR_REG 22
39#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
40#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
41
42/*
43 * Commands configuration
44 */
45#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010046#define CONFIG_CMD_NAND
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010047#define CONFIG_CMD_DATE
48#define CONFIG_CMD_IDE
49#define CONFIG_SYS_LONGHELP
50#define CONFIG_AUTO_COMPLETE
51#define CONFIG_CMDLINE_EDITING
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010052
53/*
54 * mv-common.h should be defined after CMD configs since it used them
55 * to enable certain macros
56 */
57#include "mv-common.h"
58
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010059/*
60 * Environment variables configurations
61 */
62#ifdef CONFIG_CMD_NAND
63#define CONFIG_ENV_IS_IN_NAND
64#define CONFIG_ENV_SECT_SIZE 0x10000
65#else
66#define CONFIG_ENV_IS_NOWHERE
67#endif
68
69#define CONFIG_ENV_SIZE 0x10000
70#define CONFIG_ENV_OFFSET 0xa0000
71
72/*
73 * Default environment variables
74 */
75#define CONFIG_BOOTCOMMAND ""
76
77#define CONFIG_EXTRA_ENV_SETTINGS \
78 "bootargs=console=ttyS0,115200\0" \
79 "mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\
80 "0x010000@0xa0000(env),"\
81 "0x500000@0xc0000(uimage),"\
82 "0x1a40000@0x5c0000(rootfs)\0" \
83 "mtdids=nand0=orion_nand\0"\
84 "bootdelay=-1\0"\
85 "autostart=no\0"\
86 "autoload=no\0"
87
88/*
89 * Ethernet Driver configuration
90 */
91#ifdef CONFIG_CMD_NET
92#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
93#define CONFIG_PHY_BASE_ADR 8
94#endif /* CONFIG_CMD_NET */
95
96/*
97 * USB/EHCI
98 */
99#ifdef CONFIG_CMD_USB
100#define CONFIG_USB_EHCI /* Enable EHCI USB support */
101#define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */
102#define CONFIG_EHCI_IS_TDI
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100103#define CONFIG_DOS_PARTITION
104#define CONFIG_SUPPORT_VFAT
105#endif /* CONFIG_CMD_USB */
106
107/*
108 * File system
109 */
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100110#define CONFIG_CMD_JFFS2
111#define CONFIG_JFFS2_NAND
112#define CONFIG_JFFS2_LZO
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100113#define CONFIG_CMD_UBIFS
114#define CONFIG_RBTREE
115#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
116#define CONFIG_MTD_PARTITIONS
117#define CONFIG_CMD_MTDPARTS
118#define CONFIG_LZO
119
120/*
121 * SATA
122 */
123#ifdef CONFIG_MVSATA_IDE
124#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
125#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
126#endif
127
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100128/*
129 * EFI partition
130 */
131#define CONFIG_EFI_PARTITION
132
133/*
134 * Date Time
135 */
136#ifdef CONFIG_CMD_DATE
137#define CONFIG_RTC_MV
138#endif /* CONFIG_CMD_DATE */
139
140#define CONFIG_KIRKWOOD_GPIO
141
142#endif /* _CONFIG_NAS220_H */
143