blob: 62f07011809c42b52fca42c5010157c6e2729414 [file] [log] [blame]
Tom Rini299f8f82021-07-07 22:55:41 -04001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
Tony Dinh64eb7492022-04-17 13:42:42 -07003 * Copyright (C) 2015, 2021-2022 Tony Dinh <mibodhi@gmail.com>
Tom Rini299f8f82021-07-07 22:55:41 -04004 * Copyright (C) 2015
5 * Gerald Kerma <dreagle@doukki.net>
Tom Rini299f8f82021-07-07 22:55:41 -04006 * Luka Perkov <luka.perkov@sartura.hr>
7 */
8
9#ifndef _CONFIG_NSA310S_H
10#define _CONFIG_NSA310S_H
11
Tony Dinhc35331c2022-08-11 16:40:25 -070012/*
13 * mv-common.h should be defined after CMD configs since it used them
14 * to enable certain macros
15 */
Tom Rini299f8f82021-07-07 22:55:41 -040016#include "mv-common.h"
17
Tony Dinhc35331c2022-08-11 16:40:25 -070018/* Include the common distro boot environment */
19#ifndef CONFIG_SPL_BUILD
20
21#define BOOT_TARGET_DEVICES(func) \
22 func(USB, usb, 0) \
23 func(SATA, sata, 0) \
24 func(DHCP, dhcp, na)
25
26#define KERNEL_ADDR_R __stringify(0x800000)
27#define FDT_ADDR_R __stringify(0x2c00000)
28#define RAMDISK_ADDR_R __stringify(0x01100000)
29#define SCRIPT_ADDR_R __stringify(0x200000)
30
31#define LOAD_ADDRESS_ENV_SETTINGS \
32 "kernel_addr_r=" KERNEL_ADDR_R "\0" \
33 "fdt_addr_r=" FDT_ADDR_R "\0" \
34 "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \
35 "scriptaddr=" SCRIPT_ADDR_R "\0"
36
37#include <config_distro_bootcmd.h>
Tom Rini299f8f82021-07-07 22:55:41 -040038
39#define CONFIG_EXTRA_ENV_SETTINGS \
40 "console=console=ttyS0,115200\0" \
Tom Rini299f8f82021-07-07 22:55:41 -040041 "kernel=/boot/zImage\0" \
42 "fdt=/boot/nsa310s.dtb\0" \
Tony Dinhc35331c2022-08-11 16:40:25 -070043 "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0" \
44 LOAD_ADDRESS_ENV_SETTINGS \
45 BOOTENV
46
47#endif /* CONFIG_SPL_BUILD */
Tom Rini299f8f82021-07-07 22:55:41 -040048
49/* Ethernet driver configuration */
Tom Rini299f8f82021-07-07 22:55:41 -040050#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
51#define CONFIG_PHY_BASE_ADR 1
Tom Rini299f8f82021-07-07 22:55:41 -040052
Tom Rini299f8f82021-07-07 22:55:41 -040053#endif /* _CONFIG_NSA310S_H */