blob: e54428ba43e202acdd8a363874c1bbd4f4feb65b [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/*
11 * Size of malloc() pool
12 */
Marek Vasut7f8d4362018-02-16 16:41:18 +010013#ifdef CONFIG_DFU_OVER_USB
Stephen Warren8dc8f332015-09-04 22:03:49 -060014#define CONFIG_SYS_MALLOC_LEN (SZ_4M + \
15 CONFIG_SYS_DFU_DATA_BUF_SIZE + \
16 CONFIG_SYS_DFU_MAX_FILE_SIZE)
Stephen Warren9d84fff2015-09-04 22:03:48 -060017#else
18#define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */
19#endif
20
Stephen Warren9d84fff2015-09-04 22:03:48 -060021#define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */
Stephen Warren9d84fff2015-09-04 22:03:48 -060022
Stephen Warren5c30d752014-07-30 16:37:15 -060023#ifndef CONFIG_SPL_BUILD
24#define BOOT_TARGET_DEVICES(func) \
25 func(MMC, mmc, 1) \
26 func(MMC, mmc, 0) \
27 func(USB, usb, 0) \
28 func(PXE, pxe, na) \
29 func(DHCP, dhcp, na)
30#include <config_distro_bootcmd.h>
Stephen Warrende17c292012-05-16 06:21:00 +000031#else
Stephen Warren5c30d752014-07-30 16:37:15 -060032#define BOOTENV
Stephen Warrende17c292012-05-16 06:21:00 +000033#endif
34
Allen Martin50df8702012-10-24 08:32:05 +000035#ifdef CONFIG_TEGRA_KEYBOARD
36#define STDIN_KBD_KBC ",tegra-kbc"
37#else
38#define STDIN_KBD_KBC ""
39#endif
40
41#ifdef CONFIG_USB_KEYBOARD
42#define STDIN_KBD_USB ",usbkbd"
Allen Martin50df8702012-10-24 08:32:05 +000043#define CONFIG_PREBOOT "usb start"
44#else
45#define STDIN_KBD_USB ""
46#endif
47
Simon Glassea797e52015-04-14 21:03:31 -060048#ifdef CONFIG_LCD
Stephen Warren3f264792013-01-22 06:20:07 +000049#define STDOUT_LCD ",lcd"
50#else
51#define STDOUT_LCD ""
52#endif
53
Simon Glass3e2b2d92016-01-30 16:37:49 -070054#ifdef CONFIG_DM_VIDEO
55#define STDOUT_VIDEO ",vidconsole"
56#else
57#define STDOUT_VIDEO ""
58#endif
59
Simon Glass576e45c2015-06-05 14:39:32 -060060#ifdef CONFIG_CROS_EC_KEYB
61#define STDOUT_CROS_EC ",cros-ec-keyb"
62#else
63#define STDOUT_CROS_EC ""
64#endif
65
Allen Martin50df8702012-10-24 08:32:05 +000066#define TEGRA_DEVICE_SETTINGS \
Simon Glass576e45c2015-06-05 14:39:32 -060067 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
Simon Glass3e2b2d92016-01-30 16:37:49 -070068 "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
69 "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
Stephen Warren3f264792013-01-22 06:20:07 +000070 ""
Allen Martin50df8702012-10-24 08:32:05 +000071
Stephen Warren26b02f12014-01-23 13:17:01 -070072#ifndef BOARD_EXTRA_ENV_SETTINGS
73#define BOARD_EXTRA_ENV_SETTINGS
74#endif
75
Stephen Warrenf61f1292015-04-01 15:40:53 -060076#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
77
Simon Glass4a9dd322015-06-05 14:39:44 -060078#ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
79#define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
80#endif
81
Tom Warrenab0cc6b2015-03-04 16:36:00 -070082#ifdef CONFIG_ARM64
83#define FDT_HIGH "ffffffffffffffff"
84#define INITRD_HIGH "ffffffffffffffff"
85#else
86#define FDT_HIGH "ffffffff"
87#define INITRD_HIGH "ffffffff"
88#endif
89
Stephen Warrende17c292012-05-16 06:21:00 +000090#define CONFIG_EXTRA_ENV_SETTINGS \
Tom Warren22562a42012-09-04 17:00:24 -070091 TEGRA_DEVICE_SETTINGS \
Stephen Warren35305102012-10-02 09:26:51 +000092 MEM_LAYOUT_ENV_SETTINGS \
Tom Warrenab0cc6b2015-03-04 16:36:00 -070093 "fdt_high=" FDT_HIGH "\0" \
94 "initrd_high=" INITRD_HIGH "\0" \
Stephen Warren5c30d752014-07-30 16:37:15 -060095 BOOTENV \
Simon Glass4a9dd322015-06-05 14:39:44 -060096 BOARD_EXTRA_ENV_SETTINGS \
97 CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
Stephen Warrende17c292012-05-16 06:21:00 +000098
Allen Martin21f5b932013-03-16 18:58:13 +000099#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
Simon Glass1121b1b2014-10-13 23:42:13 -0600100#define CONFIG_TEGRA_SPI
Allen Martinb98691c2013-03-16 18:58:07 +0000101#endif
102
Allen Martinc9c98462012-08-31 08:30:12 +0000103/* overrides for SPL build here */
104#ifdef CONFIG_SPL_BUILD
105
Simon Glass8e842442017-05-31 17:57:21 -0600106#define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
Axel Lin53e512a2013-05-21 13:45:18 +0000107
Allen Martinc9c98462012-08-31 08:30:12 +0000108/* remove I2C support */
Simon Glass026fefb2012-10-30 07:28:53 +0000109#ifdef CONFIG_SYS_I2C_TEGRA
110#undef CONFIG_SYS_I2C_TEGRA
Allen Martinc9c98462012-08-31 08:30:12 +0000111#endif
Allen Martinc9c98462012-08-31 08:30:12 +0000112
Allen Martinc9c98462012-08-31 08:30:12 +0000113/* remove USB */
Allen Martinc9c98462012-08-31 08:30:12 +0000114#ifdef CONFIG_USB_EHCI_TEGRA
115#undef CONFIG_USB_EHCI_TEGRA
116#endif
Allen Martinc9c98462012-08-31 08:30:12 +0000117
118#endif /* CONFIG_SPL_BUILD */
119
Tom Warren22562a42012-09-04 17:00:24 -0700120#endif /* __TEGRA_COMMON_POST_H */