xref: /openbmc/u-boot/include/configs/goflexhome.h (revision 3335786a)
1 /*
2  * Copyright (C) 2013 Suriyan Ramasami <suriyan.r@gmail.com>
3  *
4  * Based on dockstar.h originally written by
5  * Copyright (C) 2010  Eric C. Cooper <ecc@cmu.edu>
6  *
7  * Based on sheevaplug.h originally written by
8  * Prafulla Wadaskar <prafulla@marvell.com>
9  * (C) Copyright 2009
10  * Marvell Semiconductor <www.marvell.com>
11  *
12  * SPDX-License-Identifier:	GPL-2.0+
13  */
14 
15 #ifndef _CONFIG_GOFLEXHOME_H
16 #define _CONFIG_GOFLEXHOME_H
17 
18 /*
19  * High Level Configuration Options (easy to change)
20  */
21 #define CONFIG_FEROCEON_88FR131	1	/* CPU Core subversion */
22 #define CONFIG_KW88F6281	1	/* SOC Name */
23 #define CONFIG_MACH_GOFLEXHOME		/* Machine type */
24 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
25 
26 /*
27  * Default GPIO configuration and LED status
28  */
29 #define GOFLEXHOME_OE_LOW               (~(0))
30 #define GOFLEXHOME_OE_HIGH              (~(0))
31 #define GOFLEXHOME_OE_VAL_LOW           (1 << 29)       /* USB_PWEN low */
32 #define GOFLEXHOME_OE_VAL_HIGH          (1 << 17)       /* LED pin high */
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) */
46 #define CONFIG_CONSOLE_MUX
47 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
48 
49 #define CONFIG_CMD_ENV
50 #define CONFIG_CMD_NAND
51 #define CONFIG_CMD_IDE
52 #define CONFIG_CMD_DATE
53 #define CONFIG_SYS_MVFS         /* Picks up Filesystem from mv-common.h */
54 
55 /*
56  * mv-common.h should be defined after CMD configs since it used them
57  * to enable certain macros
58  */
59 #include "mv-common.h"
60 
61 /*
62  *  Environment variables configurations
63  */
64 #ifdef CONFIG_CMD_NAND
65 #define CONFIG_ENV_IS_IN_NAND		1
66 #define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K */
67 #else
68 #define CONFIG_ENV_IS_NOWHERE		1	/* if env in SDRAM */
69 #endif
70 /*
71  * max 4k env size is enough, but in case of nand
72  * it has to be rounded to sector size
73  */
74 #define CONFIG_ENV_SIZE			0x20000	/* 128k */
75 #define CONFIG_ENV_ADDR			0xC0000
76 #define CONFIG_ENV_OFFSET		0xC0000	/* env starts here */
77 
78 /*
79  * Default environment variables
80  */
81 #define CONFIG_BOOTCOMMAND \
82 	"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
83 	"ubi part root; " \
84 	"ubifsmount ubi:root; " \
85 	"ubifsload 0x800000 ${kernel}; " \
86 	"bootm 0x800000"
87 
88 #define CONFIG_MTDPARTS \
89 	"mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0"
90 
91 #define CONFIG_EXTRA_ENV_SETTINGS \
92 	"console=console=ttyS0,115200\0" \
93 	"mtdids=nand0=orion_nand\0" \
94 	"mtdparts="CONFIG_MTDPARTS \
95 	"kernel=/boot/uImage\0" \
96 	"bootargs_root=ubi.mtd=root root=ubi0:root rootfstype=ubifs ro\0"
97 
98 /*
99  * Ethernet Driver configuration
100  */
101 #ifdef CONFIG_CMD_NET
102 #define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
103 #define CONFIG_PHY_BASE_ADR	0
104 #endif /* CONFIG_CMD_NET */
105 
106 /*
107  *  * SATA Driver configuration
108  *   */
109 #ifdef CONFIG_MVSATA_IDE
110 #define CONFIG_SYS_ATA_IDE0_OFFSET      MV_SATA_PORT0_OFFSET
111 #endif /*CONFIG_MVSATA_IDE*/
112 
113 /*
114  *  * RTC driver configuration
115  *   */
116 #ifdef CONFIG_CMD_DATE
117 #define CONFIG_RTC_MV
118 #endif /* CONFIG_CMD_DATE */
119 
120 #endif /* _CONFIG_GOFLEXHOME_H */
121