1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 229f3e3f2STom Warren /* 329f3e3f2STom Warren * (C) Copyright 2010-2012 429f3e3f2STom Warren * NVIDIA Corporation <www.nvidia.com> 529f3e3f2STom Warren */ 629f3e3f2STom Warren 729f3e3f2STom Warren #ifndef __TEGRA_COMMON_POST_H 829f3e3f2STom Warren #define __TEGRA_COMMON_POST_H 929f3e3f2STom Warren 1099d96961SStephen Warren /* 1199d96961SStephen Warren * Size of malloc() pool 1299d96961SStephen Warren */ 13bb4059a5SMarek Vasut #ifdef CONFIG_DFU_OVER_USB 14f69d72eeSStephen Warren #define CONFIG_SYS_MALLOC_LEN (SZ_4M + \ 15f69d72eeSStephen Warren CONFIG_SYS_DFU_DATA_BUF_SIZE + \ 16f69d72eeSStephen Warren CONFIG_SYS_DFU_MAX_FILE_SIZE) 1799d96961SStephen Warren #else 1899d96961SStephen Warren #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */ 1999d96961SStephen Warren #endif 2099d96961SStephen Warren 2199d96961SStephen Warren #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */ 2299d96961SStephen Warren 238dca9ff4SStephen Warren #ifndef CONFIG_SPL_BUILD 248dca9ff4SStephen Warren #define BOOT_TARGET_DEVICES(func) \ 258dca9ff4SStephen Warren func(MMC, mmc, 1) \ 268dca9ff4SStephen Warren func(MMC, mmc, 0) \ 278dca9ff4SStephen Warren func(USB, usb, 0) \ 288dca9ff4SStephen Warren func(PXE, pxe, na) \ 298dca9ff4SStephen Warren func(DHCP, dhcp, na) 308dca9ff4SStephen Warren #include <config_distro_bootcmd.h> 3129f3e3f2STom Warren #else 328dca9ff4SStephen Warren #define BOOTENV 3329f3e3f2STom Warren #endif 3429f3e3f2STom Warren 357992bfbfSAllen Martin #ifdef CONFIG_TEGRA_KEYBOARD 367992bfbfSAllen Martin #define STDIN_KBD_KBC ",tegra-kbc" 377992bfbfSAllen Martin #else 387992bfbfSAllen Martin #define STDIN_KBD_KBC "" 397992bfbfSAllen Martin #endif 407992bfbfSAllen Martin 417992bfbfSAllen Martin #ifdef CONFIG_USB_KEYBOARD 427992bfbfSAllen Martin #define STDIN_KBD_USB ",usbkbd" 437992bfbfSAllen Martin #define CONFIG_PREBOOT "usb start" 447992bfbfSAllen Martin #else 457992bfbfSAllen Martin #define STDIN_KBD_USB "" 467992bfbfSAllen Martin #endif 477992bfbfSAllen Martin 48ec022efbSSimon Glass #ifdef CONFIG_LCD 49c35eb56aSStephen Warren #define STDOUT_LCD ",lcd" 50c35eb56aSStephen Warren #else 51c35eb56aSStephen Warren #define STDOUT_LCD "" 52c35eb56aSStephen Warren #endif 53c35eb56aSStephen Warren 54135a87efSSimon Glass #ifdef CONFIG_DM_VIDEO 55135a87efSSimon Glass #define STDOUT_VIDEO ",vidconsole" 56135a87efSSimon Glass #else 57135a87efSSimon Glass #define STDOUT_VIDEO "" 58135a87efSSimon Glass #endif 59135a87efSSimon Glass 60bbe0d4dbSSimon Glass #ifdef CONFIG_CROS_EC_KEYB 61bbe0d4dbSSimon Glass #define STDOUT_CROS_EC ",cros-ec-keyb" 62bbe0d4dbSSimon Glass #else 63bbe0d4dbSSimon Glass #define STDOUT_CROS_EC "" 64bbe0d4dbSSimon Glass #endif 65bbe0d4dbSSimon Glass 667992bfbfSAllen Martin #define TEGRA_DEVICE_SETTINGS \ 67bbe0d4dbSSimon Glass "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ 68135a87efSSimon Glass "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ 69135a87efSSimon Glass "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ 70c35eb56aSStephen Warren "" 717992bfbfSAllen Martin 72b9b53a60SStephen Warren #ifndef BOARD_EXTRA_ENV_SETTINGS 73b9b53a60SStephen Warren #define BOARD_EXTRA_ENV_SETTINGS 74b9b53a60SStephen Warren #endif 75b9b53a60SStephen Warren 7648cfca24SStephen Warren #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR 7748cfca24SStephen Warren 78e379b03eSSimon Glass #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS 79e379b03eSSimon Glass #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS 80e379b03eSSimon Glass #endif 81e379b03eSSimon Glass 827aaa5a60STom Warren #ifdef CONFIG_ARM64 837aaa5a60STom Warren #define FDT_HIGH "ffffffffffffffff" 847aaa5a60STom Warren #define INITRD_HIGH "ffffffffffffffff" 857aaa5a60STom Warren #else 867aaa5a60STom Warren #define FDT_HIGH "ffffffff" 877aaa5a60STom Warren #define INITRD_HIGH "ffffffff" 887aaa5a60STom Warren #endif 897aaa5a60STom Warren 9029f3e3f2STom Warren #define CONFIG_EXTRA_ENV_SETTINGS \ 9129f3e3f2STom Warren TEGRA_DEVICE_SETTINGS \ 92938176a4SStephen Warren MEM_LAYOUT_ENV_SETTINGS \ 937aaa5a60STom Warren "fdt_high=" FDT_HIGH "\0" \ 947aaa5a60STom Warren "initrd_high=" INITRD_HIGH "\0" \ 958dca9ff4SStephen Warren BOOTENV \ 96e379b03eSSimon Glass BOARD_EXTRA_ENV_SETTINGS \ 97e379b03eSSimon Glass CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS 9829f3e3f2STom Warren 9977c42e80SAllen Martin #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI) 100fda6fac3SSimon Glass #define CONFIG_TEGRA_SPI 10178f47b73SAllen Martin #endif 10278f47b73SAllen Martin 10329f3e3f2STom Warren /* overrides for SPL build here */ 10429f3e3f2STom Warren #ifdef CONFIG_SPL_BUILD 10529f3e3f2STom Warren 10606cc85a2SSimon Glass #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY 10760985bbaSAxel Lin 10829f3e3f2STom Warren /* remove I2C support */ 1091f2ba722SSimon Glass #ifdef CONFIG_SYS_I2C_TEGRA 1101f2ba722SSimon Glass #undef CONFIG_SYS_I2C_TEGRA 11129f3e3f2STom Warren #endif 11229f3e3f2STom Warren 11329f3e3f2STom Warren /* remove USB */ 11429f3e3f2STom Warren #ifdef CONFIG_USB_EHCI_TEGRA 11529f3e3f2STom Warren #undef CONFIG_USB_EHCI_TEGRA 11629f3e3f2STom Warren #endif 11729f3e3f2STom Warren 11829f3e3f2STom Warren #endif /* CONFIG_SPL_BUILD */ 11929f3e3f2STom Warren 12029f3e3f2STom Warren #endif /* __TEGRA_COMMON_POST_H */ 121