mt6362.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2019 MediaTek Inc.
  4. */
  5. #ifndef __DT_BINDINGS_MT6362_H__
  6. #define __DT_BINDINGS_MT6362_H__
  7. /* ADC Channel definition */
  8. #define MT6362_ADCCH_CHGVINDIV5 (0)
  9. #define MT6362_ADCCH_VSYS (1)
  10. #define MT6362_ADCCH_VBAT (2)
  11. #define MT6362_ADCCH_IBUS (3)
  12. #define MT6362_ADCCH_IBAT (4)
  13. #define MT6362_ADCCH_RESV5 (5)
  14. #define MT6362_ADCCH_TEMPJC (6)
  15. #define MT6362_ADCCH_VREFTS (7)
  16. #define MT6362_ADCCH_TS (8)
  17. #define MT6362_ADCCH_PDVBUSDIV10 (9)
  18. #define MT6362_ADCCH_PDCC1DIV4 (10)
  19. #define MT6362_ADCCH_PDCC2DIV4 (11)
  20. #define MT6362_ADCCH_PDSBU1DIV4 (12)
  21. #define MT6362_ADCCH_PDSBU2DIV4 (13)
  22. #define MT6362_ADCCH_ZCV (14)
  23. /* Regulator MODE definitions */
  24. #define MT6362_REGULATOR_MODE_LP (0)
  25. #define MT6362_REGULATOR_MODE_NORMAL (1)
  26. /* IRQ definitions */
  27. /* 0 ~ 7 */
  28. #define MT6362_FL_PWR_RDY (0)
  29. #define MT6362_FL_DETACH (1)
  30. #define MT6362_FL_RECHG (2)
  31. #define MT6362_FL_CHG_DONE (3)
  32. #define MT6362_FL_FL_BK_CHG (4)
  33. #define MT6362_FL_IEOC (5)
  34. #define MT6362_FL_CHG_RDY (6)
  35. #define MT6362_FL_VBUS_GD (7)
  36. /* 8 ~ 15 */
  37. #define MT6362_FL_VBUS_OV (8)
  38. #define MT6362_FL_CHG_BATOV (9)
  39. #define MT6362_FL_CHG_SYSOV (10)
  40. #define MT6362_FL_CHG_TOUT (11)
  41. #define MT6362_FL_CHG_BUSUV (12)
  42. #define MT6362_FL_CHG_THREG (13)
  43. #define MT6362_FL_CHG_AICR (14)
  44. #define MT6362_FL_CHG_MIVR (15)
  45. /* 16 ~ 23 */
  46. #define MT6362_FL_SYS_SHORT (16)
  47. #define MT6362_FL_SYS_MIN (17)
  48. #define MT6362_FL_AICC_DONE (18)
  49. #define MT6362_FL_PE_DONE (19)
  50. #define MT6362_PP_PGB_EVT (21)
  51. #define MT6362_FT_DIG_THR (22)
  52. #define MT6362_FL_WDT (23)
  53. /* 24 ~ 31 */
  54. #define MT6362_FL_OTG_FAULT (24)
  55. #define MT6362_FL_OTG_BAT_LBP (25)
  56. #define MT6362_FL_OTG_CC (26)
  57. #define MT6362_FL_BC12_HVDCP (30)
  58. #define MT6362_FL_BC12_DN (31)
  59. /* 32 ~ 39 */
  60. #define MT6362_INT_CHRDET_UV (32)
  61. #define MT6362_INT_CHRDET_OV (33)
  62. #define MT6362_INT_CHRDET_EXT (34)
  63. /* 40 ~ 47 */
  64. #define MT6362_ADC_DONEI (44)
  65. /* 48 ~ 55 */
  66. #define MT6362_FLED_STRBPIN_EVT (48)
  67. #define MT6362_FLED_TORPIN_EVT (49)
  68. #define MT6362_FLED_TX_EVT (50)
  69. #define MT6362_FLED_LVF_EVT (51)
  70. #define MT6362_FLED_LBP_EVT (52)
  71. #define MT6362_FLED_CHGVINOVP_EVT (53)
  72. #define MT6362_FLED2_SHORT_EVT (54)
  73. #define MT6362_FLED1_SHORT_EVT (55)
  74. /* 56 ~ 63 */
  75. #define MT6362_FLED2_STRB_EVT (56)
  76. #define MT6362_FLED1_STRB_EVT (57)
  77. #define MT6362_FLED2_STRB_TO_EVT (58)
  78. #define MT6362_FLED1_STRB_TO_EVT (59)
  79. #define MT6362_FLED2_TOR_EVT (60)
  80. #define MT6362_FLED1_TOR_EVT (61)
  81. /* 64 ~ 71 */
  82. #define MT6362_APWDTRST_EVT (65)
  83. #define MT6362_EN_EVT (66)
  84. #define MT6362_QONB_RST_EVT (67)
  85. #define MT6362_MRSTB_EVT (68)
  86. #define MT6362_VDDAOV_EVT (70)
  87. #define MT6362_SYSUV_EVT (71)
  88. /* 72 ~ 79 */
  89. #define MT6362_OTP0_EVT (72)
  90. #define MT6362_OTP1_EVT (73)
  91. #define MT6362_OTP2_EVT (74)
  92. #define MT6362_OTP3_EVT (75)
  93. #define MT6362_OTP4_EVT (76)
  94. #define MT6362_OTP5_EVT (77)
  95. /* 80 ~ 87 */
  96. #define MT6362_BUCK1_OC_SDN_EVT (81)
  97. #define MT6362_BUCK2_OC_SDN_EVT (82)
  98. #define MT6362_BUCK3_OC_SDN_EVT (83)
  99. #define MT6362_BUCK4_OC_SDN_EVT (84)
  100. #define MT6362_BUCK5_OC_SDN_EVT (85)
  101. #define MT6362_BUCK6_OC_SDN_EVT (86)
  102. /* 88 ~ 95 */
  103. #define MT6362_BUCK1_PGB_EVT (89)
  104. #define MT6362_BUCK2_PGB_EVT (90)
  105. #define MT6362_BUCK3_PGB_EVT (91)
  106. #define MT6362_BUCK4_PGB_EVT (92)
  107. #define MT6362_BUCK5_PGB_EVT (93)
  108. #define MT6362_BUCK6_PGB_EVT (94)
  109. /* 96 ~ 103 */
  110. #define MT6362_LDO1_OC_EVT (97)
  111. #define MT6362_LDO2_OC_EVT (98)
  112. #define MT6362_LDO3_OC_EVT (99)
  113. #define MT6362_LDO4_OC_EVT (100)
  114. #define MT6362_LDO5_OC_EVT (101)
  115. #define MT6362_LDO6_OC_EVT (102)
  116. #define MT6362_LDO7_OC_EVT (103)
  117. /* 104 ~ 111 */
  118. #define MT6362_VDIG18_PGB_EVT (104)
  119. #define MT6362_LDO1_PGB_EVT (105)
  120. #define MT6362_LDO2_PGB_EVT (106)
  121. #define MT6362_LDO3_PGB_EVT (107)
  122. #define MT6362_LDO4_PGB_EVT (108)
  123. #define MT6362_LDO5_PGB_EVT (109)
  124. #define MT6362_LDO6_PGB_EVT (110)
  125. #define MT6362_LDO7_PGB_EVT (111)
  126. /* 112 ~ 119 */
  127. #define MT6362_USBID_EVT (112)
  128. /* 120 ~ 127 */
  129. #define MT6362_PD_EVT (120)
  130. #endif /* __DT_BINDINGS_MT6362_H__ */