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