blob: 4e20e1d1984bac8aeee77d415854286d2ada9a94 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stephen Warrende17c292012-05-16 06:21:00 +00002/*
3 * (C) Copyright 2010-2012
4 * NVIDIA Corporation <www.nvidia.com>
Stephen Warrende17c292012-05-16 06:21:00 +00005 */
6
Tom Warren22562a42012-09-04 17:00:24 -07007#ifndef __TEGRA_COMMON_POST_H
8#define __TEGRA_COMMON_POST_H
Stephen Warrende17c292012-05-16 06:21:00 +00009
Stephen Warren9d84fff2015-09-04 22:03:48 -060010#define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */
Stephen Warren9d84fff2015-09-04 22:03:48 -060011
Tom Rinib4ab8a02021-07-09 10:11:54 -040012#if CONFIG_IS_ENABLED(CMD_USB)
13# define BOOT_TARGET_USB(func) func(USB, usb, 0)
14#else
15# define BOOT_TARGET_USB(func)
16#endif
17
Thierry Redingc3c67822019-04-15 11:32:24 +020018#ifndef BOOT_TARGET_DEVICES
Stephen Warren5c30d752014-07-30 16:37:15 -060019#define BOOT_TARGET_DEVICES(func) \
20 func(MMC, mmc, 1) \
21 func(MMC, mmc, 0) \
Tom Rinib4ab8a02021-07-09 10:11:54 -040022 BOOT_TARGET_USB(func) \
Stephen Warren5c30d752014-07-30 16:37:15 -060023 func(PXE, pxe, na) \
24 func(DHCP, dhcp, na)
Thierry Redingc3c67822019-04-15 11:32:24 +020025#endif
Stephen Warren5c30d752014-07-30 16:37:15 -060026#include <config_distro_bootcmd.h>
Stephen Warrende17c292012-05-16 06:21:00 +000027
Allen Martin50df8702012-10-24 08:32:05 +000028#ifdef CONFIG_TEGRA_KEYBOARD
29#define STDIN_KBD_KBC ",tegra-kbc"
30#else
31#define STDIN_KBD_KBC ""
32#endif
33
34#ifdef CONFIG_USB_KEYBOARD
35#define STDIN_KBD_USB ",usbkbd"
Allen Martin50df8702012-10-24 08:32:05 +000036#else
37#define STDIN_KBD_USB ""
38#endif
39
Simon Glass52cb5042022-10-18 07:46:31 -060040#ifdef CONFIG_VIDEO
Simon Glass3e2b2d92016-01-30 16:37:49 -070041#define STDOUT_VIDEO ",vidconsole"
42#else
43#define STDOUT_VIDEO ""
44#endif
45
Simon Glass576e45c2015-06-05 14:39:32 -060046#ifdef CONFIG_CROS_EC_KEYB
47#define STDOUT_CROS_EC ",cros-ec-keyb"
48#else
49#define STDOUT_CROS_EC ""
50#endif
51
Allen Martin50df8702012-10-24 08:32:05 +000052#define TEGRA_DEVICE_SETTINGS \
Simon Glass576e45c2015-06-05 14:39:32 -060053 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
Simon Glassc162e022022-10-18 06:10:04 -060054 "stdout=serial" STDOUT_VIDEO "\0" \
55 "stderr=serial" STDOUT_VIDEO "\0" \
Stephen Warren3f264792013-01-22 06:20:07 +000056 ""
Allen Martin50df8702012-10-24 08:32:05 +000057
Stephen Warren26b02f12014-01-23 13:17:01 -070058#ifndef BOARD_EXTRA_ENV_SETTINGS
59#define BOARD_EXTRA_ENV_SETTINGS
60#endif
61
Tom Warrenab0cc6b2015-03-04 16:36:00 -070062#ifdef CONFIG_ARM64
63#define FDT_HIGH "ffffffffffffffff"
64#define INITRD_HIGH "ffffffffffffffff"
65#else
66#define FDT_HIGH "ffffffff"
67#define INITRD_HIGH "ffffffff"
68#endif
69
Stephen Warrende17c292012-05-16 06:21:00 +000070#define CONFIG_EXTRA_ENV_SETTINGS \
Tom Warren22562a42012-09-04 17:00:24 -070071 TEGRA_DEVICE_SETTINGS \
Stephen Warren35305102012-10-02 09:26:51 +000072 MEM_LAYOUT_ENV_SETTINGS \
Tom Warrenab0cc6b2015-03-04 16:36:00 -070073 "fdt_high=" FDT_HIGH "\0" \
74 "initrd_high=" INITRD_HIGH "\0" \
Stephen Warren5c30d752014-07-30 16:37:15 -060075 BOOTENV \
Tom Rini23581a62022-03-30 18:07:25 -040076 BOARD_EXTRA_ENV_SETTINGS
Stephen Warrende17c292012-05-16 06:21:00 +000077
Allen Martin21f5b932013-03-16 18:58:13 +000078#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
Simon Glass1121b1b2014-10-13 23:42:13 -060079#define CONFIG_TEGRA_SPI
Allen Martinb98691c2013-03-16 18:58:07 +000080#endif
81
Tom Warren22562a42012-09-04 17:00:24 -070082#endif /* __TEGRA_COMMON_POST_H */