0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __DA9055_REG_H
0011 #define __DA9055_REG_H
0012
0013
0014
0015
0016
0017 #define DA9055_REG_PAGE_CON 0x00
0018
0019
0020 #define DA9055_REG_STATUS_A 0x01
0021 #define DA9055_REG_STATUS_B 0x02
0022 #define DA9055_REG_FAULT_LOG 0x03
0023 #define DA9055_REG_EVENT_A 0x04
0024 #define DA9055_REG_EVENT_B 0x05
0025 #define DA9055_REG_EVENT_C 0x06
0026 #define DA9055_REG_IRQ_MASK_A 0x07
0027 #define DA9055_REG_IRQ_MASK_B 0x08
0028 #define DA9055_REG_IRQ_MASK_C 0x09
0029 #define DA9055_REG_CONTROL_A 0x0A
0030 #define DA9055_REG_CONTROL_B 0x0B
0031 #define DA9055_REG_CONTROL_C 0x0C
0032 #define DA9055_REG_CONTROL_D 0x0D
0033 #define DA9055_REG_CONTROL_E 0x0E
0034 #define DA9055_REG_PD_DIS 0x0F
0035
0036
0037 #define DA9055_REG_GPIO0_1 0x10
0038 #define DA9055_REG_GPIO2 0x11
0039 #define DA9055_REG_GPIO_MODE0_2 0x12
0040
0041
0042 #define DA9055_REG_BCORE_CONT 0x13
0043 #define DA9055_REG_BMEM_CONT 0x14
0044 #define DA9055_REG_LDO1_CONT 0x15
0045 #define DA9055_REG_LDO2_CONT 0x16
0046 #define DA9055_REG_LDO3_CONT 0x17
0047 #define DA9055_REG_LDO4_CONT 0x18
0048 #define DA9055_REG_LDO5_CONT 0x19
0049 #define DA9055_REG_LDO6_CONT 0x1A
0050
0051
0052 #define DA9055_REG_ADC_MAN 0x1B
0053 #define DA9055_REG_ADC_CONT 0x1C
0054 #define DA9055_REG_VSYS_MON 0x1D
0055 #define DA9055_REG_ADC_RES_L 0x1E
0056 #define DA9055_REG_ADC_RES_H 0x1F
0057 #define DA9055_REG_VSYS_RES 0x20
0058 #define DA9055_REG_ADCIN1_RES 0x21
0059 #define DA9055_REG_ADCIN2_RES 0x22
0060 #define DA9055_REG_ADCIN3_RES 0x23
0061
0062
0063 #define DA9055_REG_EN_32K 0x35
0064
0065
0066 #define DA9055_REG_BUCK_LIM 0x37
0067 #define DA9055_REG_BCORE_MODE 0x38
0068 #define DA9055_REG_VBCORE_A 0x39
0069 #define DA9055_REG_VBMEM_A 0x3A
0070 #define DA9055_REG_VLDO1_A 0x3B
0071 #define DA9055_REG_VLDO2_A 0x3C
0072 #define DA9055_REG_VLDO3_A 0x3D
0073 #define DA9055_REG_VLDO4_A 0x3E
0074 #define DA9055_REG_VLDO5_A 0x3F
0075 #define DA9055_REG_VLDO6_A 0x40
0076 #define DA9055_REG_VBCORE_B 0x41
0077 #define DA9055_REG_VBMEM_B 0x42
0078 #define DA9055_REG_VLDO1_B 0x43
0079 #define DA9055_REG_VLDO2_B 0x44
0080 #define DA9055_REG_VLDO3_B 0x45
0081 #define DA9055_REG_VLDO4_B 0x46
0082 #define DA9055_REG_VLDO5_B 0x47
0083 #define DA9055_REG_VLDO6_B 0x48
0084
0085
0086 #define DA9055_REG_AUTO1_HIGH 0x49
0087 #define DA9055_REG_AUTO1_LOW 0x4A
0088 #define DA9055_REG_AUTO2_HIGH 0x4B
0089 #define DA9055_REG_AUTO2_LOW 0x4C
0090 #define DA9055_REG_AUTO3_HIGH 0x4D
0091 #define DA9055_REG_AUTO3_LOW 0x4E
0092
0093
0094 #define DA9055_REG_OPT_COUNT 0x50
0095 #define DA9055_REG_OPT_ADDR 0x51
0096 #define DA9055_REG_OPT_DATA 0x52
0097
0098
0099 #define DA9055_REG_COUNT_S 0x53
0100 #define DA9055_REG_COUNT_MI 0x54
0101 #define DA9055_REG_COUNT_H 0x55
0102 #define DA9055_REG_COUNT_D 0x56
0103 #define DA9055_REG_COUNT_MO 0x57
0104 #define DA9055_REG_COUNT_Y 0x58
0105 #define DA9055_REG_ALARM_MI 0x59
0106 #define DA9055_REG_ALARM_H 0x5A
0107 #define DA9055_REG_ALARM_D 0x5B
0108 #define DA9055_REG_ALARM_MO 0x5C
0109 #define DA9055_REG_ALARM_Y 0x5D
0110 #define DA9055_REG_SECOND_A 0x5E
0111 #define DA9055_REG_SECOND_B 0x5F
0112 #define DA9055_REG_SECOND_C 0x60
0113 #define DA9055_REG_SECOND_D 0x61
0114
0115
0116 #define DA9055_REG_T_OFFSET 0x63
0117 #define DA9055_REG_INTERFACE 0x64
0118 #define DA9055_REG_CONFIG_A 0x65
0119 #define DA9055_REG_CONFIG_B 0x66
0120 #define DA9055_REG_CONFIG_C 0x67
0121 #define DA9055_REG_CONFIG_D 0x68
0122 #define DA9055_REG_CONFIG_E 0x69
0123 #define DA9055_REG_TRIM_CLDR 0x6F
0124
0125
0126 #define DA9055_REG_GP_ID_0 0x70
0127 #define DA9055_REG_GP_ID_1 0x71
0128 #define DA9055_REG_GP_ID_2 0x72
0129 #define DA9055_REG_GP_ID_3 0x73
0130 #define DA9055_REG_GP_ID_4 0x74
0131 #define DA9055_REG_GP_ID_5 0x75
0132 #define DA9055_REG_GP_ID_6 0x76
0133 #define DA9055_REG_GP_ID_7 0x77
0134 #define DA9055_REG_GP_ID_8 0x78
0135 #define DA9055_REG_GP_ID_9 0x79
0136 #define DA9055_REG_GP_ID_10 0x7A
0137 #define DA9055_REG_GP_ID_11 0x7B
0138 #define DA9055_REG_GP_ID_12 0x7C
0139 #define DA9055_REG_GP_ID_13 0x7D
0140 #define DA9055_REG_GP_ID_14 0x7E
0141 #define DA9055_REG_GP_ID_15 0x7F
0142 #define DA9055_REG_GP_ID_16 0x80
0143 #define DA9055_REG_GP_ID_17 0x81
0144 #define DA9055_REG_GP_ID_18 0x82
0145 #define DA9055_REG_GP_ID_19 0x83
0146
0147 #define DA9055_MAX_REGISTER_CNT DA9055_REG_GP_ID_19
0148
0149
0150
0151
0152
0153
0154 #define DA9055_PAGE_WRITE_MODE (0<<6)
0155 #define DA9055_REPEAT_WRITE_MODE (1<<6)
0156
0157
0158 #define DA9055_NOKEY_STS 0x01
0159 #define DA9055_WAKE_STS 0x02
0160 #define DA9055_DVC_BUSY_STS 0x04
0161 #define DA9055_COMP1V2_STS 0x08
0162 #define DA9055_NJIG_STS 0x10
0163 #define DA9055_LDO5_LIM_STS 0x20
0164 #define DA9055_LDO6_LIM_STS 0x40
0165
0166
0167 #define DA9055_GPI0_STS 0x01
0168 #define DA9055_GPI1_STS 0x02
0169 #define DA9055_GPI2_STS 0x04
0170
0171
0172 #define DA9055_TWD_ERROR_FLG 0x01
0173 #define DA9055_POR_FLG 0x02
0174 #define DA9055_VDD_FAULT_FLG 0x04
0175 #define DA9055_VDD_START_FLG 0x08
0176 #define DA9055_TEMP_CRIT_FLG 0x10
0177 #define DA9055_KEY_RESET_FLG 0x20
0178 #define DA9055_WAIT_SHUT_FLG 0x80
0179
0180
0181 #define DA9055_NOKEY_EINT 0x01
0182 #define DA9055_ALARM_EINT 0x02
0183 #define DA9055_TICK_EINT 0x04
0184 #define DA9055_ADC_RDY_EINT 0x08
0185 #define DA9055_SEQ_RDY_EINT 0x10
0186 #define DA9055_EVENTS_B_EINT 0x20
0187 #define DA9055_EVENTS_C_EINT 0x40
0188
0189
0190 #define DA9055_E_WAKE_EINT 0x01
0191 #define DA9055_E_TEMP_EINT 0x02
0192 #define DA9055_E_COMP1V2_EINT 0x04
0193 #define DA9055_E_LDO_LIM_EINT 0x08
0194 #define DA9055_E_NJIG_EINT 0x20
0195 #define DA9055_E_VDD_MON_EINT 0x40
0196 #define DA9055_E_VDD_WARN_EINT 0x80
0197
0198
0199 #define DA9055_E_GPI0_EINT 0x01
0200 #define DA9055_E_GPI1_EINT 0x02
0201 #define DA9055_E_GPI2_EINT 0x04
0202
0203
0204 #define DA9055_M_NONKEY_EINT 0x01
0205 #define DA9055_M_ALARM_EINT 0x02
0206 #define DA9055_M_TICK_EINT 0x04
0207 #define DA9055_M_ADC_RDY_EINT 0x08
0208 #define DA9055_M_SEQ_RDY_EINT 0x10
0209
0210
0211 #define DA9055_M_WAKE_EINT 0x01
0212 #define DA9055_M_TEMP_EINT 0x02
0213 #define DA9055_M_COMP_1V2_EINT 0x04
0214 #define DA9055_M_LDO_LIM_EINT 0x08
0215 #define DA9055_M_NJIG_EINT 0x20
0216 #define DA9055_M_VDD_MON_EINT 0x40
0217 #define DA9055_M_VDD_WARN_EINT 0x80
0218
0219
0220 #define DA9055_M_GPI0_EINT 0x01
0221 #define DA9055_M_GPI1_EINT 0x02
0222 #define DA9055_M_GPI2_EINT 0x04
0223
0224
0225 #define DA9055_DEBOUNCING_SHIFT 0x00
0226 #define DA9055_DEBOUNCING_MASK 0x07
0227 #define DA9055_NRES_MODE_SHIFT 0x03
0228 #define DA9055_NRES_MODE_MASK 0x08
0229 #define DA9055_SLEW_RATE_SHIFT 0x04
0230 #define DA9055_SLEW_RATE_MASK 0x30
0231 #define DA9055_NOKEY_LOCK_SHIFT 0x06
0232 #define DA9055_NOKEY_LOCK_MASK 0x40
0233
0234
0235 #define DA9055_RTC_MODE_PD 0x01
0236 #define DA9055_RTC_MODE_SD_SHIFT 0x01
0237 #define DA9055_RTC_MODE_SD 0x02
0238 #define DA9055_RTC_EN 0x04
0239 #define DA9055_ECO_MODE_SHIFT 0x03
0240 #define DA9055_ECO_MODE_MASK 0x08
0241 #define DA9055_TWDSCALE_SHIFT 4
0242 #define DA9055_TWDSCALE_MASK 0x70
0243 #define DA9055_V_LOCK_SHIFT 0x07
0244 #define DA9055_V_LOCK_MASK 0x80
0245
0246
0247 #define DA9055_SYSTEM_EN_SHIFT 0x00
0248 #define DA9055_SYSTEM_EN_MASK 0x01
0249 #define DA9055_POWERN_EN_SHIFT 0x01
0250 #define DA9055_POWERN_EN_MASK 0x02
0251 #define DA9055_POWER1_EN_SHIFT 0x02
0252 #define DA9055_POWER1_EN_MASK 0x04
0253
0254
0255 #define DA9055_STANDBY_SHIFT 0x02
0256 #define DA9055_STANDBY_MASK 0x08
0257 #define DA9055_AUTO_BOOT_SHIFT 0x03
0258 #define DA9055_AUTO_BOOT_MASK 0x04
0259
0260
0261 #define DA9055_WATCHDOG_SHIFT 0x00
0262 #define DA9055_WATCHDOG_MASK 0x01
0263 #define DA9055_SHUTDOWN_SHIFT 0x01
0264 #define DA9055_SHUTDOWN_MASK 0x02
0265 #define DA9055_WAKE_UP_SHIFT 0x02
0266 #define DA9055_WAKE_UP_MASK 0x04
0267
0268
0269 #define DA9055_GPIO0_PIN_SHIFT 0x00
0270 #define DA9055_GPIO0_PIN_MASK 0x03
0271 #define DA9055_GPIO0_TYPE_SHIFT 0x02
0272 #define DA9055_GPIO0_TYPE_MASK 0x04
0273 #define DA9055_GPIO0_WEN_SHIFT 0x03
0274 #define DA9055_GPIO0_WEN_MASK 0x08
0275 #define DA9055_GPIO1_PIN_SHIFT 0x04
0276 #define DA9055_GPIO1_PIN_MASK 0x30
0277 #define DA9055_GPIO1_TYPE_SHIFT 0x06
0278 #define DA9055_GPIO1_TYPE_MASK 0x40
0279 #define DA9055_GPIO1_WEN_SHIFT 0x07
0280 #define DA9055_GPIO1_WEN_MASK 0x80
0281 #define DA9055_GPIO2_PIN_SHIFT 0x00
0282 #define DA9055_GPIO2_PIN_MASK 0x30
0283 #define DA9055_GPIO2_TYPE_SHIFT 0x02
0284 #define DA9055_GPIO2_TYPE_MASK 0x04
0285 #define DA9055_GPIO2_WEN_SHIFT 0x03
0286 #define DA9055_GPIO2_WEN_MASK 0x08
0287
0288
0289 #define DA9055_GPIO0_MODE_SHIFT 0x00
0290 #define DA9055_GPIO0_MODE_MASK 0x01
0291 #define DA9055_GPIO1_MODE_SHIFT 0x01
0292 #define DA9055_GPIO1_MODE_MASK 0x02
0293 #define DA9055_GPIO2_MODE_SHIFT 0x02
0294 #define DA9055_GPIO2_MODE_MASK 0x04
0295
0296
0297 #define DA9055_BCORE_EN_SHIFT 0x00
0298 #define DA9055_BCORE_EN_MASK 0x01
0299 #define DA9055_BCORE_GPI_SHIFT 0x01
0300 #define DA9055_BCORE_GPI_MASK 0x02
0301 #define DA9055_BCORE_PD_DIS_SHIFT 0x03
0302 #define DA9055_BCORE_PD_DIS_MASK 0x04
0303 #define DA9055_VBCORE_SEL_SHIFT 0x04
0304 #define DA9055_SEL_REG_A 0x0
0305 #define DA9055_SEL_REG_B 0x10
0306 #define DA9055_VBCORE_SEL_MASK 0x10
0307 #define DA9055_V_GPI_MASK 0x60
0308 #define DA9055_V_GPI_SHIFT 0x05
0309 #define DA9055_E_GPI_MASK 0x06
0310 #define DA9055_E_GPI_SHIFT 0x01
0311 #define DA9055_VBCORE_GPI_SHIFT 0x05
0312 #define DA9055_VBCORE_GPI_MASK 0x60
0313 #define DA9055_BCORE_CONF_SHIFT 0x07
0314 #define DA9055_BCORE_CONF_MASK 0x80
0315
0316
0317 #define DA9055_BMEM_EN_SHIFT 0x00
0318 #define DA9055_BMEM_EN_MASK 0x01
0319 #define DA9055_BMEM_GPI_SHIFT 0x01
0320 #define DA9055_BMEM_GPI_MASK 0x06
0321 #define DA9055_BMEM_PD_DIS_SHIFT 0x03
0322 #define DA9055_BMEM_PD_DIS_MASK 0x08
0323 #define DA9055_VBMEM_SEL_SHIT 0x04
0324 #define DA9055_VBMEM_SEL_VBMEM_A (0<<4)
0325 #define DA9055_VBMEM_SEL_VBMEM_B (1<<4)
0326 #define DA9055_VBMEM_SEL_MASK 0x10
0327 #define DA9055_VBMEM_GPI_SHIFT 0x05
0328 #define DA9055_VBMEM_GPI_MASK 0x60
0329 #define DA9055_BMEM_CONF_SHIFT 0x07
0330 #define DA9055_BMEM_CONF_MASK 0x80
0331
0332
0333 #define DA9055_LDO_EN_SHIFT 0x00
0334 #define DA9055_LDO_EN_MASK 0x01
0335 #define DA9055_LDO_GPI_SHIFT 0x01
0336 #define DA9055_LDO_GPI_MASK 0x06
0337 #define DA9055_LDO_PD_DIS_SHIFT 0x03
0338 #define DA9055_LDO_PD_DIS_MASK 0x08
0339 #define DA9055_VLDO_SEL_SHIFT 0x04
0340 #define DA9055_VLDO_SEL_MASK 0x10
0341 #define DA9055_VLDO_SEL_VLDO_A 0x00
0342 #define DA9055_VLDO_SEL_VLDO_B 0x01
0343 #define DA9055_VLDO_GPI_SHIFT 0x05
0344 #define DA9055_VLDO_GPI_MASK 0x60
0345 #define DA9055_LDO_CONF_SHIFT 0x07
0346 #define DA9055_LDO_CONF_MASK 0x80
0347 #define DA9055_REGUALTOR_SET_A 0x00
0348 #define DA9055_REGUALTOR_SET_B 0x10
0349
0350
0351 #define DA9055_ADC_MUX_SHIFT 0
0352 #define DA9055_ADC_MUX_MASK 0xF
0353 #define DA9055_ADC_MUX_VSYS 0x0
0354 #define DA9055_ADC_MUX_ADCIN1 0x01
0355 #define DA9055_ADC_MUX_ADCIN2 0x02
0356 #define DA9055_ADC_MUX_ADCIN3 0x03
0357 #define DA9055_ADC_MUX_T_SENSE 0x04
0358 #define DA9055_ADC_MAN_SHIFT 0x04
0359 #define DA9055_ADC_MAN_CONV 0x10
0360 #define DA9055_ADC_LSB_MASK 0X03
0361 #define DA9055_ADC_MODE_MASK 0x20
0362 #define DA9055_ADC_MODE_SHIFT 5
0363 #define DA9055_ADC_MODE_1MS (1<<5)
0364 #define DA9055_COMP1V2_EN_SHIFT 7
0365
0366
0367 #define DA9055_ADC_AUTO_VSYS_EN_SHIFT 0
0368 #define DA9055_ADC_AUTO_AD1_EN_SHIFT 1
0369 #define DA9055_ADC_AUTO_AD2_EN_SHIFT 2
0370 #define DA9055_ADC_AUTO_AD3_EN_SHIFT 3
0371 #define DA9055_ADC_ISRC_EN_SHIFT 4
0372 #define DA9055_ADC_ADCIN1_DEB_SHIFT 5
0373 #define DA9055_ADC_ADCIN2_DEB_SHIFT 6
0374 #define DA9055_ADC_ADCIN3_DEB_SHIFT 7
0375 #define DA9055_AD1_ISRC_MASK 0x10
0376 #define DA9055_AD1_ISRC_SHIFT 4
0377
0378
0379 #define DA9055_VSYS_VAL_SHIFT 0
0380 #define DA9055_VSYS_VAL_MASK 0xFF
0381 #define DA9055_VSYS_VAL_BASE 0x00
0382 #define DA9055_VSYS_VAL_MAX DA9055_VSYS_VAL_MASK
0383 #define DA9055_VSYS_VOLT_BASE 2500
0384 #define DA9055_VSYS_VOLT_INC 10
0385 #define DA9055_VSYS_STEPS 255
0386 #define DA9055_VSYS_VOLT_MIN 2500
0387
0388
0389 #define DA9055_ADC_VAL_SHIFT 0
0390 #define DA9055_ADC_VAL_MASK 0xFF
0391 #define DA9055_ADC_VAL_BASE 0x00
0392 #define DA9055_ADC_VAL_MAX DA9055_ADC_VAL_MASK
0393 #define DA9055_ADC_VOLT_BASE 0
0394 #define DA9055_ADC_VSYS_VOLT_BASE 2500
0395 #define DA9055_ADC_VOLT_INC 10
0396 #define DA9055_ADC_VSYS_VOLT_INC 12
0397 #define DA9055_ADC_STEPS 255
0398
0399
0400 #define DA9055_STARTUP_TIME_MASK 0x07
0401 #define DA9055_STARTUP_TIME_0S 0x0
0402 #define DA9055_STARTUP_TIME_0_52S 0x1
0403 #define DA9055_STARTUP_TIME_1S 0x2
0404 #define DA9055_CRYSTAL_EN 0x08
0405 #define DA9055_DELAY_MODE_EN 0x10
0406 #define DA9055_OUT_CLCK_GATED 0x20
0407 #define DA9055_RTC_CLOCK_GATED 0x40
0408 #define DA9055_EN_32KOUT_BUF 0x80
0409
0410
0411
0412 #define DA9055_RESET_TIMER_VAL_SHIFT 0
0413 #define DA9055_RESET_LOW_VAL_MASK 0x3F
0414 #define DA9055_RESET_LOW_VAL_BASE 0
0415 #define DA9055_RESET_LOW_VAL_MAX DA9055_RESET_LOW_VAL_MASK
0416 #define DA9055_RESET_US_LOW_BASE 1024
0417 #define DA9055_RESET_US_LOW_INC 1024
0418 #define DA9055_RESET_US_LOW_STEP 30
0419
0420
0421 #define DA9055_RESET_HIGH_VAL_MASK 0x3F
0422 #define DA9055_RESET_HIGH_VAL_BASE 0
0423 #define DA9055_RESET_HIGH_VAL_MAX DA9055_RESET_HIGH_VAL_MASK
0424 #define DA9055_RESET_US_HIGH_BASE 32768
0425 #define DA9055_RESET_US_HIGH_INC 32768
0426 #define DA9055_RESET_US_HIGH_STEP 31
0427
0428
0429 #define DA9055_BMEM_ILIM_SHIFT 0
0430 #define DA9055_ILIM_MASK 0x3
0431 #define DA9055_ILIM_500MA 0x0
0432 #define DA9055_ILIM_600MA 0x1
0433 #define DA9055_ILIM_700MA 0x2
0434 #define DA9055_ILIM_800MA 0x3
0435 #define DA9055_BCORE_ILIM_SHIFT 2
0436
0437
0438 #define DA9055_BMEM_MODE_SHIFT 0
0439 #define DA9055_MODE_MASK 0x3
0440 #define DA9055_MODE_AB 0x0
0441 #define DA9055_MODE_SLEEP 0x1
0442 #define DA9055_MODE_SYNCHRO 0x2
0443 #define DA9055_MODE_AUTO 0x3
0444 #define DA9055_BCORE_MODE_SHIFT 2
0445
0446
0447 #define DA9055_VBCORE_VAL_SHIFT 0
0448 #define DA9055_VBCORE_VAL_MASK 0x3F
0449 #define DA9055_VBCORE_VAL_BASE 0x09
0450 #define DA9055_VBCORE_VAL_MAX DA9055_VBCORE_VAL_MASK
0451 #define DA9055_VBCORE_VOLT_BASE 750
0452 #define DA9055_VBCORE_VOLT_INC 25
0453 #define DA9055_VBCORE_STEPS 53
0454 #define DA9055_VBCORE_VOLT_MIN DA9055_VBCORE_VOLT_BASE
0455 #define DA9055_BCORE_SL_SYNCHRO (0<<7)
0456 #define DA9055_BCORE_SL_SLEEP (1<<7)
0457
0458
0459 #define DA9055_VBMEM_VAL_SHIFT 0
0460 #define DA9055_VBMEM_VAL_MASK 0x3F
0461 #define DA9055_VBMEM_VAL_BASE 0x00
0462 #define DA9055_VBMEM_VAL_MAX DA9055_VBMEM_VAL_MASK
0463 #define DA9055_VBMEM_VOLT_BASE 925
0464 #define DA9055_VBMEM_VOLT_INC 25
0465 #define DA9055_VBMEM_STEPS 63
0466 #define DA9055_VBMEM_VOLT_MIN DA9055_VBMEM_VOLT_BASE
0467 #define DA9055_BCMEM_SL_SYNCHRO (0<<7)
0468 #define DA9055_BCMEM_SL_SLEEP (1<<7)
0469
0470
0471
0472 #define DA9055_VLDO_VAL_SHIFT 0
0473 #define DA9055_VLDO_VAL_MASK 0x3F
0474 #define DA9055_VLDO6_VAL_MASK 0x7F
0475 #define DA9055_VLDO_VAL_BASE 0x02
0476 #define DA9055_VLDO2_VAL_BASE 0x03
0477 #define DA9055_VLDO6_VAL_BASE 0x00
0478 #define DA9055_VLDO_VAL_MAX DA9055_VLDO_VAL_MASK
0479 #define DA9055_VLDO6_VAL_MAX DA9055_VLDO6_VAL_MASK
0480 #define DA9055_VLDO_VOLT_BASE 900
0481 #define DA9055_VLDO_VOLT_INC 50
0482 #define DA9055_VLDO6_VOLT_INC 20
0483 #define DA9055_VLDO_STEPS 48
0484 #define DA9055_VLDO5_STEPS 37
0485 #define DA9055_VLDO6_STEPS 120
0486 #define DA9055_VLDO_VOLT_MIN DA9055_VLDO_VOLT_BASE
0487 #define DA9055_LDO_MODE_SHIFT 7
0488 #define DA9055_LDO_SL_NORMAL 0
0489 #define DA9055_LDO_SL_SLEEP 1
0490
0491
0492 #define DA9055_OTP_TIM_NORMAL (0<<0)
0493 #define DA9055_OTP_TIM_MARGINAL (1<<0)
0494 #define DA9055_OTP_GP_RD_SHIFT 1
0495 #define DA9055_OTP_APPS_RD_SHIFT 2
0496 #define DA9055_PC_DONE_SHIFT 3
0497 #define DA9055_OTP_GP_LOCK_SHIFT 4
0498 #define DA9055_OTP_APPS_LOCK_SHIFT 5
0499 #define DA9055_OTP_CONF_LOCK_SHIFT 6
0500 #define DA9055_OTP_WRITE_DIS_SHIFT 7
0501
0502
0503 #define DA9055_RTC_SEC 0x3F
0504 #define DA9055_RTC_MONITOR_EN 0x40
0505 #define DA9055_RTC_READ 0x80
0506
0507
0508 #define DA9055_RTC_MIN 0x3F
0509
0510
0511 #define DA9055_RTC_HOUR 0x1F
0512
0513
0514 #define DA9055_RTC_DAY 0x1F
0515
0516
0517 #define DA9055_RTC_MONTH 0x0F
0518
0519
0520 #define DA9055_RTC_YEAR 0x3F
0521 #define DA9055_RTC_YEAR_BASE 2000
0522
0523
0524 #define DA9055_RTC_ALM_MIN 0x3F
0525 #define DA9055_ALARM_STATUS_SHIFT 6
0526 #define DA9055_ALARM_STATUS_MASK 0x3
0527 #define DA9055_ALARM_STATUS_NO_ALARM 0x0
0528 #define DA9055_ALARM_STATUS_TICK 0x1
0529 #define DA9055_ALARM_STATUS_TIMER_ALARM 0x2
0530 #define DA9055_ALARM_STATUS_BOTH 0x3
0531
0532
0533 #define DA9055_RTC_ALM_HOUR 0x1F
0534
0535
0536 #define DA9055_RTC_ALM_DAY 0x1F
0537
0538
0539 #define DA9055_RTC_ALM_MONTH 0x0F
0540 #define DA9055_RTC_TICK_WAKE_MASK 0x20
0541 #define DA9055_RTC_TICK_WAKE_SHIFT 5
0542 #define DA9055_RTC_TICK_TYPE 0x10
0543 #define DA9055_RTC_TICK_TYPE_SHIFT 0x4
0544 #define DA9055_RTC_TICK_SEC 0x0
0545 #define DA9055_RTC_TICK_MIN 0x1
0546 #define DA9055_ALARAM_TICK_WAKE 0x20
0547
0548
0549 #define DA9055_RTC_TICK_EN 0x80
0550 #define DA9055_RTC_ALM_EN 0x40
0551 #define DA9055_RTC_TICK_ALM_MASK 0xC0
0552 #define DA9055_RTC_ALM_YEAR 0x3F
0553
0554
0555 #define DA9055_TRIM_32K_SHIFT 0
0556 #define DA9055_TRIM_32K_MASK 0x7F
0557 #define DA9055_TRIM_DECREMENT (1<<7)
0558 #define DA9055_TRIM_INCREMENT (0<<7)
0559 #define DA9055_TRIM_VAL_BASE 0x0
0560 #define DA9055_TRIM_PPM_BASE 0x0
0561 #define DA9055_TRIM_PPM_INC 19
0562 #define DA9055_TRIM_STEPS 127
0563
0564
0565 #define DA9055_PM_I_V_VDDCORE (0<<0)
0566 #define DA9055_PM_I_V_VDD_IO (1<<0)
0567 #define DA9055_VDD_FAULT_TYPE_ACT_LOW (0<<1)
0568 #define DA9055_VDD_FAULT_TYPE_ACT_HIGH (1<<1)
0569 #define DA9055_PM_O_TYPE_PUSH_PULL (0<<2)
0570 #define DA9055_PM_O_TYPE_OPEN_DRAIN (1<<2)
0571 #define DA9055_IRQ_TYPE_ACT_LOW (0<<3)
0572 #define DA9055_IRQ_TYPE_ACT_HIGH (1<<3)
0573 #define DA9055_NIRQ_MODE_IMM (0<<4)
0574 #define DA9055_NIRQ_MODE_ACTIVE (1<<4)
0575 #define DA9055_GPI_V_VDDCORE (0<<5)
0576 #define DA9055_GPI_V_VDD_IO (1<<5)
0577 #define DA9055_PM_IF_V_VDDCORE (0<<6)
0578 #define DA9055_PM_IF_V_VDD_IO (1<<6)
0579
0580
0581 #define DA9055_VDD_FAULT_VAL_SHIFT 0
0582 #define DA9055_VDD_FAULT_VAL_MASK 0xF
0583 #define DA9055_VDD_FAULT_VAL_BASE 0x0
0584 #define DA9055_VDD_FAULT_VAL_MAX DA9055_VDD_FAULT_VAL_MASK
0585 #define DA9055_VDD_FAULT_VOLT_BASE 2500
0586 #define DA9055_VDD_FAULT_VOLT_INC 50
0587 #define DA9055_VDD_FAULT_STEPS 15
0588
0589 #define DA9055_VDD_HYST_VAL_SHIFT 4
0590 #define DA9055_VDD_HYST_VAL_MASK 0x7
0591 #define DA9055_VDD_HYST_VAL_BASE 0x0
0592 #define DA9055_VDD_HYST_VAL_MAX DA9055_VDD_HYST_VAL_MASK
0593 #define DA9055_VDD_HYST_VOLT_BASE 100
0594 #define DA9055_VDD_HYST_VOLT_INC 50
0595 #define DA9055_VDD_HYST_STEPS 7
0596 #define DA9055_VDD_HYST_VOLT_MIN DA9055_VDD_HYST_VOLT_BASE
0597
0598 #define DA9055_VDD_FAULT_EN_SHIFT 7
0599
0600
0601 #define DA9055_BCORE_CLK_INV_SHIFT 0
0602 #define DA9055_BMEM_CLK_INV_SHIFT 1
0603 #define DA9055_NFAULT_CONF_SHIFT 2
0604 #define DA9055_LDO_SD_SHIFT 4
0605 #define DA9055_LDO5_BYP_SHIFT 6
0606 #define DA9055_LDO6_BYP_SHIFT 7
0607
0608
0609 #define DA9055_NONKEY_PIN_SHIFT 0
0610 #define DA9055_NONKEY_PIN_MASK 0x3
0611 #define DA9055_NONKEY_PIN_PORT_MODE 0x0
0612 #define DA9055_NONKEY_PIN_KEY_MODE 0x1
0613 #define DA9055_NONKEY_PIN_MULTI_FUNC 0x2
0614 #define DA9055_NONKEY_PIN_DEDICT 0x3
0615 #define DA9055_NONKEY_SD_SHIFT 2
0616 #define DA9055_KEY_DELAY_SHIFT 3
0617 #define DA9055_KEY_DELAY_MASK 0x3
0618 #define DA9055_KEY_DELAY_4S 0x0
0619 #define DA9055_KEY_DELAY_6S 0x1
0620 #define DA9055_KEY_DELAY_8S 0x2
0621 #define DA9055_KEY_DELAY_10S 0x3
0622
0623
0624 #define DA9055_GPIO_PUPD_PULL_UP 0x0
0625 #define DA9055_GPIO_PUPD_OPEN_DRAIN 0x1
0626 #define DA9055_GPIO0_PUPD_SHIFT 0
0627 #define DA9055_GPIO1_PUPD_SHIFT 1
0628 #define DA9055_GPIO2_PUPD_SHIFT 2
0629 #define DA9055_UVOV_DELAY_SHIFT 4
0630 #define DA9055_UVOV_DELAY_MASK 0x3
0631 #define DA9055_RESET_DURATION_SHIFT 6
0632 #define DA9055_RESET_DURATION_MASK 0x3
0633 #define DA9055_RESET_DURATION_0MS 0x0
0634 #define DA9055_RESET_DURATION_100MS 0x1
0635 #define DA9055_RESET_DURATION_500MS 0x2
0636 #define DA9055_RESET_DURATION_1000MS 0x3
0637
0638
0639 #define DA9055_MON_THRES_SHIFT 0
0640 #define DA9055_MON_THRES_MASK 0x3
0641 #define DA9055_MON_RES_SHIFT 2
0642 #define DA9055_MON_DEB_SHIFT 3
0643 #define DA9055_MON_MODE_SHIFT 4
0644 #define DA9055_MON_MODE_MASK 0x3
0645 #define DA9055_START_MAX_SHIFT 6
0646 #define DA9055_START_MAX_MASK 0x3
0647
0648
0649 #define DA9055_LDO1_MON_EN_SHIFT 0
0650 #define DA9055_LDO2_MON_EN_SHIFT 1
0651 #define DA9055_LDO3_MON_EN_SHIFT 2
0652 #define DA9055_LDO4_MON_EN_SHIFT 3
0653 #define DA9055_LDO5_MON_EN_SHIFT 4
0654 #define DA9055_LDO6_MON_EN_SHIFT 5
0655 #define DA9055_BCORE_MON_EN_SHIFT 6
0656 #define DA9055_BMEM_MON_EN_SHIFT 7
0657
0658
0659 #define DA9055_LDO1_DEF_SHIFT 0
0660 #define DA9055_LDO2_DEF_SHIFT 1
0661 #define DA9055_LDO3_DEF_SHIFT 2
0662 #define DA9055_LDO4_DEF_SHIFT 3
0663 #define DA9055_LDO5_DEF_SHIFT 4
0664 #define DA9055_LDO6_DEF_SHIFT 5
0665 #define DA9055_BCORE_DEF_SHIFT 6
0666 #define DA9055_BMEM_DEF_SHIFT 7
0667
0668
0669 #define DA9055_MON_A8_IDX_SHIFT 0
0670 #define DA9055_MON_A89_IDX_MASK 0x3
0671 #define DA9055_MON_A89_IDX_NONE 0x0
0672 #define DA9055_MON_A89_IDX_BUCKCORE 0x1
0673 #define DA9055_MON_A89_IDX_LDO3 0x2
0674 #define DA9055_MON_A9_IDX_SHIFT 5
0675
0676
0677 #define DA9055_MON_A10_IDX_SHIFT 0
0678 #define DA9055_MON_A10_IDX_MASK 0x3
0679 #define DA9055_MON_A10_IDX_NONE 0x0
0680 #define DA9055_MON_A10_IDX_LDO1 0x1
0681 #define DA9055_MON_A10_IDX_LDO2 0x2
0682 #define DA9055_MON_A10_IDX_LDO5 0x3
0683 #define DA9055_MON_A10_IDX_LDO6 0x4
0684
0685 #endif