tegra-common.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /*
  2. * (C) Copyright 2010-2012
  3. * NVIDIA Corporation <www.nvidia.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _TEGRA_COMMON_H_
  8. #define _TEGRA_COMMON_H_
  9. #include <linux/sizes.h>
  10. #include <linux/stringify.h>
  11. /*
  12. * High Level Configuration Options
  13. */
  14. #define CONFIG_ARMCORTEXA9 /* This is an ARM V7 CPU core */
  15. #define CONFIG_TEGRA /* which is a Tegra generic machine */
  16. #define CONFIG_SYS_L2CACHE_OFF /* No L2 cache */
  17. #include <asm/arch/tegra.h> /* get chip and board defs */
  18. #define CONFIG_DM
  19. #define CONFIG_CMD_DM
  20. #define CONFIG_SYS_TIMER_RATE 1000000
  21. #define CONFIG_SYS_TIMER_COUNTER NV_PA_TMRUS_BASE
  22. /*
  23. * Display CPU and Board information
  24. */
  25. #define CONFIG_DISPLAY_CPUINFO
  26. #define CONFIG_DISPLAY_BOARDINFO
  27. #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
  28. /* Environment */
  29. #define CONFIG_ENV_VARS_UBOOT_CONFIG
  30. #define CONFIG_ENV_SIZE 0x2000 /* Total Size Environment */
  31. /*
  32. * Size of malloc() pool
  33. */
  34. #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */
  35. /*
  36. * NS16550 Configuration
  37. */
  38. #define CONFIG_SYS_NS16550
  39. #define CONFIG_SYS_NS16550_SERIAL
  40. #define CONFIG_SYS_NS16550_REG_SIZE (-4)
  41. #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
  42. /*
  43. * Common HW configuration.
  44. * If this varies between SoCs later, move to tegraNN-common.h
  45. * Note: This is number of devices, not max device ID.
  46. */
  47. #define CONFIG_SYS_MMC_MAX_DEVICE 4
  48. /*
  49. * select serial console configuration
  50. */
  51. #define CONFIG_CONS_INDEX 1
  52. /* allow to overwrite serial and ethaddr */
  53. #define CONFIG_ENV_OVERWRITE
  54. #define CONFIG_BAUDRATE 115200
  55. /* include default commands */
  56. #include <config_cmd_default.h>
  57. /* remove unused commands */
  58. #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
  59. #undef CONFIG_CMD_FPGA /* FPGA configuration support */
  60. #undef CONFIG_CMD_IMI
  61. #undef CONFIG_CMD_IMLS
  62. #undef CONFIG_CMD_NFS /* NFS support */
  63. #undef CONFIG_CMD_NET /* network support */
  64. /* turn on command-line edit/hist/auto */
  65. #define CONFIG_COMMAND_HISTORY
  66. /* turn on commonly used storage-related commands */
  67. #define CONFIG_PARTITION_UUIDS
  68. #define CONFIG_CMD_PART
  69. #define CONFIG_SYS_NO_FLASH
  70. #define CONFIG_CONSOLE_MUX
  71. #define CONFIG_SYS_CONSOLE_IS_IN_ENV
  72. /*
  73. * Miscellaneous configurable options
  74. */
  75. #define CONFIG_SYS_PROMPT V_PROMPT
  76. /*
  77. * Increasing the size of the IO buffer as default nfsargs size is more
  78. * than 256 and so it is not possible to edit it
  79. */
  80. #define CONFIG_SYS_CBSIZE (256 * 2) /* Console I/O Buffer Size */
  81. /* Print Buffer Size */
  82. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  83. sizeof(CONFIG_SYS_PROMPT) + 16)
  84. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  85. /* Boot Argument Buffer Size */
  86. #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
  87. #define CONFIG_SYS_MEMTEST_START (NV_PA_SDRC_CS0 + 0x600000)
  88. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x100000)
  89. /*-----------------------------------------------------------------------
  90. * Physical Memory Map
  91. */
  92. #define CONFIG_NR_DRAM_BANKS 1
  93. #define PHYS_SDRAM_1 NV_PA_SDRC_CS0
  94. #define PHYS_SDRAM_1_SIZE 0x20000000 /* 512M */
  95. #define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE
  96. #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
  97. #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* 256M */
  98. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_STACKBASE
  99. #define CONFIG_SYS_INIT_RAM_SIZE CONFIG_SYS_MALLOC_LEN
  100. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
  101. CONFIG_SYS_INIT_RAM_SIZE - \
  102. GENERATED_GBL_DATA_SIZE)
  103. #define CONFIG_TEGRA_GPIO
  104. #define CONFIG_CMD_GPIO
  105. #define CONFIG_CMD_ENTERRCM
  106. /* Defines for SPL */
  107. #define CONFIG_SPL 1
  108. #define CONFIG_SPL_FRAMEWORK
  109. #define CONFIG_SPL_RAM_DEVICE
  110. #define CONFIG_SPL_BOARD_INIT
  111. #define CONFIG_SPL_NAND_SIMPLE
  112. #define CONFIG_SPL_MAX_FOOTPRINT (CONFIG_SYS_TEXT_BASE - \
  113. CONFIG_SPL_TEXT_BASE)
  114. #define CONFIG_SYS_SPL_MALLOC_SIZE 0x00010000
  115. #define CONFIG_SPL_LIBCOMMON_SUPPORT
  116. #define CONFIG_SPL_LIBGENERIC_SUPPORT
  117. #define CONFIG_SPL_SERIAL_SUPPORT
  118. #define CONFIG_SPL_GPIO_SUPPORT
  119. #ifdef CONFIG_SPL_BUILD
  120. # define CONFIG_USE_PRIVATE_LIBGCC
  121. #endif
  122. #define CONFIG_SYS_GENERIC_BOARD
  123. /* Misc utility code */
  124. #define CONFIG_BOUNCE_BUFFER
  125. #define CONFIG_CRC32_VERIFY
  126. #ifndef CONFIG_SPL_BUILD
  127. #include <config_distro_defaults.h>
  128. #endif
  129. #endif /* _TEGRA_COMMON_H_ */