AXP221

From linux-sunxi.org
Jump to navigation Jump to search

The AXP221 is the PMIC (Power Management IC) used by A31 SoCs and developed by X-Powers, a sister company of Allwinner.

Overview [1]

AXP221 is a highly integrated PMIC targeted at single cell Li-battery (Li-ion or Li-polymer) applications that require multi-channel power conversion outputs. It provides an easy and flexible power management solution for multi-core processors to meet the increasingly complex and accurate requirements of power control.

AXP221 comes with an adaptive USB3.0-compatible Flash Charger that supports up to 94% efficiency and 2.2A charge current. It also provides 21 power output channels (including 5-CH DC-DC, with efficiency up to 95%). To ensure the security and stability of the power system, AXP221 provides multiple-channel 12-bit ADC for voltage/current/temperature monitoring and integrates protection circuits such as OVP, UVP, OTP, and OCP. Moreover, AXP221 integrates a unique E-Gauge™ system which simplifies battery power measurement.

Importantly, AXP221 also Featuress an IPS™ (Intelligent Power Select) circuit that transparently selects power path among USB, external adaptor, Li-battery, and system load, allowing the system to function normally when only running on external input power and not the battery.

AXP221 is available in 8mm x 8mm x 0.75mm 68-pin QFN package.

Features [1]

  • IPS™
  • Input voltage range: 2.9V~6.3V (AMR: -0.3V~11V)
  • Configurable IPS™ system
  • Adaptive USB/AC adaptor voltage/current limit (4.4V/900mA/500mA)
  • Buck DC-DC Converters (5-CH)
  • DC-DC1: 1.6V~3.4V adjustable, 100mV/step, load current up to 1.4A
  • DC-DC2: 0.6V~1.54V adjustable, 20mV/step, load current up to 2.5A, supports VRC (Voltage Ramp Control)
  • DC-DC3: 0.6V-1.86V adjustable, 20mV/step, load current up to 2.5A
  • DC-DC4: 0.6V-1.54V adjustable, 20mV/step, load current up to 0.6A
  • DC-DC5: 1.0V-2.55V adjustable, 50mV/step, load current up to 2A
  • System Management
  • Support soft reset and hard reset
  • Support soft shutdown and hard shutdown
  • Support external wakeup triggers
  • Support PWROK for system rest or shutdown indication
  • External power detection (insert/remove/drive strength deficiency)
  • All output voltage support software boot
  • Over/Under-voltage protection (OVP/UVP)
  • Over-current protection (OCP)
  • Over-temperature protection (OTP)
  • E-Gauge™ System
  • Highly accurate gauge system with dual modes
  • Easy Mode: highly adaptive to different powers
  • Exact Mode: highly accurate data is provided for specific power
  • Provide rich power information, such as instantaneous power consumption (mA or mW), remaining power (% or mA), charge status (%), remaining power life, charge time, etc
  • Low power warning and low power protection
  • Provide die temperature
  • High Integration
  • Highly accurate (0.5%) reference voltage
  • Integrates MOSFET
  • Flash Charger
  • Integrated MOSFET charge current up to 2.2A
  • Battery temperature monitor
  • Fully supports USB charge
  • High charge accuracy, ±0.5% accuracy
  • Supports 4.1V/4.2V/4.22V/4.24V battery
  • Automatic charge control
  • Supports LED to indicate charge status
  • Automatic charge current adjustment based on system load
  • LDOs (14-CH)
  • RTC_VCC: 30mA, always valid
  • ALDO1/2: low noise LDO, 0.7V~3.3V adjustable, 100mV/step, load current up to 300mA
  • ALDO3: low noise LDO, 0.7V~3.3V adjustable, 100mV/step, load current up to 200mA
  • LDOIO0/LDOIO1: low noise LDO, 0.7V~3.3V adjustable, 100mV/step, load current up to 100mA
  • DLDO1/ ELDO1: 0.7~3.3V adjustable, 100mV/step, load current up to 400mA
  • DLDO2/ DLDO3/ ELDO2/ ELDO3: 0.7~3.3V adjustable, 100mV/step, load current up to 200mA
  • DLDO4: 0.7V~3.3V adjustable, 100mV/step, load current up to 100mA
  • DC5LDO: 0.7V~1.4V adjustable, 100mV/step, load current up to 200mA
  • Switch (2-CH)
  • DC1SW: internal resistance 100mOhm, power sourced from DCDC1
  • CHGLED:100mA sink strength, can be used to drive the motor and charging LED
  • Host Interface
  • P2WI (Push-Pull Two Wire Interface) for host communication
  • Configurable interrupt management
  • Flexible pin function configuration: 2 GPIOs can be set as IO or LDO, etc
  • Integrated timer
  • 12 groups of registers for system shutdown data storage

