gpio.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * GPIO configuration for Arizona devices
  3. *
  4. * Copyright 2013 Wolfson Microelectronics. PLC.
  5. *
  6. * Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef _ARIZONA_GPIO_H
  13. #define _ARIZONA_GPIO_H
  14. #define ARIZONA_GP_FN_TXLRCLK 0x00
  15. #define ARIZONA_GP_FN_GPIO 0x01
  16. #define ARIZONA_GP_FN_IRQ1 0x02
  17. #define ARIZONA_GP_FN_IRQ2 0x03
  18. #define ARIZONA_GP_FN_OPCLK 0x04
  19. #define ARIZONA_GP_FN_FLL1_OUT 0x05
  20. #define ARIZONA_GP_FN_FLL2_OUT 0x06
  21. #define ARIZONA_GP_FN_PWM1 0x08
  22. #define ARIZONA_GP_FN_PWM2 0x09
  23. #define ARIZONA_GP_FN_SYSCLK_UNDERCLOCKED 0x0A
  24. #define ARIZONA_GP_FN_ASYNCCLK_UNDERCLOCKED 0x0B
  25. #define ARIZONA_GP_FN_FLL1_LOCK 0x0C
  26. #define ARIZONA_GP_FN_FLL2_LOCK 0x0D
  27. #define ARIZONA_GP_FN_FLL1_CLOCK_OK 0x0F
  28. #define ARIZONA_GP_FN_FLL2_CLOCK_OK 0x10
  29. #define ARIZONA_GP_FN_HEADPHONE_DET 0x12
  30. #define ARIZONA_GP_FN_MIC_DET 0x13
  31. #define ARIZONA_GP_FN_WSEQ_STATUS 0x15
  32. #define ARIZONA_GP_FN_CIF_ADDRESS_ERROR 0x16
  33. #define ARIZONA_GP_FN_ASRC1_LOCK 0x1A
  34. #define ARIZONA_GP_FN_ASRC2_LOCK 0x1B
  35. #define ARIZONA_GP_FN_ASRC_CONFIG_ERROR 0x1C
  36. #define ARIZONA_GP_FN_DRC1_SIGNAL_DETECT 0x1D
  37. #define ARIZONA_GP_FN_DRC1_ANTICLIP 0x1E
  38. #define ARIZONA_GP_FN_DRC1_DECAY 0x1F
  39. #define ARIZONA_GP_FN_DRC1_NOISE 0x20
  40. #define ARIZONA_GP_FN_DRC1_QUICK_RELEASE 0x21
  41. #define ARIZONA_GP_FN_DRC2_SIGNAL_DETECT 0x22
  42. #define ARIZONA_GP_FN_DRC2_ANTICLIP 0x23
  43. #define ARIZONA_GP_FN_DRC2_DECAY 0x24
  44. #define ARIZONA_GP_FN_DRC2_NOISE 0x25
  45. #define ARIZONA_GP_FN_DRC2_QUICK_RELEASE 0x26
  46. #define ARIZONA_GP_FN_MIXER_DROPPED_SAMPLE 0x27
  47. #define ARIZONA_GP_FN_AIF1_CONFIG_ERROR 0x28
  48. #define ARIZONA_GP_FN_AIF2_CONFIG_ERROR 0x29
  49. #define ARIZONA_GP_FN_AIF3_CONFIG_ERROR 0x2A
  50. #define ARIZONA_GP_FN_SPK_TEMP_SHUTDOWN 0x2B
  51. #define ARIZONA_GP_FN_SPK_TEMP_WARNING 0x2C
  52. #define ARIZONA_GP_FN_UNDERCLOCKED 0x2D
  53. #define ARIZONA_GP_FN_OVERCLOCKED 0x2E
  54. #define ARIZONA_GP_FN_DSP_IRQ1 0x35
  55. #define ARIZONA_GP_FN_DSP_IRQ2 0x36
  56. #define ARIZONA_GP_FN_ASYNC_OPCLK 0x3D
  57. #define ARIZONA_GP_FN_BOOT_DONE 0x44
  58. #define ARIZONA_GP_FN_DSP1_RAM_READY 0x45
  59. #define ARIZONA_GP_FN_SYSCLK_ENA_STATUS 0x4B
  60. #define ARIZONA_GP_FN_ASYNCCLK_ENA_STATUS 0x4C
  61. #define ARIZONA_GPN_DIR 0x8000 /* GPN_DIR */
  62. #define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */
  63. #define ARIZONA_GPN_DIR_SHIFT 15 /* GPN_DIR */
  64. #define ARIZONA_GPN_DIR_WIDTH 1 /* GPN_DIR */
  65. #define ARIZONA_GPN_PU 0x4000 /* GPN_PU */
  66. #define ARIZONA_GPN_PU_MASK 0x4000 /* GPN_PU */
  67. #define ARIZONA_GPN_PU_SHIFT 14 /* GPN_PU */
  68. #define ARIZONA_GPN_PU_WIDTH 1 /* GPN_PU */
  69. #define ARIZONA_GPN_PD 0x2000 /* GPN_PD */
  70. #define ARIZONA_GPN_PD_MASK 0x2000 /* GPN_PD */
  71. #define ARIZONA_GPN_PD_SHIFT 13 /* GPN_PD */
  72. #define ARIZONA_GPN_PD_WIDTH 1 /* GPN_PD */
  73. #define ARIZONA_GPN_LVL 0x0800 /* GPN_LVL */
  74. #define ARIZONA_GPN_LVL_MASK 0x0800 /* GPN_LVL */
  75. #define ARIZONA_GPN_LVL_SHIFT 11 /* GPN_LVL */
  76. #define ARIZONA_GPN_LVL_WIDTH 1 /* GPN_LVL */
  77. #define ARIZONA_GPN_POL 0x0400 /* GPN_POL */
  78. #define ARIZONA_GPN_POL_MASK 0x0400 /* GPN_POL */
  79. #define ARIZONA_GPN_POL_SHIFT 10 /* GPN_POL */
  80. #define ARIZONA_GPN_POL_WIDTH 1 /* GPN_POL */
  81. #define ARIZONA_GPN_OP_CFG 0x0200 /* GPN_OP_CFG */
  82. #define ARIZONA_GPN_OP_CFG_MASK 0x0200 /* GPN_OP_CFG */
  83. #define ARIZONA_GPN_OP_CFG_SHIFT 9 /* GPN_OP_CFG */
  84. #define ARIZONA_GPN_OP_CFG_WIDTH 1 /* GPN_OP_CFG */
  85. #define ARIZONA_GPN_DB 0x0100 /* GPN_DB */
  86. #define ARIZONA_GPN_DB_MASK 0x0100 /* GPN_DB */
  87. #define ARIZONA_GPN_DB_SHIFT 8 /* GPN_DB */
  88. #define ARIZONA_GPN_DB_WIDTH 1 /* GPN_DB */
  89. #define ARIZONA_GPN_FN_MASK 0x007F /* GPN_DB */
  90. #define ARIZONA_GPN_FN_SHIFT 0 /* GPN_DB */
  91. #define ARIZONA_GPN_FN_WIDTH 7 /* GPN_DB */
  92. #endif