arizona.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Device Tree defines for Arizona devices
  4. *
  5. * Copyright 2015 Cirrus Logic Inc.
  6. *
  7. * Author: Charles Keepax <[email protected]>
  8. */
  9. #ifndef _DT_BINDINGS_MFD_ARIZONA_H
  10. #define _DT_BINDINGS_MFD_ARIZONA_H
  11. /* GPIO Function Definitions */
  12. #define ARIZONA_GP_FN_TXLRCLK 0x00
  13. #define ARIZONA_GP_FN_GPIO 0x01
  14. #define ARIZONA_GP_FN_IRQ1 0x02
  15. #define ARIZONA_GP_FN_IRQ2 0x03
  16. #define ARIZONA_GP_FN_OPCLK 0x04
  17. #define ARIZONA_GP_FN_FLL1_OUT 0x05
  18. #define ARIZONA_GP_FN_FLL2_OUT 0x06
  19. #define ARIZONA_GP_FN_PWM1 0x08
  20. #define ARIZONA_GP_FN_PWM2 0x09
  21. #define ARIZONA_GP_FN_SYSCLK_UNDERCLOCKED 0x0A
  22. #define ARIZONA_GP_FN_ASYNCCLK_UNDERCLOCKED 0x0B
  23. #define ARIZONA_GP_FN_FLL1_LOCK 0x0C
  24. #define ARIZONA_GP_FN_FLL2_LOCK 0x0D
  25. #define ARIZONA_GP_FN_FLL1_CLOCK_OK 0x0F
  26. #define ARIZONA_GP_FN_FLL2_CLOCK_OK 0x10
  27. #define ARIZONA_GP_FN_HEADPHONE_DET 0x12
  28. #define ARIZONA_GP_FN_MIC_DET 0x13
  29. #define ARIZONA_GP_FN_WSEQ_STATUS 0x15
  30. #define ARIZONA_GP_FN_CIF_ADDRESS_ERROR 0x16
  31. #define ARIZONA_GP_FN_ASRC1_LOCK 0x1A
  32. #define ARIZONA_GP_FN_ASRC2_LOCK 0x1B
  33. #define ARIZONA_GP_FN_ASRC_CONFIG_ERROR 0x1C
  34. #define ARIZONA_GP_FN_DRC1_SIGNAL_DETECT 0x1D
  35. #define ARIZONA_GP_FN_DRC1_ANTICLIP 0x1E
  36. #define ARIZONA_GP_FN_DRC1_DECAY 0x1F
  37. #define ARIZONA_GP_FN_DRC1_NOISE 0x20
  38. #define ARIZONA_GP_FN_DRC1_QUICK_RELEASE 0x21
  39. #define ARIZONA_GP_FN_DRC2_SIGNAL_DETECT 0x22
  40. #define ARIZONA_GP_FN_DRC2_ANTICLIP 0x23
  41. #define ARIZONA_GP_FN_DRC2_DECAY 0x24
  42. #define ARIZONA_GP_FN_DRC2_NOISE 0x25
  43. #define ARIZONA_GP_FN_DRC2_QUICK_RELEASE 0x26
  44. #define ARIZONA_GP_FN_MIXER_DROPPED_SAMPLE 0x27
  45. #define ARIZONA_GP_FN_AIF1_CONFIG_ERROR 0x28
  46. #define ARIZONA_GP_FN_AIF2_CONFIG_ERROR 0x29
  47. #define ARIZONA_GP_FN_AIF3_CONFIG_ERROR 0x2A
  48. #define ARIZONA_GP_FN_SPK_TEMP_SHUTDOWN 0x2B
  49. #define ARIZONA_GP_FN_SPK_TEMP_WARNING 0x2C
  50. #define ARIZONA_GP_FN_UNDERCLOCKED 0x2D
  51. #define ARIZONA_GP_FN_OVERCLOCKED 0x2E
  52. #define ARIZONA_GP_FN_DSP_IRQ1 0x35
  53. #define ARIZONA_GP_FN_DSP_IRQ2 0x36
  54. #define ARIZONA_GP_FN_ASYNC_OPCLK 0x3D
  55. #define ARIZONA_GP_FN_BOOT_DONE 0x44
  56. #define ARIZONA_GP_FN_DSP1_RAM_READY 0x45
  57. #define ARIZONA_GP_FN_SYSCLK_ENA_STATUS 0x4B
  58. #define ARIZONA_GP_FN_ASYNCCLK_ENA_STATUS 0x4C
  59. /* GPIO Configuration Bits */
  60. #define ARIZONA_GPN_DIR 0x8000
  61. #define ARIZONA_GPN_PU 0x4000
  62. #define ARIZONA_GPN_PD 0x2000
  63. #define ARIZONA_GPN_LVL 0x0800
  64. #define ARIZONA_GPN_POL 0x0400
  65. #define ARIZONA_GPN_OP_CFG 0x0200
  66. #define ARIZONA_GPN_DB 0x0100
  67. /* Provide some defines for the most common configs */
  68. #define ARIZONA_GP_DEFAULT 0xffffffff
  69. #define ARIZONA_GP_OUTPUT (ARIZONA_GP_FN_GPIO)
  70. #define ARIZONA_GP_INPUT (ARIZONA_GP_FN_GPIO | \
  71. ARIZONA_GPN_DIR)
  72. #define ARIZONA_32KZ_MCLK1 1
  73. #define ARIZONA_32KZ_MCLK2 2
  74. #define ARIZONA_32KZ_NONE 3
  75. #define ARIZONA_DMIC_MICVDD 0
  76. #define ARIZONA_DMIC_MICBIAS1 1
  77. #define ARIZONA_DMIC_MICBIAS2 2
  78. #define ARIZONA_DMIC_MICBIAS3 3
  79. #define ARIZONA_INMODE_DIFF 0
  80. #define ARIZONA_INMODE_SE 1
  81. #define ARIZONA_INMODE_DMIC 2
  82. #define ARIZONA_MICD_TIME_CONTINUOUS 0
  83. #define ARIZONA_MICD_TIME_250US 1
  84. #define ARIZONA_MICD_TIME_500US 2
  85. #define ARIZONA_MICD_TIME_1MS 3
  86. #define ARIZONA_MICD_TIME_2MS 4
  87. #define ARIZONA_MICD_TIME_4MS 5
  88. #define ARIZONA_MICD_TIME_8MS 6
  89. #define ARIZONA_MICD_TIME_16MS 7
  90. #define ARIZONA_MICD_TIME_32MS 8
  91. #define ARIZONA_MICD_TIME_64MS 9
  92. #define ARIZONA_MICD_TIME_128MS 10
  93. #define ARIZONA_MICD_TIME_256MS 11
  94. #define ARIZONA_MICD_TIME_512MS 12
  95. #define ARIZONA_ACCDET_MODE_MIC 0
  96. #define ARIZONA_ACCDET_MODE_HPL 1
  97. #define ARIZONA_ACCDET_MODE_HPR 2
  98. #define ARIZONA_ACCDET_MODE_HPM 4
  99. #define ARIZONA_ACCDET_MODE_ADC 7
  100. #define ARIZONA_GPSW_OPEN 0
  101. #define ARIZONA_GPSW_CLOSED 1
  102. #define ARIZONA_GPSW_CLAMP_ENABLED 2
  103. #define ARIZONA_GPSW_CLAMP_DISABLED 3
  104. #endif