pinctrl-pic32.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. * PIC32 pinctrl driver
  3. *
  4. * Joshua Henderson, <joshua.henderson@microchip.com>
  5. * Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
  6. *
  7. * This program is free software; you can distribute it and/or modify it
  8. * under the terms of the GNU General Public License (Version 2) as
  9. * published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope it will be useful, but WITHOUT
  12. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14. * for more details.
  15. */
  16. #ifndef PINCTRL_PINCTRL_PIC32_H
  17. #define PINCTRL_PINCTRL_PIC32_H
  18. /* PORT Registers */
  19. #define ANSEL_REG 0x00
  20. #define TRIS_REG 0x10
  21. #define PORT_REG 0x20
  22. #define LAT_REG 0x30
  23. #define ODCU_REG 0x40
  24. #define CNPU_REG 0x50
  25. #define CNPD_REG 0x60
  26. #define CNCON_REG 0x70
  27. #define CNEN_REG 0x80
  28. #define CNSTAT_REG 0x90
  29. #define CNNE_REG 0xA0
  30. #define CNF_REG 0xB0
  31. /* Input PPS Registers */
  32. #define INT1R 0x04
  33. #define INT2R 0x08
  34. #define INT3R 0x0C
  35. #define INT4R 0x10
  36. #define T2CKR 0x18
  37. #define T3CKR 0x1C
  38. #define T4CKR 0x20
  39. #define T5CKR 0x24
  40. #define T6CKR 0x28
  41. #define T7CKR 0x2C
  42. #define T8CKR 0x30
  43. #define T9CKR 0x34
  44. #define IC1R 0x38
  45. #define IC2R 0x3C
  46. #define IC3R 0x40
  47. #define IC4R 0x44
  48. #define IC5R 0x48
  49. #define IC6R 0x4C
  50. #define IC7R 0x50
  51. #define IC8R 0x54
  52. #define IC9R 0x58
  53. #define OCFAR 0x60
  54. #define U1RXR 0x68
  55. #define U1CTSR 0x6C
  56. #define U2RXR 0x70
  57. #define U2CTSR 0x74
  58. #define U3RXR 0x78
  59. #define U3CTSR 0x7C
  60. #define U4RXR 0x80
  61. #define U4CTSR 0x84
  62. #define U5RXR 0x88
  63. #define U5CTSR 0x8C
  64. #define U6RXR 0x90
  65. #define U6CTSR 0x94
  66. #define SDI1R 0x9C
  67. #define SS1INR 0xA0
  68. #define SDI2R 0xA8
  69. #define SS2INR 0xAC
  70. #define SDI3R 0xB4
  71. #define SS3INR 0xB8
  72. #define SDI4R 0xC0
  73. #define SS4INR 0xC4
  74. #define SDI5R 0xCC
  75. #define SS5INR 0xD0
  76. #define SDI6R 0xD8
  77. #define SS6INR 0xDC
  78. #define C1RXR 0xE0
  79. #define C2RXR 0xE4
  80. #define REFCLKI1R 0xE8
  81. #define REFCLKI3R 0xF0
  82. #define REFCLKI4R 0xF4
  83. /* Output PPS Registers */
  84. #define RPA14R 0x138
  85. #define RPA15R 0x13C
  86. #define RPB0R 0x140
  87. #define RPB1R 0x144
  88. #define RPB2R 0x148
  89. #define RPB3R 0x14C
  90. #define RPB5R 0x154
  91. #define RPB6R 0x158
  92. #define RPB7R 0x15C
  93. #define RPB8R 0x160
  94. #define RPB9R 0x164
  95. #define RPB10R 0x168
  96. #define RPB14R 0x178
  97. #define RPB15R 0x17C
  98. #define RPC1R 0x184
  99. #define RPC2R 0x188
  100. #define RPC3R 0x18C
  101. #define RPC4R 0x190
  102. #define RPC13R 0x1B4
  103. #define RPC14R 0x1B8
  104. #define RPD0R 0x1C0
  105. #define RPD1R 0x1C4
  106. #define RPD2R 0x1C8
  107. #define RPD3R 0x1CC
  108. #define RPD4R 0x1D0
  109. #define RPD5R 0x1D4
  110. #define RPD6R 0x1D8
  111. #define RPD7R 0x1DC
  112. #define RPD9R 0x1E4
  113. #define RPD10R 0x1E8
  114. #define RPD11R 0x1EC
  115. #define RPD12R 0x1F0
  116. #define RPD14R 0x1F8
  117. #define RPD15R 0x1FC
  118. #define RPE3R 0x20C
  119. #define RPE5R 0x214
  120. #define RPE8R 0x220
  121. #define RPE9R 0x224
  122. #define RPF0R 0x240
  123. #define RPF1R 0x244
  124. #define RPF2R 0x248
  125. #define RPF3R 0x24C
  126. #define RPF4R 0x250
  127. #define RPF5R 0x254
  128. #define RPF8R 0x260
  129. #define RPF12R 0x270
  130. #define RPF13R 0x274
  131. #define RPG0R 0x280
  132. #define RPG1R 0x284
  133. #define RPG6R 0x298
  134. #define RPG7R 0x29C
  135. #define RPG8R 0x2A0
  136. #define RPG9R 0x2A4
  137. #endif /* PINCTRL_PINCTRL_PIC32_H */