Pinout Diagram

basic

Pinout List

Number Pin Name Type Control Criteria Description
1 ELDOIN PI ELDO Input Source
2 ELDO2 O ELDO2 Output
3 ELDO3 O ELDO3 Output
4 DC5LDO O DC5LDO Output
5 DCDC5 I DC-DC5 Feedback
6 PGND5 G DC-DC5 NMOS ground
7,8 LX5 IO DC-DC5 Inductor
9 VIN5 PI DC-DC5 Input Source
10 DC5SET I Set DC-DC5 output voltage
11 N_VBUSEN IO Input VBUS-IPSOUT channel control
Connected to GND: IPSOUT uses VBUS
Connected to IPSOUT: IPSOUT does not use VBUS
11 N_VBUSEN IO Output VBUS-IPSOUT channel control
GND: IPSOUT uses VBUS:
High: IPSOUT does not use VBUS
12 PWRON I Power On-Off key (PEK) input, Internal 100kΩ pull-up resistor to APS
13 VIN1 PI DC-DC1 Input Source
14 LX1 IO DC-DC1 Inductor
15 PGND1 G DC-DC1 NMOS ground
16 DLDO3 O DLDO3 Output
17 DLDO2 O DLDO2 Output
18 DLDOIN PI DLDO Input Source
19 DLDO1 O DLDO1 Output
20 DLDO4 O DLDO4 Output
21 DCDC1 I DC-DC1 Feedback
22 DC1SW O DC-DC1 Switch output
23 VIN2 PI DC-DC2 Input Source
24,25 LX2 IO DC-DC2 Inductor
26,27 PGND2 G DC-DC2 NMOS ground
28 DCDC2 I DC-DC2 Feedback
29 IRQ/WAKEUP IO IRQ output or wakeup
30 TS I Battery temperature sensor or external ADC input
31 GPIO1 IO Reg 92h [2:0] GPIO1 / LDOIO0 output
32 ALDO1 O ALDO1 Output
33 ALDOIN PI ALDO Input Source
34 ALDO2 O ALDO2 Output
35 VREF I Internal reference voltage
36 ALDO3 O ALDO3 Output
37 GPIO0 IO Reg 90h [2:0] GPIO0 / LDOIO0 output
38 DCDC3 I DC-DC3 Feedback
39 VIN3 PI DC-DC3 Input Source
40,41 LX3 IO DC-DC3 Inductor
42 PGND3 G DC-DC3 NMOS ground
43 PWROK O Power good indicator
44 SCK I Serial interface clock pin. Normally pulled-up to 3.3V by 2.2k resistor
45 SDA IO Serial interface data pin. Normally pulled-up to 3.3V by 2.2k resistor
46 VCC_RTC O VCC_RTC output
47 VINT PO Internal logic power, 1.8V
48 VBUS PI VBUS input
49 BATSENSE I PWM Charger current sense resistance positive input
50 LOADSENSE I PWM Charger current sense resistance negative input
51 N_BATDRV O BAT to PS external PMOS driver
52 CHGLED O Charger status indicator
53,54 IPSOUT PO System power source
55,56 ACIN PI Power adapter input
57 CHSENSEP I PWM Charger current limit sense resistance positive input
58 CHSENSEN I PWM Charger current limit sense resistance negative input
59 PGND_CHG G PWM Charger NMOS ground
60,61 LX_CHG IO PWM Charger Inductor
62,63 VIN_CHG PI PWM Charger Input Source
64 VIN4 PI DC-DC4 Input Source
65 LX4 IO DC-DC4 Inductor
66 PGND4 G DC-DC4 NMOS ground
67 DCDC4 I DC-DC4 Feedback
68 ELDO1 O ELDO1 Output
69 EP G Exposed Pad, need to connect to ground

