tegra.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2010-2015
  4. * NVIDIA Corporation <www.nvidia.com>
  5. */
  6. #ifndef _TEGRA_H_
  7. #define _TEGRA_H_
  8. #define NV_PA_ARM_PERIPHBASE 0x50040000
  9. #define NV_PA_PG_UP_BASE 0x60000000
  10. #define NV_PA_TMRUS_BASE 0x60005010
  11. #define NV_PA_CLK_RST_BASE 0x60006000
  12. #define NV_PA_FLOW_BASE 0x60007000
  13. #define NV_PA_GPIO_BASE 0x6000D000
  14. #define NV_PA_EVP_BASE 0x6000F000
  15. #define NV_PA_APB_MISC_BASE 0x70000000
  16. #define NV_PA_APB_MISC_GP_BASE (NV_PA_APB_MISC_BASE + 0x0800)
  17. #define NV_PA_APB_UARTA_BASE (NV_PA_APB_MISC_BASE + 0x6000)
  18. #define NV_PA_APB_UARTB_BASE (NV_PA_APB_MISC_BASE + 0x6040)
  19. #define NV_PA_APB_UARTC_BASE (NV_PA_APB_MISC_BASE + 0x6200)
  20. #define NV_PA_APB_UARTD_BASE (NV_PA_APB_MISC_BASE + 0x6300)
  21. #define NV_PA_APB_UARTE_BASE (NV_PA_APB_MISC_BASE + 0x6400)
  22. #define NV_PA_NAND_BASE (NV_PA_APB_MISC_BASE + 0x8000)
  23. #define NV_PA_SPI_BASE (NV_PA_APB_MISC_BASE + 0xC380)
  24. #define NV_PA_SLINK1_BASE (NV_PA_APB_MISC_BASE + 0xD400)
  25. #define NV_PA_SLINK2_BASE (NV_PA_APB_MISC_BASE + 0xD600)
  26. #define NV_PA_SLINK3_BASE (NV_PA_APB_MISC_BASE + 0xD800)
  27. #define NV_PA_SLINK4_BASE (NV_PA_APB_MISC_BASE + 0xDA00)
  28. #define NV_PA_SLINK5_BASE (NV_PA_APB_MISC_BASE + 0xDC00)
  29. #define NV_PA_SLINK6_BASE (NV_PA_APB_MISC_BASE + 0xDE00)
  30. #define TEGRA_DVC_BASE (NV_PA_APB_MISC_BASE + 0xD000)
  31. #define NV_PA_PMC_BASE (NV_PA_APB_MISC_BASE + 0xE400)
  32. #define NV_PA_EMC_BASE (NV_PA_APB_MISC_BASE + 0xF400)
  33. #define NV_PA_FUSE_BASE (NV_PA_APB_MISC_BASE + 0xF800)
  34. #if defined(CONFIG_TEGRA20) || defined(CONFIG_TEGRA30) || \
  35. defined(CONFIG_TEGRA114)
  36. #define NV_PA_CSITE_BASE 0x70040000
  37. #else
  38. #define NV_PA_CSITE_BASE 0x70800000
  39. #endif
  40. #define TEGRA_USB_ADDR_MASK 0xFFFFC000
  41. #define NV_PA_SDRC_CS0 NV_PA_SDRAM_BASE
  42. #define LOW_LEVEL_SRAM_STACK 0x4000FFFC
  43. #define EARLY_AVP_STACK (NV_PA_SDRAM_BASE + 0x20000)
  44. #define EARLY_CPU_STACK (EARLY_AVP_STACK - 4096)
  45. #define PG_UP_TAG_AVP 0xAAAAAAAA
  46. #ifndef __ASSEMBLY__
  47. struct timerus {
  48. unsigned int cntr_1us;
  49. };
  50. /* Address at which WB code runs, it must not overlap Bootrom's IRAM usage */
  51. #define NV_WB_RUN_ADDRESS 0x40020000
  52. #define NVBOOTTYPE_RECOVERY 2 /* BR entered RCM */
  53. #define NVBOOTINFOTABLE_BOOTTYPE 0xC /* Boot type in BIT in IRAM */
  54. #define NVBOOTINFOTABLE_BCTSIZE 0x38 /* BCT size in BIT in IRAM */
  55. #define NVBOOTINFOTABLE_BCTPTR 0x3C /* BCT pointer in BIT in IRAM */
  56. /* These are the available SKUs (product types) for Tegra */
  57. enum {
  58. SKU_ID_T20_7 = 0x7,
  59. SKU_ID_T20 = 0x8,
  60. SKU_ID_T25SE = 0x14,
  61. SKU_ID_AP25 = 0x17,
  62. SKU_ID_T25 = 0x18,
  63. SKU_ID_AP25E = 0x1b,
  64. SKU_ID_T25E = 0x1c,
  65. SKU_ID_T33 = 0x80,
  66. SKU_ID_T30 = 0x81, /* Cardhu value */
  67. SKU_ID_TM30MQS_P_A3 = 0xb1,
  68. SKU_ID_T114_ENG = 0x00, /* Dalmore value, unfused */
  69. SKU_ID_T114_1 = 0x01,
  70. SKU_ID_T124_ENG = 0x00, /* Venice2 value, unfused */
  71. SKU_ID_T210_ENG = 0x00, /* unfused value TBD */
  72. };
  73. /*
  74. * These are used to distinguish SOC types for setting up clocks. Mostly
  75. * we can tell the clocking required by looking at the SOC sku_id, but
  76. * for T30 it is a user option as to whether to run PLLP in fast or slow
  77. * mode, so we have two options there.
  78. */
  79. enum {
  80. TEGRA_SOC_T20,
  81. TEGRA_SOC_T25,
  82. TEGRA_SOC_T30,
  83. TEGRA_SOC_T114,
  84. TEGRA_SOC_T124,
  85. TEGRA_SOC_T210,
  86. TEGRA_SOC_CNT,
  87. TEGRA_SOC_UNKNOWN = -1,
  88. };
  89. /* Tegra system controller (SYSCON) devices */
  90. enum {
  91. TEGRA_SYSCON_PMC,
  92. };
  93. #else /* __ASSEMBLY__ */
  94. #define PRM_RSTCTRL NV_PA_PMC_BASE
  95. #endif
  96. #endif /* TEGRA_H */