qcom,pmic-mpp.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * This header provides constants for the Qualcomm PMIC's
  4. * Multi-Purpose Pin binding.
  5. */
  6. #ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_MPP_H
  7. #define _DT_BINDINGS_PINCTRL_QCOM_PMIC_MPP_H
  8. /* power-source */
  9. /* Digital Input/Output: level [PM8058] */
  10. #define PM8058_MPP_VPH 0
  11. #define PM8058_MPP_S3 1
  12. #define PM8058_MPP_L2 2
  13. #define PM8058_MPP_L3 3
  14. /* Digital Input/Output: level [PM8901] */
  15. #define PM8901_MPP_MSMIO 0
  16. #define PM8901_MPP_DIG 1
  17. #define PM8901_MPP_L5 2
  18. #define PM8901_MPP_S4 3
  19. #define PM8901_MPP_VPH 4
  20. /* Digital Input/Output: level [PM8921] */
  21. #define PM8921_MPP_S4 1
  22. #define PM8921_MPP_L15 3
  23. #define PM8921_MPP_L17 4
  24. #define PM8921_MPP_VPH 7
  25. /* Digital Input/Output: level [PM8821] */
  26. #define PM8821_MPP_1P8 0
  27. #define PM8821_MPP_VPH 7
  28. /* Digital Input/Output: level [PM8018] */
  29. #define PM8018_MPP_L4 0
  30. #define PM8018_MPP_L14 1
  31. #define PM8018_MPP_S3 2
  32. #define PM8018_MPP_L6 3
  33. #define PM8018_MPP_L2 4
  34. #define PM8018_MPP_L5 5
  35. #define PM8018_MPP_VPH 7
  36. /* Digital Input/Output: level [PM8038] */
  37. #define PM8038_MPP_L20 0
  38. #define PM8038_MPP_L11 1
  39. #define PM8038_MPP_L5 2
  40. #define PM8038_MPP_L15 3
  41. #define PM8038_MPP_L17 4
  42. #define PM8038_MPP_VPH 7
  43. #define PM8841_MPP_VPH 0
  44. #define PM8841_MPP_S3 2
  45. #define PM8916_MPP_VPH 0
  46. #define PM8916_MPP_L2 2
  47. #define PM8916_MPP_L5 3
  48. #define PM8941_MPP_VPH 0
  49. #define PM8941_MPP_L1 1
  50. #define PM8941_MPP_S3 2
  51. #define PM8941_MPP_L6 3
  52. #define PMA8084_MPP_VPH 0
  53. #define PMA8084_MPP_L1 1
  54. #define PMA8084_MPP_S4 2
  55. #define PMA8084_MPP_L6 3
  56. #define PM8994_MPP_VPH 0
  57. /* Only supported for MPP_05-MPP_08 */
  58. #define PM8994_MPP_L19 1
  59. #define PM8994_MPP_S4 2
  60. #define PM8994_MPP_L12 3
  61. /*
  62. * Analog Input - Set the source for analog input.
  63. * To be used with "qcom,amux-route" property
  64. */
  65. #define PMIC_MPP_AMUX_ROUTE_CH5 0
  66. #define PMIC_MPP_AMUX_ROUTE_CH6 1
  67. #define PMIC_MPP_AMUX_ROUTE_CH7 2
  68. #define PMIC_MPP_AMUX_ROUTE_CH8 3
  69. #define PMIC_MPP_AMUX_ROUTE_ABUS1 4
  70. #define PMIC_MPP_AMUX_ROUTE_ABUS2 5
  71. #define PMIC_MPP_AMUX_ROUTE_ABUS3 6
  72. #define PMIC_MPP_AMUX_ROUTE_ABUS4 7
  73. /* Analog Output: level */
  74. #define PMIC_MPP_AOUT_LVL_1V25 0
  75. #define PMIC_MPP_AOUT_LVL_1V25_2 1
  76. #define PMIC_MPP_AOUT_LVL_0V625 2
  77. #define PMIC_MPP_AOUT_LVL_0V3125 3
  78. #define PMIC_MPP_AOUT_LVL_MPP 4
  79. #define PMIC_MPP_AOUT_LVL_ABUS1 5
  80. #define PMIC_MPP_AOUT_LVL_ABUS2 6
  81. #define PMIC_MPP_AOUT_LVL_ABUS3 7
  82. /* To be used with "function" */
  83. #define PMIC_MPP_FUNC_NORMAL "normal"
  84. #define PMIC_MPP_FUNC_PAIRED "paired"
  85. #define PMIC_MPP_FUNC_DTEST1 "dtest1"
  86. #define PMIC_MPP_FUNC_DTEST2 "dtest2"
  87. #define PMIC_MPP_FUNC_DTEST3 "dtest3"
  88. #define PMIC_MPP_FUNC_DTEST4 "dtest4"
  89. #endif