Functional Diagram

basic

Typical Usage

AXP221 typical usage.png

Regulators

The AXP221 features 5 DC-DC step-down (buck) converters, 14 linear regulators (5 of which are low-noise), and 2 switches. The DC-DC converters operate in automatic (PFM + PWM) or PWM mode, controllable via reg 80h, at a default frequency of 3 MHz. The frequency is controlled via reg 37h. It also supports spread spectrum.

Output Type Voltage Range Default Voltage Enable steps Example Usage Maximum Output Note
DCDC1 Buck 1.6 - 3.4 V 3.3 V 1 3.3V I/O 1400 mA
DCDC2 Buck 0.6 - 1.53 V 1.1 V 1 1.1V CPU 2500 mA
DCDC3 Buck 0.6 - 1.86 V 1.1 V 1 1.1V GPU 2500 mA
DCDC4 Buck 0.6 - 1.53 V 1.1 V 1 1.1V Core 600 mA
DCDC5 Buck 1.0 - 2.55 V 1.5 V 1 1.5V DDR3 2000 mA DC5SET pin configurable default
RTC-LDO LDO Fixed 3.0 V 1 RTC 30 mA Always on
ALDO1 LDO 0.7 - 3.3 V Off Off N/A 300 mA Low noise
ALDO2 LDO 0.7 - 3.3 V 1.8 V 1 N/A 300 mA Low noise
ALDO3 LDO 0.7 - 3.3 V 3.0 V 1 N/A 200 mA Low noise
LDOIO0 LDO 0.7 - 3.3 V Off Off N/A 100 mA Low noise, output on GPIO0
LDOIO1 LDO 0.7 - 3.3 V Off Off N/A 100 mA Low noise, output on GPIO1
DLDO1 LDO 0.7 - 3.3 V Off Off N/A 400 mA
DLDO2 LDO 0.7 - 3.3 V Off Off N/A 200 mA
DLDO3 LDO 0.7 - 3.3 V Off Off N/A 200 mA
DLDO4 LDO 0.7 - 3.3 V Off Off N/A 200 mA
ELDO1 LDO 0.7 - 3.3 V Off Off N/A 400 mA
ELDO2 LDO 0.7 - 3.3 V Off Off N/A 200 mA
ELDO3 LDO 0.7 - 3.3 V Off Off N/A 200 mA
DC5LDO LDO 0.7 - 1.4 V 1.1 V 1 N/A 200 mA Powered from DCDC5
DC1SW Switch Fixed to DCDC1 Off Off N/A 400 mA Powered from DCDC1, equivalent resistance is 160 mΩ

Interrupts

This section corresponds to section 9.8 in the datasheet.

The AXP221 pulls the IRQ pin low to signal an interrupt to the host, and stores the interrupt status in the interrupt status registers (48h ~ 4Ch). Writing 1 to the corresponding bit clears the interrupt. When there are no interrupts, the IRQ pin is pulled up (by an external 51KΩ resistor). Each interrupt can be masked via the interrupt control registers (40h ~ 44h).

