functionDefinition.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /*
  2. * linux/arch/arm/mach-mv78xx0/mpp.h -- Multi Purpose Pins
  3. *
  4. *
  5. * sebastien requiem <sebastien@requiem.fr>
  6. *
  7. * This file is licensed under the terms of the GNU General Public
  8. * License version 2. This program is licensed "as is" without any
  9. * warranty of any kind, whether express or implied.
  10. */
  11. #ifndef __MV78X00_MPP_H
  12. #define __MV78X00_MPP_H
  13. #define MPP(_num, _sel, _in, _out, _78100_A0) (\
  14. /* MPP number */ ((_num) & 0xff) | \
  15. /* MPP select value */ (((_sel) & 0xf) << 8) | \
  16. /* may be input signal */ ((!!(_in)) << 12) | \
  17. /* may be output signal */ ((!!(_out)) << 13) | \
  18. /* available on A0 */ ((!!(_78100_A0)) << 14))
  19. /* num sel i o 78100_A0 */
  20. #define MPP_78100_A0_MASK MPP(0, 0x0, 0, 0, 1)
  21. #define MPP0_GPIO MPP(0, 0x0, 1, 1, 1)
  22. #define MPP0_GE0_COL MPP(0, 0x1, 0, 0, 1)
  23. #define MPP0_GE1_TXCLK MPP(0, 0x2, 0, 0, 1)
  24. #define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1)
  25. #define MPP1_GPIO MPP(1, 0x0, 1, 1, 1)
  26. #define MPP1_GE0_RXERR MPP(1, 0x1, 0, 0, 1)
  27. #define MPP1_GE1_TXCTL MPP(1, 0x2, 0, 0, 1)
  28. #define MPP1_UNUSED MPP(1, 0x3, 0, 0, 1)
  29. #define MPP2_GPIO MPP(2, 0x0, 1, 1, 1)
  30. #define MPP2_GE0_CRS MPP(2, 0x1, 0, 0, 1)
  31. #define MPP2_GE1_RXCTL MPP(2, 0x2, 0, 0, 1)
  32. #define MPP2_UNUSED MPP(2, 0x3, 0, 0, 1)
  33. #define MPP3_GPIO MPP(3, 0x0, 1, 1, 1)
  34. #define MPP3_GE0_TXERR MPP(3, 0x1, 0, 0, 1)
  35. #define MPP3_GE1_RXCLK MPP(3, 0x2, 0, 0, 1)
  36. #define MPP3_UNUSED MPP(3, 0x3, 0, 0, 1)
  37. #define MPP4_GPIO MPP(4, 0x0, 1, 1, 1)
  38. #define MPP4_GE0_TXD4 MPP(4, 0x1, 0, 0, 1)
  39. #define MPP4_GE1_TXD0 MPP(4, 0x2, 0, 0, 1)
  40. #define MPP4_UNUSED MPP(4, 0x3, 0, 0, 1)
  41. #define MPP5_GPIO MPP(5, 0x0, 1, 1, 1)
  42. #define MPP5_GE0_TXD5 MPP(5, 0x1, 0, 0, 1)
  43. #define MPP5_GE1_TXD1 MPP(5, 0x2, 0, 0, 1)
  44. #define MPP5_UNUSED MPP(5, 0x3, 0, 0, 1)
  45. #define MPP6_GPIO MPP(6, 0x0, 1, 1, 1)
  46. #define MPP6_GE0_TXD6 MPP(6, 0x1, 0, 0, 1)
  47. #define MPP6_GE1_TXD2 MPP(6, 0x2, 0, 0, 1)
  48. #define MPP6_UNUSED MPP(6, 0x3, 0, 0, 1)
  49. #define MPP7_GPIO MPP(7, 0x0, 1, 1, 1)
  50. #define MPP7_GE0_TXD7 MPP(7, 0x1, 0, 0, 1)
  51. #define MPP7_GE1_TXD3 MPP(7, 0x2, 0, 0, 1)
  52. #define MPP7_UNUSED MPP(7, 0x3, 0, 0, 1)
  53. #define MPP8_GPIO MPP(8, 0x0, 1, 1, 1)
  54. #define MPP8_GE0_RXD4 MPP(8, 0x1, 0, 0, 1)
  55. #define MPP8_GE1_RXD0 MPP(8, 0x2, 0, 0, 1)
  56. #define MPP8_UNUSED MPP(8, 0x3, 0, 0, 1)
  57. #define MPP9_GPIO MPP(9, 0x0, 1, 1, 1)
  58. #define MPP9_GE0_RXD5 MPP(9, 0x1, 0, 0, 1)
  59. #define MPP9_GE1_RXD1 MPP(9, 0x2, 0, 0, 1)
  60. #define MPP9_UNUSED MPP(9, 0x3, 0, 0, 1)
  61. #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1)
  62. #define MPP10_GE0_RXD6 MPP(10, 0x1, 0, 0, 1)
  63. #define MPP10_GE1_RXD2 MPP(10, 0x2, 0, 0, 1)
  64. #define MPP10_UNUSED MPP(10, 0x3, 0, 0, 1)
  65. #define MPP11_GPIO MPP(11, 0x0, 1, 1, 1)
  66. #define MPP11_GE0_RXD7 MPP(11, 0x1, 0, 0, 1)
  67. #define MPP11_GE1_RXD3 MPP(11, 0x2, 0, 0, 1)
  68. #define MPP11_UNUSED MPP(11, 0x3, 0, 0, 1)
  69. #define MPP12_GPIO MPP(12, 0x0, 1, 1, 1)
  70. #define MPP12_M_BB MPP(12, 0x3, 0, 0, 1)
  71. #define MPP12_UA0_CTSn MPP(12, 0x4, 0, 0, 1)
  72. #define MPP12_NAND_FLASH_REn0 MPP(12, 0x5, 0, 0, 1)
  73. #define MPP12_TDM0_SCSn MPP(12, 0X6, 0, 0, 1)
  74. #define MPP12_UNUSED MPP(12, 0x1, 0, 0, 1)
  75. #define MPP13_GPIO MPP(13, 0x0, 1, 1, 1)
  76. #define MPP13_SYSRST_OUTn MPP(13, 0x3, 0, 0, 1)
  77. #define MPP13_UA0_RTSn MPP(13, 0x4, 0, 0, 1)
  78. #define MPP13_NAN_FLASH_WEn0 MPP(13, 0x5, 0, 0, 1)
  79. #define MPP13_TDM_SCLK MPP(13, 0x6, 0, 0, 1)
  80. #define MPP13_UNUSED MPP(13, 0x1, 0, 0, 1)
  81. #define MPP14_GPIO MPP(14, 0x0, 1, 1, 1)
  82. #define MPP14_SATA1_ACTn MPP(14, 0x3, 0, 0, 1)
  83. #define MPP14_UA1_CTSn MPP(14, 0x4, 0, 0, 1)
  84. #define MPP14_NAND_FLASH_REn1 MPP(14, 0x5, 0, 0, 1)
  85. #define MPP14_TDM_SMOSI MPP(14, 0x6, 0, 0, 1)
  86. #define MPP14_UNUSED MPP(14, 0x1, 0, 0, 1)
  87. #define MPP15_GPIO MPP(15, 0x0, 1, 1, 1)
  88. #define MPP15_SATA0_ACTn MPP(15, 0x3, 0, 0, 1)
  89. #define MPP15_UA1_RTSn MPP(15, 0x4, 0, 0, 1)
  90. #define MPP15_NAND_FLASH_WEn1 MPP(15, 0x5, 0, 0, 1)
  91. #define MPP15_TDM_SMISO MPP(15, 0x6, 0, 0, 1)
  92. #define MPP15_UNUSED MPP(15, 0x1, 0, 0, 1)
  93. #define MPP16_GPIO MPP(16, 0x0, 1, 1, 1)
  94. #define MPP16_SATA1_PRESENTn MPP(16, 0x3, 0, 0, 1)
  95. #define MPP16_UA2_TXD MPP(16, 0x4, 0, 0, 1)
  96. #define MPP16_NAND_FLASH_REn3 MPP(16, 0x5, 0, 0, 1)
  97. #define MPP16_TDM_INTn MPP(16, 0x6, 0, 0, 1)
  98. #define MPP16_UNUSED MPP(16, 0x1, 0, 0, 1)
  99. #define MPP17_GPIO MPP(17, 0x0, 1, 1, 1)
  100. #define MPP17_SATA0_PRESENTn MPP(17, 0x3, 0, 0, 1)
  101. #define MPP17_UA2_RXD MPP(17, 0x4, 0, 0, 1)
  102. #define MPP17_NAND_FLASH_WEn3 MPP(17, 0x5, 0, 0, 1)
  103. #define MPP17_TDM_RSTn MPP(17, 0x6, 0, 0, 1)
  104. #define MPP17_UNUSED MPP(17, 0x1, 0, 0, 1)
  105. #define MPP18_GPIO MPP(18, 0x0, 1, 1, 1)
  106. #define MPP18_UA0_CTSn MPP(18, 0x4, 0, 0, 1)
  107. #define MPP18_BOOT_FLASH_REn MPP(18, 0x5, 0, 0, 1)
  108. #define MPP18_UNUSED MPP(18, 0x1, 0, 0, 1)
  109. #define MPP19_GPIO MPP(19, 0x0, 1, 1, 1)
  110. #define MPP19_UA0_CTSn MPP(19, 0x4, 0, 0, 1)
  111. #define MPP19_BOOT_FLASH_WEn MPP(19, 0x5, 0, 0, 1)
  112. #define MPP19_UNUSED MPP(19, 0x1, 0, 0, 1)
  113. #define MPP20_GPIO MPP(20, 0x0, 1, 1, 1)
  114. #define MPP20_UA1_CTSs MPP(20, 0x4, 0, 0, 1)
  115. #define MPP20_TDM_PCLK MPP(20, 0x6, 0, 0, 0)
  116. #define MPP20_UNUSED MPP(20, 0x1, 0, 0, 1)
  117. #define MPP21_GPIO MPP(21, 0x0, 1, 1, 1)
  118. #define MPP21_UA1_CTSs MPP(21, 0x4, 0, 0, 1)
  119. #define MPP21_TDM_FSYNC MPP(21, 0x6, 0, 0, 0)
  120. #define MPP21_UNUSED MPP(21, 0x1, 0, 0, 1)
  121. #define MPP22_GPIO MPP(22, 0x0, 1, 1, 1)
  122. #define MPP22_UA3_TDX MPP(22, 0x4, 0, 0, 1)
  123. #define MPP22_NAND_FLASH_REn2 MPP(22, 0x5, 0, 0, 1)
  124. #define MPP22_TDM_DRX MPP(22, 0x6, 0, 0, 1)
  125. #define MPP22_UNUSED MPP(22, 0x1, 0, 0, 1)
  126. #define MPP23_GPIO MPP(23, 0x0, 1, 1, 1)
  127. #define MPP23_UA3_RDX MPP(23, 0x4, 0, 0, 1)
  128. #define MPP23_NAND_FLASH_WEn2 MPP(23, 0x5, 0, 0, 1)
  129. #define MPP23_TDM_DTX MPP(23, 0x6, 0, 0, 1)
  130. #define MPP23_UNUSED MPP(23, 0x1, 0, 0, 1)
  131. #define MPP24_GPIO MPP(24, 0x0, 1, 1, 1)
  132. #define MPP24_UA2_TXD MPP(24, 0x4, 0, 0, 1)
  133. #define MPP24_TDM_INTn MPP(24, 0x6, 0, 0, 1)