blob: 089263f96f749783810f7dfc051d1c788cdea5c4 [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/*
Tom Rini92a1bab2017-01-25 20:42:36 -050016 * Machine type ID
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010017 */
Tom Rini92a1bab2017-01-25 20:42:36 -050018#define CONFIG_MACH_TYPE MACH_TYPE_RD88F6192_NAS
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010019
20/*
21 * High Level Configuration Options (easy to change)
22 */
23#define CONFIG_FEROCEON_88FR131 /* #define CPU Core subversion */
24#define CONFIG_KW88F6192 /* SOC Name */
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010025#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
26
27/* power-on led, regulator, sata0, sata1 */
28#define NAS220_GE_OE_VAL_LOW ((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28))
29#define NAS220_GE_OE_VAL_HIGH (0)
30#define NAS220_GE_OE_LOW (~((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28)))
31#define NAS220_GE_OE_HIGH (~(0))
32
33/* PHY related */
34#define MV88E1116_LED_FCTRL_REG 10
35#define MV88E1116_CPRSP_CR3_REG 21
36#define MV88E1116_MAC_CTRL_REG 21
37#define MV88E1116_PGADR_REG 22
38#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
39#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
40
41/*
42 * Commands configuration
43 */
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010044#define CONFIG_SYS_LONGHELP
45#define CONFIG_AUTO_COMPLETE
46#define CONFIG_CMDLINE_EDITING
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010047
48/*
49 * mv-common.h should be defined after CMD configs since it used them
50 * to enable certain macros
51 */
52#include "mv-common.h"
53
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010054/*
55 * Environment variables configurations
56 */
57#ifdef CONFIG_CMD_NAND
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010058#define CONFIG_ENV_SECT_SIZE 0x10000
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010059#endif
60
61#define CONFIG_ENV_SIZE 0x10000
62#define CONFIG_ENV_OFFSET 0xa0000
63
64/*
65 * Default environment variables
66 */
67#define CONFIG_BOOTCOMMAND ""
68
69#define CONFIG_EXTRA_ENV_SETTINGS \
70 "bootargs=console=ttyS0,115200\0" \
71 "mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\
72 "0x010000@0xa0000(env),"\
73 "0x500000@0xc0000(uimage),"\
74 "0x1a40000@0x5c0000(rootfs)\0" \
75 "mtdids=nand0=orion_nand\0"\
76 "bootdelay=-1\0"\
77 "autostart=no\0"\
78 "autoload=no\0"
79
80/*
81 * Ethernet Driver configuration
82 */
83#ifdef CONFIG_CMD_NET
84#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
85#define CONFIG_PHY_BASE_ADR 8
86#endif /* CONFIG_CMD_NET */
87
88/*
89 * USB/EHCI
90 */
91#ifdef CONFIG_CMD_USB
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010092#define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */
93#define CONFIG_EHCI_IS_TDI
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +010094#define CONFIG_SUPPORT_VFAT
95#endif /* CONFIG_CMD_USB */
96
97/*
98 * File system
99 */
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100100#define CONFIG_JFFS2_NAND
101#define CONFIG_JFFS2_LZO
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100102#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
103#define CONFIG_MTD_PARTITIONS
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100104
105/*
106 * SATA
107 */
108#ifdef CONFIG_MVSATA_IDE
109#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
110#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
111#endif
112
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100113/*
114 * EFI partition
115 */
Evgeni Dobrev9637c4b2014-12-08 17:49:42 +0100116
117/*
118 * Date Time
119 */
120#ifdef CONFIG_CMD_DATE
121#define CONFIG_RTC_MV
122#endif /* CONFIG_CMD_DATE */
123
124#define CONFIG_KIRKWOOD_GPIO
125
126#endif /* _CONFIG_NAS220_H */
127