Register Address
Control Status Bit Interrupt # Description Notes
40h 48h [7] IRQ 1 ACIN over voltage
40h 48h [6] IRQ 2 ACIN connected
40h 48h [5] IRQ 3 ACIN removed
40h 48h [4] IRQ 4 VBUS over voltage
40h 48h [3] IRQ 5 VBUS connected
40h 48h [2] IRQ 6 VBUS removed
40h 48h [1] IRQ 7 VVBUS < VHOLD VHOLD defaults to 4.4V, controlled via reg 30h [3:5]
40h 48h [0]
41h 49h [7] IRQ 8 Battery connected
41h 49h [6] IRQ 9 Battery removed
41h 49h [5] IRQ 10 Battery discharging
41h 49h [4] IRQ 11 Battery discharge stopped
41h 49h [3] IRQ 12 Battery charging
41h 49h [2] IRQ 13 Battery charge complete
41h 49h [1] IRQ 14 Battery temperature too high see reg 39h (charge) and 3Dh (discharge)
41h 49h [0] IRQ 15 Battery temperature too low see reg 38h (charge) and 3Ch (discharge)
42h 4Ah [7] IRQ 16 IC overheat
42h 4Ah [6] IRQ 17 Insufficient charging current The PMIC raises this interrupt when charging current is lower than 65% of the default
42h 4Ah [5]
42h 4Ah [4]
42h 4Ah [3]
42h 4Ah [2]
42h 4Ah [1] IRQ 18 PEK short press See reg e6h
42h 4Ah [0] IRQ 19 PEK long press See reg 36h
43h 4Bh [7]
43h 4Bh [6]
43h 4Bh [5]
43h 4Bh [4]
43h 4Bh [3]
43h 4Bh [2]
43h 4Bh [1] IRQ 20 Battery low warning 1 warning, see reg E6h
43h 4Bh [0] IRQ 21 Battery low warning 2 power off, see reg E6h
44h 4Ch [7] IRQ 22 Timer expired See reg 8Ah
44h 4Ch [6] IRQ 23 PEK rising edge
44h 4Ch [5] IRQ 24 PEK falling edge
44h 4Ch [4]
44h 4Ch [3]
44h 4Ch [2]
44h 4Ch [1] IRQ 25 GPIO 1 edge trigger See reg 91h
44h 4Ch [0] IRQ 26 GPIO 0 edge trigger See reg 90h

Registers

Power Control

REG 00h: Power input status

Bit Description R/W
7 ACIN presence

0: ACIN not present 1: ACIN present

R
6 Indicates whether ACIN is usable R
5 VBUS presence

0: VBUS not present; 1: VBUS present

R
4 Indicates whether VBUS is usable R
3 Indicates whether VBUS was VHOLD before use R
2 Indicates the battery current direction

0: battery discharging; 1: battery charging

R
1 Indicates whether ACIN and VBUS input are shorted on the PCB R
0 Indicates starting power is ACIN or VBUS

0: Start power source is not ACIN / VBUS ; 1: Starting power source ACIN / VBUS

R

REG 01h: Power operation mode and charge status

Bit Description R/W
7 Indicates whether AXP221 is overheating

0: normal; 1: overheating

R
6 Charging indicator

0: not charging or charging complete; 1: Charging

R
5 Battery existence

0: no battery connected to AXP209; 1: the battery has been connected to the AXP209

R
4 Reserved
3 Battery discharge indicator

0: Battery not discharging; 1: battery discharging

R
2-0 Reserved

Reg 30h: VBUS-IPSOUT control

Bit Description R/W Default Value
7 VBUS-IPSOUT path control when VBUS available

0: N_VBUSEN ​​pin decide whether to enable this path 1: VBUS-IPSOUT enabled regardless of N_VBUSEN ​​pin

RW 0
6 VBUS VHOLD voltage limiting RW 1
5-3 VHOLD = [4.0 + (Bit5-3) * 0.1] V RW 100
2 DRIVEVBUS output status 0: low; 1: IPSOUT RW 0
1-0 VBUS current limit control open time limit stream selection

