18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* Copyright (C) 2020 ROHM Semiconductors */ 38c2ecf20Sopenharmony_ci#ifndef BD99954_CHARGER_H 48c2ecf20Sopenharmony_ci#define BD99954_CHARGER_H 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#include <linux/regmap.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#define BD9995X_MANUFACTURER "Rohm Semiconductor" 98c2ecf20Sopenharmony_ci#define BD9995X_IRQ_PIN "bd9995x_irq" 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define BD9995X_VSYS_PRECHARGE_OFFSET_MV 200 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#define BD99954_ID 0x346 148c2ecf20Sopenharmony_ci#define BD99955_ID 0x221 158c2ecf20Sopenharmony_ci#define BD99956_ID 0x331 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* Battery Charger Commands */ 188c2ecf20Sopenharmony_ci#define CHARGING_CURRENT 0x14 198c2ecf20Sopenharmony_ci#define CHARGING_VOLTAGE 0x15 208c2ecf20Sopenharmony_ci#define PROTECT_SET 0x3E 218c2ecf20Sopenharmony_ci#define MAP_SET 0x3F 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci/* Extended commands */ 248c2ecf20Sopenharmony_ci#define CHGSTM_STATUS 0x100 258c2ecf20Sopenharmony_ci#define VBAT_VSYS_STATUS 0x101 268c2ecf20Sopenharmony_ci#define VBUS_VCC_STATUS 0x102 278c2ecf20Sopenharmony_ci#define CHGOP_STATUS 0x103 288c2ecf20Sopenharmony_ci#define WDT_STATUS 0x104 298c2ecf20Sopenharmony_ci#define CUR_ILIM_VAL 0x105 308c2ecf20Sopenharmony_ci#define SEL_ILIM_VAL 0x106 318c2ecf20Sopenharmony_ci#define IBUS_LIM_SET 0x107 328c2ecf20Sopenharmony_ci#define ICC_LIM_SET 0x108 338c2ecf20Sopenharmony_ci#define IOTG_LIM_SET 0x109 348c2ecf20Sopenharmony_ci#define VIN_CTRL_SET 0x10A 358c2ecf20Sopenharmony_ci#define CHGOP_SET1 0x10B 368c2ecf20Sopenharmony_ci#define CHGOP_SET2 0x10C 378c2ecf20Sopenharmony_ci#define VBUSCLPS_TH_SET 0x10D 388c2ecf20Sopenharmony_ci#define VCCCLPS_TH_SET 0x10E 398c2ecf20Sopenharmony_ci#define CHGWDT_SET 0x10F 408c2ecf20Sopenharmony_ci#define BATTWDT_SET 0x110 418c2ecf20Sopenharmony_ci#define VSYSREG_SET 0x111 428c2ecf20Sopenharmony_ci#define VSYSVAL_THH_SET 0x112 438c2ecf20Sopenharmony_ci#define VSYSVAL_THL_SET 0x113 448c2ecf20Sopenharmony_ci#define ITRICH_SET 0x114 458c2ecf20Sopenharmony_ci#define IPRECH_SET 0x115 468c2ecf20Sopenharmony_ci#define ICHG_SET 0x116 478c2ecf20Sopenharmony_ci#define ITERM_SET 0x117 488c2ecf20Sopenharmony_ci#define VPRECHG_TH_SET 0x118 498c2ecf20Sopenharmony_ci#define VRBOOST_SET 0x119 508c2ecf20Sopenharmony_ci#define VFASTCHG_REG_SET1 0x11A 518c2ecf20Sopenharmony_ci#define VFASTCHG_REG_SET2 0x11B 528c2ecf20Sopenharmony_ci#define VFASTCHG_REG_SET3 0x11C 538c2ecf20Sopenharmony_ci#define VRECHG_SET 0x11D 548c2ecf20Sopenharmony_ci#define VBATOVP_SET 0x11E 558c2ecf20Sopenharmony_ci#define IBATSHORT_SET 0x11F 568c2ecf20Sopenharmony_ci#define PROCHOT_CTRL_SET 0x120 578c2ecf20Sopenharmony_ci#define PROCHOT_ICRIT_SET 0x121 588c2ecf20Sopenharmony_ci#define PROCHOT_INORM_SET 0x122 598c2ecf20Sopenharmony_ci#define PROCHOT_IDCHG_SET 0x123 608c2ecf20Sopenharmony_ci#define PROCHOT_VSYS_SET 0x124 618c2ecf20Sopenharmony_ci#define PMON_IOUT_CTRL_SET 0x125 628c2ecf20Sopenharmony_ci#define PMON_DACIN_VAL 0x126 638c2ecf20Sopenharmony_ci#define IOUT_DACIN_VAL 0x127 648c2ecf20Sopenharmony_ci#define VCC_UCD_SET 0x128 658c2ecf20Sopenharmony_ci#define VCC_UCD_STATUS 0x129 668c2ecf20Sopenharmony_ci#define VCC_IDD_STATUS 0x12A 678c2ecf20Sopenharmony_ci#define VCC_UCD_FCTRL_SET 0x12B 688c2ecf20Sopenharmony_ci#define VCC_UCD_FCTRL_EN 0x12C 698c2ecf20Sopenharmony_ci#define VBUS_UCD_SET 0x130 708c2ecf20Sopenharmony_ci#define VBUS_UCD_STATUS 0x131 718c2ecf20Sopenharmony_ci#define VBUS_IDD_STATUS 0x132 728c2ecf20Sopenharmony_ci#define VBUS_UCD_FCTRL_SET 0x133 738c2ecf20Sopenharmony_ci#define VBUS_UCD_FCTRL_EN 0x134 748c2ecf20Sopenharmony_ci#define CHIP_ID 0x138 758c2ecf20Sopenharmony_ci#define CHIP_REV 0x139 768c2ecf20Sopenharmony_ci#define IC_SET1 0x13A 778c2ecf20Sopenharmony_ci#define IC_SET2 0x13B 788c2ecf20Sopenharmony_ci#define SYSTEM_STATUS 0x13C 798c2ecf20Sopenharmony_ci#define SYSTEM_CTRL_SET 0x13D 808c2ecf20Sopenharmony_ci#define VM_CTRL_SET 0x140 818c2ecf20Sopenharmony_ci#define THERM_WINDOW_SET1 0x141 828c2ecf20Sopenharmony_ci#define THERM_WINDOW_SET2 0x142 838c2ecf20Sopenharmony_ci#define THERM_WINDOW_SET3 0x143 848c2ecf20Sopenharmony_ci#define THERM_WINDOW_SET4 0x144 858c2ecf20Sopenharmony_ci#define THERM_WINDOW_SET5 0x145 868c2ecf20Sopenharmony_ci#define IBATP_TH_SET 0x146 878c2ecf20Sopenharmony_ci#define IBATM_TH_SET 0x147 888c2ecf20Sopenharmony_ci#define VBAT_TH_SET 0x148 898c2ecf20Sopenharmony_ci#define THERM_TH_SET 0x149 908c2ecf20Sopenharmony_ci#define IACP_TH_SET 0x14A 918c2ecf20Sopenharmony_ci#define VACP_TH_SET 0x14B 928c2ecf20Sopenharmony_ci#define VBUS_TH_SET 0x14C 938c2ecf20Sopenharmony_ci#define VCC_TH_SET 0x14D 948c2ecf20Sopenharmony_ci#define VSYS_TH_SET 0x14E 958c2ecf20Sopenharmony_ci#define EXTIADP_TH_SET 0x14F 968c2ecf20Sopenharmony_ci#define IBATP_VAL 0x150 978c2ecf20Sopenharmony_ci#define IBATP_AVE_VAL 0x151 988c2ecf20Sopenharmony_ci#define IBATM_VAL 0x152 998c2ecf20Sopenharmony_ci#define IBATM_AVE_VAL 0x153 1008c2ecf20Sopenharmony_ci#define VBAT_VAL 0x154 1018c2ecf20Sopenharmony_ci#define VBAT_AVE_VAL 0x155 1028c2ecf20Sopenharmony_ci#define THERM_VAL 0x156 1038c2ecf20Sopenharmony_ci#define VTH_VAL 0x157 1048c2ecf20Sopenharmony_ci#define IACP_VAL 0x158 1058c2ecf20Sopenharmony_ci#define IACP_AVE_VAL 0x159 1068c2ecf20Sopenharmony_ci#define VACP_VAL 0x15A 1078c2ecf20Sopenharmony_ci#define VACP_AVE_VAL 0x15B 1088c2ecf20Sopenharmony_ci#define VBUS_VAL 0x15C 1098c2ecf20Sopenharmony_ci#define VBUS_AVE_VAL 0x15D 1108c2ecf20Sopenharmony_ci#define VCC_VAL 0x15E 1118c2ecf20Sopenharmony_ci#define VCC_AVE_VAL 0x15F 1128c2ecf20Sopenharmony_ci#define VSYS_VAL 0x160 1138c2ecf20Sopenharmony_ci#define VSYS_AVE_VAL 0x161 1148c2ecf20Sopenharmony_ci#define EXTIADP_VAL 0x162 1158c2ecf20Sopenharmony_ci#define EXTIADP_AVE_VAL 0x163 1168c2ecf20Sopenharmony_ci#define VACPCLPS_TH_SET 0x164 1178c2ecf20Sopenharmony_ci#define INT0_SET 0x168 1188c2ecf20Sopenharmony_ci#define INT1_SET 0x169 1198c2ecf20Sopenharmony_ci#define INT2_SET 0x16A 1208c2ecf20Sopenharmony_ci#define INT3_SET 0x16B 1218c2ecf20Sopenharmony_ci#define INT4_SET 0x16C 1228c2ecf20Sopenharmony_ci#define INT5_SET 0x16D 1238c2ecf20Sopenharmony_ci#define INT6_SET 0x16E 1248c2ecf20Sopenharmony_ci#define INT7_SET 0x16F 1258c2ecf20Sopenharmony_ci#define INT0_STATUS 0x170 1268c2ecf20Sopenharmony_ci#define INT1_STATUS 0x171 1278c2ecf20Sopenharmony_ci#define INT2_STATUS 0x172 1288c2ecf20Sopenharmony_ci#define INT3_STATUS 0x173 1298c2ecf20Sopenharmony_ci#define INT4_STATUS 0x174 1308c2ecf20Sopenharmony_ci#define INT5_STATUS 0x175 1318c2ecf20Sopenharmony_ci#define INT6_STATUS 0x176 1328c2ecf20Sopenharmony_ci#define INT7_STATUS 0x177 1338c2ecf20Sopenharmony_ci#define OTPREG0 0x17A 1348c2ecf20Sopenharmony_ci#define OTPREG1 0x17B 1358c2ecf20Sopenharmony_ci#define SMBREG 0x17C 1368c2ecf20Sopenharmony_ci#define DEBUG_MODE_SET 0x17F 1378c2ecf20Sopenharmony_ci#define DEBUG0x14 0x214 1388c2ecf20Sopenharmony_ci#define DEBUG0x1A 0x21A 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_cienum bd9995x_fields { 1418c2ecf20Sopenharmony_ci F_PREV_CHGSTM_STATE, F_CHGSTM_STATE, 1428c2ecf20Sopenharmony_ci F_VBAT_VSYS_STATUS, 1438c2ecf20Sopenharmony_ci F_VBUS_VCC_STATUS, 1448c2ecf20Sopenharmony_ci F_BATTEMP, F_VRECHG_DET, F_RBOOST_UV, F_RBOOSTS, 1458c2ecf20Sopenharmony_ci F_THERMWDT_VAL, F_CHGWDT_VAL, 1468c2ecf20Sopenharmony_ci F_CUR_ILIM_VAL, 1478c2ecf20Sopenharmony_ci F_SEL_ILIM_VAL, 1488c2ecf20Sopenharmony_ci F_IBUS_LIM_SET, 1498c2ecf20Sopenharmony_ci F_ICC_LIM_SET, 1508c2ecf20Sopenharmony_ci F_IOTG_LIM_SET, 1518c2ecf20Sopenharmony_ci F_OTG_BOTH_EN, 1528c2ecf20Sopenharmony_ci F_VRBOOST_TRIG, 1538c2ecf20Sopenharmony_ci F_VRBOOST_EN, 1548c2ecf20Sopenharmony_ci F_PP_BOTH_THRU, 1558c2ecf20Sopenharmony_ci F_VIN_ORD, 1568c2ecf20Sopenharmony_ci F_VBUS_EN, 1578c2ecf20Sopenharmony_ci F_VCC_EN, 1588c2ecf20Sopenharmony_ci F_VSYS_PRIORITY, 1598c2ecf20Sopenharmony_ci F_PPC_SUB_CAP, 1608c2ecf20Sopenharmony_ci F_PPC_CAP, 1618c2ecf20Sopenharmony_ci F_DCP_2500_SEL, 1628c2ecf20Sopenharmony_ci F_SDP_500_SEL, 1638c2ecf20Sopenharmony_ci F_ILIM_AUTO_DISEN, 1648c2ecf20Sopenharmony_ci F_VCC_BC_DISEN, 1658c2ecf20Sopenharmony_ci F_VBUS_BC_DISEN, 1668c2ecf20Sopenharmony_ci F_SDP_CHG_TRIG_EN, 1678c2ecf20Sopenharmony_ci F_SDP_CHG_TRIG, 1688c2ecf20Sopenharmony_ci F_AUTO_TOF, 1698c2ecf20Sopenharmony_ci F_AUTO_FST, 1708c2ecf20Sopenharmony_ci F_AUTO_RECH, 1718c2ecf20Sopenharmony_ci F_ILIM_RESET_EN, 1728c2ecf20Sopenharmony_ci F_DCDC_1MS_SEL, 1738c2ecf20Sopenharmony_ci F_SEL_ILIM_DIV, 1748c2ecf20Sopenharmony_ci F_BATT_LEARN, 1758c2ecf20Sopenharmony_ci F_CHG_EN, 1768c2ecf20Sopenharmony_ci F_USB_SUS, 1778c2ecf20Sopenharmony_ci F_CHOP_SS_INIT, 1788c2ecf20Sopenharmony_ci F_CHOP_ALL_INIT, 1798c2ecf20Sopenharmony_ci F_DCDC_CLK_SEL, 1808c2ecf20Sopenharmony_ci F_CHOP_SS, 1818c2ecf20Sopenharmony_ci F_CHOP_ALL, 1828c2ecf20Sopenharmony_ci F_VBUSCLPS_TH_SET, 1838c2ecf20Sopenharmony_ci F_VCCCLPS_TH_SET, 1848c2ecf20Sopenharmony_ci F_WDT_FST, 1858c2ecf20Sopenharmony_ci F_WDT_PRE, 1868c2ecf20Sopenharmony_ci F_WDT_IBAT_SHORT, 1878c2ecf20Sopenharmony_ci F_WDT_THERM, 1888c2ecf20Sopenharmony_ci F_VSYSREG_SET, 1898c2ecf20Sopenharmony_ci F_VSYSVAL_THH_SET, 1908c2ecf20Sopenharmony_ci F_VSYSVAL_THL_SET, 1918c2ecf20Sopenharmony_ci F_ITRICH_SET, 1928c2ecf20Sopenharmony_ci F_IPRECH_SET, 1938c2ecf20Sopenharmony_ci F_ICHG_SET, 1948c2ecf20Sopenharmony_ci F_ITERM_SET, 1958c2ecf20Sopenharmony_ci F_VPRECHG_TH_SET, 1968c2ecf20Sopenharmony_ci F_VRBOOST_SET, 1978c2ecf20Sopenharmony_ci F_VFASTCHG_REG_SET1, 1988c2ecf20Sopenharmony_ci F_VFASTCHG_REG_SET2, 1998c2ecf20Sopenharmony_ci F_VFASTCHG_REG_SET3, 2008c2ecf20Sopenharmony_ci F_VRECHG_SET, 2018c2ecf20Sopenharmony_ci F_VBATOVP_SET, 2028c2ecf20Sopenharmony_ci F_IBATM_SHORT_SET, 2038c2ecf20Sopenharmony_ci F_PROCHOT_DG_SET, 2048c2ecf20Sopenharmony_ci F_PROCHOT_ICRIT_DG_SET, 2058c2ecf20Sopenharmony_ci F_PROCHOT_IDCHG_DG_SET, 2068c2ecf20Sopenharmony_ci F_PROCHOT_EN, 2078c2ecf20Sopenharmony_ci F_PROCHOT_ICRIT_SET, 2088c2ecf20Sopenharmony_ci F_PROCHOT_INORM_SET, 2098c2ecf20Sopenharmony_ci F_PROCHOT_IDCHG_SET, 2108c2ecf20Sopenharmony_ci F_PROCHOT_VSYS_SET, 2118c2ecf20Sopenharmony_ci F_IMON_INSEL, 2128c2ecf20Sopenharmony_ci F_PMON_INSEL, 2138c2ecf20Sopenharmony_ci F_IOUT_OUT_EN, 2148c2ecf20Sopenharmony_ci F_IOUT_SOURCE_SEL, 2158c2ecf20Sopenharmony_ci F_IOUT_GAIN_SET, 2168c2ecf20Sopenharmony_ci F_PMON_OUT_EN, 2178c2ecf20Sopenharmony_ci F_PMON_GAIN_SET, 2188c2ecf20Sopenharmony_ci F_PMON_DACIN_VAL, 2198c2ecf20Sopenharmony_ci F_IOUT_DACIN_VAL, 2208c2ecf20Sopenharmony_ci F_VCC_BCSRETRY, 2218c2ecf20Sopenharmony_ci F_VCC_ADCRTRY, 2228c2ecf20Sopenharmony_ci F_VCC_USBDETEN, 2238c2ecf20Sopenharmony_ci F_VCC_IDRDETEN, 2248c2ecf20Sopenharmony_ci F_VCC_ENUMRDY, 2258c2ecf20Sopenharmony_ci F_VCC_ADCPOLEN, 2268c2ecf20Sopenharmony_ci F_VCC_DCDMODE, 2278c2ecf20Sopenharmony_ci F_VCC_USB_SW_EN, 2288c2ecf20Sopenharmony_ci F_VCC_USB_SW, 2298c2ecf20Sopenharmony_ci F_VCC_DCDFAIL, 2308c2ecf20Sopenharmony_ci F_VCC_CHGPORT, 2318c2ecf20Sopenharmony_ci F_VCC_PUPDET, 2328c2ecf20Sopenharmony_ci F_VCC_VBUS_VLD, 2338c2ecf20Sopenharmony_ci F_VCC_CHGDET, 2348c2ecf20Sopenharmony_ci F_VCC_OTGDET, 2358c2ecf20Sopenharmony_ci F_VCC_VBINOP, 2368c2ecf20Sopenharmony_ci F_VCC_EXTID, 2378c2ecf20Sopenharmony_ci F_VCC_IDRDET, 2388c2ecf20Sopenharmony_ci F_VCC_INDO, 2398c2ecf20Sopenharmony_ci F_VCC_UCDSWEN, 2408c2ecf20Sopenharmony_ci F_VCC_RREF_EN, 2418c2ecf20Sopenharmony_ci F_VCC_DPPU_EN, 2428c2ecf20Sopenharmony_ci F_VCC_DPREF_EN, 2438c2ecf20Sopenharmony_ci F_VCC_DMREF_EN, 2448c2ecf20Sopenharmony_ci F_VCC_DPDET_EN, 2458c2ecf20Sopenharmony_ci F_VCC_DMDET_EN, 2468c2ecf20Sopenharmony_ci F_VCC_DPSINK_EN, 2478c2ecf20Sopenharmony_ci F_VCC_DMSINK_EN, 2488c2ecf20Sopenharmony_ci F_VCC_DP_BUFF_EN, 2498c2ecf20Sopenharmony_ci F_VCC_DM_BUFF_EN, 2508c2ecf20Sopenharmony_ci F_VCC_EXTCLKENBL, 2518c2ecf20Sopenharmony_ci F_VCC_PLSTESTEN, 2528c2ecf20Sopenharmony_ci F_VCC_UCDSWEN_TSTENB, 2538c2ecf20Sopenharmony_ci F_VCC_RREF_EN_TSTENB, 2548c2ecf20Sopenharmony_ci F_VCC_DPPU_EN_TSTENB, 2558c2ecf20Sopenharmony_ci F_VCC_DPREF_EN_TSTENB, 2568c2ecf20Sopenharmony_ci F_VCC_DMREF_EN_TSTENB, 2578c2ecf20Sopenharmony_ci F_VCC_DPDET_EN_TSTENB, 2588c2ecf20Sopenharmony_ci F_VCC_DMDET_EN_TSTENB, 2598c2ecf20Sopenharmony_ci F_VCC_DPSINK_EN_TSTENB, 2608c2ecf20Sopenharmony_ci F_VCC_DMSINK_EN_TSTENB, 2618c2ecf20Sopenharmony_ci F_VCC_DP_BUFF_EN_TSTENB, 2628c2ecf20Sopenharmony_ci F_VCC_DM_BUFF_EN_TSTENB, 2638c2ecf20Sopenharmony_ci F_VBUS_BCSRETRY, 2648c2ecf20Sopenharmony_ci F_VBUS_ADCRTRY, 2658c2ecf20Sopenharmony_ci F_VBUS_USBDETEN, 2668c2ecf20Sopenharmony_ci F_VBUS_IDRDETEN, 2678c2ecf20Sopenharmony_ci F_VBUS_ENUMRDY, 2688c2ecf20Sopenharmony_ci F_VBUS_ADCPOLEN, 2698c2ecf20Sopenharmony_ci F_VBUS_DCDMODE, 2708c2ecf20Sopenharmony_ci F_VBUS_USB_SW_EN, 2718c2ecf20Sopenharmony_ci F_VBUS_USB_SW, 2728c2ecf20Sopenharmony_ci F_VBUS_DCDFAIL, 2738c2ecf20Sopenharmony_ci F_VBUS_CHGPORT, 2748c2ecf20Sopenharmony_ci F_VBUS_PUPDET, 2758c2ecf20Sopenharmony_ci F_VBUS_VBUS_VLD, 2768c2ecf20Sopenharmony_ci F_VBUS_CHGDET, 2778c2ecf20Sopenharmony_ci F_VBUS_OTGDET, 2788c2ecf20Sopenharmony_ci F_VBUS_VBINOP, 2798c2ecf20Sopenharmony_ci F_VBUS_EXTID, 2808c2ecf20Sopenharmony_ci F_VBUS_IDRDET, 2818c2ecf20Sopenharmony_ci F_VBUS_INDO, 2828c2ecf20Sopenharmony_ci F_VBUS_UCDSWEN, 2838c2ecf20Sopenharmony_ci F_VBUS_RREF_EN, 2848c2ecf20Sopenharmony_ci F_VBUS_DPPU_EN, 2858c2ecf20Sopenharmony_ci F_VBUS_DPREF_EN, 2868c2ecf20Sopenharmony_ci F_VBUS_DMREF_EN, 2878c2ecf20Sopenharmony_ci F_VBUS_DPDET_EN, 2888c2ecf20Sopenharmony_ci F_VBUS_DMDET_EN, 2898c2ecf20Sopenharmony_ci F_VBUS_DPSINK_EN, 2908c2ecf20Sopenharmony_ci F_VBUS_DMSINK_EN, 2918c2ecf20Sopenharmony_ci F_VBUS_DP_BUFF_EN, 2928c2ecf20Sopenharmony_ci F_VBUS_DM_BUFF_EN, 2938c2ecf20Sopenharmony_ci F_VBUS_EXTCLKENBL, 2948c2ecf20Sopenharmony_ci F_VBUS_PLSTESTEN, 2958c2ecf20Sopenharmony_ci F_VBUS_UCDSWEN_TSTENB, 2968c2ecf20Sopenharmony_ci F_VBUS_RREF_EN_TSTENB, 2978c2ecf20Sopenharmony_ci F_VBUS_DPPU_EN_TSTENB, 2988c2ecf20Sopenharmony_ci F_VBUS_DPREF_EN_TSTENB, 2998c2ecf20Sopenharmony_ci F_VBUS_DMREF_EN_TSTENB, 3008c2ecf20Sopenharmony_ci F_VBUS_DPDET_EN_TSTENB, 3018c2ecf20Sopenharmony_ci F_VBUS_DMDET_EN_TSTENB, 3028c2ecf20Sopenharmony_ci F_VBUS_DPSINK_EN_TSTENB, 3038c2ecf20Sopenharmony_ci F_VBUS_DMSINK_EN_TSTENB, 3048c2ecf20Sopenharmony_ci F_VBUS_DP_BUFF_EN_TSTENB, 3058c2ecf20Sopenharmony_ci F_VBUS_DM_BUFF_EN_TSTENB, 3068c2ecf20Sopenharmony_ci F_CHIP_ID, 3078c2ecf20Sopenharmony_ci F_CHIP_REV, 3088c2ecf20Sopenharmony_ci F_ONE_CELL_MODE, 3098c2ecf20Sopenharmony_ci F_cell, 3108c2ecf20Sopenharmony_ci F_VACP_AUTO_DISCHG, 3118c2ecf20Sopenharmony_ci F_VACP_LOAD, 3128c2ecf20Sopenharmony_ci F_ACOK_POL, 3138c2ecf20Sopenharmony_ci F_ACOK_DISEN, 3148c2ecf20Sopenharmony_ci F_DEBUG_SET1, 3158c2ecf20Sopenharmony_ci F_DEBUG_SET0, 3168c2ecf20Sopenharmony_ci F_MONRST_STATE, 3178c2ecf20Sopenharmony_ci F_ALMRST_STATE, 3188c2ecf20Sopenharmony_ci F_CHGRST_STATE, 3198c2ecf20Sopenharmony_ci F_OTPLD_STATE, 3208c2ecf20Sopenharmony_ci F_ALLRST_STATE, 3218c2ecf20Sopenharmony_ci F_PROTECT_SET, 3228c2ecf20Sopenharmony_ci F_MAP_SET, 3238c2ecf20Sopenharmony_ci F_ADCINTERVAL, 3248c2ecf20Sopenharmony_ci F_ADCMOD, 3258c2ecf20Sopenharmony_ci F_ADCTMOD, 3268c2ecf20Sopenharmony_ci F_EXTIADPEN, 3278c2ecf20Sopenharmony_ci F_VSYSENB, 3288c2ecf20Sopenharmony_ci F_VCCENB, 3298c2ecf20Sopenharmony_ci F_VBUSENB, 3308c2ecf20Sopenharmony_ci F_VACPENB, 3318c2ecf20Sopenharmony_ci F_IACPENB, 3328c2ecf20Sopenharmony_ci F_THERMENB, 3338c2ecf20Sopenharmony_ci F_VBATENB, 3348c2ecf20Sopenharmony_ci F_IBATMENB, 3358c2ecf20Sopenharmony_ci F_IBATPENB, 3368c2ecf20Sopenharmony_ci F_TMPTHR1B, 3378c2ecf20Sopenharmony_ci F_TMPTHR1A, 3388c2ecf20Sopenharmony_ci F_TMPTHR2B, 3398c2ecf20Sopenharmony_ci F_TMPTHR2A, 3408c2ecf20Sopenharmony_ci F_TMPTHR3B, 3418c2ecf20Sopenharmony_ci F_TMPTHR3A, 3428c2ecf20Sopenharmony_ci F_TMPTHR4B, 3438c2ecf20Sopenharmony_ci F_TMPTHR4A, 3448c2ecf20Sopenharmony_ci F_TMPTHR5B, 3458c2ecf20Sopenharmony_ci F_TMPTHR5A, 3468c2ecf20Sopenharmony_ci F_IBATP_TH_SET, 3478c2ecf20Sopenharmony_ci F_IBATM_TH_SET, 3488c2ecf20Sopenharmony_ci F_VBAT_TH_SET, 3498c2ecf20Sopenharmony_ci F_THERM_TH_SET, 3508c2ecf20Sopenharmony_ci F_IACP_TH_SET, 3518c2ecf20Sopenharmony_ci F_VACP_TH_SET, 3528c2ecf20Sopenharmony_ci F_VBUS_TH_SET, 3538c2ecf20Sopenharmony_ci F_VCC_TH_SET, 3548c2ecf20Sopenharmony_ci F_VSYS_TH_SET, 3558c2ecf20Sopenharmony_ci F_EXTIADP_TH_SET, 3568c2ecf20Sopenharmony_ci F_IBATP_VAL, 3578c2ecf20Sopenharmony_ci F_IBATP_AVE_VAL, 3588c2ecf20Sopenharmony_ci F_IBATM_VAL, 3598c2ecf20Sopenharmony_ci F_IBATM_AVE_VAL, 3608c2ecf20Sopenharmony_ci F_VBAT_VAL, 3618c2ecf20Sopenharmony_ci F_VBAT_AVE_VAL, 3628c2ecf20Sopenharmony_ci F_THERM_VAL, 3638c2ecf20Sopenharmony_ci F_VTH_VAL, 3648c2ecf20Sopenharmony_ci F_IACP_VAL, 3658c2ecf20Sopenharmony_ci F_IACP_AVE_VAL, 3668c2ecf20Sopenharmony_ci F_VACP_VAL, 3678c2ecf20Sopenharmony_ci F_VACP_AVE_VAL, 3688c2ecf20Sopenharmony_ci F_VBUS_VAL, 3698c2ecf20Sopenharmony_ci F_VBUS_AVE_VAL, 3708c2ecf20Sopenharmony_ci F_VCC_VAL, 3718c2ecf20Sopenharmony_ci F_VCC_AVE_VAL, 3728c2ecf20Sopenharmony_ci F_VSYS_VAL, 3738c2ecf20Sopenharmony_ci F_VSYS_AVE_VAL, 3748c2ecf20Sopenharmony_ci F_EXTIADP_VAL, 3758c2ecf20Sopenharmony_ci F_EXTIADP_AVE_VAL, 3768c2ecf20Sopenharmony_ci F_VACPCLPS_TH_SET, 3778c2ecf20Sopenharmony_ci F_INT7_SET, 3788c2ecf20Sopenharmony_ci F_INT6_SET, 3798c2ecf20Sopenharmony_ci F_INT5_SET, 3808c2ecf20Sopenharmony_ci F_INT4_SET, 3818c2ecf20Sopenharmony_ci F_INT3_SET, 3828c2ecf20Sopenharmony_ci F_INT2_SET, 3838c2ecf20Sopenharmony_ci F_INT1_SET, 3848c2ecf20Sopenharmony_ci F_INT0_SET, 3858c2ecf20Sopenharmony_ci F_VBUS_RBUV_DET, 3868c2ecf20Sopenharmony_ci F_VBUS_RBUV_RES, 3878c2ecf20Sopenharmony_ci F_VBUS_TH_DET, 3888c2ecf20Sopenharmony_ci F_VBUS_TH_RES, 3898c2ecf20Sopenharmony_ci F_VBUS_IIN_MOD, 3908c2ecf20Sopenharmony_ci F_VBUS_OV_DET, 3918c2ecf20Sopenharmony_ci F_VBUS_OV_RES, 3928c2ecf20Sopenharmony_ci F_VBUS_CLPS_DET, 3938c2ecf20Sopenharmony_ci F_VBUS_CLPS, 3948c2ecf20Sopenharmony_ci F_VBUS_DET, 3958c2ecf20Sopenharmony_ci F_VBUS_RES, 3968c2ecf20Sopenharmony_ci F_VCC_RBUV_DET, 3978c2ecf20Sopenharmony_ci F_VCC_RBUV_RES, 3988c2ecf20Sopenharmony_ci F_VCC_TH_DET, 3998c2ecf20Sopenharmony_ci F_VCC_TH_RES, 4008c2ecf20Sopenharmony_ci F_VCC_IIN_MOD, 4018c2ecf20Sopenharmony_ci F_VCC_OVP_DET, 4028c2ecf20Sopenharmony_ci F_VCC_OVP_RES, 4038c2ecf20Sopenharmony_ci F_VCC_CLPS_DET, 4048c2ecf20Sopenharmony_ci F_VCC_CLPS_RES, 4058c2ecf20Sopenharmony_ci F_VCC_DET, 4068c2ecf20Sopenharmony_ci F_VCC_RES, 4078c2ecf20Sopenharmony_ci F_TH_DET, 4088c2ecf20Sopenharmony_ci F_TH_RMV, 4098c2ecf20Sopenharmony_ci F_TMP_OUT_DET, 4108c2ecf20Sopenharmony_ci F_TMP_OUT_RES, 4118c2ecf20Sopenharmony_ci F_VBAT_TH_DET, 4128c2ecf20Sopenharmony_ci F_VBAT_TH_RES, 4138c2ecf20Sopenharmony_ci F_IBAT_SHORT_DET, 4148c2ecf20Sopenharmony_ci F_IBAT_SHORT_RES, 4158c2ecf20Sopenharmony_ci F_VBAT_OV_DET, 4168c2ecf20Sopenharmony_ci F_VBAT_OV_RES, 4178c2ecf20Sopenharmony_ci F_BAT_ASSIST_DET, 4188c2ecf20Sopenharmony_ci F_BAT_ASSIST_RES, 4198c2ecf20Sopenharmony_ci F_VSYS_TH_DET, 4208c2ecf20Sopenharmony_ci F_VSYS_TH_RES, 4218c2ecf20Sopenharmony_ci F_VSYS_OV_DET, 4228c2ecf20Sopenharmony_ci F_VSYS_OV_RES, 4238c2ecf20Sopenharmony_ci F_VSYS_SHT_DET, 4248c2ecf20Sopenharmony_ci F_VSYS_SHT_RES, 4258c2ecf20Sopenharmony_ci F_VSYS_UV_DET, 4268c2ecf20Sopenharmony_ci F_VSYS_UV_RES, 4278c2ecf20Sopenharmony_ci F_OTP_LOAD_DONE, 4288c2ecf20Sopenharmony_ci F_PWR_ON, 4298c2ecf20Sopenharmony_ci F_EXTIADP_TRNS, 4308c2ecf20Sopenharmony_ci F_EXTIADP_TH_DET, 4318c2ecf20Sopenharmony_ci F_EXIADP_TH_RES, 4328c2ecf20Sopenharmony_ci F_BAT_MNT_DET, 4338c2ecf20Sopenharmony_ci F_BAT_MNT_RES, 4348c2ecf20Sopenharmony_ci F_TSD_DET, 4358c2ecf20Sopenharmony_ci F_TSD_RES, 4368c2ecf20Sopenharmony_ci F_CHGWDT_EXP, 4378c2ecf20Sopenharmony_ci F_THERMWDT_EXP, 4388c2ecf20Sopenharmony_ci F_TMP_TRNS, 4398c2ecf20Sopenharmony_ci F_CHG_TRNS, 4408c2ecf20Sopenharmony_ci F_VBUS_UCD_PORT_DET, 4418c2ecf20Sopenharmony_ci F_VBUS_UCD_UCHG_DET, 4428c2ecf20Sopenharmony_ci F_VBUS_UCD_URID_RMV, 4438c2ecf20Sopenharmony_ci F_VBUS_UCD_OTG_DET, 4448c2ecf20Sopenharmony_ci F_VBUS_UCD_URID_MOD, 4458c2ecf20Sopenharmony_ci F_VCC_UCD_PORT_DET, 4468c2ecf20Sopenharmony_ci F_VCC_UCD_UCHG_DET, 4478c2ecf20Sopenharmony_ci F_VCC_UCD_URID_RMV, 4488c2ecf20Sopenharmony_ci F_VCC_UCD_OTG_DET, 4498c2ecf20Sopenharmony_ci F_VCC_UCD_URID_MOD, 4508c2ecf20Sopenharmony_ci F_PROCHOT_DET, 4518c2ecf20Sopenharmony_ci F_PROCHOT_RES, 4528c2ecf20Sopenharmony_ci F_VACP_DET, 4538c2ecf20Sopenharmony_ci F_VACP_RES, 4548c2ecf20Sopenharmony_ci F_VACP_TH_DET, 4558c2ecf20Sopenharmony_ci F_VACP_TH_RES, 4568c2ecf20Sopenharmony_ci F_IACP_TH_DET, 4578c2ecf20Sopenharmony_ci F_IACP_THE_RES, 4588c2ecf20Sopenharmony_ci F_THERM_TH_DET, 4598c2ecf20Sopenharmony_ci F_THERM_TH_RES, 4608c2ecf20Sopenharmony_ci F_IBATM_TH_DET, 4618c2ecf20Sopenharmony_ci F_IBATM_TH_RES, 4628c2ecf20Sopenharmony_ci F_IBATP_TH_DET, 4638c2ecf20Sopenharmony_ci F_IBATP_TH_RES, 4648c2ecf20Sopenharmony_ci F_INT7_STATUS, 4658c2ecf20Sopenharmony_ci F_INT6_STATUS, 4668c2ecf20Sopenharmony_ci F_INT5_STATUS, 4678c2ecf20Sopenharmony_ci F_INT4_STATUS, 4688c2ecf20Sopenharmony_ci F_INT3_STATUS, 4698c2ecf20Sopenharmony_ci F_INT2_STATUS, 4708c2ecf20Sopenharmony_ci F_INT1_STATUS, 4718c2ecf20Sopenharmony_ci F_INT0_STATUS, 4728c2ecf20Sopenharmony_ci F_ILIM_DECREASE, 4738c2ecf20Sopenharmony_ci F_RESERVE_OTPREG1, 4748c2ecf20Sopenharmony_ci F_POWER_SAVE_MODE, 4758c2ecf20Sopenharmony_ci F_DEBUG_MODE_SET, 4768c2ecf20Sopenharmony_ci F_DEBUG0x14, 4778c2ecf20Sopenharmony_ci F_DEBUG0x1A, 4788c2ecf20Sopenharmony_ci F_MAX_FIELDS 4798c2ecf20Sopenharmony_ci}; 4808c2ecf20Sopenharmony_ci 4818c2ecf20Sopenharmony_cistatic const struct reg_field bd9995x_reg_fields[] = { 4828c2ecf20Sopenharmony_ci [F_PREV_CHGSTM_STATE] = REG_FIELD(CHGSTM_STATUS, 8, 14), 4838c2ecf20Sopenharmony_ci [F_CHGSTM_STATE] = REG_FIELD(CHGSTM_STATUS, 0, 6), 4848c2ecf20Sopenharmony_ci [F_VBAT_VSYS_STATUS] = REG_FIELD(VBAT_VSYS_STATUS, 0, 15), 4858c2ecf20Sopenharmony_ci [F_VBUS_VCC_STATUS] = REG_FIELD(VBUS_VCC_STATUS, 0, 12), 4868c2ecf20Sopenharmony_ci [F_BATTEMP] = REG_FIELD(CHGOP_STATUS, 8, 10), 4878c2ecf20Sopenharmony_ci [F_VRECHG_DET] = REG_FIELD(CHGOP_STATUS, 6, 6), 4888c2ecf20Sopenharmony_ci [F_RBOOST_UV] = REG_FIELD(CHGOP_STATUS, 1, 1), 4898c2ecf20Sopenharmony_ci [F_RBOOSTS] = REG_FIELD(CHGOP_STATUS, 0, 0), 4908c2ecf20Sopenharmony_ci [F_THERMWDT_VAL] = REG_FIELD(WDT_STATUS, 8, 15), 4918c2ecf20Sopenharmony_ci [F_CHGWDT_VAL] = REG_FIELD(WDT_STATUS, 0, 7), 4928c2ecf20Sopenharmony_ci [F_CUR_ILIM_VAL] = REG_FIELD(CUR_ILIM_VAL, 0, 13), 4938c2ecf20Sopenharmony_ci [F_SEL_ILIM_VAL] = REG_FIELD(SEL_ILIM_VAL, 0, 13), 4948c2ecf20Sopenharmony_ci [F_IBUS_LIM_SET] = REG_FIELD(IBUS_LIM_SET, 5, 13), 4958c2ecf20Sopenharmony_ci [F_ICC_LIM_SET] = REG_FIELD(ICC_LIM_SET, 5, 13), 4968c2ecf20Sopenharmony_ci [F_IOTG_LIM_SET] = REG_FIELD(IOTG_LIM_SET, 5, 13), 4978c2ecf20Sopenharmony_ci [F_OTG_BOTH_EN] = REG_FIELD(VIN_CTRL_SET, 15, 15), 4988c2ecf20Sopenharmony_ci [F_VRBOOST_TRIG] = REG_FIELD(VIN_CTRL_SET, 14, 14), 4998c2ecf20Sopenharmony_ci [F_VRBOOST_EN] = REG_FIELD(VIN_CTRL_SET, 12, 13), 5008c2ecf20Sopenharmony_ci [F_PP_BOTH_THRU] = REG_FIELD(VIN_CTRL_SET, 11, 11), 5018c2ecf20Sopenharmony_ci [F_VIN_ORD] = REG_FIELD(VIN_CTRL_SET, 7, 7), 5028c2ecf20Sopenharmony_ci [F_VBUS_EN] = REG_FIELD(VIN_CTRL_SET, 6, 6), 5038c2ecf20Sopenharmony_ci [F_VCC_EN] = REG_FIELD(VIN_CTRL_SET, 5, 5), 5048c2ecf20Sopenharmony_ci [F_VSYS_PRIORITY] = REG_FIELD(VIN_CTRL_SET, 4, 4), 5058c2ecf20Sopenharmony_ci [F_PPC_SUB_CAP] = REG_FIELD(VIN_CTRL_SET, 2, 3), 5068c2ecf20Sopenharmony_ci [F_PPC_CAP] = REG_FIELD(VIN_CTRL_SET, 0, 1), 5078c2ecf20Sopenharmony_ci [F_DCP_2500_SEL] = REG_FIELD(CHGOP_SET1, 15, 15), 5088c2ecf20Sopenharmony_ci [F_SDP_500_SEL] = REG_FIELD(CHGOP_SET1, 14, 14), 5098c2ecf20Sopenharmony_ci [F_ILIM_AUTO_DISEN] = REG_FIELD(CHGOP_SET1, 13, 13), 5108c2ecf20Sopenharmony_ci [F_VCC_BC_DISEN] = REG_FIELD(CHGOP_SET1, 11, 11), 5118c2ecf20Sopenharmony_ci [F_VBUS_BC_DISEN] = REG_FIELD(CHGOP_SET1, 10, 10), 5128c2ecf20Sopenharmony_ci [F_SDP_CHG_TRIG_EN] = REG_FIELD(CHGOP_SET1, 9, 9), 5138c2ecf20Sopenharmony_ci [F_SDP_CHG_TRIG] = REG_FIELD(CHGOP_SET1, 8, 8), 5148c2ecf20Sopenharmony_ci [F_AUTO_TOF] = REG_FIELD(CHGOP_SET1, 6, 6), 5158c2ecf20Sopenharmony_ci [F_AUTO_FST] = REG_FIELD(CHGOP_SET1, 5, 5), 5168c2ecf20Sopenharmony_ci [F_AUTO_RECH] = REG_FIELD(CHGOP_SET1, 3, 3), 5178c2ecf20Sopenharmony_ci [F_ILIM_RESET_EN] = REG_FIELD(CHGOP_SET2, 14, 14), 5188c2ecf20Sopenharmony_ci [F_DCDC_1MS_SEL] = REG_FIELD(CHGOP_SET2, 12, 13), 5198c2ecf20Sopenharmony_ci [F_SEL_ILIM_DIV] = REG_FIELD(CHGOP_SET2, 10, 10), 5208c2ecf20Sopenharmony_ci [F_BATT_LEARN] = REG_FIELD(CHGOP_SET2, 8, 8), 5218c2ecf20Sopenharmony_ci [F_CHG_EN] = REG_FIELD(CHGOP_SET2, 7, 7), 5228c2ecf20Sopenharmony_ci [F_USB_SUS] = REG_FIELD(CHGOP_SET2, 6, 6), 5238c2ecf20Sopenharmony_ci [F_CHOP_SS_INIT] = REG_FIELD(CHGOP_SET2, 5, 5), 5248c2ecf20Sopenharmony_ci [F_CHOP_ALL_INIT] = REG_FIELD(CHGOP_SET2, 4, 4), 5258c2ecf20Sopenharmony_ci [F_DCDC_CLK_SEL] = REG_FIELD(CHGOP_SET2, 2, 3), 5268c2ecf20Sopenharmony_ci [F_CHOP_SS] = REG_FIELD(CHGOP_SET2, 1, 1), 5278c2ecf20Sopenharmony_ci [F_CHOP_ALL] = REG_FIELD(CHGOP_SET2, 0, 0), 5288c2ecf20Sopenharmony_ci [F_VBUSCLPS_TH_SET] = REG_FIELD(VBUSCLPS_TH_SET, 7, 14), 5298c2ecf20Sopenharmony_ci [F_VCCCLPS_TH_SET] = REG_FIELD(VCCCLPS_TH_SET, 7, 14), 5308c2ecf20Sopenharmony_ci [F_WDT_FST] = REG_FIELD(CHGWDT_SET, 8, 15), 5318c2ecf20Sopenharmony_ci [F_WDT_PRE] = REG_FIELD(CHGWDT_SET, 0, 7), 5328c2ecf20Sopenharmony_ci [F_WDT_IBAT_SHORT] = REG_FIELD(BATTWDT_SET, 8, 15), 5338c2ecf20Sopenharmony_ci [F_WDT_THERM] = REG_FIELD(BATTWDT_SET, 0, 7), 5348c2ecf20Sopenharmony_ci [F_VSYSREG_SET] = REG_FIELD(VSYSREG_SET, 6, 14), 5358c2ecf20Sopenharmony_ci [F_VSYSVAL_THH_SET] = REG_FIELD(VSYSVAL_THH_SET, 6, 14), 5368c2ecf20Sopenharmony_ci [F_VSYSVAL_THL_SET] = REG_FIELD(VSYSVAL_THL_SET, 6, 14), 5378c2ecf20Sopenharmony_ci [F_ITRICH_SET] = REG_FIELD(ITRICH_SET, 6, 10), 5388c2ecf20Sopenharmony_ci [F_IPRECH_SET] = REG_FIELD(IPRECH_SET, 6, 10), 5398c2ecf20Sopenharmony_ci [F_ICHG_SET] = REG_FIELD(ICHG_SET, 6, 13), 5408c2ecf20Sopenharmony_ci [F_ITERM_SET] = REG_FIELD(ITERM_SET, 6, 10), 5418c2ecf20Sopenharmony_ci [F_VPRECHG_TH_SET] = REG_FIELD(VPRECHG_TH_SET, 6, 14), 5428c2ecf20Sopenharmony_ci [F_VRBOOST_SET] = REG_FIELD(VRBOOST_SET, 6, 14), 5438c2ecf20Sopenharmony_ci [F_VFASTCHG_REG_SET1] = REG_FIELD(VFASTCHG_REG_SET1, 4, 14), 5448c2ecf20Sopenharmony_ci [F_VFASTCHG_REG_SET2] = REG_FIELD(VFASTCHG_REG_SET2, 4, 14), 5458c2ecf20Sopenharmony_ci [F_VFASTCHG_REG_SET3] = REG_FIELD(VFASTCHG_REG_SET3, 4, 14), 5468c2ecf20Sopenharmony_ci [F_VRECHG_SET] = REG_FIELD(VRECHG_SET, 4, 14), 5478c2ecf20Sopenharmony_ci [F_VBATOVP_SET] = REG_FIELD(VBATOVP_SET, 4, 14), 5488c2ecf20Sopenharmony_ci [F_IBATM_SHORT_SET] = REG_FIELD(IBATSHORT_SET, 0, 14), 5498c2ecf20Sopenharmony_ci [F_PROCHOT_DG_SET] = REG_FIELD(PROCHOT_CTRL_SET, 14, 15), 5508c2ecf20Sopenharmony_ci [F_PROCHOT_ICRIT_DG_SET] = REG_FIELD(PROCHOT_CTRL_SET, 10, 11), 5518c2ecf20Sopenharmony_ci [F_PROCHOT_IDCHG_DG_SET] = REG_FIELD(PROCHOT_CTRL_SET, 8, 9), 5528c2ecf20Sopenharmony_ci [F_PROCHOT_EN] = REG_FIELD(PROCHOT_CTRL_SET, 0, 4), 5538c2ecf20Sopenharmony_ci [F_PROCHOT_ICRIT_SET] = REG_FIELD(PROCHOT_ICRIT_SET, 0, 14), 5548c2ecf20Sopenharmony_ci [F_PROCHOT_INORM_SET] = REG_FIELD(PROCHOT_INORM_SET, 0, 14), 5558c2ecf20Sopenharmony_ci [F_PROCHOT_IDCHG_SET] = REG_FIELD(PROCHOT_IDCHG_SET, 0, 14), 5568c2ecf20Sopenharmony_ci [F_PROCHOT_VSYS_SET] = REG_FIELD(PROCHOT_VSYS_SET, 0, 14), 5578c2ecf20Sopenharmony_ci [F_IMON_INSEL] = REG_FIELD(PMON_IOUT_CTRL_SET, 9, 9), 5588c2ecf20Sopenharmony_ci [F_PMON_INSEL] = REG_FIELD(PMON_IOUT_CTRL_SET, 8, 8), 5598c2ecf20Sopenharmony_ci [F_IOUT_OUT_EN] = REG_FIELD(PMON_IOUT_CTRL_SET, 7, 7), 5608c2ecf20Sopenharmony_ci [F_IOUT_SOURCE_SEL] = REG_FIELD(PMON_IOUT_CTRL_SET, 6, 6), 5618c2ecf20Sopenharmony_ci [F_IOUT_GAIN_SET] = REG_FIELD(PMON_IOUT_CTRL_SET, 4, 5), 5628c2ecf20Sopenharmony_ci [F_PMON_OUT_EN] = REG_FIELD(PMON_IOUT_CTRL_SET, 3, 3), 5638c2ecf20Sopenharmony_ci [F_PMON_GAIN_SET] = REG_FIELD(PMON_IOUT_CTRL_SET, 0, 2), 5648c2ecf20Sopenharmony_ci [F_PMON_DACIN_VAL] = REG_FIELD(PMON_DACIN_VAL, 0, 9), 5658c2ecf20Sopenharmony_ci [F_IOUT_DACIN_VAL] = REG_FIELD(IOUT_DACIN_VAL, 0, 11), 5668c2ecf20Sopenharmony_ci [F_VCC_BCSRETRY] = REG_FIELD(VCC_UCD_SET, 12, 12), 5678c2ecf20Sopenharmony_ci [F_VCC_ADCRTRY] = REG_FIELD(VCC_UCD_SET, 8, 8), 5688c2ecf20Sopenharmony_ci [F_VCC_USBDETEN] = REG_FIELD(VCC_UCD_SET, 7, 7), 5698c2ecf20Sopenharmony_ci [F_VCC_IDRDETEN] = REG_FIELD(VCC_UCD_SET, 6, 6), 5708c2ecf20Sopenharmony_ci [F_VCC_ENUMRDY] = REG_FIELD(VCC_UCD_SET, 5, 5), 5718c2ecf20Sopenharmony_ci [F_VCC_ADCPOLEN] = REG_FIELD(VCC_UCD_SET, 4, 4), 5728c2ecf20Sopenharmony_ci [F_VCC_DCDMODE] = REG_FIELD(VCC_UCD_SET, 3, 3), 5738c2ecf20Sopenharmony_ci [F_VCC_USB_SW_EN] = REG_FIELD(VCC_UCD_SET, 1, 1), 5748c2ecf20Sopenharmony_ci [F_VCC_USB_SW] = REG_FIELD(VCC_UCD_SET, 0, 0), 5758c2ecf20Sopenharmony_ci [F_VCC_DCDFAIL] = REG_FIELD(VCC_UCD_STATUS, 15, 15), 5768c2ecf20Sopenharmony_ci [F_VCC_CHGPORT] = REG_FIELD(VCC_UCD_STATUS, 12, 13), 5778c2ecf20Sopenharmony_ci [F_VCC_PUPDET] = REG_FIELD(VCC_UCD_STATUS, 11, 11), 5788c2ecf20Sopenharmony_ci [F_VCC_VBUS_VLD] = REG_FIELD(VCC_UCD_STATUS, 7, 7), 5798c2ecf20Sopenharmony_ci [F_VCC_CHGDET] = REG_FIELD(VCC_UCD_STATUS, 6, 6), 5808c2ecf20Sopenharmony_ci [F_VCC_OTGDET] = REG_FIELD(VCC_UCD_STATUS, 3, 3), 5818c2ecf20Sopenharmony_ci [F_VCC_VBINOP] = REG_FIELD(VCC_IDD_STATUS, 6, 6), 5828c2ecf20Sopenharmony_ci [F_VCC_EXTID] = REG_FIELD(VCC_IDD_STATUS, 5, 5), 5838c2ecf20Sopenharmony_ci [F_VCC_IDRDET] = REG_FIELD(VCC_IDD_STATUS, 4, 4), 5848c2ecf20Sopenharmony_ci [F_VCC_INDO] = REG_FIELD(VCC_IDD_STATUS, 0, 3), 5858c2ecf20Sopenharmony_ci [F_VCC_UCDSWEN] = REG_FIELD(VCC_UCD_FCTRL_SET, 10, 10), 5868c2ecf20Sopenharmony_ci [F_VCC_RREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 9, 9), 5878c2ecf20Sopenharmony_ci [F_VCC_DPPU_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 8, 8), 5888c2ecf20Sopenharmony_ci [F_VCC_DPREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 7, 7), 5898c2ecf20Sopenharmony_ci [F_VCC_DMREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 6, 6), 5908c2ecf20Sopenharmony_ci [F_VCC_DPDET_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 5, 5), 5918c2ecf20Sopenharmony_ci [F_VCC_DMDET_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 4, 4), 5928c2ecf20Sopenharmony_ci [F_VCC_DPSINK_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 3, 3), 5938c2ecf20Sopenharmony_ci [F_VCC_DMSINK_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 2, 2), 5948c2ecf20Sopenharmony_ci [F_VCC_DP_BUFF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 1, 1), 5958c2ecf20Sopenharmony_ci [F_VCC_DM_BUFF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 0, 0), 5968c2ecf20Sopenharmony_ci [F_VCC_EXTCLKENBL] = REG_FIELD(VCC_UCD_FCTRL_EN, 15, 15), 5978c2ecf20Sopenharmony_ci [F_VCC_PLSTESTEN] = REG_FIELD(VCC_UCD_FCTRL_EN, 14, 14), 5988c2ecf20Sopenharmony_ci [F_VCC_UCDSWEN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 10, 10), 5998c2ecf20Sopenharmony_ci [F_VCC_RREF_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 9, 9), 6008c2ecf20Sopenharmony_ci [F_VCC_DPPU_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 8, 8), 6018c2ecf20Sopenharmony_ci [F_VCC_DPREF_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 7, 7), 6028c2ecf20Sopenharmony_ci [F_VCC_DMREF_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 6, 6), 6038c2ecf20Sopenharmony_ci [F_VCC_DPDET_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 5, 5), 6048c2ecf20Sopenharmony_ci [F_VCC_DMDET_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 4, 4), 6058c2ecf20Sopenharmony_ci [F_VCC_DPSINK_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 3, 3), 6068c2ecf20Sopenharmony_ci [F_VCC_DMSINK_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 2, 2), 6078c2ecf20Sopenharmony_ci [F_VCC_DP_BUFF_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 1, 1), 6088c2ecf20Sopenharmony_ci [F_VCC_DM_BUFF_EN_TSTENB] = REG_FIELD(VCC_UCD_FCTRL_EN, 0, 0), 6098c2ecf20Sopenharmony_ci 6108c2ecf20Sopenharmony_ci [F_VBUS_BCSRETRY] = REG_FIELD(VBUS_UCD_SET, 12, 12), 6118c2ecf20Sopenharmony_ci [F_VBUS_ADCRTRY] = REG_FIELD(VBUS_UCD_SET, 8, 8), 6128c2ecf20Sopenharmony_ci [F_VBUS_USBDETEN] = REG_FIELD(VBUS_UCD_SET, 7, 7), 6138c2ecf20Sopenharmony_ci [F_VBUS_IDRDETEN] = REG_FIELD(VBUS_UCD_SET, 6, 6), 6148c2ecf20Sopenharmony_ci [F_VBUS_ENUMRDY] = REG_FIELD(VBUS_UCD_SET, 5, 5), 6158c2ecf20Sopenharmony_ci [F_VBUS_ADCPOLEN] = REG_FIELD(VBUS_UCD_SET, 4, 4), 6168c2ecf20Sopenharmony_ci [F_VBUS_DCDMODE] = REG_FIELD(VBUS_UCD_SET, 3, 3), 6178c2ecf20Sopenharmony_ci [F_VBUS_USB_SW_EN] = REG_FIELD(VBUS_UCD_SET, 1, 1), 6188c2ecf20Sopenharmony_ci [F_VBUS_USB_SW] = REG_FIELD(VBUS_UCD_SET, 0, 0), 6198c2ecf20Sopenharmony_ci [F_VBUS_DCDFAIL] = REG_FIELD(VBUS_UCD_STATUS, 15, 15), 6208c2ecf20Sopenharmony_ci [F_VBUS_CHGPORT] = REG_FIELD(VBUS_UCD_STATUS, 12, 13), 6218c2ecf20Sopenharmony_ci [F_VBUS_PUPDET] = REG_FIELD(VBUS_UCD_STATUS, 11, 11), 6228c2ecf20Sopenharmony_ci [F_VBUS_VBUS_VLD] = REG_FIELD(VBUS_UCD_STATUS, 7, 7), 6238c2ecf20Sopenharmony_ci [F_VBUS_CHGDET] = REG_FIELD(VBUS_UCD_STATUS, 6, 6), 6248c2ecf20Sopenharmony_ci [F_VBUS_OTGDET] = REG_FIELD(VBUS_UCD_STATUS, 3, 3), 6258c2ecf20Sopenharmony_ci [F_VBUS_VBINOP] = REG_FIELD(VBUS_IDD_STATUS, 6, 6), 6268c2ecf20Sopenharmony_ci [F_VBUS_EXTID] = REG_FIELD(VBUS_IDD_STATUS, 5, 5), 6278c2ecf20Sopenharmony_ci [F_VBUS_IDRDET] = REG_FIELD(VBUS_IDD_STATUS, 4, 4), 6288c2ecf20Sopenharmony_ci [F_VBUS_INDO] = REG_FIELD(VBUS_IDD_STATUS, 0, 3), 6298c2ecf20Sopenharmony_ci [F_VBUS_UCDSWEN] = REG_FIELD(VCC_UCD_FCTRL_SET, 10, 10), 6308c2ecf20Sopenharmony_ci [F_VBUS_RREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 9, 9), 6318c2ecf20Sopenharmony_ci [F_VBUS_DPPU_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 8, 8), 6328c2ecf20Sopenharmony_ci [F_VBUS_DPREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 7, 7), 6338c2ecf20Sopenharmony_ci [F_VBUS_DMREF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 6, 6), 6348c2ecf20Sopenharmony_ci [F_VBUS_DPDET_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 5, 5), 6358c2ecf20Sopenharmony_ci [F_VBUS_DMDET_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 4, 4), 6368c2ecf20Sopenharmony_ci [F_VBUS_DPSINK_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 3, 3), 6378c2ecf20Sopenharmony_ci [F_VBUS_DMSINK_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 2, 2), 6388c2ecf20Sopenharmony_ci [F_VBUS_DP_BUFF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 1, 1), 6398c2ecf20Sopenharmony_ci [F_VBUS_DM_BUFF_EN] = REG_FIELD(VCC_UCD_FCTRL_SET, 0, 0), 6408c2ecf20Sopenharmony_ci 6418c2ecf20Sopenharmony_ci [F_VBUS_EXTCLKENBL] = REG_FIELD(VBUS_UCD_FCTRL_EN, 15, 15), 6428c2ecf20Sopenharmony_ci [F_VBUS_PLSTESTEN] = REG_FIELD(VBUS_UCD_FCTRL_EN, 14, 14), 6438c2ecf20Sopenharmony_ci [F_VBUS_UCDSWEN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 10, 10), 6448c2ecf20Sopenharmony_ci [F_VBUS_RREF_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 9, 9), 6458c2ecf20Sopenharmony_ci [F_VBUS_DPPU_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 8, 8), 6468c2ecf20Sopenharmony_ci [F_VBUS_DPREF_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 7, 7), 6478c2ecf20Sopenharmony_ci [F_VBUS_DMREF_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 6, 6), 6488c2ecf20Sopenharmony_ci [F_VBUS_DPDET_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 5, 5), 6498c2ecf20Sopenharmony_ci [F_VBUS_DMDET_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 4, 4), 6508c2ecf20Sopenharmony_ci [F_VBUS_DPSINK_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 3, 3), 6518c2ecf20Sopenharmony_ci [F_VBUS_DMSINK_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 2, 2), 6528c2ecf20Sopenharmony_ci [F_VBUS_DP_BUFF_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 1, 1), 6538c2ecf20Sopenharmony_ci [F_VBUS_DM_BUFF_EN_TSTENB] = REG_FIELD(VBUS_UCD_FCTRL_EN, 0, 0), 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_ci [F_CHIP_ID] = REG_FIELD(CHIP_ID, 0, 15), 6568c2ecf20Sopenharmony_ci [F_CHIP_REV] = REG_FIELD(CHIP_REV, 0, 15), 6578c2ecf20Sopenharmony_ci [F_ONE_CELL_MODE] = REG_FIELD(IC_SET1, 11, 11), 6588c2ecf20Sopenharmony_ci [F_cell] = REG_FIELD(IC_SET1, 1, 1), 6598c2ecf20Sopenharmony_ci [F_VACP_AUTO_DISCHG] = REG_FIELD(IC_SET1, 9, 9), 6608c2ecf20Sopenharmony_ci [F_VACP_LOAD] = REG_FIELD(IC_SET1, 8, 8), 6618c2ecf20Sopenharmony_ci [F_ACOK_POL] = REG_FIELD(IC_SET1, 1, 1), 6628c2ecf20Sopenharmony_ci [F_ACOK_DISEN] = REG_FIELD(IC_SET1, 0, 0), 6638c2ecf20Sopenharmony_ci [F_DEBUG_SET1] = REG_FIELD(IC_SET2, 4, 8), 6648c2ecf20Sopenharmony_ci [F_DEBUG_SET0] = REG_FIELD(IC_SET2, 0, 0), 6658c2ecf20Sopenharmony_ci [F_MONRST_STATE] = REG_FIELD(SYSTEM_STATUS, 6, 6), 6668c2ecf20Sopenharmony_ci [F_ALMRST_STATE] = REG_FIELD(SYSTEM_STATUS, 5, 5), 6678c2ecf20Sopenharmony_ci [F_CHGRST_STATE] = REG_FIELD(SYSTEM_STATUS, 4, 4), 6688c2ecf20Sopenharmony_ci [F_OTPLD_STATE] = REG_FIELD(SYSTEM_STATUS, 1, 1), 6698c2ecf20Sopenharmony_ci [F_ALLRST_STATE] = REG_FIELD(SYSTEM_STATUS, 0, 0), 6708c2ecf20Sopenharmony_ci [F_PROTECT_SET] = REG_FIELD(PROTECT_SET, 0, 15), 6718c2ecf20Sopenharmony_ci [F_MAP_SET] = REG_FIELD(MAP_SET, 0, 15), 6728c2ecf20Sopenharmony_ci [F_ADCINTERVAL] = REG_FIELD(VM_CTRL_SET, 14, 15), 6738c2ecf20Sopenharmony_ci [F_ADCMOD] = REG_FIELD(VM_CTRL_SET, 12, 13), 6748c2ecf20Sopenharmony_ci [F_ADCTMOD] = REG_FIELD(VM_CTRL_SET, 10, 11), 6758c2ecf20Sopenharmony_ci [F_EXTIADPEN] = REG_FIELD(VM_CTRL_SET, 9, 9), 6768c2ecf20Sopenharmony_ci [F_VSYSENB] = REG_FIELD(VM_CTRL_SET, 8, 8), 6778c2ecf20Sopenharmony_ci [F_VCCENB] = REG_FIELD(VM_CTRL_SET, 7, 7), 6788c2ecf20Sopenharmony_ci [F_VBUSENB] = REG_FIELD(VM_CTRL_SET, 6, 6), 6798c2ecf20Sopenharmony_ci [F_VACPENB] = REG_FIELD(VM_CTRL_SET, 5, 5), 6808c2ecf20Sopenharmony_ci [F_IACPENB] = REG_FIELD(VM_CTRL_SET, 4, 4), 6818c2ecf20Sopenharmony_ci [F_THERMENB] = REG_FIELD(VM_CTRL_SET, 3, 3), 6828c2ecf20Sopenharmony_ci [F_VBATENB] = REG_FIELD(VM_CTRL_SET, 2, 2), 6838c2ecf20Sopenharmony_ci [F_IBATMENB] = REG_FIELD(VM_CTRL_SET, 1, 1), 6848c2ecf20Sopenharmony_ci [F_IBATPENB] = REG_FIELD(VM_CTRL_SET, 0, 0), 6858c2ecf20Sopenharmony_ci [F_TMPTHR1B] = REG_FIELD(THERM_WINDOW_SET1, 8, 15), 6868c2ecf20Sopenharmony_ci [F_TMPTHR1A] = REG_FIELD(THERM_WINDOW_SET1, 0, 7), 6878c2ecf20Sopenharmony_ci [F_TMPTHR2B] = REG_FIELD(THERM_WINDOW_SET2, 8, 15), 6888c2ecf20Sopenharmony_ci [F_TMPTHR2A] = REG_FIELD(THERM_WINDOW_SET2, 0, 7), 6898c2ecf20Sopenharmony_ci [F_TMPTHR3B] = REG_FIELD(THERM_WINDOW_SET3, 8, 15), 6908c2ecf20Sopenharmony_ci [F_TMPTHR3A] = REG_FIELD(THERM_WINDOW_SET3, 0, 7), 6918c2ecf20Sopenharmony_ci [F_TMPTHR4B] = REG_FIELD(THERM_WINDOW_SET4, 8, 15), 6928c2ecf20Sopenharmony_ci [F_TMPTHR4A] = REG_FIELD(THERM_WINDOW_SET4, 0, 7), 6938c2ecf20Sopenharmony_ci [F_TMPTHR5B] = REG_FIELD(THERM_WINDOW_SET5, 8, 15), 6948c2ecf20Sopenharmony_ci [F_TMPTHR5A] = REG_FIELD(THERM_WINDOW_SET5, 0, 7), 6958c2ecf20Sopenharmony_ci [F_IBATP_TH_SET] = REG_FIELD(IBATP_TH_SET, 0, 14), 6968c2ecf20Sopenharmony_ci [F_IBATM_TH_SET] = REG_FIELD(IBATM_TH_SET, 0, 14), 6978c2ecf20Sopenharmony_ci [F_VBAT_TH_SET] = REG_FIELD(VBAT_TH_SET, 0, 14), 6988c2ecf20Sopenharmony_ci [F_THERM_TH_SET] = REG_FIELD(THERM_TH_SET, 0, 7), 6998c2ecf20Sopenharmony_ci [F_IACP_TH_SET] = REG_FIELD(IACP_TH_SET, 0, 14), 7008c2ecf20Sopenharmony_ci [F_VACP_TH_SET] = REG_FIELD(VACP_TH_SET, 0, 14), 7018c2ecf20Sopenharmony_ci [F_VBUS_TH_SET] = REG_FIELD(VBUS_TH_SET, 0, 14), 7028c2ecf20Sopenharmony_ci [F_VCC_TH_SET] = REG_FIELD(VCC_TH_SET, 0, 14), 7038c2ecf20Sopenharmony_ci [F_VSYS_TH_SET] = REG_FIELD(VSYS_TH_SET, 0, 14), 7048c2ecf20Sopenharmony_ci [F_EXTIADP_TH_SET] = REG_FIELD(EXTIADP_TH_SET, 0, 11), 7058c2ecf20Sopenharmony_ci [F_IBATP_VAL] = REG_FIELD(IBATP_VAL, 0, 14), 7068c2ecf20Sopenharmony_ci [F_IBATP_AVE_VAL] = REG_FIELD(IBATP_AVE_VAL, 0, 14), 7078c2ecf20Sopenharmony_ci [F_IBATM_VAL] = REG_FIELD(IBATM_VAL, 0, 14), 7088c2ecf20Sopenharmony_ci [F_IBATM_AVE_VAL] = REG_FIELD(IBATM_AVE_VAL, 0, 14), 7098c2ecf20Sopenharmony_ci [F_VBAT_VAL] = REG_FIELD(VBAT_VAL, 0, 14), 7108c2ecf20Sopenharmony_ci [F_VBAT_AVE_VAL] = REG_FIELD(VBAT_AVE_VAL, 0, 14), 7118c2ecf20Sopenharmony_ci [F_THERM_VAL] = REG_FIELD(THERM_VAL, 0, 7), 7128c2ecf20Sopenharmony_ci [F_VTH_VAL] = REG_FIELD(VTH_VAL, 0, 11), 7138c2ecf20Sopenharmony_ci [F_IACP_VAL] = REG_FIELD(IACP_VAL, 0, 14), 7148c2ecf20Sopenharmony_ci [F_IACP_AVE_VAL] = REG_FIELD(IACP_AVE_VAL, 0, 14), 7158c2ecf20Sopenharmony_ci [F_VACP_VAL] = REG_FIELD(VACP_VAL, 0, 14), 7168c2ecf20Sopenharmony_ci [F_VACP_AVE_VAL] = REG_FIELD(VACP_AVE_VAL, 0, 14), 7178c2ecf20Sopenharmony_ci [F_VBUS_VAL] = REG_FIELD(VBUS_VAL, 0, 14), 7188c2ecf20Sopenharmony_ci [F_VBUS_AVE_VAL] = REG_FIELD(VBUS_AVE_VAL, 0, 14), 7198c2ecf20Sopenharmony_ci [F_VCC_VAL] = REG_FIELD(VCC_VAL, 0, 14), 7208c2ecf20Sopenharmony_ci [F_VCC_AVE_VAL] = REG_FIELD(VCC_AVE_VAL, 0, 14), 7218c2ecf20Sopenharmony_ci [F_VSYS_VAL] = REG_FIELD(VSYS_VAL, 0, 14), 7228c2ecf20Sopenharmony_ci [F_VSYS_AVE_VAL] = REG_FIELD(VSYS_AVE_VAL, 0, 14), 7238c2ecf20Sopenharmony_ci [F_EXTIADP_VAL] = REG_FIELD(EXTIADP_VAL, 0, 11), 7248c2ecf20Sopenharmony_ci [F_EXTIADP_AVE_VAL] = REG_FIELD(EXTIADP_AVE_VAL, 0, 11), 7258c2ecf20Sopenharmony_ci [F_VACPCLPS_TH_SET] = REG_FIELD(VACPCLPS_TH_SET, 7, 14), 7268c2ecf20Sopenharmony_ci [F_INT7_SET] = REG_FIELD(INT7_SET, 0, 15), 7278c2ecf20Sopenharmony_ci [F_INT6_SET] = REG_FIELD(INT6_SET, 0, 13), 7288c2ecf20Sopenharmony_ci [F_INT5_SET] = REG_FIELD(INT5_SET, 0, 13), 7298c2ecf20Sopenharmony_ci [F_INT4_SET] = REG_FIELD(INT4_SET, 0, 9), 7308c2ecf20Sopenharmony_ci [F_INT3_SET] = REG_FIELD(INT3_SET, 0, 15), 7318c2ecf20Sopenharmony_ci [F_INT2_SET] = REG_FIELD(INT2_SET, 0, 15), 7328c2ecf20Sopenharmony_ci [F_INT1_SET] = REG_FIELD(INT1_SET, 0, 15), 7338c2ecf20Sopenharmony_ci [F_INT0_SET] = REG_FIELD(INT0_SET, 0, 7), 7348c2ecf20Sopenharmony_ci [F_VBUS_RBUV_DET] = REG_FIELD(INT1_SET, 15, 15), 7358c2ecf20Sopenharmony_ci [F_VBUS_RBUV_RES] = REG_FIELD(INT1_SET, 14, 14), 7368c2ecf20Sopenharmony_ci [F_VBUS_TH_DET] = REG_FIELD(INT1_SET, 9, 9), 7378c2ecf20Sopenharmony_ci [F_VBUS_TH_RES] = REG_FIELD(INT1_SET, 8, 8), 7388c2ecf20Sopenharmony_ci [F_VBUS_IIN_MOD] = REG_FIELD(INT1_SET, 6, 6), 7398c2ecf20Sopenharmony_ci [F_VBUS_OV_DET] = REG_FIELD(INT1_SET, 5, 5), 7408c2ecf20Sopenharmony_ci [F_VBUS_OV_RES] = REG_FIELD(INT1_SET, 4, 4), 7418c2ecf20Sopenharmony_ci [F_VBUS_CLPS_DET] = REG_FIELD(INT1_SET, 3, 3), 7428c2ecf20Sopenharmony_ci [F_VBUS_CLPS] = REG_FIELD(INT1_SET, 2, 2), 7438c2ecf20Sopenharmony_ci [F_VBUS_DET] = REG_FIELD(INT1_SET, 1, 1), 7448c2ecf20Sopenharmony_ci [F_VBUS_RES] = REG_FIELD(INT1_SET, 0, 0), 7458c2ecf20Sopenharmony_ci [F_VCC_RBUV_DET] = REG_FIELD(INT2_SET, 15, 15), 7468c2ecf20Sopenharmony_ci [F_VCC_RBUV_RES] = REG_FIELD(INT2_SET, 14, 14), 7478c2ecf20Sopenharmony_ci [F_VCC_TH_DET] = REG_FIELD(INT2_SET, 9, 9), 7488c2ecf20Sopenharmony_ci [F_VCC_TH_RES] = REG_FIELD(INT2_SET, 8, 8), 7498c2ecf20Sopenharmony_ci [F_VCC_IIN_MOD] = REG_FIELD(INT2_SET, 6, 6), 7508c2ecf20Sopenharmony_ci [F_VCC_OVP_DET] = REG_FIELD(INT2_SET, 5, 5), 7518c2ecf20Sopenharmony_ci [F_VCC_OVP_RES] = REG_FIELD(INT2_SET, 4, 4), 7528c2ecf20Sopenharmony_ci [F_VCC_CLPS_DET] = REG_FIELD(INT2_SET, 3, 3), 7538c2ecf20Sopenharmony_ci [F_VCC_CLPS_RES] = REG_FIELD(INT2_SET, 2, 2), 7548c2ecf20Sopenharmony_ci [F_VCC_DET] = REG_FIELD(INT2_SET, 1, 1), 7558c2ecf20Sopenharmony_ci [F_VCC_RES] = REG_FIELD(INT2_SET, 0, 0), 7568c2ecf20Sopenharmony_ci [F_TH_DET] = REG_FIELD(INT3_SET, 15, 15), 7578c2ecf20Sopenharmony_ci [F_TH_RMV] = REG_FIELD(INT3_SET, 14, 14), 7588c2ecf20Sopenharmony_ci [F_TMP_OUT_DET] = REG_FIELD(INT3_SET, 11, 11), 7598c2ecf20Sopenharmony_ci [F_TMP_OUT_RES] = REG_FIELD(INT3_SET, 10, 10), 7608c2ecf20Sopenharmony_ci [F_VBAT_TH_DET] = REG_FIELD(INT3_SET, 9, 9), 7618c2ecf20Sopenharmony_ci [F_VBAT_TH_RES] = REG_FIELD(INT3_SET, 8, 8), 7628c2ecf20Sopenharmony_ci [F_IBAT_SHORT_DET] = REG_FIELD(INT3_SET, 7, 7), 7638c2ecf20Sopenharmony_ci [F_IBAT_SHORT_RES] = REG_FIELD(INT3_SET, 6, 6), 7648c2ecf20Sopenharmony_ci [F_VBAT_OV_DET] = REG_FIELD(INT3_SET, 5, 5), 7658c2ecf20Sopenharmony_ci [F_VBAT_OV_RES] = REG_FIELD(INT3_SET, 4, 4), 7668c2ecf20Sopenharmony_ci [F_BAT_ASSIST_DET] = REG_FIELD(INT3_SET, 3, 3), 7678c2ecf20Sopenharmony_ci [F_BAT_ASSIST_RES] = REG_FIELD(INT3_SET, 2, 2), 7688c2ecf20Sopenharmony_ci [F_VSYS_TH_DET] = REG_FIELD(INT4_SET, 9, 9), 7698c2ecf20Sopenharmony_ci [F_VSYS_TH_RES] = REG_FIELD(INT4_SET, 8, 8), 7708c2ecf20Sopenharmony_ci [F_VSYS_OV_DET] = REG_FIELD(INT4_SET, 5, 5), 7718c2ecf20Sopenharmony_ci [F_VSYS_OV_RES] = REG_FIELD(INT4_SET, 4, 4), 7728c2ecf20Sopenharmony_ci [F_VSYS_SHT_DET] = REG_FIELD(INT4_SET, 3, 3), 7738c2ecf20Sopenharmony_ci [F_VSYS_SHT_RES] = REG_FIELD(INT4_SET, 2, 2), 7748c2ecf20Sopenharmony_ci [F_VSYS_UV_DET] = REG_FIELD(INT4_SET, 1, 1), 7758c2ecf20Sopenharmony_ci [F_VSYS_UV_RES] = REG_FIELD(INT4_SET, 0, 0), 7768c2ecf20Sopenharmony_ci [F_OTP_LOAD_DONE] = REG_FIELD(INT5_SET, 13, 13), 7778c2ecf20Sopenharmony_ci [F_PWR_ON] = REG_FIELD(INT5_SET, 12, 12), 7788c2ecf20Sopenharmony_ci [F_EXTIADP_TRNS] = REG_FIELD(INT5_SET, 11, 11), 7798c2ecf20Sopenharmony_ci [F_EXTIADP_TH_DET] = REG_FIELD(INT5_SET, 9, 9), 7808c2ecf20Sopenharmony_ci [F_EXIADP_TH_RES] = REG_FIELD(INT5_SET, 8, 8), 7818c2ecf20Sopenharmony_ci [F_BAT_MNT_DET] = REG_FIELD(INT5_SET, 7, 7), 7828c2ecf20Sopenharmony_ci [F_BAT_MNT_RES] = REG_FIELD(INT5_SET, 6, 6), 7838c2ecf20Sopenharmony_ci [F_TSD_DET] = REG_FIELD(INT5_SET, 5, 5), 7848c2ecf20Sopenharmony_ci [F_TSD_RES] = REG_FIELD(INT5_SET, 4, 4), 7858c2ecf20Sopenharmony_ci [F_CHGWDT_EXP] = REG_FIELD(INT5_SET, 3, 3), 7868c2ecf20Sopenharmony_ci [F_THERMWDT_EXP] = REG_FIELD(INT5_SET, 2, 2), 7878c2ecf20Sopenharmony_ci [F_TMP_TRNS] = REG_FIELD(INT5_SET, 1, 1), 7888c2ecf20Sopenharmony_ci [F_CHG_TRNS] = REG_FIELD(INT5_SET, 0, 0), 7898c2ecf20Sopenharmony_ci [F_VBUS_UCD_PORT_DET] = REG_FIELD(INT6_SET, 13, 13), 7908c2ecf20Sopenharmony_ci [F_VBUS_UCD_UCHG_DET] = REG_FIELD(INT6_SET, 12, 12), 7918c2ecf20Sopenharmony_ci [F_VBUS_UCD_URID_RMV] = REG_FIELD(INT6_SET, 11, 11), 7928c2ecf20Sopenharmony_ci [F_VBUS_UCD_OTG_DET] = REG_FIELD(INT6_SET, 10, 10), 7938c2ecf20Sopenharmony_ci [F_VBUS_UCD_URID_MOD] = REG_FIELD(INT6_SET, 8, 8), 7948c2ecf20Sopenharmony_ci [F_VCC_UCD_PORT_DET] = REG_FIELD(INT6_SET, 5, 5), 7958c2ecf20Sopenharmony_ci [F_VCC_UCD_UCHG_DET] = REG_FIELD(INT6_SET, 4, 4), 7968c2ecf20Sopenharmony_ci [F_VCC_UCD_URID_RMV] = REG_FIELD(INT6_SET, 3, 3), 7978c2ecf20Sopenharmony_ci [F_VCC_UCD_OTG_DET] = REG_FIELD(INT6_SET, 2, 2), 7988c2ecf20Sopenharmony_ci [F_VCC_UCD_URID_MOD] = REG_FIELD(INT6_SET, 0, 0), 7998c2ecf20Sopenharmony_ci [F_PROCHOT_DET] = REG_FIELD(INT7_SET, 15, 15), 8008c2ecf20Sopenharmony_ci [F_PROCHOT_RES] = REG_FIELD(INT7_SET, 14, 14), 8018c2ecf20Sopenharmony_ci [F_VACP_DET] = REG_FIELD(INT7_SET, 11, 11), 8028c2ecf20Sopenharmony_ci [F_VACP_RES] = REG_FIELD(INT7_SET, 10, 10), 8038c2ecf20Sopenharmony_ci [F_VACP_TH_DET] = REG_FIELD(INT7_SET, 9, 9), 8048c2ecf20Sopenharmony_ci [F_VACP_TH_RES] = REG_FIELD(INT7_SET, 8, 8), 8058c2ecf20Sopenharmony_ci [F_IACP_TH_DET] = REG_FIELD(INT7_SET, 7, 7), 8068c2ecf20Sopenharmony_ci [F_IACP_THE_RES] = REG_FIELD(INT7_SET, 6, 6), 8078c2ecf20Sopenharmony_ci [F_THERM_TH_DET] = REG_FIELD(INT7_SET, 5, 5), 8088c2ecf20Sopenharmony_ci [F_THERM_TH_RES] = REG_FIELD(INT7_SET, 4, 4), 8098c2ecf20Sopenharmony_ci [F_IBATM_TH_DET] = REG_FIELD(INT7_SET, 3, 3), 8108c2ecf20Sopenharmony_ci [F_IBATM_TH_RES] = REG_FIELD(INT7_SET, 2, 2), 8118c2ecf20Sopenharmony_ci [F_IBATP_TH_DET] = REG_FIELD(INT7_SET, 1, 1), 8128c2ecf20Sopenharmony_ci [F_IBATP_TH_RES] = REG_FIELD(INT7_SET, 0, 0), 8138c2ecf20Sopenharmony_ci [F_INT7_STATUS] = REG_FIELD(INT7_STATUS, 0, 15), 8148c2ecf20Sopenharmony_ci [F_INT6_STATUS] = REG_FIELD(INT6_STATUS, 0, 13), 8158c2ecf20Sopenharmony_ci [F_INT5_STATUS] = REG_FIELD(INT5_STATUS, 0, 13), 8168c2ecf20Sopenharmony_ci [F_INT4_STATUS] = REG_FIELD(INT4_STATUS, 0, 9), 8178c2ecf20Sopenharmony_ci [F_INT3_STATUS] = REG_FIELD(INT3_STATUS, 0, 15), 8188c2ecf20Sopenharmony_ci [F_INT2_STATUS] = REG_FIELD(INT2_STATUS, 0, 15), 8198c2ecf20Sopenharmony_ci [F_INT1_STATUS] = REG_FIELD(INT1_STATUS, 0, 15), 8208c2ecf20Sopenharmony_ci [F_INT0_STATUS] = REG_FIELD(INT0_STATUS, 0, 7), 8218c2ecf20Sopenharmony_ci [F_ILIM_DECREASE] = REG_FIELD(OTPREG0, 0, 15), 8228c2ecf20Sopenharmony_ci [F_RESERVE_OTPREG1] = REG_FIELD(OTPREG1, 0, 15), 8238c2ecf20Sopenharmony_ci [F_POWER_SAVE_MODE] = REG_FIELD(SMBREG, 0, 15), 8248c2ecf20Sopenharmony_ci [F_DEBUG_MODE_SET] = REG_FIELD(DEBUG_MODE_SET, 0, 15), 8258c2ecf20Sopenharmony_ci [F_DEBUG0x14] = REG_FIELD(DEBUG0x14, 0, 15), 8268c2ecf20Sopenharmony_ci [F_DEBUG0x1A] = REG_FIELD(DEBUG0x1A, 0, 15), 8278c2ecf20Sopenharmony_ci}; 8288c2ecf20Sopenharmony_ci 8298c2ecf20Sopenharmony_ci/* CHGSTM_STATEs */ 8308c2ecf20Sopenharmony_ci#define CHGSTM_SUSPEND 0x00 8318c2ecf20Sopenharmony_ci#define CHGSTM_TRICKLE_CHARGE 0x01 8328c2ecf20Sopenharmony_ci#define CHGSTM_PRE_CHARGE 0x02 8338c2ecf20Sopenharmony_ci#define CHGSTM_FAST_CHARGE 0x03 8348c2ecf20Sopenharmony_ci#define CHGSTM_TOP_OFF 0x04 8358c2ecf20Sopenharmony_ci#define CHGSTM_DONE 0x05 8368c2ecf20Sopenharmony_ci#define CHGSTM_OTG 0x08 8378c2ecf20Sopenharmony_ci#define CHGSTM_OTG_DONE 0x09 8388c2ecf20Sopenharmony_ci#define CHGSTM_TEMPERATURE_ERROR_1 0x10 8398c2ecf20Sopenharmony_ci#define CHGSTM_TEMPERATURE_ERROR_2 0x11 8408c2ecf20Sopenharmony_ci#define CHGSTM_TEMPERATURE_ERROR_3 0x12 8418c2ecf20Sopenharmony_ci#define CHGSTM_TEMPERATURE_ERROR_4 0x13 8428c2ecf20Sopenharmony_ci#define CHGSTM_TEMPERATURE_ERROR_5 0x14 8438c2ecf20Sopenharmony_ci#define CHGSTM_TEMPERATURE_ERROR_6 0x15 8448c2ecf20Sopenharmony_ci#define CHGSTM_TEMPERATURE_ERROR_7 0x18 8458c2ecf20Sopenharmony_ci#define CHGSTM_THERMAL_SHUT_DOWN_1 0x20 8468c2ecf20Sopenharmony_ci#define CHGSTM_THERMAL_SHUT_DOWN_2 0x21 8478c2ecf20Sopenharmony_ci#define CHGSTM_THERMAL_SHUT_DOWN_3 0x22 8488c2ecf20Sopenharmony_ci#define CHGSTM_THERMAL_SHUT_DOWN_4 0x23 8498c2ecf20Sopenharmony_ci#define CHGSTM_THERMAL_SHUT_DOWN_5 0x24 8508c2ecf20Sopenharmony_ci#define CHGSTM_THERMAL_SHUT_DOWN_6 0x25 8518c2ecf20Sopenharmony_ci#define CHGSTM_THERMAL_SHUT_DOWN_7 0x28 8528c2ecf20Sopenharmony_ci#define CHGSTM_BATTERY_ERROR 0x40 8538c2ecf20Sopenharmony_ci 8548c2ecf20Sopenharmony_ci/* VBAT_VSYS_STATUS */ 8558c2ecf20Sopenharmony_ci#define STATUS_VSYS_OV BIT(15) 8568c2ecf20Sopenharmony_ci#define STATUS_VSYS_SSD BIT(14) 8578c2ecf20Sopenharmony_ci#define STATUS_VSYS_SCP BIT(13) 8588c2ecf20Sopenharmony_ci#define STATUS_VSYS_UVN BIT(12) 8598c2ecf20Sopenharmony_ci#define STATUS_IBAT_SHORT BIT(6) 8608c2ecf20Sopenharmony_ci#define STATUS_VBAT_OV BIT(3) 8618c2ecf20Sopenharmony_ci#define STATUS_DEAD_BAT BIT(0) 8628c2ecf20Sopenharmony_ci 8638c2ecf20Sopenharmony_ci/* VBUS_VCC_STATUS */ 8648c2ecf20Sopenharmony_ci#define STATUS_VACP_DET BIT(12) 8658c2ecf20Sopenharmony_ci#define STATUS_VCC_OVP BIT(11) 8668c2ecf20Sopenharmony_ci#define STATUS_ILIM_VCC_MOD BIT(10) 8678c2ecf20Sopenharmony_ci#define STATUS_VCC_CLPS BIT(9) 8688c2ecf20Sopenharmony_ci#define STATUS_VCC_DET BIT(8) 8698c2ecf20Sopenharmony_ci#define STATUS_VBUS_OVP BIT(3) 8708c2ecf20Sopenharmony_ci#define STATUS_ILIM_VBUS_MOD BIT(2) 8718c2ecf20Sopenharmony_ci#define STATUS_VBUS_CLPS BIT(1) 8728c2ecf20Sopenharmony_ci#define STATUS_VBUS_DET BIT(0) 8738c2ecf20Sopenharmony_ci 8748c2ecf20Sopenharmony_ci/* Interrupt set/status definitions */ 8758c2ecf20Sopenharmony_ci 8768c2ecf20Sopenharmony_ci/* INT 0 */ 8778c2ecf20Sopenharmony_ci#define INT0_INT7_STATUS BIT(7) 8788c2ecf20Sopenharmony_ci#define INT0_INT6_STATUS BIT(6) 8798c2ecf20Sopenharmony_ci#define INT0_INT5_STATUS BIT(5) 8808c2ecf20Sopenharmony_ci#define INT0_INT4_STATUS BIT(4) 8818c2ecf20Sopenharmony_ci#define INT0_INT3_STATUS BIT(3) 8828c2ecf20Sopenharmony_ci#define INT0_INT2_STATUS BIT(2) 8838c2ecf20Sopenharmony_ci#define INT0_INT1_STATUS BIT(1) 8848c2ecf20Sopenharmony_ci#define INT0_INT0_STATUS BIT(0) 8858c2ecf20Sopenharmony_ci#define INT0_ALL 0xff 8868c2ecf20Sopenharmony_ci 8878c2ecf20Sopenharmony_ci/* INT 1 */ 8888c2ecf20Sopenharmony_ci#define VBUS_RBUV_DET BIT(15) 8898c2ecf20Sopenharmony_ci#define VBUS_RBUV_RES BIT(14) 8908c2ecf20Sopenharmony_ci#define VBUS_TH_DET BIT(9) 8918c2ecf20Sopenharmony_ci#define VBUS_TH_RES BIT(8) 8928c2ecf20Sopenharmony_ci#define VBUS_IIN_MOD BIT(6) 8938c2ecf20Sopenharmony_ci#define VBUS_OV_DET BIT(5) 8948c2ecf20Sopenharmony_ci#define VBUS_OV_RES BIT(4) 8958c2ecf20Sopenharmony_ci#define VBUS_CLPS_DET BIT(3) 8968c2ecf20Sopenharmony_ci#define VBUS_CLPS BIT(2) 8978c2ecf20Sopenharmony_ci#define VBUS_DET BIT(1) 8988c2ecf20Sopenharmony_ci#define VBUS_RES BIT(0) 8998c2ecf20Sopenharmony_ci#define INT1_ALL (VBUS_RBUV_DET|\ 9008c2ecf20Sopenharmony_ci VBUS_RBUV_RES|\ 9018c2ecf20Sopenharmony_ci VBUS_TH_DET |\ 9028c2ecf20Sopenharmony_ci VBUS_TH_RES |\ 9038c2ecf20Sopenharmony_ci VBUS_IIN_MOD|\ 9048c2ecf20Sopenharmony_ci VBUS_OV_DET |\ 9058c2ecf20Sopenharmony_ci VBUS_OV_RES |\ 9068c2ecf20Sopenharmony_ci VBUS_CLPS_DET |\ 9078c2ecf20Sopenharmony_ci VBUS_CLPS |\ 9088c2ecf20Sopenharmony_ci VBUS_DET |\ 9098c2ecf20Sopenharmony_ci VBUS_RES) 9108c2ecf20Sopenharmony_ci 9118c2ecf20Sopenharmony_ci/* INT 2 */ 9128c2ecf20Sopenharmony_ci#define VCC_RBUV_DET BIT(15) 9138c2ecf20Sopenharmony_ci#define VCC_RBUV_RES BIT(14) 9148c2ecf20Sopenharmony_ci#define VCC_TH_DET BIT(9) 9158c2ecf20Sopenharmony_ci#define VCC_TH_RES BIT(8) 9168c2ecf20Sopenharmony_ci#define VCC_IIN_MOD BIT(6) 9178c2ecf20Sopenharmony_ci#define VCC_OVP_DET BIT(5) 9188c2ecf20Sopenharmony_ci#define VCC_OVP_RES BIT(4) 9198c2ecf20Sopenharmony_ci#define VCC_CLPS_DET BIT(3) 9208c2ecf20Sopenharmony_ci#define VCC_CLPS_RES BIT(2) 9218c2ecf20Sopenharmony_ci#define VCC_DET BIT(1) 9228c2ecf20Sopenharmony_ci#define VCC_RES BIT(0) 9238c2ecf20Sopenharmony_ci#define INT2_ALL (VCC_RBUV_DET |\ 9248c2ecf20Sopenharmony_ci VCC_RBUV_RES |\ 9258c2ecf20Sopenharmony_ci VCC_TH_DET |\ 9268c2ecf20Sopenharmony_ci VCC_TH_RES |\ 9278c2ecf20Sopenharmony_ci VCC_IIN_MOD |\ 9288c2ecf20Sopenharmony_ci VCC_OVP_DET |\ 9298c2ecf20Sopenharmony_ci VCC_OVP_RES |\ 9308c2ecf20Sopenharmony_ci VCC_CLPS_DET |\ 9318c2ecf20Sopenharmony_ci VCC_CLPS_RES |\ 9328c2ecf20Sopenharmony_ci VCC_DET |\ 9338c2ecf20Sopenharmony_ci VCC_RES) 9348c2ecf20Sopenharmony_ci/* INT 3 */ 9358c2ecf20Sopenharmony_ci#define TH_DET BIT(15) 9368c2ecf20Sopenharmony_ci#define TH_RMV BIT(14) 9378c2ecf20Sopenharmony_ci#define TMP_OUT_DET BIT(11) 9388c2ecf20Sopenharmony_ci#define TMP_OUT_RES BIT(10) 9398c2ecf20Sopenharmony_ci#define VBAT_TH_DET BIT(9) 9408c2ecf20Sopenharmony_ci#define VBAT_TH_RES BIT(8) 9418c2ecf20Sopenharmony_ci#define IBAT_SHORT_DET BIT(7) 9428c2ecf20Sopenharmony_ci#define IBAT_SHORT_RES BIT(6) 9438c2ecf20Sopenharmony_ci#define VBAT_OV_DET BIT(5) 9448c2ecf20Sopenharmony_ci#define VBAT_OV_RES BIT(4) 9458c2ecf20Sopenharmony_ci#define BAT_ASSIST_DET BIT(3) 9468c2ecf20Sopenharmony_ci#define BAT_ASSIST_RES BIT(2) 9478c2ecf20Sopenharmony_ci#define INT3_ALL (TH_DET |\ 9488c2ecf20Sopenharmony_ci TH_RMV |\ 9498c2ecf20Sopenharmony_ci TMP_OUT_DET |\ 9508c2ecf20Sopenharmony_ci TMP_OUT_RES |\ 9518c2ecf20Sopenharmony_ci VBAT_TH_DET |\ 9528c2ecf20Sopenharmony_ci VBAT_TH_RES |\ 9538c2ecf20Sopenharmony_ci IBAT_SHORT_DET |\ 9548c2ecf20Sopenharmony_ci IBAT_SHORT_RES |\ 9558c2ecf20Sopenharmony_ci VBAT_OV_DET |\ 9568c2ecf20Sopenharmony_ci VBAT_OV_RES |\ 9578c2ecf20Sopenharmony_ci BAT_ASSIST_DET |\ 9588c2ecf20Sopenharmony_ci BAT_ASSIST_RES) 9598c2ecf20Sopenharmony_ci 9608c2ecf20Sopenharmony_ci/* INT 4 */ 9618c2ecf20Sopenharmony_ci#define VSYS_TH_DET BIT(9) 9628c2ecf20Sopenharmony_ci#define VSYS_TH_RES BIT(8) 9638c2ecf20Sopenharmony_ci#define VSYS_OV_DET BIT(5) 9648c2ecf20Sopenharmony_ci#define VSYS_OV_RES BIT(4) 9658c2ecf20Sopenharmony_ci#define VSYS_SHT_DET BIT(3) 9668c2ecf20Sopenharmony_ci#define VSYS_SHT_RES BIT(2) 9678c2ecf20Sopenharmony_ci#define VSYS_UV_DET BIT(1) 9688c2ecf20Sopenharmony_ci#define VSYS_UV_RES BIT(0) 9698c2ecf20Sopenharmony_ci#define INT4_ALL (VSYS_TH_DET |\ 9708c2ecf20Sopenharmony_ci VSYS_TH_RES |\ 9718c2ecf20Sopenharmony_ci VSYS_OV_DET |\ 9728c2ecf20Sopenharmony_ci VSYS_OV_RES |\ 9738c2ecf20Sopenharmony_ci VSYS_SHT_DET |\ 9748c2ecf20Sopenharmony_ci VSYS_SHT_RES |\ 9758c2ecf20Sopenharmony_ci VSYS_UV_DET |\ 9768c2ecf20Sopenharmony_ci VSYS_UV_RES) 9778c2ecf20Sopenharmony_ci 9788c2ecf20Sopenharmony_ci/* INT 5*/ 9798c2ecf20Sopenharmony_ci#define OTP_LOAD_DONE BIT(13) 9808c2ecf20Sopenharmony_ci#define PWR_ON BIT(12) 9818c2ecf20Sopenharmony_ci#define EXTIADP_TRNS BIT(11) 9828c2ecf20Sopenharmony_ci#define EXTIADP_TH_DET BIT(9) 9838c2ecf20Sopenharmony_ci#define EXIADP_TH_RES BIT(8) 9848c2ecf20Sopenharmony_ci#define BAT_MNT_DET BIT(7) 9858c2ecf20Sopenharmony_ci#define BAT_MNT_RES BIT(6) 9868c2ecf20Sopenharmony_ci#define TSD_DET BIT(5) 9878c2ecf20Sopenharmony_ci#define TSD_RES BIT(4) 9888c2ecf20Sopenharmony_ci#define CHGWDT_EXP BIT(3) 9898c2ecf20Sopenharmony_ci#define THERMWDT_EXP BIT(2) 9908c2ecf20Sopenharmony_ci#define TMP_TRNS BIT(1) 9918c2ecf20Sopenharmony_ci#define CHG_TRNS BIT(0) 9928c2ecf20Sopenharmony_ci#define INT5_ALL (OTP_LOAD_DONE |\ 9938c2ecf20Sopenharmony_ci PWR_ON |\ 9948c2ecf20Sopenharmony_ci EXTIADP_TRNS |\ 9958c2ecf20Sopenharmony_ci EXTIADP_TH_DET |\ 9968c2ecf20Sopenharmony_ci EXIADP_TH_RES |\ 9978c2ecf20Sopenharmony_ci BAT_MNT_DET |\ 9988c2ecf20Sopenharmony_ci BAT_MNT_RES |\ 9998c2ecf20Sopenharmony_ci TSD_DET |\ 10008c2ecf20Sopenharmony_ci TSD_RES |\ 10018c2ecf20Sopenharmony_ci CHGWDT_EXP |\ 10028c2ecf20Sopenharmony_ci THERMWDT_EXP |\ 10038c2ecf20Sopenharmony_ci TMP_TRNS |\ 10048c2ecf20Sopenharmony_ci CHG_TRNS) 10058c2ecf20Sopenharmony_ci 10068c2ecf20Sopenharmony_ci/* INT 6*/ 10078c2ecf20Sopenharmony_ci#define VBUS_UCD_PORT_DET BIT(13) 10088c2ecf20Sopenharmony_ci#define VBUS_UCD_UCHG_DET BIT(12) 10098c2ecf20Sopenharmony_ci#define VBUS_UCD_URID_RMV BIT(11) 10108c2ecf20Sopenharmony_ci#define VBUS_UCD_OTG_DET BIT(10) 10118c2ecf20Sopenharmony_ci#define VBUS_UCD_URID_MOD BIT(8) 10128c2ecf20Sopenharmony_ci#define VCC_UCD_PORT_DET BIT(5) 10138c2ecf20Sopenharmony_ci#define VCC_UCD_UCHG_DET BIT(4) 10148c2ecf20Sopenharmony_ci#define VCC_UCD_URID_RMV BIT(3) 10158c2ecf20Sopenharmony_ci#define VCC_UCD_OTG_DET BIT(2) 10168c2ecf20Sopenharmony_ci#define VCC_UCD_URID_MOD BIT(0) 10178c2ecf20Sopenharmony_ci#define INT6_ALL (VBUS_UCD_PORT_DET |\ 10188c2ecf20Sopenharmony_ci VBUS_UCD_UCHG_DET |\ 10198c2ecf20Sopenharmony_ci VBUS_UCD_URID_RMV |\ 10208c2ecf20Sopenharmony_ci VBUS_UCD_OTG_DET |\ 10218c2ecf20Sopenharmony_ci VBUS_UCD_URID_MOD |\ 10228c2ecf20Sopenharmony_ci VCC_UCD_PORT_DET |\ 10238c2ecf20Sopenharmony_ci VCC_UCD_UCHG_DET |\ 10248c2ecf20Sopenharmony_ci VCC_UCD_URID_RMV |\ 10258c2ecf20Sopenharmony_ci VCC_UCD_OTG_DET |\ 10268c2ecf20Sopenharmony_ci VCC_UCD_URID_MOD) 10278c2ecf20Sopenharmony_ci 10288c2ecf20Sopenharmony_ci/* INT 7 */ 10298c2ecf20Sopenharmony_ci#define PROCHOT_DET BIT(15) 10308c2ecf20Sopenharmony_ci#define PROCHOT_RES BIT(14) 10318c2ecf20Sopenharmony_ci#define VACP_DET BIT(11) 10328c2ecf20Sopenharmony_ci#define VACP_RES BIT(10) 10338c2ecf20Sopenharmony_ci#define VACP_TH_DET BIT(9) 10348c2ecf20Sopenharmony_ci#define VACP_TH_RES BIT(8) 10358c2ecf20Sopenharmony_ci#define IACP_TH_DET BIT(7) 10368c2ecf20Sopenharmony_ci#define IACP_THE_RES BIT(6) 10378c2ecf20Sopenharmony_ci#define THERM_TH_DET BIT(5) 10388c2ecf20Sopenharmony_ci#define THERM_TH_RES BIT(4) 10398c2ecf20Sopenharmony_ci#define IBATM_TH_DET BIT(3) 10408c2ecf20Sopenharmony_ci#define IBATM_TH_RES BIT(2) 10418c2ecf20Sopenharmony_ci#define IBATP_TH_DET BIT(1) 10428c2ecf20Sopenharmony_ci#define IBATP_TH_RES BIT(0) 10438c2ecf20Sopenharmony_ci#define INT7_ALL (PROCHOT_DET |\ 10448c2ecf20Sopenharmony_ci PROCHOT_RES |\ 10458c2ecf20Sopenharmony_ci VACP_DET |\ 10468c2ecf20Sopenharmony_ci VACP_RES |\ 10478c2ecf20Sopenharmony_ci VACP_TH_DET |\ 10488c2ecf20Sopenharmony_ci VACP_TH_RES |\ 10498c2ecf20Sopenharmony_ci IACP_TH_DET |\ 10508c2ecf20Sopenharmony_ci IACP_THE_RES |\ 10518c2ecf20Sopenharmony_ci THERM_TH_DET |\ 10528c2ecf20Sopenharmony_ci THERM_TH_RES |\ 10538c2ecf20Sopenharmony_ci IBATM_TH_DET |\ 10548c2ecf20Sopenharmony_ci IBATM_TH_RES |\ 10558c2ecf20Sopenharmony_ci IBATP_TH_DET |\ 10568c2ecf20Sopenharmony_ci IBATP_TH_RES) 10578c2ecf20Sopenharmony_ci 10588c2ecf20Sopenharmony_ci/* SYSTEM_CTRL_SET*/ 10598c2ecf20Sopenharmony_ci#define MONRST BIT(6) 10608c2ecf20Sopenharmony_ci#define ALMRST BIT(5) 10618c2ecf20Sopenharmony_ci#define CHGRST BIT(4) 10628c2ecf20Sopenharmony_ci#define OTPLD BIT(1) 10638c2ecf20Sopenharmony_ci#define ALLRST BIT(0) 10648c2ecf20Sopenharmony_ci 10658c2ecf20Sopenharmony_ci/* F_BATTEMP */ 10668c2ecf20Sopenharmony_ci#define ROOM 0x0 10678c2ecf20Sopenharmony_ci#define HOT1 0x1 10688c2ecf20Sopenharmony_ci#define HOT2 0x2 10698c2ecf20Sopenharmony_ci#define HOT3 0x3 10708c2ecf20Sopenharmony_ci#define COLD1 0x4 10718c2ecf20Sopenharmony_ci#define COLD2 0x5 10728c2ecf20Sopenharmony_ci#define TEMP_DIS 0x6 10738c2ecf20Sopenharmony_ci#define BATT_OPEN 0x7 10748c2ecf20Sopenharmony_ci 10758c2ecf20Sopenharmony_ci#endif 1076