0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __DA9150_REGISTERS_H
0011 #define __DA9150_REGISTERS_H
0012
0013 #include <linux/bitops.h>
0014
0015
0016 #define DA9150_PAGE_CON 0x000
0017 #define DA9150_STATUS_A 0x068
0018 #define DA9150_STATUS_B 0x069
0019 #define DA9150_STATUS_C 0x06A
0020 #define DA9150_STATUS_D 0x06B
0021 #define DA9150_STATUS_E 0x06C
0022 #define DA9150_STATUS_F 0x06D
0023 #define DA9150_STATUS_G 0x06E
0024 #define DA9150_STATUS_H 0x06F
0025 #define DA9150_STATUS_I 0x070
0026 #define DA9150_STATUS_J 0x071
0027 #define DA9150_STATUS_K 0x072
0028 #define DA9150_STATUS_L 0x073
0029 #define DA9150_STATUS_N 0x074
0030 #define DA9150_FAULT_LOG_A 0x076
0031 #define DA9150_FAULT_LOG_B 0x077
0032 #define DA9150_EVENT_E 0x078
0033 #define DA9150_EVENT_F 0x079
0034 #define DA9150_EVENT_G 0x07A
0035 #define DA9150_EVENT_H 0x07B
0036 #define DA9150_IRQ_MASK_E 0x07C
0037 #define DA9150_IRQ_MASK_F 0x07D
0038 #define DA9150_IRQ_MASK_G 0x07E
0039 #define DA9150_IRQ_MASK_H 0x07F
0040 #define DA9150_PAGE_CON_1 0x080
0041 #define DA9150_CONFIG_A 0x0E0
0042 #define DA9150_CONFIG_B 0x0E1
0043 #define DA9150_CONFIG_C 0x0E2
0044 #define DA9150_CONFIG_D 0x0E3
0045 #define DA9150_CONFIG_E 0x0E4
0046 #define DA9150_CONTROL_A 0x0E5
0047 #define DA9150_CONTROL_B 0x0E6
0048 #define DA9150_CONTROL_C 0x0E7
0049 #define DA9150_GPIO_A_B 0x0E8
0050 #define DA9150_GPIO_C_D 0x0E9
0051 #define DA9150_GPIO_MODE_CONT 0x0EA
0052 #define DA9150_GPIO_CTRL_B 0x0EB
0053 #define DA9150_GPIO_CTRL_A 0x0EC
0054 #define DA9150_GPIO_CTRL_C 0x0ED
0055 #define DA9150_GPIO_CFG_A 0x0EE
0056 #define DA9150_GPIO_CFG_B 0x0EF
0057 #define DA9150_GPIO_CFG_C 0x0F0
0058 #define DA9150_GPADC_MAN 0x0F2
0059 #define DA9150_GPADC_RES_A 0x0F4
0060 #define DA9150_GPADC_RES_B 0x0F5
0061 #define DA9150_PAGE_CON_2 0x100
0062 #define DA9150_OTP_CONT_SHARED 0x101
0063 #define DA9150_INTERFACE_SHARED 0x105
0064 #define DA9150_CONFIG_A_SHARED 0x106
0065 #define DA9150_CONFIG_D_SHARED 0x109
0066 #define DA9150_ADETVB_CFG_C 0x150
0067 #define DA9150_ADETD_STAT 0x151
0068 #define DA9150_ADET_CMPSTAT 0x152
0069 #define DA9150_ADET_CTRL_A 0x153
0070 #define DA9150_ADETVB_CFG_B 0x154
0071 #define DA9150_ADETVB_CFG_A 0x155
0072 #define DA9150_ADETAC_CFG_A 0x156
0073 #define DA9150_ADDETAC_CFG_B 0x157
0074 #define DA9150_ADETAC_CFG_C 0x158
0075 #define DA9150_ADETAC_CFG_D 0x159
0076 #define DA9150_ADETVB_CFG_D 0x15A
0077 #define DA9150_ADETID_CFG_A 0x15B
0078 #define DA9150_ADET_RID_PT_CHG_H 0x15C
0079 #define DA9150_ADET_RID_PT_CHG_L 0x15D
0080 #define DA9150_PPR_TCTR_B 0x160
0081 #define DA9150_PPR_BKCTRL_A 0x163
0082 #define DA9150_PPR_BKCFG_A 0x164
0083 #define DA9150_PPR_BKCFG_B 0x165
0084 #define DA9150_PPR_CHGCTRL_A 0x166
0085 #define DA9150_PPR_CHGCTRL_B 0x167
0086 #define DA9150_PPR_CHGCTRL_C 0x168
0087 #define DA9150_PPR_TCTR_A 0x169
0088 #define DA9150_PPR_CHGCTRL_D 0x16A
0089 #define DA9150_PPR_CHGCTRL_E 0x16B
0090 #define DA9150_PPR_CHGCTRL_F 0x16C
0091 #define DA9150_PPR_CHGCTRL_G 0x16D
0092 #define DA9150_PPR_CHGCTRL_H 0x16E
0093 #define DA9150_PPR_CHGCTRL_I 0x16F
0094 #define DA9150_PPR_CHGCTRL_J 0x170
0095 #define DA9150_PPR_CHGCTRL_K 0x171
0096 #define DA9150_PPR_CHGCTRL_L 0x172
0097 #define DA9150_PPR_CHGCTRL_M 0x173
0098 #define DA9150_PPR_THYST_A 0x174
0099 #define DA9150_PPR_THYST_B 0x175
0100 #define DA9150_PPR_THYST_C 0x176
0101 #define DA9150_PPR_THYST_D 0x177
0102 #define DA9150_PPR_THYST_E 0x178
0103 #define DA9150_PPR_THYST_F 0x179
0104 #define DA9150_PPR_THYST_G 0x17A
0105 #define DA9150_PAGE_CON_3 0x180
0106 #define DA9150_PAGE_CON_4 0x200
0107 #define DA9150_PAGE_CON_5 0x280
0108 #define DA9150_PAGE_CON_6 0x300
0109 #define DA9150_COREBTLD_STAT_A 0x302
0110 #define DA9150_COREBTLD_CTRL_A 0x303
0111 #define DA9150_CORE_CONFIG_A 0x304
0112 #define DA9150_CORE_CONFIG_C 0x305
0113 #define DA9150_CORE_CONFIG_B 0x306
0114 #define DA9150_CORE_CFG_DATA_A 0x307
0115 #define DA9150_CORE_CFG_DATA_B 0x308
0116 #define DA9150_CORE_CMD_A 0x309
0117 #define DA9150_CORE_DATA_A 0x30A
0118 #define DA9150_CORE_DATA_B 0x30B
0119 #define DA9150_CORE_DATA_C 0x30C
0120 #define DA9150_CORE_DATA_D 0x30D
0121 #define DA9150_CORE2WIRE_STAT_A 0x310
0122 #define DA9150_CORE2WIRE_CTRL_A 0x311
0123 #define DA9150_FW_CTRL_A 0x312
0124 #define DA9150_FW_CTRL_C 0x313
0125 #define DA9150_FW_CTRL_D 0x314
0126 #define DA9150_FG_CTRL_A 0x315
0127 #define DA9150_FG_CTRL_B 0x316
0128 #define DA9150_FW_CTRL_E 0x317
0129 #define DA9150_FW_CTRL_B 0x318
0130 #define DA9150_GPADC_CMAN 0x320
0131 #define DA9150_GPADC_CRES_A 0x322
0132 #define DA9150_GPADC_CRES_B 0x323
0133 #define DA9150_CC_CFG_A 0x328
0134 #define DA9150_CC_CFG_B 0x329
0135 #define DA9150_CC_ICHG_RES_A 0x32A
0136 #define DA9150_CC_ICHG_RES_B 0x32B
0137 #define DA9150_CC_IAVG_RES_A 0x32C
0138 #define DA9150_CC_IAVG_RES_B 0x32D
0139 #define DA9150_TAUX_CTRL_A 0x330
0140 #define DA9150_TAUX_RELOAD_H 0x332
0141 #define DA9150_TAUX_RELOAD_L 0x333
0142 #define DA9150_TAUX_VALUE_H 0x334
0143 #define DA9150_TAUX_VALUE_L 0x335
0144 #define DA9150_AUX_DATA_0 0x338
0145 #define DA9150_AUX_DATA_1 0x339
0146 #define DA9150_AUX_DATA_2 0x33A
0147 #define DA9150_AUX_DATA_3 0x33B
0148 #define DA9150_BIF_CTRL 0x340
0149 #define DA9150_TBAT_CTRL_A 0x342
0150 #define DA9150_TBAT_CTRL_B 0x343
0151 #define DA9150_TBAT_RES_A 0x344
0152 #define DA9150_TBAT_RES_B 0x345
0153
0154
0155 #define DA9150_PAGE_SHIFT 0
0156 #define DA9150_PAGE_MASK (0x3f << 0)
0157 #define DA9150_I2C_PAGE_SHIFT 1
0158 #define DA9150_I2C_PAGE_MASK (0x1f << 1)
0159 #define DA9150_WRITE_MODE_SHIFT 6
0160 #define DA9150_WRITE_MODE_MASK BIT(6)
0161 #define DA9150_REVERT_SHIFT 7
0162 #define DA9150_REVERT_MASK BIT(7)
0163
0164
0165 #define DA9150_WKUP_STAT_SHIFT 2
0166 #define DA9150_WKUP_STAT_MASK (0x0f << 2)
0167 #define DA9150_SLEEP_STAT_SHIFT 6
0168 #define DA9150_SLEEP_STAT_MASK (0x03 << 6)
0169
0170
0171 #define DA9150_VFAULT_STAT_SHIFT 0
0172 #define DA9150_VFAULT_STAT_MASK BIT(0)
0173 #define DA9150_TFAULT_STAT_SHIFT 1
0174 #define DA9150_TFAULT_STAT_MASK BIT(1)
0175
0176
0177 #define DA9150_VDD33_STAT_SHIFT 0
0178 #define DA9150_VDD33_STAT_MASK BIT(0)
0179 #define DA9150_VDD33_SLEEP_SHIFT 1
0180 #define DA9150_VDD33_SLEEP_MASK BIT(1)
0181 #define DA9150_LFOSC_STAT_SHIFT 7
0182 #define DA9150_LFOSC_STAT_MASK BIT(7)
0183
0184
0185 #define DA9150_GPIOA_STAT_SHIFT 0
0186 #define DA9150_GPIOA_STAT_MASK BIT(0)
0187 #define DA9150_GPIOB_STAT_SHIFT 1
0188 #define DA9150_GPIOB_STAT_MASK BIT(1)
0189 #define DA9150_GPIOC_STAT_SHIFT 2
0190 #define DA9150_GPIOC_STAT_MASK BIT(2)
0191 #define DA9150_GPIOD_STAT_SHIFT 3
0192 #define DA9150_GPIOD_STAT_MASK BIT(3)
0193
0194
0195 #define DA9150_DTYPE_SHIFT 0
0196 #define DA9150_DTYPE_MASK (0x1f << 0)
0197 #define DA9150_DTYPE_DT_NIL (0x00 << 0)
0198 #define DA9150_DTYPE_DT_USB_OTG BIT(0)
0199 #define DA9150_DTYPE_DT_USB_STD (0x02 << 0)
0200 #define DA9150_DTYPE_DT_USB_CHG (0x03 << 0)
0201 #define DA9150_DTYPE_DT_ACA_CHG (0x04 << 0)
0202 #define DA9150_DTYPE_DT_ACA_OTG (0x05 << 0)
0203 #define DA9150_DTYPE_DT_ACA_DOC (0x06 << 0)
0204 #define DA9150_DTYPE_DT_DED_CHG (0x07 << 0)
0205 #define DA9150_DTYPE_DT_CR5_CHG (0x08 << 0)
0206 #define DA9150_DTYPE_DT_CR4_CHG (0x0c << 0)
0207 #define DA9150_DTYPE_DT_PT_CHG (0x11 << 0)
0208 #define DA9150_DTYPE_DT_NN_ACC (0x16 << 0)
0209 #define DA9150_DTYPE_DT_NN_CHG (0x17 << 0)
0210
0211
0212 #define DA9150_SESS_VLD_SHIFT 0
0213 #define DA9150_SESS_VLD_MASK BIT(0)
0214 #define DA9150_ID_ERR_SHIFT 1
0215 #define DA9150_ID_ERR_MASK BIT(1)
0216 #define DA9150_PT_CHG_SHIFT 2
0217 #define DA9150_PT_CHG_MASK BIT(2)
0218
0219
0220 #define DA9150_RID_SHIFT 0
0221 #define DA9150_RID_MASK (0xff << 0)
0222
0223
0224 #define DA9150_VBUS_STAT_SHIFT 0
0225 #define DA9150_VBUS_STAT_MASK (0x07 << 0)
0226 #define DA9150_VBUS_STAT_OFF (0x00 << 0)
0227 #define DA9150_VBUS_STAT_WAIT BIT(0)
0228 #define DA9150_VBUS_STAT_CHG (0x02 << 0)
0229 #define DA9150_VBUS_TRED_SHIFT 3
0230 #define DA9150_VBUS_TRED_MASK BIT(3)
0231 #define DA9150_VBUS_DROP_STAT_SHIFT 4
0232 #define DA9150_VBUS_DROP_STAT_MASK (0x0f << 4)
0233
0234
0235 #define DA9150_VBUS_ISET_STAT_SHIFT 0
0236 #define DA9150_VBUS_ISET_STAT_MASK (0x1f << 0)
0237 #define DA9150_VBUS_OT_SHIFT 7
0238 #define DA9150_VBUS_OT_MASK BIT(7)
0239
0240
0241 #define DA9150_CHG_STAT_SHIFT 0
0242 #define DA9150_CHG_STAT_MASK (0x0f << 0)
0243 #define DA9150_CHG_STAT_OFF (0x00 << 0)
0244 #define DA9150_CHG_STAT_SUSP BIT(0)
0245 #define DA9150_CHG_STAT_ACT (0x02 << 0)
0246 #define DA9150_CHG_STAT_PRE (0x03 << 0)
0247 #define DA9150_CHG_STAT_CC (0x04 << 0)
0248 #define DA9150_CHG_STAT_CV (0x05 << 0)
0249 #define DA9150_CHG_STAT_FULL (0x06 << 0)
0250 #define DA9150_CHG_STAT_TEMP (0x07 << 0)
0251 #define DA9150_CHG_STAT_TIME (0x08 << 0)
0252 #define DA9150_CHG_STAT_BAT (0x09 << 0)
0253 #define DA9150_CHG_TEMP_SHIFT 4
0254 #define DA9150_CHG_TEMP_MASK (0x07 << 4)
0255 #define DA9150_CHG_TEMP_UNDER (0x06 << 4)
0256 #define DA9150_CHG_TEMP_OVER (0x07 << 4)
0257 #define DA9150_CHG_IEND_STAT_SHIFT 7
0258 #define DA9150_CHG_IEND_STAT_MASK BIT(7)
0259
0260
0261 #define DA9150_CHG_IAV_H_SHIFT 0
0262 #define DA9150_CHG_IAV_H_MASK (0xff << 0)
0263
0264
0265 #define DA9150_CHG_IAV_L_SHIFT 5
0266 #define DA9150_CHG_IAV_L_MASK (0x07 << 5)
0267
0268
0269 #define DA9150_CHG_TIME_SHIFT 1
0270 #define DA9150_CHG_TIME_MASK BIT(1)
0271 #define DA9150_CHG_TRED_SHIFT 2
0272 #define DA9150_CHG_TRED_MASK BIT(2)
0273 #define DA9150_CHG_TJUNC_CLASS_SHIFT 3
0274 #define DA9150_CHG_TJUNC_CLASS_MASK (0x07 << 3)
0275 #define DA9150_CHG_TJUNC_CLASS_6 (0x06 << 3)
0276 #define DA9150_EBS_STAT_SHIFT 6
0277 #define DA9150_EBS_STAT_MASK BIT(6)
0278 #define DA9150_CHG_BAT_REMOVED_SHIFT 7
0279 #define DA9150_CHG_BAT_REMOVED_MASK BIT(7)
0280
0281
0282 #define DA9150_TEMP_FAULT_SHIFT 0
0283 #define DA9150_TEMP_FAULT_MASK BIT(0)
0284 #define DA9150_VSYS_FAULT_SHIFT 1
0285 #define DA9150_VSYS_FAULT_MASK BIT(1)
0286 #define DA9150_START_FAULT_SHIFT 2
0287 #define DA9150_START_FAULT_MASK BIT(2)
0288 #define DA9150_EXT_FAULT_SHIFT 3
0289 #define DA9150_EXT_FAULT_MASK BIT(3)
0290 #define DA9150_POR_FAULT_SHIFT 4
0291 #define DA9150_POR_FAULT_MASK BIT(4)
0292
0293
0294 #define DA9150_VBUS_FAULT_SHIFT 0
0295 #define DA9150_VBUS_FAULT_MASK BIT(0)
0296 #define DA9150_OTG_FAULT_SHIFT 1
0297 #define DA9150_OTG_FAULT_MASK BIT(1)
0298
0299
0300 #define DA9150_E_VBUS_SHIFT 0
0301 #define DA9150_E_VBUS_MASK BIT(0)
0302 #define DA9150_E_CHG_SHIFT 1
0303 #define DA9150_E_CHG_MASK BIT(1)
0304 #define DA9150_E_TCLASS_SHIFT 2
0305 #define DA9150_E_TCLASS_MASK BIT(2)
0306 #define DA9150_E_TJUNC_SHIFT 3
0307 #define DA9150_E_TJUNC_MASK BIT(3)
0308 #define DA9150_E_VFAULT_SHIFT 4
0309 #define DA9150_E_VFAULT_MASK BIT(4)
0310 #define DA9150_EVENTS_H_SHIFT 5
0311 #define DA9150_EVENTS_H_MASK BIT(5)
0312 #define DA9150_EVENTS_G_SHIFT 6
0313 #define DA9150_EVENTS_G_MASK BIT(6)
0314 #define DA9150_EVENTS_F_SHIFT 7
0315 #define DA9150_EVENTS_F_MASK BIT(7)
0316
0317
0318 #define DA9150_E_CONF_SHIFT 0
0319 #define DA9150_E_CONF_MASK BIT(0)
0320 #define DA9150_E_DAT_SHIFT 1
0321 #define DA9150_E_DAT_MASK BIT(1)
0322 #define DA9150_E_DTYPE_SHIFT 3
0323 #define DA9150_E_DTYPE_MASK BIT(3)
0324 #define DA9150_E_ID_SHIFT 4
0325 #define DA9150_E_ID_MASK BIT(4)
0326 #define DA9150_E_ADP_SHIFT 5
0327 #define DA9150_E_ADP_MASK BIT(5)
0328 #define DA9150_E_SESS_END_SHIFT 6
0329 #define DA9150_E_SESS_END_MASK BIT(6)
0330 #define DA9150_E_SESS_VLD_SHIFT 7
0331 #define DA9150_E_SESS_VLD_MASK BIT(7)
0332
0333
0334 #define DA9150_E_FG_SHIFT 0
0335 #define DA9150_E_FG_MASK BIT(0)
0336 #define DA9150_E_GP_SHIFT 1
0337 #define DA9150_E_GP_MASK BIT(1)
0338 #define DA9150_E_TBAT_SHIFT 2
0339 #define DA9150_E_TBAT_MASK BIT(2)
0340 #define DA9150_E_GPIOA_SHIFT 3
0341 #define DA9150_E_GPIOA_MASK BIT(3)
0342 #define DA9150_E_GPIOB_SHIFT 4
0343 #define DA9150_E_GPIOB_MASK BIT(4)
0344 #define DA9150_E_GPIOC_SHIFT 5
0345 #define DA9150_E_GPIOC_MASK BIT(5)
0346 #define DA9150_E_GPIOD_SHIFT 6
0347 #define DA9150_E_GPIOD_MASK BIT(6)
0348 #define DA9150_E_GPADC_SHIFT 7
0349 #define DA9150_E_GPADC_MASK BIT(7)
0350
0351
0352 #define DA9150_E_WKUP_SHIFT 0
0353 #define DA9150_E_WKUP_MASK BIT(0)
0354
0355
0356 #define DA9150_M_VBUS_SHIFT 0
0357 #define DA9150_M_VBUS_MASK BIT(0)
0358 #define DA9150_M_CHG_SHIFT 1
0359 #define DA9150_M_CHG_MASK BIT(1)
0360 #define DA9150_M_TJUNC_SHIFT 3
0361 #define DA9150_M_TJUNC_MASK BIT(3)
0362 #define DA9150_M_VFAULT_SHIFT 4
0363 #define DA9150_M_VFAULT_MASK BIT(4)
0364
0365
0366 #define DA9150_M_CONF_SHIFT 0
0367 #define DA9150_M_CONF_MASK BIT(0)
0368 #define DA9150_M_DAT_SHIFT 1
0369 #define DA9150_M_DAT_MASK BIT(1)
0370 #define DA9150_M_DTYPE_SHIFT 3
0371 #define DA9150_M_DTYPE_MASK BIT(3)
0372 #define DA9150_M_ID_SHIFT 4
0373 #define DA9150_M_ID_MASK BIT(4)
0374 #define DA9150_M_ADP_SHIFT 5
0375 #define DA9150_M_ADP_MASK BIT(5)
0376 #define DA9150_M_SESS_END_SHIFT 6
0377 #define DA9150_M_SESS_END_MASK BIT(6)
0378 #define DA9150_M_SESS_VLD_SHIFT 7
0379 #define DA9150_M_SESS_VLD_MASK BIT(7)
0380
0381
0382 #define DA9150_M_FG_SHIFT 0
0383 #define DA9150_M_FG_MASK BIT(0)
0384 #define DA9150_M_GP_SHIFT 1
0385 #define DA9150_M_GP_MASK BIT(1)
0386 #define DA9150_M_TBAT_SHIFT 2
0387 #define DA9150_M_TBAT_MASK BIT(2)
0388 #define DA9150_M_GPIOA_SHIFT 3
0389 #define DA9150_M_GPIOA_MASK BIT(3)
0390 #define DA9150_M_GPIOB_SHIFT 4
0391 #define DA9150_M_GPIOB_MASK BIT(4)
0392 #define DA9150_M_GPIOC_SHIFT 5
0393 #define DA9150_M_GPIOC_MASK BIT(5)
0394 #define DA9150_M_GPIOD_SHIFT 6
0395 #define DA9150_M_GPIOD_MASK BIT(6)
0396 #define DA9150_M_GPADC_SHIFT 7
0397 #define DA9150_M_GPADC_MASK BIT(7)
0398
0399
0400 #define DA9150_M_WKUP_SHIFT 0
0401 #define DA9150_M_WKUP_MASK BIT(0)
0402
0403
0404 #define DA9150_PAGE_SHIFT 0
0405 #define DA9150_PAGE_MASK (0x3f << 0)
0406 #define DA9150_WRITE_MODE_SHIFT 6
0407 #define DA9150_WRITE_MODE_MASK BIT(6)
0408 #define DA9150_REVERT_SHIFT 7
0409 #define DA9150_REVERT_MASK BIT(7)
0410
0411
0412 #define DA9150_RESET_DUR_SHIFT 0
0413 #define DA9150_RESET_DUR_MASK (0x03 << 0)
0414 #define DA9150_RESET_EXT_SHIFT 2
0415 #define DA9150_RESET_EXT_MASK (0x03 << 2)
0416 #define DA9150_START_MAX_SHIFT 4
0417 #define DA9150_START_MAX_MASK (0x03 << 4)
0418 #define DA9150_PS_WAIT_EN_SHIFT 6
0419 #define DA9150_PS_WAIT_EN_MASK BIT(6)
0420 #define DA9150_PS_DISABLE_DIRECT_SHIFT 7
0421 #define DA9150_PS_DISABLE_DIRECT_MASK BIT(7)
0422
0423
0424 #define DA9150_VFAULT_ADJ_SHIFT 0
0425 #define DA9150_VFAULT_ADJ_MASK (0x0f << 0)
0426 #define DA9150_VFAULT_HYST_SHIFT 4
0427 #define DA9150_VFAULT_HYST_MASK (0x07 << 4)
0428 #define DA9150_VFAULT_EN_SHIFT 7
0429 #define DA9150_VFAULT_EN_MASK BIT(7)
0430
0431
0432 #define DA9150_VSYS_MIN_SHIFT 3
0433 #define DA9150_VSYS_MIN_MASK (0x1f << 3)
0434
0435
0436 #define DA9150_LFOSC_EXT_SHIFT 0
0437 #define DA9150_LFOSC_EXT_MASK BIT(0)
0438 #define DA9150_VDD33_DWN_SHIFT 1
0439 #define DA9150_VDD33_DWN_MASK BIT(1)
0440 #define DA9150_WKUP_PM_EN_SHIFT 2
0441 #define DA9150_WKUP_PM_EN_MASK BIT(2)
0442 #define DA9150_WKUP_CE_SEL_SHIFT 3
0443 #define DA9150_WKUP_CE_SEL_MASK (0x03 << 3)
0444 #define DA9150_WKUP_CLK32K_EN_SHIFT 5
0445 #define DA9150_WKUP_CLK32K_EN_MASK BIT(5)
0446 #define DA9150_DISABLE_DEL_SHIFT 7
0447 #define DA9150_DISABLE_DEL_MASK BIT(7)
0448
0449
0450 #define DA9150_PM_SPKSUP_DIS_SHIFT 0
0451 #define DA9150_PM_SPKSUP_DIS_MASK BIT(0)
0452 #define DA9150_PM_MERGE_SHIFT 1
0453 #define DA9150_PM_MERGE_MASK BIT(1)
0454 #define DA9150_PM_SR_OFF_SHIFT 2
0455 #define DA9150_PM_SR_OFF_MASK BIT(2)
0456 #define DA9150_PM_TIMEOUT_EN_SHIFT 3
0457 #define DA9150_PM_TIMEOUT_EN_MASK BIT(3)
0458 #define DA9150_PM_DLY_SEL_SHIFT 4
0459 #define DA9150_PM_DLY_SEL_MASK (0x07 << 4)
0460 #define DA9150_PM_OUT_DLY_SEL_SHIFT 7
0461 #define DA9150_PM_OUT_DLY_SEL_MASK BIT(7)
0462
0463
0464 #define DA9150_VDD33_SL_SHIFT 0
0465 #define DA9150_VDD33_SL_MASK BIT(0)
0466 #define DA9150_VDD33_LPM_SHIFT 1
0467 #define DA9150_VDD33_LPM_MASK (0x03 << 1)
0468 #define DA9150_VDD33_EN_SHIFT 3
0469 #define DA9150_VDD33_EN_MASK BIT(3)
0470 #define DA9150_GPI_LPM_SHIFT 6
0471 #define DA9150_GPI_LPM_MASK BIT(6)
0472 #define DA9150_PM_IF_LPM_SHIFT 7
0473 #define DA9150_PM_IF_LPM_MASK BIT(7)
0474
0475
0476 #define DA9150_LPM_SHIFT 0
0477 #define DA9150_LPM_MASK BIT(0)
0478 #define DA9150_RESET_SHIFT 1
0479 #define DA9150_RESET_MASK BIT(1)
0480 #define DA9150_RESET_USRCONF_EN_SHIFT 2
0481 #define DA9150_RESET_USRCONF_EN_MASK BIT(2)
0482
0483
0484 #define DA9150_DISABLE_SHIFT 0
0485 #define DA9150_DISABLE_MASK BIT(0)
0486
0487
0488 #define DA9150_GPIOA_PIN_SHIFT 0
0489 #define DA9150_GPIOA_PIN_MASK (0x07 << 0)
0490 #define DA9150_GPIOA_PIN_GPI (0x00 << 0)
0491 #define DA9150_GPIOA_PIN_GPO_OD BIT(0)
0492 #define DA9150_GPIOA_TYPE_SHIFT 3
0493 #define DA9150_GPIOA_TYPE_MASK BIT(3)
0494 #define DA9150_GPIOB_PIN_SHIFT 4
0495 #define DA9150_GPIOB_PIN_MASK (0x07 << 4)
0496 #define DA9150_GPIOB_PIN_GPI (0x00 << 4)
0497 #define DA9150_GPIOB_PIN_GPO_OD BIT(4)
0498 #define DA9150_GPIOB_TYPE_SHIFT 7
0499 #define DA9150_GPIOB_TYPE_MASK BIT(7)
0500
0501
0502 #define DA9150_GPIOC_PIN_SHIFT 0
0503 #define DA9150_GPIOC_PIN_MASK (0x07 << 0)
0504 #define DA9150_GPIOC_PIN_GPI (0x00 << 0)
0505 #define DA9150_GPIOC_PIN_GPO_OD BIT(0)
0506 #define DA9150_GPIOC_TYPE_SHIFT 3
0507 #define DA9150_GPIOC_TYPE_MASK BIT(3)
0508 #define DA9150_GPIOD_PIN_SHIFT 4
0509 #define DA9150_GPIOD_PIN_MASK (0x07 << 4)
0510 #define DA9150_GPIOD_PIN_GPI (0x00 << 4)
0511 #define DA9150_GPIOD_PIN_GPO_OD BIT(4)
0512 #define DA9150_GPIOD_TYPE_SHIFT 7
0513 #define DA9150_GPIOD_TYPE_MASK BIT(7)
0514
0515
0516 #define DA9150_GPIOA_MODE_SHIFT 0
0517 #define DA9150_GPIOA_MODE_MASK BIT(0)
0518 #define DA9150_GPIOB_MODE_SHIFT 1
0519 #define DA9150_GPIOB_MODE_MASK BIT(1)
0520 #define DA9150_GPIOC_MODE_SHIFT 2
0521 #define DA9150_GPIOC_MODE_MASK BIT(2)
0522 #define DA9150_GPIOD_MODE_SHIFT 3
0523 #define DA9150_GPIOD_MODE_MASK BIT(3)
0524 #define DA9150_GPIOA_CONT_SHIFT 4
0525 #define DA9150_GPIOA_CONT_MASK BIT(4)
0526 #define DA9150_GPIOB_CONT_SHIFT 5
0527 #define DA9150_GPIOB_CONT_MASK BIT(5)
0528 #define DA9150_GPIOC_CONT_SHIFT 6
0529 #define DA9150_GPIOC_CONT_MASK BIT(6)
0530 #define DA9150_GPIOD_CONT_SHIFT 7
0531 #define DA9150_GPIOD_CONT_MASK BIT(7)
0532
0533
0534 #define DA9150_WAKE_PIN_SHIFT 0
0535 #define DA9150_WAKE_PIN_MASK (0x03 << 0)
0536 #define DA9150_WAKE_MODE_SHIFT 2
0537 #define DA9150_WAKE_MODE_MASK BIT(2)
0538 #define DA9150_WAKE_CONT_SHIFT 3
0539 #define DA9150_WAKE_CONT_MASK BIT(3)
0540 #define DA9150_WAKE_DLY_SHIFT 4
0541 #define DA9150_WAKE_DLY_MASK BIT(4)
0542
0543
0544 #define DA9150_GPIOA_ANAEN_SHIFT 0
0545 #define DA9150_GPIOA_ANAEN_MASK BIT(0)
0546 #define DA9150_GPIOB_ANAEN_SHIFT 1
0547 #define DA9150_GPIOB_ANAEN_MASK BIT(1)
0548 #define DA9150_GPIOC_ANAEN_SHIFT 2
0549 #define DA9150_GPIOC_ANAEN_MASK BIT(2)
0550 #define DA9150_GPIOD_ANAEN_SHIFT 3
0551 #define DA9150_GPIOD_ANAEN_MASK BIT(3)
0552 #define DA9150_GPIO_ANAEN 0x01
0553 #define DA9150_GPIO_ANAEN_MASK 0x0F
0554 #define DA9150_CHGLED_PIN_SHIFT 5
0555 #define DA9150_CHGLED_PIN_MASK (0x07 << 5)
0556
0557
0558 #define DA9150_CHGBL_DUR_SHIFT 0
0559 #define DA9150_CHGBL_DUR_MASK (0x03 << 0)
0560 #define DA9150_CHGBL_DBL_SHIFT 2
0561 #define DA9150_CHGBL_DBL_MASK BIT(2)
0562 #define DA9150_CHGBL_FRQ_SHIFT 3
0563 #define DA9150_CHGBL_FRQ_MASK (0x03 << 3)
0564 #define DA9150_CHGBL_FLKR_SHIFT 5
0565 #define DA9150_CHGBL_FLKR_MASK BIT(5)
0566
0567
0568 #define DA9150_CE_LPM_DEB_SHIFT 0
0569 #define DA9150_CE_LPM_DEB_MASK (0x07 << 0)
0570
0571
0572 #define DA9150_GPIOA_PUPD_SHIFT 0
0573 #define DA9150_GPIOA_PUPD_MASK BIT(0)
0574 #define DA9150_GPIOB_PUPD_SHIFT 1
0575 #define DA9150_GPIOB_PUPD_MASK BIT(1)
0576 #define DA9150_GPIOC_PUPD_SHIFT 2
0577 #define DA9150_GPIOC_PUPD_MASK BIT(2)
0578 #define DA9150_GPIOD_PUPD_SHIFT 3
0579 #define DA9150_GPIOD_PUPD_MASK BIT(3)
0580 #define DA9150_GPIO_PUPD_MASK (0xF << 0)
0581 #define DA9150_GPI_DEB_SHIFT 4
0582 #define DA9150_GPI_DEB_MASK (0x07 << 4)
0583 #define DA9150_LPM_EN_SHIFT 7
0584 #define DA9150_LPM_EN_MASK BIT(7)
0585
0586
0587 #define DA9150_GPI_V_SHIFT 0
0588 #define DA9150_GPI_V_MASK BIT(0)
0589 #define DA9150_VDDIO_INT_SHIFT 1
0590 #define DA9150_VDDIO_INT_MASK BIT(1)
0591 #define DA9150_FAULT_PIN_SHIFT 3
0592 #define DA9150_FAULT_PIN_MASK (0x07 << 3)
0593 #define DA9150_FAULT_TYPE_SHIFT 6
0594 #define DA9150_FAULT_TYPE_MASK BIT(6)
0595 #define DA9150_NIRQ_PUPD_SHIFT 7
0596 #define DA9150_NIRQ_PUPD_MASK BIT(7)
0597
0598
0599 #define DA9150_GPADC_EN_SHIFT 0
0600 #define DA9150_GPADC_EN_MASK BIT(0)
0601 #define DA9150_GPADC_MUX_SHIFT 1
0602 #define DA9150_GPADC_MUX_MASK (0x1f << 1)
0603
0604
0605 #define DA9150_GPADC_RES_H_SHIFT 0
0606 #define DA9150_GPADC_RES_H_MASK (0xff << 0)
0607
0608
0609 #define DA9150_GPADC_RUN_SHIFT 0
0610 #define DA9150_GPADC_RUN_MASK BIT(0)
0611 #define DA9150_GPADC_RES_L_SHIFT 6
0612 #define DA9150_GPADC_RES_L_MASK (0x03 << 6)
0613 #define DA9150_GPADC_RES_L_BITS 2
0614
0615
0616 #define DA9150_PAGE_SHIFT 0
0617 #define DA9150_PAGE_MASK (0x3f << 0)
0618 #define DA9150_WRITE_MODE_SHIFT 6
0619 #define DA9150_WRITE_MODE_MASK BIT(6)
0620 #define DA9150_REVERT_SHIFT 7
0621 #define DA9150_REVERT_MASK BIT(7)
0622
0623
0624 #define DA9150_PC_DONE_SHIFT 3
0625 #define DA9150_PC_DONE_MASK BIT(3)
0626
0627
0628 #define DA9150_IF_BASE_ADDR_SHIFT 4
0629 #define DA9150_IF_BASE_ADDR_MASK (0x0f << 4)
0630
0631
0632 #define DA9150_NIRQ_VDD_SHIFT 1
0633 #define DA9150_NIRQ_VDD_MASK BIT(1)
0634 #define DA9150_NIRQ_PIN_SHIFT 2
0635 #define DA9150_NIRQ_PIN_MASK BIT(2)
0636 #define DA9150_NIRQ_TYPE_SHIFT 3
0637 #define DA9150_NIRQ_TYPE_MASK BIT(3)
0638 #define DA9150_PM_IF_V_SHIFT 4
0639 #define DA9150_PM_IF_V_MASK BIT(4)
0640 #define DA9150_PM_IF_FMP_SHIFT 5
0641 #define DA9150_PM_IF_FMP_MASK BIT(5)
0642 #define DA9150_PM_IF_HSM_SHIFT 6
0643 #define DA9150_PM_IF_HSM_MASK BIT(6)
0644
0645
0646 #define DA9150_NIRQ_MODE_SHIFT 1
0647 #define DA9150_NIRQ_MODE_MASK BIT(1)
0648
0649
0650 #define DA9150_TADP_RISE_SHIFT 0
0651 #define DA9150_TADP_RISE_MASK (0xff << 0)
0652
0653
0654 #define DA9150_DCD_STAT_SHIFT 0
0655 #define DA9150_DCD_STAT_MASK BIT(0)
0656 #define DA9150_PCD_STAT_SHIFT 1
0657 #define DA9150_PCD_STAT_MASK (0x03 << 1)
0658 #define DA9150_SCD_STAT_SHIFT 3
0659 #define DA9150_SCD_STAT_MASK (0x03 << 3)
0660 #define DA9150_DP_STAT_SHIFT 5
0661 #define DA9150_DP_STAT_MASK BIT(5)
0662 #define DA9150_DM_STAT_SHIFT 6
0663 #define DA9150_DM_STAT_MASK BIT(6)
0664
0665
0666 #define DA9150_DP_COMP_SHIFT 1
0667 #define DA9150_DP_COMP_MASK BIT(1)
0668 #define DA9150_DM_COMP_SHIFT 2
0669 #define DA9150_DM_COMP_MASK BIT(2)
0670 #define DA9150_ADP_SNS_COMP_SHIFT 3
0671 #define DA9150_ADP_SNS_COMP_MASK BIT(3)
0672 #define DA9150_ADP_PRB_COMP_SHIFT 4
0673 #define DA9150_ADP_PRB_COMP_MASK BIT(4)
0674 #define DA9150_ID_COMP_SHIFT 5
0675 #define DA9150_ID_COMP_MASK BIT(5)
0676
0677
0678 #define DA9150_AID_DAT_SHIFT 0
0679 #define DA9150_AID_DAT_MASK BIT(0)
0680 #define DA9150_AID_ID_SHIFT 1
0681 #define DA9150_AID_ID_MASK BIT(1)
0682 #define DA9150_AID_TRIG_SHIFT 2
0683 #define DA9150_AID_TRIG_MASK BIT(2)
0684
0685
0686 #define DA9150_VB_MODE_SHIFT 0
0687 #define DA9150_VB_MODE_MASK (0x03 << 0)
0688 #define DA9150_VB_MODE_VB_SESS BIT(0)
0689
0690 #define DA9150_TADP_PRB_SHIFT 2
0691 #define DA9150_TADP_PRB_MASK BIT(2)
0692 #define DA9150_DAT_RPD_EXT_SHIFT 5
0693 #define DA9150_DAT_RPD_EXT_MASK BIT(5)
0694 #define DA9150_CONF_RPD_SHIFT 6
0695 #define DA9150_CONF_RPD_MASK BIT(6)
0696 #define DA9150_CONF_SRP_SHIFT 7
0697 #define DA9150_CONF_SRP_MASK BIT(7)
0698
0699
0700 #define DA9150_AID_MODE_SHIFT 0
0701 #define DA9150_AID_MODE_MASK (0x03 << 0)
0702 #define DA9150_AID_EXT_POL_SHIFT 2
0703 #define DA9150_AID_EXT_POL_MASK BIT(2)
0704
0705
0706 #define DA9150_ISET_CDP_SHIFT 0
0707 #define DA9150_ISET_CDP_MASK (0x1f << 0)
0708 #define DA9150_CONF_DBP_SHIFT 5
0709 #define DA9150_CONF_DBP_MASK BIT(5)
0710
0711
0712 #define DA9150_ISET_DCHG_SHIFT 0
0713 #define DA9150_ISET_DCHG_MASK (0x1f << 0)
0714 #define DA9150_CONF_GPIOA_SHIFT 5
0715 #define DA9150_CONF_GPIOA_MASK BIT(5)
0716 #define DA9150_CONF_GPIOB_SHIFT 6
0717 #define DA9150_CONF_GPIOB_MASK BIT(6)
0718 #define DA9150_AID_VB_SHIFT 7
0719 #define DA9150_AID_VB_MASK BIT(7)
0720
0721
0722 #define DA9150_ISET_DEF_SHIFT 0
0723 #define DA9150_ISET_DEF_MASK (0x1f << 0)
0724 #define DA9150_CONF_MODE_SHIFT 5
0725 #define DA9150_CONF_MODE_MASK (0x03 << 5)
0726 #define DA9150_AID_CR_DIS_SHIFT 7
0727 #define DA9150_AID_CR_DIS_MASK BIT(7)
0728
0729
0730 #define DA9150_ISET_UNIT_SHIFT 0
0731 #define DA9150_ISET_UNIT_MASK (0x1f << 0)
0732 #define DA9150_AID_UNCLAMP_SHIFT 5
0733 #define DA9150_AID_UNCLAMP_MASK BIT(5)
0734
0735
0736 #define DA9150_ID_MODE_SHIFT 0
0737 #define DA9150_ID_MODE_MASK (0x03 << 0)
0738 #define DA9150_DAT_MODE_SHIFT 2
0739 #define DA9150_DAT_MODE_MASK (0x0f << 2)
0740 #define DA9150_DAT_SWP_SHIFT 6
0741 #define DA9150_DAT_SWP_MASK BIT(6)
0742 #define DA9150_DAT_CLAMP_EXT_SHIFT 7
0743 #define DA9150_DAT_CLAMP_EXT_MASK BIT(7)
0744
0745
0746 #define DA9150_TID_POLL_SHIFT 0
0747 #define DA9150_TID_POLL_MASK (0x07 << 0)
0748 #define DA9150_RID_CONV_SHIFT 3
0749 #define DA9150_RID_CONV_MASK BIT(3)
0750
0751
0752 #define DA9150_RID_PT_CHG_H_SHIFT 0
0753 #define DA9150_RID_PT_CHG_H_MASK (0xff << 0)
0754
0755
0756 #define DA9150_RID_PT_CHG_L_SHIFT 6
0757 #define DA9150_RID_PT_CHG_L_MASK (0x03 << 6)
0758
0759
0760 #define DA9150_CHG_TCTR_VAL_SHIFT 0
0761 #define DA9150_CHG_TCTR_VAL_MASK (0xff << 0)
0762
0763
0764 #define DA9150_VBUS_MODE_SHIFT 0
0765 #define DA9150_VBUS_MODE_MASK (0x03 << 0)
0766 #define DA9150_VBUS_MODE_CHG BIT(0)
0767 #define DA9150_VBUS_MODE_OTG (0x02 << 0)
0768 #define DA9150_VBUS_LPM_SHIFT 2
0769 #define DA9150_VBUS_LPM_MASK (0x03 << 2)
0770 #define DA9150_VBUS_SUSP_SHIFT 4
0771 #define DA9150_VBUS_SUSP_MASK BIT(4)
0772 #define DA9150_VBUS_PWM_SHIFT 5
0773 #define DA9150_VBUS_PWM_MASK BIT(5)
0774 #define DA9150_VBUS_ISO_SHIFT 6
0775 #define DA9150_VBUS_ISO_MASK BIT(6)
0776 #define DA9150_VBUS_LDO_SHIFT 7
0777 #define DA9150_VBUS_LDO_MASK BIT(7)
0778
0779
0780 #define DA9150_VBUS_ISET_SHIFT 0
0781 #define DA9150_VBUS_ISET_MASK (0x1f << 0)
0782 #define DA9150_VBUS_IMAX_SHIFT 5
0783 #define DA9150_VBUS_IMAX_MASK BIT(5)
0784 #define DA9150_VBUS_IOTG_SHIFT 6
0785 #define DA9150_VBUS_IOTG_MASK (0x03 << 6)
0786
0787
0788 #define DA9150_VBUS_DROP_SHIFT 0
0789 #define DA9150_VBUS_DROP_MASK (0x0f << 0)
0790 #define DA9150_VBUS_FAULT_DIS_SHIFT 6
0791 #define DA9150_VBUS_FAULT_DIS_MASK BIT(6)
0792 #define DA9150_OTG_FAULT_DIS_SHIFT 7
0793 #define DA9150_OTG_FAULT_DIS_MASK BIT(7)
0794
0795
0796 #define DA9150_CHG_EN_SHIFT 0
0797 #define DA9150_CHG_EN_MASK BIT(0)
0798
0799
0800 #define DA9150_CHG_VBAT_SHIFT 0
0801 #define DA9150_CHG_VBAT_MASK (0x1f << 0)
0802 #define DA9150_CHG_VDROP_SHIFT 6
0803 #define DA9150_CHG_VDROP_MASK (0x03 << 6)
0804
0805
0806 #define DA9150_CHG_VFAULT_SHIFT 0
0807 #define DA9150_CHG_VFAULT_MASK (0x0f << 0)
0808 #define DA9150_CHG_IPRE_SHIFT 4
0809 #define DA9150_CHG_IPRE_MASK (0x03 << 4)
0810
0811
0812 #define DA9150_CHG_TCTR_SHIFT 0
0813 #define DA9150_CHG_TCTR_MASK (0x07 << 0)
0814 #define DA9150_CHG_TCTR_MODE_SHIFT 4
0815 #define DA9150_CHG_TCTR_MODE_MASK BIT(4)
0816
0817
0818 #define DA9150_CHG_IBAT_SHIFT 0
0819 #define DA9150_CHG_IBAT_MASK (0xff << 0)
0820
0821
0822 #define DA9150_CHG_IEND_SHIFT 0
0823 #define DA9150_CHG_IEND_MASK (0xff << 0)
0824
0825
0826 #define DA9150_CHG_VCOLD_SHIFT 0
0827 #define DA9150_CHG_VCOLD_MASK (0x1f << 0)
0828 #define DA9150_TBAT_TQA_EN_SHIFT 6
0829 #define DA9150_TBAT_TQA_EN_MASK BIT(6)
0830 #define DA9150_TBAT_TDP_EN_SHIFT 7
0831 #define DA9150_TBAT_TDP_EN_MASK BIT(7)
0832
0833
0834 #define DA9150_CHG_VWARM_SHIFT 0
0835 #define DA9150_CHG_VWARM_MASK (0x1f << 0)
0836
0837
0838 #define DA9150_CHG_VHOT_SHIFT 0
0839 #define DA9150_CHG_VHOT_MASK (0x1f << 0)
0840
0841
0842 #define DA9150_CHG_ICOLD_SHIFT 0
0843 #define DA9150_CHG_ICOLD_MASK (0xff << 0)
0844
0845
0846 #define DA9150_CHG_IWARM_SHIFT 0
0847 #define DA9150_CHG_IWARM_MASK (0xff << 0)
0848
0849
0850 #define DA9150_CHG_IHOT_SHIFT 0
0851 #define DA9150_CHG_IHOT_MASK (0xff << 0)
0852
0853
0854 #define DA9150_CHG_IBAT_TRED_SHIFT 0
0855 #define DA9150_CHG_IBAT_TRED_MASK (0xff << 0)
0856
0857
0858 #define DA9150_CHG_VFLOAT_SHIFT 0
0859 #define DA9150_CHG_VFLOAT_MASK (0x0f << 0)
0860 #define DA9150_CHG_LPM_SHIFT 5
0861 #define DA9150_CHG_LPM_MASK BIT(5)
0862 #define DA9150_CHG_NBLO_SHIFT 6
0863 #define DA9150_CHG_NBLO_MASK BIT(6)
0864 #define DA9150_EBS_EN_SHIFT 7
0865 #define DA9150_EBS_EN_MASK BIT(7)
0866
0867
0868 #define DA9150_TBAT_T1_SHIFT 0
0869 #define DA9150_TBAT_T1_MASK (0xff << 0)
0870
0871
0872 #define DA9150_TBAT_T2_SHIFT 0
0873 #define DA9150_TBAT_T2_MASK (0xff << 0)
0874
0875
0876 #define DA9150_TBAT_T3_SHIFT 0
0877 #define DA9150_TBAT_T3_MASK (0xff << 0)
0878
0879
0880 #define DA9150_TBAT_T4_SHIFT 0
0881 #define DA9150_TBAT_T4_MASK (0xff << 0)
0882
0883
0884 #define DA9150_TBAT_T5_SHIFT 0
0885 #define DA9150_TBAT_T5_MASK (0xff << 0)
0886
0887
0888 #define DA9150_TBAT_H1_SHIFT 0
0889 #define DA9150_TBAT_H1_MASK (0xff << 0)
0890
0891
0892 #define DA9150_TBAT_H5_SHIFT 0
0893 #define DA9150_TBAT_H5_MASK (0xff << 0)
0894
0895
0896 #define DA9150_PAGE_SHIFT 0
0897 #define DA9150_PAGE_MASK (0x3f << 0)
0898 #define DA9150_WRITE_MODE_SHIFT 6
0899 #define DA9150_WRITE_MODE_MASK BIT(6)
0900 #define DA9150_REVERT_SHIFT 7
0901 #define DA9150_REVERT_MASK BIT(7)
0902
0903
0904 #define DA9150_PAGE_SHIFT 0
0905 #define DA9150_PAGE_MASK (0x3f << 0)
0906 #define DA9150_WRITE_MODE_SHIFT 6
0907 #define DA9150_WRITE_MODE_MASK BIT(6)
0908 #define DA9150_REVERT_SHIFT 7
0909 #define DA9150_REVERT_MASK BIT(7)
0910
0911
0912 #define DA9150_PAGE_SHIFT 0
0913 #define DA9150_PAGE_MASK (0x3f << 0)
0914 #define DA9150_WRITE_MODE_SHIFT 6
0915 #define DA9150_WRITE_MODE_MASK BIT(6)
0916 #define DA9150_REVERT_SHIFT 7
0917 #define DA9150_REVERT_MASK BIT(7)
0918
0919
0920 #define DA9150_PAGE_SHIFT 0
0921 #define DA9150_PAGE_MASK (0x3f << 0)
0922 #define DA9150_WRITE_MODE_SHIFT 6
0923 #define DA9150_WRITE_MODE_MASK BIT(6)
0924 #define DA9150_REVERT_SHIFT 7
0925 #define DA9150_REVERT_MASK BIT(7)
0926
0927
0928 #define DA9150_BOOTLD_STAT_SHIFT 0
0929 #define DA9150_BOOTLD_STAT_MASK (0x03 << 0)
0930 #define DA9150_CORE_LOCKUP_SHIFT 2
0931 #define DA9150_CORE_LOCKUP_MASK BIT(2)
0932
0933
0934 #define DA9150_CORE_RESET_SHIFT 0
0935 #define DA9150_CORE_RESET_MASK BIT(0)
0936 #define DA9150_CORE_STOP_SHIFT 1
0937 #define DA9150_CORE_STOP_MASK BIT(1)
0938
0939
0940 #define DA9150_CORE_MEMMUX_SHIFT 0
0941 #define DA9150_CORE_MEMMUX_MASK (0x03 << 0)
0942 #define DA9150_WDT_AUTO_START_SHIFT 2
0943 #define DA9150_WDT_AUTO_START_MASK BIT(2)
0944 #define DA9150_WDT_AUTO_LOCK_SHIFT 3
0945 #define DA9150_WDT_AUTO_LOCK_MASK BIT(3)
0946 #define DA9150_WDT_HLT_NO_CLK_SHIFT 4
0947 #define DA9150_WDT_HLT_NO_CLK_MASK BIT(4)
0948
0949
0950 #define DA9150_CORE_SW_SIZE_SHIFT 0
0951 #define DA9150_CORE_SW_SIZE_MASK (0xff << 0)
0952
0953
0954 #define DA9150_BOOTLD_EN_SHIFT 0
0955 #define DA9150_BOOTLD_EN_MASK BIT(0)
0956 #define DA9150_CORE_EN_SHIFT 2
0957 #define DA9150_CORE_EN_MASK BIT(2)
0958 #define DA9150_CORE_SW_SRC_SHIFT 3
0959 #define DA9150_CORE_SW_SRC_MASK (0x07 << 3)
0960 #define DA9150_DEEP_SLEEP_EN_SHIFT 7
0961 #define DA9150_DEEP_SLEEP_EN_MASK BIT(7)
0962
0963
0964 #define DA9150_CORE_CFG_DT_A_SHIFT 0
0965 #define DA9150_CORE_CFG_DT_A_MASK (0xff << 0)
0966
0967
0968 #define DA9150_CORE_CFG_DT_B_SHIFT 0
0969 #define DA9150_CORE_CFG_DT_B_MASK (0xff << 0)
0970
0971
0972 #define DA9150_CORE_CMD_SHIFT 0
0973 #define DA9150_CORE_CMD_MASK (0xff << 0)
0974
0975
0976 #define DA9150_CORE_DATA_0_SHIFT 0
0977 #define DA9150_CORE_DATA_0_MASK (0xff << 0)
0978
0979
0980 #define DA9150_CORE_DATA_1_SHIFT 0
0981 #define DA9150_CORE_DATA_1_MASK (0xff << 0)
0982
0983
0984 #define DA9150_CORE_DATA_2_SHIFT 0
0985 #define DA9150_CORE_DATA_2_MASK (0xff << 0)
0986
0987
0988 #define DA9150_CORE_DATA_3_SHIFT 0
0989 #define DA9150_CORE_DATA_3_MASK (0xff << 0)
0990
0991
0992 #define DA9150_FW_FWDL_ERR_SHIFT 7
0993 #define DA9150_FW_FWDL_ERR_MASK BIT(7)
0994
0995
0996 #define DA9150_FW_FWDL_EN_SHIFT 0
0997 #define DA9150_FW_FWDL_EN_MASK BIT(0)
0998 #define DA9150_FG_QIF_EN_SHIFT 1
0999 #define DA9150_FG_QIF_EN_MASK BIT(1)
1000 #define DA9150_CORE_BASE_ADDR_SHIFT 4
1001 #define DA9150_CORE_BASE_ADDR_MASK (0x0f << 4)
1002
1003
1004 #define DA9150_FW_SEAL_SHIFT 0
1005 #define DA9150_FW_SEAL_MASK (0xff << 0)
1006
1007
1008 #define DA9150_FW_FWDL_CRC_SHIFT 0
1009 #define DA9150_FW_FWDL_CRC_MASK (0xff << 0)
1010
1011
1012 #define DA9150_FW_FWDL_BASE_SHIFT 0
1013 #define DA9150_FW_FWDL_BASE_MASK (0x0f << 0)
1014
1015
1016 #define DA9150_FG_QIF_CODE_SHIFT 0
1017 #define DA9150_FG_QIF_CODE_MASK (0xff << 0)
1018
1019
1020 #define DA9150_FG_QIF_VALUE_SHIFT 0
1021 #define DA9150_FG_QIF_VALUE_MASK (0xff << 0)
1022
1023
1024 #define DA9150_FW_FWDL_SEG_SHIFT 0
1025 #define DA9150_FW_FWDL_SEG_MASK (0xff << 0)
1026
1027
1028 #define DA9150_FW_FWDL_VALUE_SHIFT 0
1029 #define DA9150_FW_FWDL_VALUE_MASK (0xff << 0)
1030
1031
1032 #define DA9150_GPADC_CEN_SHIFT 0
1033 #define DA9150_GPADC_CEN_MASK BIT(0)
1034 #define DA9150_GPADC_CMUX_SHIFT 1
1035 #define DA9150_GPADC_CMUX_MASK (0x1f << 1)
1036
1037
1038 #define DA9150_GPADC_CRES_H_SHIFT 0
1039 #define DA9150_GPADC_CRES_H_MASK (0xff << 0)
1040
1041
1042 #define DA9150_GPADC_CRUN_SHIFT 0
1043 #define DA9150_GPADC_CRUN_MASK BIT(0)
1044 #define DA9150_GPADC_CRES_L_SHIFT 6
1045 #define DA9150_GPADC_CRES_L_MASK (0x03 << 6)
1046
1047
1048 #define DA9150_CC_EN_SHIFT 0
1049 #define DA9150_CC_EN_MASK BIT(0)
1050 #define DA9150_CC_TIMEBASE_SHIFT 1
1051 #define DA9150_CC_TIMEBASE_MASK (0x03 << 1)
1052 #define DA9150_CC_CFG_SHIFT 5
1053 #define DA9150_CC_CFG_MASK (0x03 << 5)
1054 #define DA9150_CC_ENDLESS_MODE_SHIFT 7
1055 #define DA9150_CC_ENDLESS_MODE_MASK BIT(7)
1056
1057
1058 #define DA9150_CC_OPT_SHIFT 0
1059 #define DA9150_CC_OPT_MASK (0x03 << 0)
1060 #define DA9150_CC_PREAMP_SHIFT 2
1061 #define DA9150_CC_PREAMP_MASK (0x03 << 2)
1062
1063
1064 #define DA9150_CC_ICHG_RES_H_SHIFT 0
1065 #define DA9150_CC_ICHG_RES_H_MASK (0xff << 0)
1066
1067
1068 #define DA9150_CC_ICHG_RES_L_SHIFT 3
1069 #define DA9150_CC_ICHG_RES_L_MASK (0x1f << 3)
1070
1071
1072 #define DA9150_CC_IAVG_RES_H_SHIFT 0
1073 #define DA9150_CC_IAVG_RES_H_MASK (0xff << 0)
1074
1075
1076 #define DA9150_CC_IAVG_RES_L_SHIFT 0
1077 #define DA9150_CC_IAVG_RES_L_MASK (0xff << 0)
1078
1079
1080 #define DA9150_TAUX_EN_SHIFT 0
1081 #define DA9150_TAUX_EN_MASK BIT(0)
1082 #define DA9150_TAUX_MOD_SHIFT 1
1083 #define DA9150_TAUX_MOD_MASK BIT(1)
1084 #define DA9150_TAUX_UPDATE_SHIFT 2
1085 #define DA9150_TAUX_UPDATE_MASK BIT(2)
1086
1087
1088 #define DA9150_TAUX_RLD_H_SHIFT 0
1089 #define DA9150_TAUX_RLD_H_MASK (0xff << 0)
1090
1091
1092 #define DA9150_TAUX_RLD_L_SHIFT 3
1093 #define DA9150_TAUX_RLD_L_MASK (0x1f << 3)
1094
1095
1096 #define DA9150_TAUX_VAL_H_SHIFT 0
1097 #define DA9150_TAUX_VAL_H_MASK (0xff << 0)
1098
1099
1100 #define DA9150_TAUX_VAL_L_SHIFT 3
1101 #define DA9150_TAUX_VAL_L_MASK (0x1f << 3)
1102
1103
1104 #define DA9150_AUX_DAT_0_SHIFT 0
1105 #define DA9150_AUX_DAT_0_MASK (0xff << 0)
1106
1107
1108 #define DA9150_AUX_DAT_1_SHIFT 0
1109 #define DA9150_AUX_DAT_1_MASK (0xff << 0)
1110
1111
1112 #define DA9150_AUX_DAT_2_SHIFT 0
1113 #define DA9150_AUX_DAT_2_MASK (0xff << 0)
1114
1115
1116 #define DA9150_AUX_DAT_3_SHIFT 0
1117 #define DA9150_AUX_DAT_3_MASK (0xff << 0)
1118
1119
1120 #define DA9150_BIF_ISRC_EN_SHIFT 0
1121 #define DA9150_BIF_ISRC_EN_MASK BIT(0)
1122
1123
1124 #define DA9150_TBAT_EN_SHIFT 0
1125 #define DA9150_TBAT_EN_MASK BIT(0)
1126 #define DA9150_TBAT_SW1_SHIFT 1
1127 #define DA9150_TBAT_SW1_MASK BIT(1)
1128 #define DA9150_TBAT_SW2_SHIFT 2
1129 #define DA9150_TBAT_SW2_MASK BIT(2)
1130
1131
1132 #define DA9150_TBAT_SW_FRC_SHIFT 0
1133 #define DA9150_TBAT_SW_FRC_MASK BIT(0)
1134 #define DA9150_TBAT_STAT_SW1_SHIFT 1
1135 #define DA9150_TBAT_STAT_SW1_MASK BIT(1)
1136 #define DA9150_TBAT_STAT_SW2_SHIFT 2
1137 #define DA9150_TBAT_STAT_SW2_MASK BIT(2)
1138 #define DA9150_TBAT_HIGH_CURR_SHIFT 3
1139 #define DA9150_TBAT_HIGH_CURR_MASK BIT(3)
1140
1141
1142 #define DA9150_TBAT_RES_H_SHIFT 0
1143 #define DA9150_TBAT_RES_H_MASK (0xff << 0)
1144
1145
1146 #define DA9150_TBAT_RES_DIS_SHIFT 0
1147 #define DA9150_TBAT_RES_DIS_MASK BIT(0)
1148 #define DA9150_TBAT_RES_L_SHIFT 6
1149 #define DA9150_TBAT_RES_L_MASK (0x03 << 6)
1150
1151 #endif