00:900 mA; 01: 500 mA; 1x: not limit

RW 0

REG 31h: Wake-up control and VOFF Shutdown voltage setting

Default value: 03H

Bit Description Value R/W Default Value
7 PWROK pulled down during wakeup 0: no; 1: yes RW 0
6 soft-reset write 1 to reset PMU; auto-cleared RW 0
5 soft-wakeup write 1 to restore outputs; auto-cleared RW 0
4 IRQs trigger wake-up
0: IRQs trigger wake-up, IRQs masked after wake-up
1: IRQs normal operation, will not trigger wake-up
RW 0
3 Enable wake-up during sleep mode; auto-cleared
0: off
1: on
RW 0
2-0 VOFF setting VOFF = [2.6 + (Bit2-0) * 0.1] V; Default: 2.9V RW 011

REG 32h: Shutdown control, battery detection and CHGLED pin control

Default value: 43h

Bit Description R/W Default Value
7 Shutdown; Writing 1 turns off AXP221, except RTC and charger RW 0
6 Enable battery monitoring RW 1
5-4 CHGLED pin function

00: Hi-Z 01: 25% 1Hz blinking 10: 25% 4Hz blinking 11: output low

RW 00
3 CHGLED pin control

0: controlled by REG 32h [5:4] 1: control by charging function

RW 0
2 Output power off sequence

0: Turn off all outputs at the same time 1: Reverse of power on sequence

RW 0
1-0 Delay of PWROK from last enabled output

00: 8 mS; 01: 16 mS; 10: 32 mS; 11: 64 mS

RW 10

REG 33h: Charge control 1

Default value: C6H

Bit Description R/W Default Value
7 Enable charging function RW 1
6-5 Charging target voltage

00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V

RW 10
4 End of charge current threshold

0: end of charge when charge current is less than 10% of the set value 1: end of charge when charge current is less than 15% of the set value

RW 0
3-0 Charging current Icharge = [300 + (Bit3-0) * 150] mA RW X

REG 34h: Charge control 2

Default value: 45h

Bit Description R/W Default Value
7-6 Pre-charge timeout settings

00: 40 min; 01: 50min; 10: 60min; 11: 70min

RW 01
5 Enable charge retention (trickle-charge) RW 0
4 CHGLED mode selection

0: Mode A 1: Mode B

RW 0
3 Reserved
2 Should charging voltage change with current RW 0
2 Enable external circuit when charging (duplicate bit here?) RW 0
1-0 constant current mode timeout settings

00: 6Hours; 01: 8Hours; 10: 10Hours; 11: 12Hours

RW 01

REG 35h: Charge control 3

Default value: 0Eh

Bit Description R/W Default Value
7-4 Reserved
3-0 Charging circuit current limit = [300 + (Bit3-0) * 150] mA ; Default: 2400 mA RW 1110

REG 36h: PEK button parameters

Default value: 5Dh

Bit Description R/W Default Value
7-6 Power on timing

00: 128mS; 01: 1S; 10: 2S; 11: 3S

RW 01
5-4 Long press timing T = [ 1 + (bit 1-0) * 0.5 ] S; default: 1.5S RW 01
3 Automatic shutdown when pressed longer than Tshutdown RW 1
2 Auto power on after automatic shutdown due to long press RW 1
1-0 Tshutdown = [ 4 + (bit 1-0) * 2 ] S; default: 6S RW 01

REG 38h: VLTF-charge Battery charging low temperature threshold

Default value: A5h

Bit Description Value R/W Default Value
7-0 Battery charging low temperature threshold VLTF-charge = (val << 4) * 0.0008 V; 0 ~ 3.264V RW A5h (2.112V)

REG 39H: VHTF-charge Battery charging high temperature threshold

Default value: 1Fh

