mux_omap4.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. /*
  2. * (C) Copyright 2004-2009
  3. * Texas Instruments Incorporated
  4. * Richard Woodruff <r-woodruff2@ti.com>
  5. * Aneesh V <aneesh@ti.com>
  6. * Balaji Krishnamoorthy <balajitk@ti.com>
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. */
  26. #ifndef _MUX_OMAP4_H_
  27. #define _MUX_OMAP4_H_
  28. #include <asm/types.h>
  29. struct pad_conf_entry {
  30. u16 offset;
  31. u16 val;
  32. } __attribute__ ((packed));
  33. #ifdef CONFIG_OFF_PADCONF
  34. #define OFF_PD (1 << 12)
  35. #define OFF_PU (3 << 12)
  36. #define OFF_OUT_PTD (0 << 10)
  37. #define OFF_OUT_PTU (2 << 10)
  38. #define OFF_IN (1 << 10)
  39. #define OFF_OUT (0 << 10)
  40. #define OFF_EN (1 << 9)
  41. #else
  42. #define OFF_PD (0 << 12)
  43. #define OFF_PU (0 << 12)
  44. #define OFF_OUT_PTD (0 << 10)
  45. #define OFF_OUT_PTU (0 << 10)
  46. #define OFF_IN (0 << 10)
  47. #define OFF_OUT (0 << 10)
  48. #define OFF_EN (0 << 9)
  49. #endif
  50. #define IEN (1 << 8)
  51. #define IDIS (0 << 8)
  52. #define PTU (3 << 3)
  53. #define PTD (1 << 3)
  54. #define EN (1 << 3)
  55. #define DIS (0 << 3)
  56. #define M0 0
  57. #define M1 1
  58. #define M2 2
  59. #define M3 3
  60. #define M4 4
  61. #define M5 5
  62. #define M6 6
  63. #define M7 7
  64. #define SAFE_MODE M7
  65. #ifdef CONFIG_OFF_PADCONF
  66. #define OFF_IN_PD (OFF_PD | OFF_IN | OFF_EN)
  67. #define OFF_IN_PU (OFF_PU | OFF_IN | OFF_EN)
  68. #define OFF_OUT_PD (OFF_OUT_PTD | OFF_OUT | OFF_EN)
  69. #define OFF_OUT_PU (OFF_OUT_PTU | OFF_OUT | OFF_EN)
  70. #else
  71. #define OFF_IN_PD 0
  72. #define OFF_IN_PU 0
  73. #define OFF_OUT_PD 0
  74. #define OFF_OUT_PU 0
  75. #endif
  76. #define CORE_REVISION 0x0000
  77. #define CORE_HWINFO 0x0004
  78. #define CORE_SYSCONFIG 0x0010
  79. #define GPMC_AD0 0x0040
  80. #define GPMC_AD1 0x0042
  81. #define GPMC_AD2 0x0044
  82. #define GPMC_AD3 0x0046
  83. #define GPMC_AD4 0x0048
  84. #define GPMC_AD5 0x004A
  85. #define GPMC_AD6 0x004C
  86. #define GPMC_AD7 0x004E
  87. #define GPMC_AD8 0x0050
  88. #define GPMC_AD9 0x0052
  89. #define GPMC_AD10 0x0054
  90. #define GPMC_AD11 0x0056
  91. #define GPMC_AD12 0x0058
  92. #define GPMC_AD13 0x005A
  93. #define GPMC_AD14 0x005C
  94. #define GPMC_AD15 0x005E
  95. #define GPMC_A16 0x0060
  96. #define GPMC_A17 0x0062
  97. #define GPMC_A18 0x0064
  98. #define GPMC_A19 0x0066
  99. #define GPMC_A20 0x0068
  100. #define GPMC_A21 0x006A
  101. #define GPMC_A22 0x006C
  102. #define GPMC_A23 0x006E
  103. #define GPMC_A24 0x0070
  104. #define GPMC_A25 0x0072
  105. #define GPMC_NCS0 0x0074
  106. #define GPMC_NCS1 0x0076
  107. #define GPMC_NCS2 0x0078
  108. #define GPMC_NCS3 0x007A
  109. #define GPMC_NWP 0x007C
  110. #define GPMC_CLK 0x007E
  111. #define GPMC_NADV_ALE 0x0080
  112. #define GPMC_NOE 0x0082
  113. #define GPMC_NWE 0x0084
  114. #define GPMC_NBE0_CLE 0x0086
  115. #define GPMC_NBE1 0x0088
  116. #define GPMC_WAIT0 0x008A
  117. #define GPMC_WAIT1 0x008C
  118. #define C2C_DATA11 0x008E
  119. #define C2C_DATA12 0x0090
  120. #define C2C_DATA13 0x0092
  121. #define C2C_DATA14 0x0094
  122. #define C2C_DATA15 0x0096
  123. #define HDMI_HPD 0x0098
  124. #define HDMI_CEC 0x009A
  125. #define HDMI_DDC_SCL 0x009C
  126. #define HDMI_DDC_SDA 0x009E
  127. #define CSI21_DX0 0x00A0
  128. #define CSI21_DY0 0x00A2
  129. #define CSI21_DX1 0x00A4
  130. #define CSI21_DY1 0x00A6
  131. #define CSI21_DX2 0x00A8
  132. #define CSI21_DY2 0x00AA
  133. #define CSI21_DX3 0x00AC
  134. #define CSI21_DY3 0x00AE
  135. #define CSI21_DX4 0x00B0
  136. #define CSI21_DY4 0x00B2
  137. #define CSI22_DX0 0x00B4
  138. #define CSI22_DY0 0x00B6
  139. #define CSI22_DX1 0x00B8
  140. #define CSI22_DY1 0x00BA
  141. #define CAM_SHUTTER 0x00BC
  142. #define CAM_STROBE 0x00BE
  143. #define CAM_GLOBALRESET 0x00C0
  144. #define USBB1_ULPITLL_CLK 0x00C2
  145. #define USBB1_ULPITLL_STP 0x00C4
  146. #define USBB1_ULPITLL_DIR 0x00C6
  147. #define USBB1_ULPITLL_NXT 0x00C8
  148. #define USBB1_ULPITLL_DAT0 0x00CA
  149. #define USBB1_ULPITLL_DAT1 0x00CC
  150. #define USBB1_ULPITLL_DAT2 0x00CE
  151. #define USBB1_ULPITLL_DAT3 0x00D0
  152. #define USBB1_ULPITLL_DAT4 0x00D2
  153. #define USBB1_ULPITLL_DAT5 0x00D4
  154. #define USBB1_ULPITLL_DAT6 0x00D6
  155. #define USBB1_ULPITLL_DAT7 0x00D8
  156. #define USBB1_HSIC_DATA 0x00DA
  157. #define USBB1_HSIC_STROBE 0x00DC
  158. #define USBC1_ICUSB_DP 0x00DE
  159. #define USBC1_ICUSB_DM 0x00E0
  160. #define SDMMC1_CLK 0x00E2
  161. #define SDMMC1_CMD 0x00E4
  162. #define SDMMC1_DAT0 0x00E6
  163. #define SDMMC1_DAT1 0x00E8
  164. #define SDMMC1_DAT2 0x00EA
  165. #define SDMMC1_DAT3 0x00EC
  166. #define SDMMC1_DAT4 0x00EE
  167. #define SDMMC1_DAT5 0x00F0
  168. #define SDMMC1_DAT6 0x00F2
  169. #define SDMMC1_DAT7 0x00F4
  170. #define ABE_MCBSP2_CLKX 0x00F6
  171. #define ABE_MCBSP2_DR 0x00F8
  172. #define ABE_MCBSP2_DX 0x00FA
  173. #define ABE_MCBSP2_FSX 0x00FC
  174. #define ABE_MCBSP1_CLKX 0x00FE
  175. #define ABE_MCBSP1_DR 0x0100
  176. #define ABE_MCBSP1_DX 0x0102
  177. #define ABE_MCBSP1_FSX 0x0104
  178. #define ABE_PDM_UL_DATA 0x0106
  179. #define ABE_PDM_DL_DATA 0x0108
  180. #define ABE_PDM_FRAME 0x010A
  181. #define ABE_PDM_LB_CLK 0x010C
  182. #define ABE_CLKS 0x010E
  183. #define ABE_DMIC_CLK1 0x0110
  184. #define ABE_DMIC_DIN1 0x0112
  185. #define ABE_DMIC_DIN2 0x0114
  186. #define ABE_DMIC_DIN3 0x0116
  187. #define UART2_CTS 0x0118
  188. #define UART2_RTS 0x011A
  189. #define UART2_RX 0x011C
  190. #define UART2_TX 0x011E
  191. #define HDQ_SIO 0x0120
  192. #define I2C1_SCL 0x0122
  193. #define I2C1_SDA 0x0124
  194. #define I2C2_SCL 0x0126
  195. #define I2C2_SDA 0x0128
  196. #define I2C3_SCL 0x012A
  197. #define I2C3_SDA 0x012C
  198. #define I2C4_SCL 0x012E
  199. #define I2C4_SDA 0x0130
  200. #define MCSPI1_CLK 0x0132
  201. #define MCSPI1_SOMI 0x0134
  202. #define MCSPI1_SIMO 0x0136
  203. #define MCSPI1_CS0 0x0138
  204. #define MCSPI1_CS1 0x013A
  205. #define MCSPI1_CS2 0x013C
  206. #define MCSPI1_CS3 0x013E
  207. #define UART3_CTS_RCTX 0x0140
  208. #define UART3_RTS_SD 0x0142
  209. #define UART3_RX_IRRX 0x0144
  210. #define UART3_TX_IRTX 0x0146
  211. #define SDMMC5_CLK 0x0148
  212. #define SDMMC5_CMD 0x014A
  213. #define SDMMC5_DAT0 0x014C
  214. #define SDMMC5_DAT1 0x014E
  215. #define SDMMC5_DAT2 0x0150
  216. #define SDMMC5_DAT3 0x0152
  217. #define MCSPI4_CLK 0x0154
  218. #define MCSPI4_SIMO 0x0156
  219. #define MCSPI4_SOMI 0x0158
  220. #define MCSPI4_CS0 0x015A
  221. #define UART4_RX 0x015C
  222. #define UART4_TX 0x015E
  223. #define USBB2_ULPITLL_CLK 0x0160
  224. #define USBB2_ULPITLL_STP 0x0162
  225. #define USBB2_ULPITLL_DIR 0x0164
  226. #define USBB2_ULPITLL_NXT 0x0166
  227. #define USBB2_ULPITLL_DAT0 0x0168
  228. #define USBB2_ULPITLL_DAT1 0x016A
  229. #define USBB2_ULPITLL_DAT2 0x016C
  230. #define USBB2_ULPITLL_DAT3 0x016E
  231. #define USBB2_ULPITLL_DAT4 0x0170
  232. #define USBB2_ULPITLL_DAT5 0x0172
  233. #define USBB2_ULPITLL_DAT6 0x0174
  234. #define USBB2_ULPITLL_DAT7 0x0176
  235. #define USBB2_HSIC_DATA 0x0178
  236. #define USBB2_HSIC_STROBE 0x017A
  237. #define UNIPRO_TX0 0x017C
  238. #define UNIPRO_TY0 0x017E
  239. #define UNIPRO_TX1 0x0180
  240. #define UNIPRO_TY1 0x0182
  241. #define UNIPRO_TX2 0x0184
  242. #define UNIPRO_TY2 0x0186
  243. #define UNIPRO_RX0 0x0188
  244. #define UNIPRO_RY0 0x018A
  245. #define UNIPRO_RX1 0x018C
  246. #define UNIPRO_RY1 0x018E
  247. #define UNIPRO_RX2 0x0190
  248. #define UNIPRO_RY2 0x0192
  249. #define USBA0_OTG_CE 0x0194
  250. #define USBA0_OTG_DP 0x0196
  251. #define USBA0_OTG_DM 0x0198
  252. #define FREF_CLK1_OUT 0x019A
  253. #define FREF_CLK2_OUT 0x019C
  254. #define SYS_NIRQ1 0x019E
  255. #define SYS_NIRQ2 0x01A0
  256. #define SYS_BOOT0 0x01A2
  257. #define SYS_BOOT1 0x01A4
  258. #define SYS_BOOT2 0x01A6
  259. #define SYS_BOOT3 0x01A8
  260. #define SYS_BOOT4 0x01AA
  261. #define SYS_BOOT5 0x01AC
  262. #define DPM_EMU0 0x01AE
  263. #define DPM_EMU1 0x01B0
  264. #define DPM_EMU2 0x01B2
  265. #define DPM_EMU3 0x01B4
  266. #define DPM_EMU4 0x01B6
  267. #define DPM_EMU5 0x01B8
  268. #define DPM_EMU6 0x01BA
  269. #define DPM_EMU7 0x01BC
  270. #define DPM_EMU8 0x01BE
  271. #define DPM_EMU9 0x01C0
  272. #define DPM_EMU10 0x01C2
  273. #define DPM_EMU11 0x01C4
  274. #define DPM_EMU12 0x01C6
  275. #define DPM_EMU13 0x01C8
  276. #define DPM_EMU14 0x01CA
  277. #define DPM_EMU15 0x01CC
  278. #define DPM_EMU16 0x01CE
  279. #define DPM_EMU17 0x01D0
  280. #define DPM_EMU18 0x01D2
  281. #define DPM_EMU19 0x01D4
  282. #define WAKEUPEVENT_0 0x01D8
  283. #define WAKEUPEVENT_1 0x01DC
  284. #define WAKEUPEVENT_2 0x01E0
  285. #define WAKEUPEVENT_3 0x01E4
  286. #define WAKEUPEVENT_4 0x01E8
  287. #define WAKEUPEVENT_5 0x01EC
  288. #define WAKEUPEVENT_6 0x01F0
  289. #define WKUP_REVISION 0x0000
  290. #define WKUP_HWINFO 0x0004
  291. #define WKUP_SYSCONFIG 0x0010
  292. #define PAD0_SIM_IO 0x0040
  293. #define PAD1_SIM_CLK 0x0042
  294. #define PAD0_SIM_RESET 0x0044
  295. #define PAD1_SIM_CD 0x0046
  296. #define PAD0_SIM_PWRCTRL 0x0048
  297. #define PAD1_SR_SCL 0x004A
  298. #define PAD0_SR_SDA 0x004C
  299. #define PAD1_FREF_XTAL_IN 0x004E
  300. #define PAD0_FREF_SLICER_IN 0x0050
  301. #define PAD1_FREF_CLK_IOREQ 0x0052
  302. #define PAD0_FREF_CLK0_OUT 0x0054
  303. #define PAD1_FREF_CLK3_REQ 0x0056
  304. #define PAD0_FREF_CLK3_OUT 0x0058
  305. #define PAD1_FREF_CLK4_REQ 0x005A
  306. #define PAD0_FREF_CLK4_OUT 0x005C
  307. #define PAD1_SYS_32K 0x005E
  308. #define PAD0_SYS_NRESPWRON 0x0060
  309. #define PAD1_SYS_NRESWARM 0x0062
  310. #define PAD0_SYS_PWR_REQ 0x0064
  311. #define PAD1_SYS_PWRON_RESET 0x0066
  312. #define PAD0_SYS_BOOT6 0x0068
  313. #define PAD1_SYS_BOOT7 0x006A
  314. #define PAD0_JTAG_NTRST 0x006C
  315. #define PAD1_JTAG_TCK 0x006D
  316. #define PAD0_JTAG_RTCK 0x0070
  317. #define PAD1_JTAG_TMS_TMSC 0x0072
  318. #define PAD0_JTAG_TDI 0x0074
  319. #define PAD1_JTAG_TDO 0x0076
  320. #define PADCONF_WAKEUPEVENT_0 0x007C
  321. #define CONTROL_SMART1NOPMIO_PADCONF_0 0x05A0
  322. #define CONTROL_SMART1NOPMIO_PADCONF_1 0x05A4
  323. #define PADCONF_MODE 0x05A8
  324. #define CONTROL_XTAL_OSCILLATOR 0x05AC
  325. #define CONTROL_CONTROL_I2C_2 0x0604
  326. #define CONTROL_CONTROL_JTAG 0x0608
  327. #define CONTROL_CONTROL_SYS 0x060C
  328. #define CONTROL_SPARE_RW 0x0614
  329. #define CONTROL_SPARE_R 0x0618
  330. #define CONTROL_SPARE_R_C0 0x061C
  331. #endif /* _MUX_OMAP4_H_ */