blob: bc67270af7bb932e8e7ad91f722b6d000b672c3a [file] [log] [blame]
Gerald Kermaf1df81c2015-10-23 09:50:58 +02001/*
2 * Copyright (C) 2015
3 * Gerald Kerma <dreagle@doukki.net>
4 * Tony Dinh <mibodhi@gmail.com>
5 * Luka Perkov <luka.perkov@sartura.hr>
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9
10#ifndef _CONFIG_NSA310S_H
11#define _CONFIG_NSA310S_H
12
13/* high level configuration options */
14#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
15#define CONFIG_KW88F6192 1 /* SOC Name */
16#define CONFIG_KW88F6702 1 /* SOC Name */
17#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
18
19/* add target to build it automatically upon "make" */
20#define CONFIG_BUILD_TARGET "u-boot.kwb"
21
22/* compression configuration */
23#define CONFIG_BZIP2
Gerald Kermaf1df81c2015-10-23 09:50:58 +020024
25/* commands configuration */
Gerald Kermaf1df81c2015-10-23 09:50:58 +020026#define CONFIG_SYS_MVFS
Gerald Kermaf1df81c2015-10-23 09:50:58 +020027
28/*
29 * mv-common.h should be defined after CMD configs since it used them
30 * to enable certain macros
31 */
32#include "mv-common.h"
33
34/* environment variables configuration */
35#ifdef CONFIG_CMD_NAND
36#define CONFIG_ENV_IS_IN_NAND
37#define CONFIG_ENV_SECT_SIZE 0x20000
38#else
39#define CONFIG_ENV_IS_NOWHERE
40#endif
41#define CONFIG_ENV_SIZE 0x20000
42#define CONFIG_ENV_OFFSET 0xe0000
43
44/* default environment variables */
45#define CONFIG_BOOTCOMMAND \
46 "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
47 "ubi part root; " \
48 "ubifsmount ubi:rootfs; " \
49 "ubifsload 0x800000 ${kernel}; " \
50 "ubifsload 0x700000 ${fdt}; " \
51 "ubifsumount; " \
52 "fdt addr 0x700000; fdt resize; fdt chosen; " \
53 "bootz 0x800000 - 0x700000"
54
55#define CONFIG_MTDPARTS \
56 "mtdparts=orion_nand:" \
57 "0xe0000@0x0(uboot)," \
58 "0x20000@0xe0000(uboot_env)," \
59 "0x100000@0x100000(second_stage_uboot)," \
60 "-@0x200000(root)\0"
61
62#define CONFIG_EXTRA_ENV_SETTINGS \
63 "console=console=ttyS0,115200\0" \
64 "mtdids=nand0=orion_nand\0" \
65 "mtdparts="CONFIG_MTDPARTS \
66 "kernel=/boot/zImage\0" \
67 "fdt=/boot/nsa310s.dtb\0" \
68 "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
69
70/* Ethernet driver configuration */
71#ifdef CONFIG_CMD_NET
72#define CONFIG_NETCONSOLE
73#define CONFIG_NET_MULTI
74#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
75#define CONFIG_PHY_BASE_ADR 1
76#define CONFIG_PHY_GIGE
77#define CONFIG_RESET_PHY_R
78#endif /* CONFIG_CMD_NET */
79
80/* SATA driver configuration */
Simon Glassfc843a02017-05-17 03:25:30 -060081#ifdef CONFIG_IDE
Gerald Kermaf1df81c2015-10-23 09:50:58 +020082#define __io
83#define CONFIG_IDE_PREINIT
Gerald Kermaf1df81c2015-10-23 09:50:58 +020084#define CONFIG_MVSATA_IDE_USE_PORT0
85#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
Simon Glassfc843a02017-05-17 03:25:30 -060086#endif /* CONFIG_IDE */
Gerald Kermaf1df81c2015-10-23 09:50:58 +020087
88/* RTC driver configuration */
89#ifdef CONFIG_CMD_DATE
90#define CONFIG_RTC_MV
91#endif /* CONFIG_CMD_DATE */
92
93#endif /* _CONFIG_NSA310S_H */