Bit Description Value R/W Default Value
7-0 Battery charging low temperature threshold VLTF-charge = (val << 4) * 0.0008 V; 0 ~ 3.264V RW 1Fh (0.397V)

REG 3Ch: VLTF-charge Battery discharging low temperature threshold

Default value: FCh

Bit Description Value R/W Default Value
7-0 Battery discharging low temperature threshold VLTF-charge = (val << 4) * 0.0008 V; 0 ~ 3.264V RW FCh (3.226V)

REG 3DH: VHTF-charge Battery discharging high temperature threshold

Default value: 16h

Bit Description Value R/W Default Value
7-0 Battery charging low temperature threshold VLTF-charge = (val << 4) * 0.0008 V; 0 ~ 3.264V RW 16h (0.282V)

REG 8Ah: Timer control

Default value: 00h

Bit Description Value R/W Default Value
7 Timer expired write 1 to clear RW 0
6-0 Timer duration Bit(6-0) min. ; write 0 to clear RW 0

REG 8Ch: PWREN control 1

Default value: 00h

Bit Description Value R/W Default Value
7 PWREN controls DC-DC1 0: yes ; 1: no RW 0
6 PWREN controls DC-DC2 RW 0
5 PWREN controls DC-DC3 RW 0
4 PWREN controls DC-DC4 RW 0
3 PWREN controls DC-DC5 RW 0
2 PWREN controls ALDO1 RW 0
1 PWREN controls ALDO2 RW 0
0 PWREN controls ALDO3 RW 0

REG 8Dh: PWREN control 2

Default value: 00h

Bit Description Value R/W Default Value
7 PWREN controls DLDO1 0: yes ; 1: no RW 0
6 PWREN controls DLDO2 RW 0
5 PWREN controls DLDO3 RW 0
4 PWREN controls DLDO4 RW 0
3 PWREN controls ELDO1 RW 0
2 PWREN controls ELDO2 RW 0
1 PWREN controls ELDO3 RW 0
0 PWREN controls DC5LDO RW 0

REG 8Fh: Thermal protection and misc. control

Default value: 01h

Bit Description Value R/W Default Value
7 IRQ pin triggers power on or wake-up 0: no; 1: yes RW 0
6 ACIN / VBUS In-short function 0: auto; 1: controlled by REG 8Fh [5] RW 0
5 ACIN / VBUS In-short status 0: normal; 1: short RW 0
4 N_VBUSEN pin function
0: output, as DRIVEBUS (control USB OTG VBUS regulator)
1: input, as N_VBUSEN (sense USB OTG VBUS regulator enabled)
RW x
3 reserved
2 AXP221 thermal protection power off
0: ignore
1: power off when overheating
RW 0
1-0 reserved RW 01

Storage

REG 04-0Fh: Data storage

As long as power exists, this data will be kept, not affected by system power off.

Regulators

REG 10h: Regulator output control

Default value: XXH

Bit Description R/W Default Value
7 ALDO2 on/off RW X
6 ALDO1 on/off RW X
5 DC-DC5 on/off RW X
4 DC-DC4 on/off RW X
3 DC-DC3 on/off RW X
2 DC-DC2 on/off RW X
1 DC-DC1 on/off RW X
0 DC5LDO on/off RW X

REG 12h: Regulator output control

Default value: XXH

Bit Description R/W Default Value
7 DC1SW on/off RW 0
6 DLDO4 on/off RW 0
5 DLDO3 on/off RW 0
4 DLDO2 on/off RW 0
3 DLDO1 on/off RW X
2 ELDO3 on/off RW 0
1 ELDO2 on/off RW 0
0 ELDO1 on/off RW X

REG 13h: Regulator output control

Default value: 01H

Bit Description R/W Default Value
7 ALDO3 on/off RW 0
6-0 Reserved

Reg 15h: DLDO1 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 00000

Reg 16h: DLDO2 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 00000

Reg 17h: DLDO3 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 00000

Reg 18h: DLDO4 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 00000

