blob: b9449a4a40f9b23286c52f1ea6e810c261e9e47c [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Evgeni Dobreve80958b2014-12-08 17:49:42 +01002/*
3 * Copyright (C) 2014 Evgeni Dobrev <evgeni@studio-punkt.com>
4 *
5 * based on work from:
6 * (C) Copyright 2009
7 * Marvell Semiconductor <www.marvell.com>
8 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
Evgeni Dobreve80958b2014-12-08 17:49:42 +01009 */
10
11#ifndef _CONFIG_NAS220_H
12#define _CONFIG_NAS220_H
13
14/*
Tom Rinid997f7c2017-01-25 20:42:36 -050015 * Machine type ID
Evgeni Dobreve80958b2014-12-08 17:49:42 +010016 */
Tom Rinid997f7c2017-01-25 20:42:36 -050017#define CONFIG_MACH_TYPE MACH_TYPE_RD88F6192_NAS
Evgeni Dobreve80958b2014-12-08 17:49:42 +010018
19/*
20 * High Level Configuration Options (easy to change)
21 */
22#define CONFIG_FEROCEON_88FR131 /* #define CPU Core subversion */
23#define CONFIG_KW88F6192 /* SOC Name */
Evgeni Dobreve80958b2014-12-08 17:49:42 +010024#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
25
26/* power-on led, regulator, sata0, sata1 */
27#define NAS220_GE_OE_VAL_LOW ((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28))
28#define NAS220_GE_OE_VAL_HIGH (0)
29#define NAS220_GE_OE_LOW (~((1 << 12)|(1 << 14)|(1 << 24)|(1 << 28)))
30#define NAS220_GE_OE_HIGH (~(0))
31
32/* PHY related */
33#define MV88E1116_LED_FCTRL_REG 10
34#define MV88E1116_CPRSP_CR3_REG 21
35#define MV88E1116_MAC_CTRL_REG 21
36#define MV88E1116_PGADR_REG 22
37#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
38#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
39
40/*
41 * Commands configuration
42 */
Evgeni Dobreve80958b2014-12-08 17:49:42 +010043
44/*
45 * mv-common.h should be defined after CMD configs since it used them
46 * to enable certain macros
47 */
48#include "mv-common.h"
49
Evgeni Dobreve80958b2014-12-08 17:49:42 +010050/*
51 * Environment variables configurations
52 */
53#ifdef CONFIG_CMD_NAND
Evgeni Dobreve80958b2014-12-08 17:49:42 +010054#define CONFIG_ENV_SECT_SIZE 0x10000
Evgeni Dobreve80958b2014-12-08 17:49:42 +010055#endif
56
57#define CONFIG_ENV_SIZE 0x10000
58#define CONFIG_ENV_OFFSET 0xa0000
59
60/*
61 * Default environment variables
62 */
63#define CONFIG_BOOTCOMMAND ""
64
65#define CONFIG_EXTRA_ENV_SETTINGS \
66 "bootargs=console=ttyS0,115200\0" \
67 "mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\
68 "0x010000@0xa0000(env),"\
69 "0x500000@0xc0000(uimage),"\
70 "0x1a40000@0x5c0000(rootfs)\0" \
71 "mtdids=nand0=orion_nand\0"\
72 "bootdelay=-1\0"\
73 "autostart=no\0"\
74 "autoload=no\0"
75
76/*
77 * Ethernet Driver configuration
78 */
79#ifdef CONFIG_CMD_NET
80#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
81#define CONFIG_PHY_BASE_ADR 8
82#endif /* CONFIG_CMD_NET */
83
84/*
85 * USB/EHCI
86 */
87#ifdef CONFIG_CMD_USB
Evgeni Dobreve80958b2014-12-08 17:49:42 +010088#define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */
89#define CONFIG_EHCI_IS_TDI
Evgeni Dobreve80958b2014-12-08 17:49:42 +010090#endif /* CONFIG_CMD_USB */
91
92/*
93 * File system
94 */
Evgeni Dobreve80958b2014-12-08 17:49:42 +010095#define CONFIG_JFFS2_NAND
96#define CONFIG_JFFS2_LZO
Evgeni Dobreve80958b2014-12-08 17:49:42 +010097#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
98#define CONFIG_MTD_PARTITIONS
Evgeni Dobreve80958b2014-12-08 17:49:42 +010099
100/*
101 * SATA
102 */
103#ifdef CONFIG_MVSATA_IDE
104#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
105#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
106#endif
107
Evgeni Dobreve80958b2014-12-08 17:49:42 +0100108/*
109 * EFI partition
110 */
Evgeni Dobreve80958b2014-12-08 17:49:42 +0100111
112/*
113 * Date Time
114 */
115#ifdef CONFIG_CMD_DATE
116#define CONFIG_RTC_MV
117#endif /* CONFIG_CMD_DATE */
118
119#define CONFIG_KIRKWOOD_GPIO
120
121#endif /* _CONFIG_NAS220_H */
122