qcom,pmic-gpio.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*
  2. * This header provides constants for the Qualcomm PMIC GPIO binding.
  3. */
  4. #ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H
  5. #define _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H
  6. #define PMIC_GPIO_PULL_UP_30 0
  7. #define PMIC_GPIO_PULL_UP_1P5 1
  8. #define PMIC_GPIO_PULL_UP_31P5 2
  9. #define PMIC_GPIO_PULL_UP_1P5_30 3
  10. #define PMIC_GPIO_STRENGTH_NO 0
  11. #define PMIC_GPIO_STRENGTH_HIGH 1
  12. #define PMIC_GPIO_STRENGTH_MED 2
  13. #define PMIC_GPIO_STRENGTH_LOW 3
  14. /*
  15. * Note: PM8018 GPIO3 and GPIO4 are supporting
  16. * only S3 and L2 options (1.8V)
  17. */
  18. #define PM8018_GPIO_L6 0
  19. #define PM8018_GPIO_L5 1
  20. #define PM8018_GPIO_S3 2
  21. #define PM8018_GPIO_L14 3
  22. #define PM8018_GPIO_L2 4
  23. #define PM8018_GPIO_L4 5
  24. #define PM8018_GPIO_VDD 6
  25. /*
  26. * Note: PM8038 GPIO7 and GPIO8 are supporting
  27. * only L11 and L4 options (1.8V)
  28. */
  29. #define PM8038_GPIO_VPH 0
  30. #define PM8038_GPIO_BB 1
  31. #define PM8038_GPIO_L11 2
  32. #define PM8038_GPIO_L15 3
  33. #define PM8038_GPIO_L4 4
  34. #define PM8038_GPIO_L3 5
  35. #define PM8038_GPIO_L17 6
  36. #define PM8058_GPIO_VPH 0
  37. #define PM8058_GPIO_BB 1
  38. #define PM8058_GPIO_S3 2
  39. #define PM8058_GPIO_L3 3
  40. #define PM8058_GPIO_L7 4
  41. #define PM8058_GPIO_L6 5
  42. #define PM8058_GPIO_L5 6
  43. #define PM8058_GPIO_L2 7
  44. /*
  45. * Note: PM8916 GPIO1 and GPIO2 are supporting
  46. * only L2(1.15V) and L5(1.8V) options
  47. */
  48. #define PM8916_GPIO_VPH 0
  49. #define PM8916_GPIO_L2 2
  50. #define PM8916_GPIO_L5 3
  51. #define PM8917_GPIO_VPH 0
  52. #define PM8917_GPIO_S4 2
  53. #define PM8917_GPIO_L15 3
  54. #define PM8917_GPIO_L4 4
  55. #define PM8917_GPIO_L3 5
  56. #define PM8917_GPIO_L17 6
  57. #define PM8921_GPIO_VPH 0
  58. #define PM8921_GPIO_BB 1
  59. #define PM8921_GPIO_S4 2
  60. #define PM8921_GPIO_L15 3
  61. #define PM8921_GPIO_L4 4
  62. #define PM8921_GPIO_L3 5
  63. #define PM8921_GPIO_L17 6
  64. /*
  65. * Note: PM8941 gpios from 15 to 18 are supporting
  66. * only S3 and L6 options (1.8V)
  67. */
  68. #define PM8941_GPIO_VPH 0
  69. #define PM8941_GPIO_L1 1
  70. #define PM8941_GPIO_S3 2
  71. #define PM8941_GPIO_L6 3
  72. /*
  73. * Note: PMA8084 gpios from 15 to 18 are supporting
  74. * only S4 and L6 options (1.8V)
  75. */
  76. #define PMA8084_GPIO_VPH 0
  77. #define PMA8084_GPIO_L1 1
  78. #define PMA8084_GPIO_S4 2
  79. #define PMA8084_GPIO_L6 3
  80. /* To be used with "function" */
  81. #define PMIC_GPIO_FUNC_NORMAL "normal"
  82. #define PMIC_GPIO_FUNC_PAIRED "paired"
  83. #define PMIC_GPIO_FUNC_FUNC1 "func1"
  84. #define PMIC_GPIO_FUNC_FUNC2 "func2"
  85. #define PMIC_GPIO_FUNC_DTEST1 "dtest1"
  86. #define PMIC_GPIO_FUNC_DTEST2 "dtest2"
  87. #define PMIC_GPIO_FUNC_DTEST3 "dtest3"
  88. #define PMIC_GPIO_FUNC_DTEST4 "dtest4"
  89. #define PM8038_GPIO1_2_LPG_DRV PMIC_GPIO_FUNC_FUNC1
  90. #define PM8038_GPIO3_5V_BOOST_EN PMIC_GPIO_FUNC_FUNC1
  91. #define PM8038_GPIO4_SSBI_ALT_CLK PMIC_GPIO_FUNC_FUNC1
  92. #define PM8038_GPIO5_6_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
  93. #define PM8038_GPIO10_11_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
  94. #define PM8038_GPIO6_7_CLK PMIC_GPIO_FUNC_FUNC1
  95. #define PM8038_GPIO9_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
  96. #define PM8038_GPIO6_12_KYPD_DRV PMIC_GPIO_FUNC_FUNC2
  97. #define PM8058_GPIO7_8_MP3_CLK PMIC_GPIO_FUNC_FUNC1
  98. #define PM8058_GPIO7_8_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC2
  99. #define PM8058_GPIO9_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1
  100. #define PM8058_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2
  101. #define PM8058_GPIO24_26_LPG_DRV PMIC_GPIO_FUNC_FUNC2
  102. #define PM8058_GPIO33_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1
  103. #define PM8058_GPIO34_35_MP3_CLK PMIC_GPIO_FUNC_FUNC1
  104. #define PM8058_GPIO36_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1
  105. #define PM8058_GPIO37_UPL_OUT PMIC_GPIO_FUNC_FUNC1
  106. #define PM8058_GPIO37_UART_M_RX PMIC_GPIO_FUNC_FUNC2
  107. #define PM8058_GPIO38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1
  108. #define PM8058_GPIO38_39_CLK_32KHZ PMIC_GPIO_FUNC_FUNC2
  109. #define PM8058_GPIO39_MP3_CLK PMIC_GPIO_FUNC_FUNC1
  110. #define PM8058_GPIO40_EXT_BB_EN PMIC_GPIO_FUNC_FUNC1
  111. #define PM8916_GPIO1_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
  112. #define PM8916_GPIO1_KEYP_DRV PMIC_GPIO_FUNC_FUNC2
  113. #define PM8916_GPIO2_DIV_CLK PMIC_GPIO_FUNC_FUNC1
  114. #define PM8916_GPIO2_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2
  115. #define PM8916_GPIO3_KEYP_DRV PMIC_GPIO_FUNC_FUNC1
  116. #define PM8916_GPIO4_KEYP_DRV PMIC_GPIO_FUNC_FUNC2
  117. #define PM8917_GPIO9_18_KEYP_DRV PMIC_GPIO_FUNC_FUNC1
  118. #define PM8917_GPIO20_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
  119. #define PM8917_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2
  120. #define PM8917_GPIO25_26_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
  121. #define PM8917_GPIO37_38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1
  122. #define PM8917_GPIO37_38_MP3_CLK PMIC_GPIO_FUNC_FUNC2
  123. #define PM8941_GPIO9_14_KYPD_DRV PMIC_GPIO_FUNC_FUNC1
  124. #define PM8941_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1
  125. #define PM8941_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2
  126. #define PM8941_GPIO23_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1
  127. #define PM8941_GPIO23_26_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2
  128. #define PM8941_GPIO31_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
  129. #define PM8941_GPIO33_36_LPG_DRV_3D PMIC_GPIO_FUNC_FUNC1
  130. #define PM8941_GPIO33_36_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2
  131. #define PMA8084_GPIO4_5_LPG_DRV PMIC_GPIO_FUNC_FUNC1
  132. #define PMA8084_GPIO7_10_LPG_DRV PMIC_GPIO_FUNC_FUNC1
  133. #define PMA8084_GPIO5_14_KEYP_DRV PMIC_GPIO_FUNC_FUNC2
  134. #define PMA8084_GPIO19_21_KEYP_DRV PMIC_GPIO_FUNC_FUNC2
  135. #define PMA8084_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1
  136. #define PMA8084_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2
  137. #define PMA8084_GPIO22_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
  138. #endif