blob: c8f9d7cb175c267cb78076015923e8e209884316 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stephen Warrenbea26742012-05-16 06:21:00 +00002/*
3 * (C) Copyright 2010-2012
4 * NVIDIA Corporation <www.nvidia.com>
Stephen Warrenbea26742012-05-16 06:21:00 +00005 */
6
Tom Warren29f3e3f2012-09-04 17:00:24 -07007#ifndef __TEGRA_COMMON_POST_H
8#define __TEGRA_COMMON_POST_H
Stephen Warrenbea26742012-05-16 06:21:00 +00009
Stephen Warren99d96962015-09-04 22:03:48 -060010#define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */
Stephen Warren99d96962015-09-04 22:03:48 -060011
Tom Rini3fa03bc2021-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 Reding147fac62019-04-15 11:32:24 +020018#ifndef BOOT_TARGET_DEVICES
Stephen Warren8dca9ff2014-07-30 16:37:15 -060019#define BOOT_TARGET_DEVICES(func) \
20 func(MMC, mmc, 1) \
21 func(MMC, mmc, 0) \
Tom Rini3fa03bc2021-07-09 10:11:54 -040022 BOOT_TARGET_USB(func) \
Stephen Warren8dca9ff2014-07-30 16:37:15 -060023 func(PXE, pxe, na) \
24 func(DHCP, dhcp, na)
Thierry Reding147fac62019-04-15 11:32:24 +020025#endif
Stephen Warren8dca9ff2014-07-30 16:37:15 -060026#include <config_distro_bootcmd.h>
Stephen Warrenbea26742012-05-16 06:21:00 +000027
Allen Martin7992bfb2012-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 Martin7992bfb2012-10-24 08:32:05 +000036#else
37#define STDIN_KBD_USB ""
38#endif
39
Simon Glassec022ef2015-04-14 21:03:31 -060040#ifdef CONFIG_LCD
Stephen Warrenc35eb562013-01-22 06:20:07 +000041#define STDOUT_LCD ",lcd"
42#else
43#define STDOUT_LCD ""
44#endif
45
Simon Glass135a87e2016-01-30 16:37:49 -070046#ifdef CONFIG_DM_VIDEO
47#define STDOUT_VIDEO ",vidconsole"
48#else
49#define STDOUT_VIDEO ""
50#endif
51
Simon Glassbbe0d4d2015-06-05 14:39:32 -060052#ifdef CONFIG_CROS_EC_KEYB
53#define STDOUT_CROS_EC ",cros-ec-keyb"
54#else
55#define STDOUT_CROS_EC ""
56#endif
57
Allen Martin7992bfb2012-10-24 08:32:05 +000058#define TEGRA_DEVICE_SETTINGS \
Simon Glassbbe0d4d2015-06-05 14:39:32 -060059 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
Simon Glass135a87e2016-01-30 16:37:49 -070060 "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
61 "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
Stephen Warrenc35eb562013-01-22 06:20:07 +000062 ""
Allen Martin7992bfb2012-10-24 08:32:05 +000063
Stephen Warrenb9b53a62014-01-23 13:17:01 -070064#ifndef BOARD_EXTRA_ENV_SETTINGS
65#define BOARD_EXTRA_ENV_SETTINGS
66#endif
67
Tom Warren7aaa5a62015-03-04 16:36:00 -070068#ifdef CONFIG_ARM64
69#define FDT_HIGH "ffffffffffffffff"
70#define INITRD_HIGH "ffffffffffffffff"
71#else
72#define FDT_HIGH "ffffffff"
73#define INITRD_HIGH "ffffffff"
74#endif
75
Stephen Warrenbea26742012-05-16 06:21:00 +000076#define CONFIG_EXTRA_ENV_SETTINGS \
Tom Warren29f3e3f2012-09-04 17:00:24 -070077 TEGRA_DEVICE_SETTINGS \
Stephen Warren938176a2012-10-02 09:26:51 +000078 MEM_LAYOUT_ENV_SETTINGS \
Tom Warren7aaa5a62015-03-04 16:36:00 -070079 "fdt_high=" FDT_HIGH "\0" \
80 "initrd_high=" INITRD_HIGH "\0" \
Stephen Warren8dca9ff2014-07-30 16:37:15 -060081 BOOTENV \
Tom Rini6c3c05f2022-03-30 18:07:25 -040082 BOARD_EXTRA_ENV_SETTINGS
Stephen Warrenbea26742012-05-16 06:21:00 +000083
Allen Martin77c42e82013-03-16 18:58:13 +000084#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
Simon Glassfda6fac2014-10-13 23:42:13 -060085#define CONFIG_TEGRA_SPI
Allen Martin78f47b72013-03-16 18:58:07 +000086#endif
87
Tom Warren29f3e3f2012-09-04 17:00:24 -070088#endif /* __TEGRA_COMMON_POST_H */