AXP221

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

Overview
The AXP221 is a highly integrated power management IC, targeted at single cell battery (Li-ion or Li-Po) applications needing multiple power conversion outputs. It is complete power solution that is both versatile and easy to use, satisfying the precise and complicated needs of multi-core systems.

The AXP221 integrates a USB 3.0 compatible flash charger, which has a 94% maximum efficiency, and a charging current of up to 2.2A. At the same time, it supports up to 21 power outputs (including 5 high-current DC-DC outputs, with efficiencies of up to 95%), and also multiple 12-bit ADC channels to monitor voltage, current, and temperature. To insure safe and smooth operation of the power system, the AXP221 also integrates over/under voltage, over current, overheating protection.

This PMIC uses Allwinner's new push-pull two wire interface (P2WI). The datasheet doesn't seem to list the chips address.

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.

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).

REG 31h: Wake-up control and VOFF Shutdown voltage setting
Default value: 03H

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

REG 33h: Charge control 1
Default value: C6H

REG 34h: Charge control 2
Default value: 45h

REG 35h: Charge control 3
Default value: 0Eh

REG 36h: PEK button parameters
Default value: 5Dh

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

REG 39H: VHTF-charge Battery charging high temperature threshold
Default value: 1Fh

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

REG 3DH: VHTF-charge Battery discharging high temperature threshold
Default value: 16h

REG 8Ah: Timer control
Default value: 00h

REG 8Ch: PWREN control 1
Default value: 00h

REG 8Dh: PWREN control 2
Default value: 00h

REG 8Fh: Thermal protection and misc. control
Default value: 01h

REG 04-0Fh: Data storage
As long as power exists, this data will be kept, not affected by system power off.

REG 10h: Regulator output control
Default value: XXH

REG 12h: Regulator output control
Default value: XXH

REG 13h: Regulator output control
Default value: 01H

Reg 37h: DC-DC operating frequency
Default value: 08h

REG 80h: DC-DC operation mode
Default value: 80H

Interrupts
See Interrupts section.

REG 90H: GPIO0 function control
Default value: 07h

REG 91h: LDOIO0 voltage control
Default value: 1Fh

REG 92H: GPIO1 function control
Default value: 07h

REG 93h: LDOIO1 voltage control
Default value: 1Fh

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

REG 82H: ADC Enable
Default value: E0h

REG 84h: ADC sampling rate, TS pin control
Default value: 32H

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