Reg 19h: ELDO1 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 00000

Reg 1Ah: ELDO2 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 00000

Reg 1Bh: ELDO3 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 00000

Reg 1Ch: DC5LDO output voltage

Bit Description R/W Default Value
7-3 Reserved
2-0 0.7 - 1.4 V, 100 mV/step RW 100

Reg 21h: DC-DC1 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 1.6 - 3.4 V, 100 mV/step RW 10001

Reg 22h: DC-DC2 output voltage

Bit Description R/W Default Value
7-6 Reserved
5-0 0.6 - 1.54 V, 20 mV/step RW 011001

Reg 23h: DC-DC3 output voltage

Bit Description R/W Default Value
7-6 Reserved
5-0 0.6 - 1.86 V, 20 mV/step RW 011001

Reg 24h: DC-DC4 output voltage

Bit Description R/W Default Value
7-6 Reserved
5-0 0.6 - 1.54 V, 20 mV/step RW 011001

Reg 25h: DC-DC5 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 1.0 - 2.55 V, 50 mV/step RW 01010

Reg 27h: DC-DC 2/3 Voltage Ramp Control

Bit Description R/W Default Value
7-4 Reserved
3 DC-DC3 VRC enable RW 0
2 DC-DC2 VRC enable RW 0
1 DC-DC3 VRC rate

0: 20mV/15.625μs = 1.6mV/μs ; 1: 20mV/31.250μs = 0.8mV/μs

RW 0
1 DC-DC2 VRC rate

0: 20mV/15.625μs = 1.6mV/μs ; 1: 20mV/31.250μs = 0.8mV/μs

RW 0

Reg 28h: ALDO1 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 00000

Reg 29h: ALDO2 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 01011

Reg 2Ah: ALDO3 output voltage

Bit Description R/W Default Value
7-5 Reserved
4-0 0.7 - 3.3 V, 100 mV/step RW 01011

Reg 37h: DC-DC operating frequency

Default value: 08h

Bit Description R/W Default Value
7 Enable spread spectrum for DC-DC and PWM charger RW 0
6 DC-DC and PWM charger spread spectrum bandwidth

0: 50 KHz; 1: 100KHz

RW 0
5 reserved
4 Enable DC-DC 2/3 poly-phase function RW 0
3-0 DC-DC switching frequency F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz RW 1000

REG 80h: DC-DC operation mode

Default value: 80H

Bit Description Value R/W Default Value
7-5 Reserved
4 DC-DC5 operation mode 0: PFM+PWM

1: PWM

RW 0
3 DC-DC4 operation mode RW 0
2 DC-DC3 operation mode RW 0
1 DC-DC2 operation mode RW 0
0 DC-DC1 operation mode RW 0

Interrupts

See Interrupts section.

GPIO controls

REG 90H: GPIO0 function control

Default value: 07h

Bit Description Values R/W Default Value
7 Enable GPIO0 rising edge IRQ/wakeup 1 to enable RW 0
6 Enable GPIO0 falling edge IRQ/wakeup 1 to enable RW 0
5-3 Reserved
2 GPIO0 pin function
000: output low
001: output high (3.3V)
010: input
011: LDOIO0 off
100: LDOIO0 on
1XX: floating
RW 111
1
0

REG 91h: LDOIO0 voltage control

Default value: 1Fh

Bit Description Values R/W Default Value
7-5 Reserved
4-0 LDOIO0 output voltage Vout = 0.7 + 0.1 * (Bit 4-0) V RW 00000

REG 92H: GPIO1 function control

Default value: 07h

Bit Description Values R/W Default Value
7 Enable GPIO1 rising edge IRQ/wakeup 1 to enable RW 0
6 Enable GPIO1 falling edge IRQ/wakeup 1 to enable RW 0
5-3 Reserved
2 GPIO1 pin function
000: output low
001: output high (3.3V)
010: input
011: LDOIO1 off
100: LDOIO1 on
1XX: floating
RW 111
1
0

