blob: 5ac29db240c940d4eca87c951063dcd60ddaee9f [file] [log] [blame]
Siddarth Gore16b76702010-03-18 20:25:40 +05301/*
Gerald Kerma361b3d82014-12-19 08:13:09 +01002 * (C) Copyright 2009-2014
3 * Gerald Kerma <dreagle@doukki.net>
Siddarth Gore16b76702010-03-18 20:25:40 +05304 * Marvell Semiconductor <www.marvell.com>
5 * Written-by: Siddarth Gore <gores@marvell.com>
6 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Siddarth Gore16b76702010-03-18 20:25:40 +05308 */
9
10#ifndef _CONFIG_GURUPLUG_H
11#define _CONFIG_GURUPLUG_H
12
13/*
Siddarth Gore16b76702010-03-18 20:25:40 +053014 * High Level Configuration Options (easy to change)
15 */
Siddarth Gore16b76702010-03-18 20:25:40 +053016#define CONFIG_SHEEVA_88SV131 1 /* CPU Core subversion */
Siddarth Gore16b76702010-03-18 20:25:40 +053017#define CONFIG_MACH_GURUPLUG /* Machine type */
Siddarth Gore16b76702010-03-18 20:25:40 +053018
19/*
Quentin Armitageea944002015-10-28 00:47:18 +000020 * Standard filesystems
21 */
22#define CONFIG_SYS_MVFS
23
24/*
Quentin Armitage38c0e862015-10-28 00:47:21 +000025 * mv-plug-common.h should be defined after CMD configs since it used them
Prafulla Wadaskar54e999a2010-09-30 22:53:43 +053026 * to enable certain macros
Siddarth Gore16b76702010-03-18 20:25:40 +053027 */
Quentin Armitage38c0e862015-10-28 00:47:21 +000028#include "mv-plug-common.h"
Siddarth Gore16b76702010-03-18 20:25:40 +053029
30/*
31 * Environment variables configurations
32 */
33#ifdef CONFIG_CMD_NAND
34#define CONFIG_ENV_IS_IN_NAND 1
35#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */
36#else
37#define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */
38#endif
39/*
40 * max 4k env size is enough, but in case of nand
41 * it has to be rounded to sector size
42 */
43#define CONFIG_ENV_SIZE 0x20000 /* 128k */
Gerald Kerma361b3d82014-12-19 08:13:09 +010044#define CONFIG_ENV_OFFSET 0xE0000 /* env starts here */
Siddarth Gore16b76702010-03-18 20:25:40 +053045
46/*
47 * Default environment variables
48 */
Gerald Kerma361b3d82014-12-19 08:13:09 +010049#define CONFIG_BOOTCOMMAND \
50 "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
51 "ubi part root; " \
52 "ubifsmount ubi:rootfs; " \
53 "ubifsload 0x800000 ${kernel}; " \
54 "ubifsload 0x700000 ${fdt}; " \
55 "ubifsumount; " \
56 "fdt addr 0x700000; fdt resize; fdt chosen; " \
57 "bootz 0x800000 - 0x700000"
Siddarth Gore16b76702010-03-18 20:25:40 +053058
Gerald Kerma361b3d82014-12-19 08:13:09 +010059#define CONFIG_MTDPARTS \
60 "mtdparts=orion_nand:" \
61 "896K(uboot),128K(uboot_env)," \
62 "-@1M(root)\0"
63
64#define CONFIG_EXTRA_ENV_SETTINGS \
65 "console=console=ttyS0,115200\0" \
66 "mtdids=nand0=orion_nand\0" \
67 "mtdparts="CONFIG_MTDPARTS \
68 "kernel=/boot/zImage\0" \
69 "fdt=/boot/guruplug-server-plus.dtb\0" \
70 "bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
71
72#define MTDIDS_DEFAULT "nand0=orion_nand"
73
74#define MTDPARTS_DEFAULT \
75 "mtdparts="CONFIG_MTDPARTS
Siddarth Gore16b76702010-03-18 20:25:40 +053076
77/*
Siddarth Gore16b76702010-03-18 20:25:40 +053078 * Ethernet Driver configuration
79 */
80#ifdef CONFIG_CMD_NET
Albert Aribaudd44265a2010-07-12 22:24:28 +020081#define CONFIG_MVGBE_PORTS {1, 1} /* enable both ports */
Siddarth Gore16b76702010-03-18 20:25:40 +053082#define CONFIG_PHY_BASE_ADR 0
Siddarth Gore16b76702010-03-18 20:25:40 +053083#endif /* CONFIG_CMD_NET */
84
85/*
Prafulla Wadaskar54e999a2010-09-30 22:53:43 +053086 * SATA Driver configuration
Siddarth Gore16b76702010-03-18 20:25:40 +053087 */
Prafulla Wadaskar54e999a2010-09-30 22:53:43 +053088#ifdef CONFIG_MVSATA_IDE
89#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
90#endif /*CONFIG_MVSATA_IDE*/
Siddarth Gore16b76702010-03-18 20:25:40 +053091
Siddarth Gore16b76702010-03-18 20:25:40 +053092#endif /* _CONFIG_GURUPLUG_H */