imx-uart.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /*
  2. * Copyright (C) 2012-2015 Freescale Semiconductor, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef __DEBUG_IMX_UART_H
  9. #define __DEBUG_IMX_UART_H
  10. #define IMX1_UART1_BASE_ADDR 0x00206000
  11. #define IMX1_UART2_BASE_ADDR 0x00207000
  12. #define IMX1_UART_BASE_ADDR(n) IMX1_UART##n##_BASE_ADDR
  13. #define IMX1_UART_BASE(n) IMX1_UART_BASE_ADDR(n)
  14. #define IMX21_UART1_BASE_ADDR 0x1000a000
  15. #define IMX21_UART2_BASE_ADDR 0x1000b000
  16. #define IMX21_UART3_BASE_ADDR 0x1000c000
  17. #define IMX21_UART4_BASE_ADDR 0x1000d000
  18. #define IMX21_UART_BASE_ADDR(n) IMX21_UART##n##_BASE_ADDR
  19. #define IMX21_UART_BASE(n) IMX21_UART_BASE_ADDR(n)
  20. #define IMX25_UART1_BASE_ADDR 0x43f90000
  21. #define IMX25_UART2_BASE_ADDR 0x43f94000
  22. #define IMX25_UART3_BASE_ADDR 0x5000c000
  23. #define IMX25_UART4_BASE_ADDR 0x50008000
  24. #define IMX25_UART5_BASE_ADDR 0x5002c000
  25. #define IMX25_UART_BASE_ADDR(n) IMX25_UART##n##_BASE_ADDR
  26. #define IMX25_UART_BASE(n) IMX25_UART_BASE_ADDR(n)
  27. #define IMX31_UART1_BASE_ADDR 0x43f90000
  28. #define IMX31_UART2_BASE_ADDR 0x43f94000
  29. #define IMX31_UART3_BASE_ADDR 0x5000c000
  30. #define IMX31_UART4_BASE_ADDR 0x43fb0000
  31. #define IMX31_UART5_BASE_ADDR 0x43fb4000
  32. #define IMX31_UART_BASE_ADDR(n) IMX31_UART##n##_BASE_ADDR
  33. #define IMX31_UART_BASE(n) IMX31_UART_BASE_ADDR(n)
  34. #define IMX35_UART1_BASE_ADDR 0x43f90000
  35. #define IMX35_UART2_BASE_ADDR 0x43f94000
  36. #define IMX35_UART3_BASE_ADDR 0x5000c000
  37. #define IMX35_UART_BASE_ADDR(n) IMX35_UART##n##_BASE_ADDR
  38. #define IMX35_UART_BASE(n) IMX35_UART_BASE_ADDR(n)
  39. #define IMX50_UART1_BASE_ADDR 0x53fbc000
  40. #define IMX50_UART2_BASE_ADDR 0x53fc0000
  41. #define IMX50_UART3_BASE_ADDR 0x5000c000
  42. #define IMX50_UART4_BASE_ADDR 0x53ff0000
  43. #define IMX50_UART5_BASE_ADDR 0x63f90000
  44. #define IMX50_UART_BASE_ADDR(n) IMX50_UART##n##_BASE_ADDR
  45. #define IMX50_UART_BASE(n) IMX50_UART_BASE_ADDR(n)
  46. #define IMX51_UART1_BASE_ADDR 0x73fbc000
  47. #define IMX51_UART2_BASE_ADDR 0x73fc0000
  48. #define IMX51_UART3_BASE_ADDR 0x7000c000
  49. #define IMX51_UART_BASE_ADDR(n) IMX51_UART##n##_BASE_ADDR
  50. #define IMX51_UART_BASE(n) IMX51_UART_BASE_ADDR(n)
  51. #define IMX53_UART1_BASE_ADDR 0x53fbc000
  52. #define IMX53_UART2_BASE_ADDR 0x53fc0000
  53. #define IMX53_UART3_BASE_ADDR 0x5000c000
  54. #define IMX53_UART4_BASE_ADDR 0x53ff0000
  55. #define IMX53_UART5_BASE_ADDR 0x63f90000
  56. #define IMX53_UART_BASE_ADDR(n) IMX53_UART##n##_BASE_ADDR
  57. #define IMX53_UART_BASE(n) IMX53_UART_BASE_ADDR(n)
  58. #define IMX6Q_UART1_BASE_ADDR 0x02020000
  59. #define IMX6Q_UART2_BASE_ADDR 0x021e8000
  60. #define IMX6Q_UART3_BASE_ADDR 0x021ec000
  61. #define IMX6Q_UART4_BASE_ADDR 0x021f0000
  62. #define IMX6Q_UART5_BASE_ADDR 0x021f4000
  63. #define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR
  64. #define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n)
  65. #define IMX6SL_UART1_BASE_ADDR 0x02020000
  66. #define IMX6SL_UART2_BASE_ADDR 0x02024000
  67. #define IMX6SL_UART3_BASE_ADDR 0x02034000
  68. #define IMX6SL_UART4_BASE_ADDR 0x02038000
  69. #define IMX6SL_UART5_BASE_ADDR 0x02018000
  70. #define IMX6SL_UART_BASE_ADDR(n) IMX6SL_UART##n##_BASE_ADDR
  71. #define IMX6SL_UART_BASE(n) IMX6SL_UART_BASE_ADDR(n)
  72. #define IMX6SX_UART1_BASE_ADDR 0x02020000
  73. #define IMX6SX_UART2_BASE_ADDR 0x021e8000
  74. #define IMX6SX_UART3_BASE_ADDR 0x021ec000
  75. #define IMX6SX_UART4_BASE_ADDR 0x021f0000
  76. #define IMX6SX_UART5_BASE_ADDR 0x021f4000
  77. #define IMX6SX_UART6_BASE_ADDR 0x022a0000
  78. #define IMX6SX_UART_BASE_ADDR(n) IMX6SX_UART##n##_BASE_ADDR
  79. #define IMX6SX_UART_BASE(n) IMX6SX_UART_BASE_ADDR(n)
  80. #define IMX6UL_UART1_BASE_ADDR 0x02020000
  81. #define IMX6UL_UART2_BASE_ADDR 0x021e8000
  82. #define IMX6UL_UART3_BASE_ADDR 0x021ec000
  83. #define IMX6UL_UART4_BASE_ADDR 0x021f0000
  84. #define IMX6UL_UART5_BASE_ADDR 0x021f4000
  85. #define IMX6UL_UART6_BASE_ADDR 0x021fc000
  86. #define IMX6UL_UART7_BASE_ADDR 0x02018000
  87. #define IMX6UL_UART8_BASE_ADDR 0x02024000
  88. #define IMX6UL_UART_BASE_ADDR(n) IMX6UL_UART##n##_BASE_ADDR
  89. #define IMX6UL_UART_BASE(n) IMX6UL_UART_BASE_ADDR(n)
  90. #define IMX7D_UART1_BASE_ADDR 0x30860000
  91. #define IMX7D_UART2_BASE_ADDR 0x30890000
  92. #define IMX7D_UART3_BASE_ADDR 0x30880000
  93. #define IMX7D_UART4_BASE_ADDR 0x30a60000
  94. #define IMX7D_UART5_BASE_ADDR 0x30a70000
  95. #define IMX7D_UART6_BASE_ADDR 0x30a80000
  96. #define IMX7D_UART7_BASE_ADDR 0x30a90000
  97. #define IMX7D_UART_BASE_ADDR(n) IMX7D_UART##n##_BASE_ADDR
  98. #define IMX7D_UART_BASE(n) IMX7D_UART_BASE_ADDR(n)
  99. #define IMX_DEBUG_UART_BASE(soc) soc##_UART_BASE(CONFIG_DEBUG_IMX_UART_PORT)
  100. #ifdef CONFIG_DEBUG_IMX1_UART
  101. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX1)
  102. #elif defined(CONFIG_DEBUG_IMX21_IMX27_UART)
  103. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX21)
  104. #elif defined(CONFIG_DEBUG_IMX25_UART)
  105. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX25)
  106. #elif defined(CONFIG_DEBUG_IMX31_UART)
  107. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX31)
  108. #elif defined(CONFIG_DEBUG_IMX35_UART)
  109. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX35)
  110. #elif defined(CONFIG_DEBUG_IMX50_UART)
  111. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX50)
  112. #elif defined(CONFIG_DEBUG_IMX51_UART)
  113. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX51)
  114. #elif defined(CONFIG_DEBUG_IMX53_UART)
  115. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX53)
  116. #elif defined(CONFIG_DEBUG_IMX6Q_UART)
  117. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX6Q)
  118. #elif defined(CONFIG_DEBUG_IMX6SL_UART)
  119. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX6SL)
  120. #elif defined(CONFIG_DEBUG_IMX6SX_UART)
  121. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX6SX)
  122. #elif defined(CONFIG_DEBUG_IMX6UL_UART)
  123. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX6UL)
  124. #elif defined(CONFIG_DEBUG_IMX7D_UART)
  125. #define UART_PADDR IMX_DEBUG_UART_BASE(IMX7D)
  126. #endif
  127. #endif /* __DEBUG_IMX_UART_H */