mpp.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #ifndef __ARCH_ORION5X_MPP_H
  2. #define __ARCH_ORION5X_MPP_H
  3. #define MPP(_num, _sel, _in, _out, _F5181l, _F5182, _F5281) ( \
  4. /* MPP number */ ((_num) & 0xff) | \
  5. /* MPP select value */ (((_sel) & 0xf) << 8) | \
  6. /* may be input signal */ ((!!(_in)) << 12) | \
  7. /* may be output signal */ ((!!(_out)) << 13) | \
  8. /* available on F5181l */ ((!!(_F5181l)) << 14) | \
  9. /* available on F5182 */ ((!!(_F5182)) << 15) | \
  10. /* available on F5281 */ ((!!(_F5281)) << 16))
  11. /* num sel i o 5181 5182 5281 */
  12. #define MPP_F5181_MASK MPP(0, 0x0, 0, 0, 1, 0, 0)
  13. #define MPP_F5182_MASK MPP(0, 0x0, 0, 0, 0, 1, 0)
  14. #define MPP_F5281_MASK MPP(0, 0x0, 0, 0, 0, 0, 1)
  15. #define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1, 1, 1)
  16. #define MPP0_GPIO MPP(0, 0x3, 1, 1, 1, 1, 1)
  17. #define MPP0_PCIE_RST_OUTn MPP(0, 0x0, 0, 0, 1, 1, 1)
  18. #define MPP0_PCI_ARB MPP(0, 0x2, 0, 0, 1, 1, 1)
  19. #define MPP1_UNUSED MPP(1, 0x0, 0, 0, 1, 1, 1)
  20. #define MPP1_GPIO MPP(1, 0x0, 1, 1, 1, 1, 1)
  21. #define MPP1_PCI_ARB MPP(1, 0x2, 0, 0, 1, 1, 1)
  22. #define MPP2_UNUSED MPP(2, 0x0, 0, 0, 1, 1, 1)
  23. #define MPP2_GPIO MPP(2, 0x0, 1, 1, 1, 1, 1)
  24. #define MPP2_PCI_ARB MPP(2, 0x2, 0, 0, 1, 1, 1)
  25. #define MPP2_PCI_PMEn MPP(2, 0x3, 0, 0, 1, 1, 1)
  26. #define MPP3_UNUSED MPP(3, 0x0, 0, 0, 1, 1, 1)
  27. #define MPP3_GPIO MPP(3, 0x0, 1, 1, 1, 1, 1)
  28. #define MPP3_PCI_ARB MPP(3, 0x2, 0, 0, 1, 1, 1)
  29. #define MPP4_UNUSED MPP(4, 0x0, 0, 0, 1, 1, 1)
  30. #define MPP4_GPIO MPP(4, 0x0, 1, 1, 1, 1, 1)
  31. #define MPP4_PCI_ARB MPP(4, 0x2, 0, 0, 1, 1, 1)
  32. #define MPP4_NAND MPP(4, 0x4, 0, 0, 0, 1, 1)
  33. #define MPP4_SATA_LED MPP(4, 0x5, 0, 0, 0, 1, 0)
  34. #define MPP5_UNUSED MPP(5, 0x0, 0, 0, 1, 1, 1)
  35. #define MPP5_GPIO MPP(5, 0x0, 1, 1, 1, 1, 1)
  36. #define MPP5_PCI_ARB MPP(5, 0x2, 0, 0, 1, 1, 1)
  37. #define MPP5_NAND MPP(5, 0x4, 0, 0, 0, 1, 1)
  38. #define MPP5_SATA_LED MPP(5, 0x5, 0, 0, 0, 1, 0)
  39. #define MPP6_UNUSED MPP(6, 0x0, 0, 0, 1, 1, 1)
  40. #define MPP6_GPIO MPP(6, 0x0, 1, 1, 1, 1, 1)
  41. #define MPP6_PCI_ARB MPP(6, 0x2, 0, 0, 1, 1, 1)
  42. #define MPP6_NAND MPP(6, 0x4, 0, 0, 0, 1, 1)
  43. #define MPP6_PCI_CLK MPP(6, 0x5, 0, 0, 1, 0, 0)
  44. #define MPP6_SATA_LED MPP(6, 0x5, 0, 0, 0, 1, 0)
  45. #define MPP7_UNUSED MPP(7, 0x0, 0, 0, 1, 1, 1)
  46. #define MPP7_GPIO MPP(7, 0x0, 1, 1, 1, 1, 1)
  47. #define MPP7_PCI_ARB MPP(7, 0x2, 0, 0, 1, 1, 1)
  48. #define MPP7_NAND MPP(7, 0x4, 0, 0, 0, 1, 1)
  49. #define MPP7_PCI_CLK MPP(7, 0x5, 0, 0, 1, 0, 0)
  50. #define MPP7_SATA_LED MPP(7, 0x5, 0, 0, 0, 1, 0)
  51. #define MPP8_UNUSED MPP(8, 0x0, 0, 0, 1, 1, 1)
  52. #define MPP8_GPIO MPP(8, 0x0, 1, 1, 1, 1, 1)
  53. #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1)
  54. #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1)
  55. #define MPP9_GPIO MPP(9, 0x0, 1, 1, 1, 1, 1)
  56. #define MPP9_GIGE MPP(9, 0x1, 0, 0, 1, 1, 1)
  57. #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1)
  58. #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1)
  59. #define MPP10_GIGE MPP(10, 0x1, 0, 0, 1, 1, 1)
  60. #define MPP11_UNUSED MPP(11, 0x0, 0, 0, 1, 1, 1)
  61. #define MPP11_GPIO MPP(11, 0x0, 1, 1, 1, 1, 1)
  62. #define MPP11_GIGE MPP(11, 0x1, 0, 0, 1, 1, 1)
  63. #define MPP12_UNUSED MPP(12, 0x0, 0, 0, 1, 1, 1)
  64. #define MPP12_GPIO MPP(12, 0x0, 1, 1, 1, 1, 1)
  65. #define MPP12_GIGE MPP(12, 0x1, 0, 0, 1, 1, 1)
  66. #define MPP12_NAND MPP(12, 0x4, 0, 0, 0, 1, 1)
  67. #define MPP12_SATA_LED MPP(12, 0x5, 0, 0, 0, 1, 0)
  68. #define MPP13_UNUSED MPP(13, 0x0, 0, 0, 1, 1, 1)
  69. #define MPP13_GPIO MPP(13, 0x0, 1, 1, 1, 1, 1)
  70. #define MPP13_GIGE MPP(13, 0x1, 0, 0, 1, 1, 1)
  71. #define MPP13_NAND MPP(13, 0x4, 0, 0, 0, 1, 1)
  72. #define MPP13_SATA_LED MPP(13, 0x5, 0, 0, 0, 1, 0)
  73. #define MPP14_UNUSED MPP(14, 0x0, 0, 0, 1, 1, 1)
  74. #define MPP14_GPIO MPP(14, 0x0, 1, 1, 1, 1, 1)
  75. #define MPP14_GIGE MPP(14, 0x1, 0, 0, 1, 1, 1)
  76. #define MPP14_NAND MPP(14, 0x4, 0, 0, 0, 1, 1)
  77. #define MPP14_SATA_LED MPP(14, 0x5, 0, 0, 0, 1, 0)
  78. #define MPP15_UNUSED MPP(15, 0x0, 0, 0, 1, 1, 1)
  79. #define MPP15_GPIO MPP(15, 0x0, 1, 1, 1, 1, 1)
  80. #define MPP15_GIGE MPP(15, 0x1, 0, 0, 1, 1, 1)
  81. #define MPP15_NAND MPP(15, 0x4, 0, 0, 0, 1, 1)
  82. #define MPP15_SATA_LED MPP(15, 0x5, 0, 0, 0, 1, 0)
  83. #define MPP16_UNUSED MPP(16, 0x0, 0, 0, 1, 1, 1)
  84. #define MPP16_GPIO MPP(16, 0x5, 1, 1, 0, 1, 0)
  85. #define MPP16_GIGE MPP(16, 0x1, 0, 0, 1, 1, 1)
  86. #define MPP16_NAND MPP(16, 0x4, 0, 0, 0, 1, 1)
  87. #define MPP16_UART MPP(16, 0x0, 0, 0, 0, 1, 1)
  88. #define MPP17_UNUSED MPP(17, 0x0, 0, 0, 1, 1, 1)
  89. #define MPP17_GPIO MPP(17, 0x5, 1, 1, 0, 1, 0)
  90. #define MPP17_GIGE MPP(17, 0x1, 0, 0, 1, 1, 1)
  91. #define MPP17_NAND MPP(17, 0x4, 0, 0, 0, 1, 1)
  92. #define MPP17_UART MPP(17, 0x0, 0, 0, 0, 1, 1)
  93. #define MPP18_UNUSED MPP(18, 0x0, 0, 0, 1, 1, 1)
  94. #define MPP18_GPIO MPP(18, 0x5, 1, 1, 0, 1, 0)
  95. #define MPP18_GIGE MPP(18, 0x1, 0, 0, 1, 1, 1)
  96. #define MPP18_UART MPP(18, 0x0, 0, 0, 0, 1, 1)
  97. #define MPP19_UNUSED MPP(19, 0x0, 0, 0, 1, 1, 1)
  98. #define MPP19_GPIO MPP(19, 0x5, 1, 1, 0, 1, 0)
  99. #define MPP19_GIGE MPP(19, 0x1, 0, 0, 1, 1, 1)
  100. #define MPP19_UART MPP(19, 0x0, 0, 0, 0, 1, 1)
  101. #define MPP_MAX 19
  102. void orion5x_mpp_conf(unsigned int *mpp_list);
  103. #endif