REG 93h: LDOIO1 voltage control

Default value: 1Fh

Bit Description Values R/W Default Value
7-5 Reserved
4-0 LDOIO1 output voltage Vout = 0.7 + 0.1 * (Bit 4-0) V RW 00000

REG 94h: GPIO 0/1 input

Bit Description Values R/W
7-2 Reserved
1 GPIO 1 input value 0: low; 1: high R
0 GPIO 0 input value 0: low; 1: high R

REG 95h: GPIO 0/1 input pull-down

Bit Description Values R/W
7-2 Reserved
1 GPIO 1 input pull-down 0: disable; 1: enable R
0 GPIO 0 input pull-down 0: disable; 1: enable R

ADC

First register is high 8 bits, second is lower 4 (lower 5 for battery current).

Channel Control Register Value Registers 000h Step FFFh
Internal Temperature 82h [5] 56h, 57h -267.7 C 0.1 C 165.8 C
TS Pin Voltage 82h [0] 58h, 59h 0 mV 0.8 mV 3.276 V
Battery Voltage 82h [7] 78h, 79h 0 mV 1.1 mV 4.5045 V
Battery Discharge Current 82h [6] 7Ah, 7Bh 0 mA 0.5 mA 4.095 A
Battery Charge Current 82h [6] 7Ch, 7Dh 0 mA 0.5 mA 4.095 A

REG 82H: ADC Enable

Default value: E0h

Bit Description R/W Default Value
7 Enable battery voltage ADC RW 1
6 Enable battery current ADC RW 0
5 Enable internal temperature ADC RW 0
4-1 Reserved
0 Enable TS pin voltage ADC RW 1

REG 84h: ADC sampling rate, TS pin control

Default value: 32h

Bit Description Values R/W Default Value
7-6 ADC sampling rate 100 * 2<super>(Bit 7-6)</super> Hz RW 00
5-4 TS pin output current I = 20 + 20 * (Bit 5-4) μA; Default: 80 μA RW 11
3 Reserved
2 TS pin function selection 0: battery temperature monitoring function

1: independent external ADC input path

RW 0
1-0 TS pin current output settings

00: Off 01: On when charging 10: On when ADC enabled 11: Always on

RW 10

Fuel Gauge

REG B8h: Fuel Gauge Control

Default value: C0h

Bit Description Values R/W Default Value
7 Fuel Gauge enable 0: off; 1: on RW 1
6 Coulomb Counter enable 0: off; 1: on RW 1
5 Battery capacity calibration enable 0: off; 1: on RW 0
4 Battery capacity calibration status 0: no calibration; 1: calibration in progress RW 0
3-0 Reserved

REG B9h: Battery Charge Reading

Default value: 64h

Bit Description Values R/W Default Value
7 Is battery charge correctly calculated 0: no; 1: yes RW 1
6-0 Battery charge percentage 0~64h (0~100) % RW 64

REG E0h: Battery Capacity Setting 1

Default value: 64h

Bit Description Values R/W Default Value
7 Is battery capacity set 0: no; 1: yes RW 0
6-0 Battery capacity bit [14:8] RW 64

REG E1h: Battery Capacity Setting 1

Default value: 64h

Bit Description Values R/W Default Value
7-0 Battery capacity bit [7:0] RW 64

Battery capacity = value * 1.456mAh

REG E6h: Battery Low Warning Threshold Setting 1

Default value: A0h

Bit Description Values R/W Default Value
7-4 Battery low warning threshold 1 (warning) Threshold = (value + 5)% RW 1010
3-0 Battery low warning threshold 2 (power off) Threshold = value % RW 0000

Spec Sheets

AXP221 Datasheet v1.2 (PDF, 52 pages, 2013-03-26)

References

  1. 1.0 1.1 X-Powers AXP221 Taken on 2014-03-15