blob: b5ce2dd13d08d93674bf78476bb7c3622c42bf52 [file] [log] [blame]
Tony Dinh6e36f662022-01-23 22:17:12 -08001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2014-2022 Tony Dinh <mibodhi@gmail.com>
4 *
5 * Based on
6 * Copyright (C) 2012
7 * David Purdy <david.c.purdy@gmail.com>
8 *
9 * Based on Kirkwood support:
10 * (C) Copyright 2009
11 * Marvell Semiconductor <www.marvell.com>
12 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
13 */
14
15#ifndef _CONFIG_POGO_V4_H
16#define _CONFIG_POGO_V4_H
17
18/*
19 * mv-common.h should be defined after CMD configs since it used them
20 * to enable certain macros
21 */
22#include "mv-common.h"
23
Tony Dinh07e5fcf2022-08-08 20:01:34 -070024/* Include the common distro boot environment */
25#ifndef CONFIG_SPL_BUILD
26
27#ifdef CONFIG_MMC
28#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
29#else
30#define BOOT_TARGET_DEVICES_MMC(func)
31#endif
32
33#ifdef CONFIG_SATA
34#define BOOT_TARGET_DEVICES_SATA(func) func(SATA, sata, 0)
35#else
36#define BOOT_TARGET_DEVICES_SATA(func)
37#endif
38
39#ifdef CONFIG_USB_STORAGE
40#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
41#else
42#define BOOT_TARGET_DEVICES_USB(func)
43#endif
44
45#define BOOT_TARGET_DEVICES(func) \
46 BOOT_TARGET_DEVICES_MMC(func) \
47 BOOT_TARGET_DEVICES_USB(func) \
48 BOOT_TARGET_DEVICES_SATA(func) \
49 func(DHCP, dhcp, na)
50
51#define KERNEL_ADDR_R __stringify(0x800000)
52#define FDT_ADDR_R __stringify(0x2c00000)
53#define RAMDISK_ADDR_R __stringify(0x01100000)
54#define SCRIPT_ADDR_R __stringify(0x200000)
55
56#define LOAD_ADDRESS_ENV_SETTINGS \
57 "kernel_addr_r=" KERNEL_ADDR_R "\0" \
58 "fdt_addr_r=" FDT_ADDR_R "\0" \
59 "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \
60 "scriptaddr=" SCRIPT_ADDR_R "\0"
61
62#include <config_distro_bootcmd.h>
63
Tony Dinh6e36f662022-01-23 22:17:12 -080064#define CONFIG_EXTRA_ENV_SETTINGS \
Tony Dinh07e5fcf2022-08-08 20:01:34 -070065 LOAD_ADDRESS_ENV_SETTINGS \
66 "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
67 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
68 "console=ttyS0,115200\0" \
69 BOOTENV
70#endif /* CONFIG_SPL_BUILD */
Tony Dinh6e36f662022-01-23 22:17:12 -080071
72/*
73 * Ethernet Driver configuration
74 */
75#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
76#define CONFIG_PHY_BASE_ADR 0
Tony Dinh6e36f662022-01-23 22:17:12 -080077
Tony Dinh6e36f662022-01-23 22:17:12 -080078#endif /* _CONFIG_POGO_V4_H */