cablePowerDataOperation.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * Copyright 2004-2006 Freescale Semiconductor, Inc. All Rights Reserved.
  3. * Copyright (C) 2008 by Sascha Hauer <kernel@pengutronix.de>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version 2
  8. * of the License, or (at your option) any later version.
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  17. * MA 02110-1301, USA.
  18. */
  19. #ifndef __MACH_IOMUX_MX3_H__
  20. #define __MACH_IOMUX_MX3_H__
  21. #include <linux/types.h>
  22. /*
  23. * various IOMUX output functions
  24. */
  25. #define IOMUX_OCONFIG_GPIO (0 << 4) /* used as GPIO */
  26. #define IOMUX_OCONFIG_FUNC (1 << 4) /* used as function */
  27. #define IOMUX_OCONFIG_ALT1 (2 << 4) /* used as alternate function 1 */
  28. #define IOMUX_OCONFIG_ALT2 (3 << 4) /* used as alternate function 2 */
  29. #define IOMUX_OCONFIG_ALT3 (4 << 4) /* used as alternate function 3 */
  30. #define IOMUX_OCONFIG_ALT4 (5 << 4) /* used as alternate function 4 */
  31. #define IOMUX_OCONFIG_ALT5 (6 << 4) /* used as alternate function 5 */
  32. #define IOMUX_OCONFIG_ALT6 (7 << 4) /* used as alternate function 6 */
  33. #define IOMUX_ICONFIG_NONE 0 /* not configured for input */
  34. #define IOMUX_ICONFIG_GPIO 1 /* used as GPIO */
  35. #define IOMUX_ICONFIG_FUNC 2 /* used as function */
  36. #define IOMUX_ICONFIG_ALT1 4 /* used as alternate function 1 */
  37. #define IOMUX_ICONFIG_ALT2 8 /* used as alternate function 2 */
  38. #define IOMUX_CONFIG_GPIO (IOMUX_OCONFIG_GPIO | IOMUX_ICONFIG_GPIO)
  39. #define IOMUX_CONFIG_FUNC (IOMUX_OCONFIG_FUNC | IOMUX_ICONFIG_FUNC)
  40. #define IOMUX_CONFIG_ALT1 (IOMUX_OCONFIG_ALT1 | IOMUX_ICONFIG_ALT1)
  41. #define IOMUX_CONFIG_ALT2 (IOMUX_OCONFIG_ALT2 | IOMUX_ICONFIG_ALT2)
  42. /*
  43. * various IOMUX pad functions
  44. */
  45. enum iomux_pad_config {
  46. PAD_CTL_NOLOOPBACK = 0x0 << 9,
  47. PAD_CTL_LOOPBACK = 0x1 << 9,
  48. PAD_CTL_PKE_NONE = 0x0 << 8,
  49. PAD_CTL_PKE_ENABLE = 0x1 << 8,
  50. PAD_CTL_PUE_KEEPER = 0x0 << 7,
  51. PAD_CTL_PUE_PUD = 0x1 << 7,
  52. PAD_CTL_100K_PD = 0x0 << 5,
  53. PAD_CTL_100K_PU = 0x1 << 5,
  54. PAD_CTL_47K_PU = 0x2 << 5,
  55. PAD_CTL_22K_PU = 0x3 << 5,
  56. PAD_CTL_HYS_CMOS = 0x0 << 4,
  57. PAD_CTL_HYS_SCHMITZ = 0x1 << 4,
  58. PAD_CTL_ODE_CMOS = 0x0 << 3,
  59. PAD_CTL_ODE_OpenDrain = 0x1 << 3,
  60. PAD_CTL_DRV_NORMAL = 0x0 << 1,
  61. PAD_CTL_DRV_HIGH = 0x1 << 1,
  62. PAD_CTL_DRV_MAX = 0x2 << 1,
  63. PAD_CTL_SRE_SLOW = 0x0 << 0,
  64. PAD_CTL_SRE_FAST = 0x1 << 0
  65. };
  66. /*
  67. * various IOMUX general purpose functions
  68. */
  69. enum iomux_gp_func {
  70. MUX_PGP_FIRI = 1 << 0,
  71. MUX_DDR_MODE = 1 << 1,
  72. MUX_PGP_CSPI_BB = 1 << 2,
  73. MUX_PGP_ATA_1 = 1 << 3,
  74. MUX_PGP_ATA_2 = 1 << 4,
  75. MUX_PGP_ATA_3 = 1 << 5,
  76. MUX_PGP_ATA_4 = 1 << 6,
  77. MUX_PGP_ATA_5 = 1 << 7,
  78. MUX_PGP_ATA_6 = 1 << 8,
  79. MUX_PGP_ATA_7 = 1 << 9,
  80. MUX_PGP_ATA_8 = 1 << 10,
  81. MUX_PGP_UH2 = 1 << 11,
  82. MUX_SDCTL_CSD0_SEL = 1 << 12,
  83. MUX_SDCTL_CSD1_SEL = 1 << 13,
  84. MUX_CSPI1_UART3 = 1 << 14,
  85. MUX_EXTDMAREQ2_MBX_SEL = 1 << 15,
  86. MUX_TAMPER_DETECT_EN = 1 << 16,
  87. MUX_PGP_USB_4WIRE = 1 << 17,
  88. MUX_PGP_USB_COMMON = 1 << 18,
  89. MUX_SDHC_MEMSTICK1 = 1 << 19,
  90. MUX_SDHC_MEMSTICK2 = 1 << 20,
  91. MUX_PGP_SPLL_BYP = 1 << 21,
  92. MUX_PGP_UPLL_BYP = 1 << 22,
  93. MUX_PGP_MSHC1_CLK_SEL = 1 << 23,
  94. MUX_PGP_MSHC2_CLK_SEL = 1 << 24,
  95. MUX_CSPI3_UART5_SEL = 1 << 25,
  96. MUX_PGP_ATA_9 = 1 << 26,
  97. MUX_PGP_USB_SUSPEND = 1 << 27,
  98. MUX_PGP_USB_OTG_LOOPBACK = 1 << 28,
  99. MUX_PGP_USB_HS1_LOOPBACK = 1 << 29,
  100. MUX_PGP_USB_HS2_LOOPBACK = 1 << 30,
  101. MUX_CLKO_DDR_MODE = 1 << 31,
  102. };