xref: /openbmc/u-boot/include/configs/nas220.h (revision ed09a554)
1 /*
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) */
48 #include <config_cmd_default.h>
49 #define CONFIG_CMD_DHCP
50 #define CONFIG_CMD_MII
51 #define CONFIG_CMD_NAND
52 #define CONFIG_CMD_SAVEENV
53 #define CONFIG_CMD_PING
54 #define CONFIG_CMD_USB
55 #define CONFIG_CMD_DATE
56 #define CONFIG_CMD_IDE
57 #define CONFIG_SYS_LONGHELP
58 #define CONFIG_AUTO_COMPLETE
59 #define CONFIG_CMDLINE_EDITING
60 #define CONFIG_SYS_HUSH_PARSER
61 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
62 
63 /*
64  * mv-common.h should be defined after CMD configs since it used them
65  * to enable certain macros
66  */
67 #include "mv-common.h"
68 
69 /* Remove or override few declarations from mv-common.h */
70 #undef CONFIG_SYS_PROMPT	/* previously defined in mv-common.h */
71 #define CONFIG_SYS_PROMPT "nas220> "
72 
73 /*
74  *  Environment variables configurations
75  */
76 #ifdef CONFIG_CMD_NAND
77 #define CONFIG_ENV_IS_IN_NAND
78 #define CONFIG_ENV_SECT_SIZE 0x10000
79 #else
80 #define CONFIG_ENV_IS_NOWHERE
81 #endif
82 
83 #define CONFIG_ENV_SIZE	0x10000
84 #define CONFIG_ENV_OFFSET 0xa0000
85 
86 /*
87  * Default environment variables
88  */
89 #define CONFIG_BOOTCOMMAND ""
90 
91 #define CONFIG_EXTRA_ENV_SETTINGS \
92 	"bootargs=console=ttyS0,115200\0" \
93 	"mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\
94 	"0x010000@0xa0000(env),"\
95 	"0x500000@0xc0000(uimage),"\
96 	"0x1a40000@0x5c0000(rootfs)\0" \
97 	"mtdids=nand0=orion_nand\0"\
98 	"bootdelay=-1\0"\
99 	"autostart=no\0"\
100 	"autoload=no\0"
101 
102 /*
103  * Ethernet Driver configuration
104  */
105 #ifdef CONFIG_CMD_NET
106 #define CONFIG_MVGBE_PORTS {1, 0}	/* enable port 0 only */
107 #define CONFIG_PHY_BASE_ADR 8
108 #endif /* CONFIG_CMD_NET */
109 
110 /*
111  * USB/EHCI
112  */
113 #ifdef CONFIG_CMD_USB
114 #define CONFIG_USB_EHCI			/* Enable EHCI USB support */
115 #define CONFIG_USB_EHCI_KIRKWOOD	/* on Kirkwood platform	*/
116 #define CONFIG_EHCI_IS_TDI
117 #define CONFIG_USB_STORAGE
118 #define CONFIG_DOS_PARTITION
119 #define CONFIG_SUPPORT_VFAT
120 #endif /* CONFIG_CMD_USB */
121 
122 /*
123  * File system
124  */
125 #define CONFIG_CMD_EXT2
126 #define CONFIG_CMD_EXT4
127 #define CONFIG_CMD_FAT
128 #define CONFIG_CMD_JFFS2
129 #define CONFIG_JFFS2_NAND
130 #define CONFIG_JFFS2_LZO
131 #define CONFIG_CMD_UBI
132 #define CONFIG_CMD_UBIFS
133 #define CONFIG_RBTREE
134 #define CONFIG_MTD_DEVICE               /* needed for mtdparts commands */
135 #define CONFIG_MTD_PARTITIONS
136 #define CONFIG_CMD_MTDPARTS
137 #define CONFIG_LZO
138 
139 /*
140  * SATA
141  */
142 #ifdef CONFIG_MVSATA_IDE
143 #define CONFIG_SYS_ATA_IDE0_OFFSET      MV_SATA_PORT0_OFFSET
144 #define CONFIG_SYS_ATA_IDE1_OFFSET      MV_SATA_PORT1_OFFSET
145 #endif
146 
147 
148 /*
149  * Device Tree
150  */
151 #define CONFIG_OF_LIBFDT
152 
153 /*
154  * EFI partition
155  */
156 #define CONFIG_EFI_PARTITION
157 
158 /*
159  *  Date Time
160  */
161 #ifdef CONFIG_CMD_DATE
162 #define CONFIG_RTC_MV
163 #endif /* CONFIG_CMD_DATE */
164 
165 #define CONFIG_KIRKWOOD_GPIO
166 
167 #endif /* _CONFIG_NAS220_H */
168 
169