AXP209

The AXP209 is the PMU (Power Management Unit) used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company of Allwinner.

Tips and tricks

 * shorting pin25 to gnd will reset the power/board
 * if the axp is configured the right way pressing the power button long should turn board off (that would also result in a rest when powered on again)
 * you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to reg 36

GPIO
The AXP209 has 4 GPIOs which can be addressed from fex files as port:powerN (N in [0..3]).

Spec Sheets






The correct address for AXP209 on A20 is 0x34

Overview
AXP209 is designed to be a highly-integrated power system management IC that is optimized for applications requiring single-cell Li-battery (Li-Ion/Polymer) and multiple output DC-DC converters.

AXP209 integrates
 * an adaptive USB-Compatible PWM charger
 * 2-way step-down converter (Buck DC-DC converter)
 * 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC
 * 4 configurable GPIO. Sustaining Card power system security the stable
 * AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.

Package
AXP209 6mm x 6mm 48-pin QFN package.



Features

 * Automatic gapless power source change (IPS - Intelligent Power Select)
 * Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)
 * Configurable high efficient IPS system
 * Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)
 * Battery Power Path resistance less than 75mΩ
 * Fully integrated PWM Charger
 * Maximum charging current of up to 1.8A
 * Full support USB charging
 * Battary voltage range: 4.1V/4.15V/4.2V/4.36V
 * Battery temperature monitoring
 * Automatic charging process control
 * Support charger LED
 * Automatically adjust charge current according to system load
 * Backup battery
 * Support backup battery (can be used for RTC module)
 * Support for backup battery, charging current can be set
 * 2 synchronous buck DC-DC converters
 * DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC
 * DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A
 * 5 low drop-out linear regulators
 * LDO1: Always-on 30mA
 * LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA
 * LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA
 * LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA
 * LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA
 * Timer (Timer)
 * 7bit Timer, Timing Range 1127 minutes
 * Timer outputs interrupts
 * Signal acquisition system
 * Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input
 * Built-in Fuelgauge system
 * Provides information, such as power consumption (mA or mW), the remaining battery capacity (% or mAh), the state of charge (%) and the remaining time for battery to charge
 * Two-level low-power warning and protection
 * Internal temperature sensor
 * Application Processor Interface (Host Interface)
 * TWSI (I2C) interface for data exchange
 * IRQs and Sleep Managment
 * Built-in GPIO
 * Built-in configurable timer
 * Provide 12 registers for data storage during system power-off
 * System Management
 * Soft reset and hard reset support
 * Soft and hard power shutdown support
 * Support for external wake source
 * Support the output voltage monitoring, self-diagnostic function
 * Output PWROK, indicating system reset or shutdown instructions
 * External power detection (insert / remove / drive capacity)
 * Supports soft power-on for input & output
 * Over/Under-voltage protection (OVP / UVP)
 * Overcurrent protection (OCP)
 * Overtemperature protection (OTP)
 * Support OTG VBUS power state setting / monitoring
 * Highly integrated
 * Internal precision reference voltage (0.5%)
 * Built-in MOSFET
 * timing and the output voltage can be customized
 * Decryption module
 * 128bit OTP password storage
 * dynamic real-time decryption algorithm

Battery activation mode
Battery activation mode may indicate that the battery is faulty. This mode is entered either from pre-charge mode or constant current mode under certain conditions. In battery activate mode, the charger always inputs relatively low current to batteries. AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH. AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.

REG 00H: Power input status

 * {| class="wikitable"

! Bit !! Description !! R/W 0: ACIN does not exist; 1: ACIN present 0: VBUS does not exist; 1: VBUS exist 0: battery discharge; 1: The battery is charged
 * 7
 * Indicates ACIN presence
 * Indicates ACIN presence
 * R
 * 6 || Instructions the ACIN whether available || R
 * 5 || VBUS is present indication
 * 5 || VBUS is present indication
 * 5 || VBUS is present indication
 * R
 * 4 || Indicate the VBUS whether available || R
 * 3 || The directions VBUS access before use is greater than VHOLD || R
 * 2 || Indicates that the battery current direction
 * 3 || The directions VBUS access before use is greater than VHOLD || R
 * 2 || Indicates that the battery current direction
 * 2 || Indicates that the battery current direction
 * R
 * 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R
 * 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R
 * }
 * 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R
 * }
 * }

REG 01H: Power operating mode and charge status indication

 * {| class="wikitable"

! Bit !! Description !! R/W 0: not too warm; 1: overtemperature 0: not charging or charging has been completed; 1: Charging 0: no battery connected to AXP209; 1: the battery has been connected to the AXP209 0: not to enter the the battery activation patterns; 1: has entered the battery activation mode 0: The actual charge current is equal to the desired current; 1: the actual charge current is less than the desired current
 * 7
 * Indicating AXP209 whether over-temperature
 * Indicating AXP209 whether over-temperature
 * R
 * 6
 * Charging indicator
 * Charging indicator
 * R
 * 5
 * The battery state of existence indicates
 * The battery state of existence indicates
 * R
 * 4
 * Reservations, can not be changed
 * R
 * 3
 * Indicates whether the battery into the active mode
 * 3
 * Indicates whether the battery into the active mode
 * R
 * 2
 * Indicate the charging current is less than the desired current
 * Indicate the charging current is less than the desired current
 * R
 * 1-0
 * Reservations, can not be changed
 * R
 * }
 * }
 * }

REG 02H: USB OTG VBUS status indication

 * {| class="wikitable"

! Bit !! Description !! R/W
 * 7-3
 * Reservations, can not be changed
 * 2
 * Indicate the VBUS whether effective, effective
 * R
 * 1
 * The directions VBUS Session A / B is effective, and 1 indicates that a valid
 * R
 * 0
 * Indicative Session End state 1 indicates
 * R
 * }
 * 0
 * Indicative Session End state 1 indicates
 * R
 * }

REG 03H: AXP 209 Chip Version

 * {| class="wikitable"

! Bit !! Description !! R/W
 * 7-4
 * Unknown, likely unused.
 * 3-0
 * Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.
 * R
 * }
 * R
 * }

REG 04-0FH: Data cache
Note: As long as the external power supply, battery or battery backup certain power exists, this data will be kept, not affected by the switch machine.

REG 12H: Power output control

 * Default value: 5fH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: off; 1: open 0: off; 1: open
 * 7
 * Reserved
 * R
 * 0
 * 6
 * LDO3 switch control
 * 6
 * LDO3 switch control
 * RW
 * 1
 * 5
 * Reserved
 * R
 * 0
 * 4
 * DC-DC2 switch control
 * RW
 * 1
 * 3
 * LDO4 switch control
 * RW
 * 1
 * 2
 * LDO2 switch control
 * RW
 * 1
 * 1
 * DC-DC3 switch control
 * RW
 * 1
 * 0
 * The EXTEN switch control
 * DC-DC3 switch control
 * RW
 * 1
 * 0
 * The EXTEN switch control
 * The EXTEN switch control
 * RW
 * 1
 * }
 * }

REG 23H: DC-DC2 output voltage setting

 * Default value: 16H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0.7-2.275V, 25mV/step Vout = [0.7 + (Bit5-0) * 0.025] V
 * 7-6
 * Reserved
 * 5-0
 * DC-DC2 output voltage setting
 * 5-0
 * DC-DC2 output voltage setting
 * RW
 * 0x16 (1.25 V)
 * }
 * }

REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings

 * Default value: 00H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 1: enable; 0: disable
 * 7-4
 * Reservations, can not be changed
 * 3
 * LDO3 voltage rate control
 * 3
 * LDO3 voltage rate control

Note,. 1: enable; 0: disable 0: 25mV/15.625us = 1.6mV/us 1: 25mV/31.250us = 0.8mV/us 0: 25mV/15.625us = 1.6mV/us 1: 25mV/31.250us = 0.8mV/us
 * The datasheet is incorrect here.
 * RW
 * 0
 * 2
 * DC-DC2 voltage rate control
 * DC-DC2 voltage rate control
 * The datasheet is incorrect here.
 * RW
 * 0
 * 1
 * LDO3 slew rate
 * LDO3 slew rate
 * RW
 * 0
 * 0
 * DC-DC2 slew rate
 * DC-DC2 slew rate
 * RW
 * 0
 * }
 * }

REG 27H: DC-DC3 output voltage setting

 * Default value: XXH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0.7-3.5V, 25mV/step Vout = [0.7 + (Bit6-0) * 0.025] V
 * 7
 * Reservations, can not be changed
 * 6-0
 * DC-DC3 output voltage setting
 * 6-0
 * DC-DC3 output voltage setting
 * RW
 * X
 * }
 * }

REG 28H: LDO2 / 4 output voltage settings

 * Default value: XXH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 1.8-3.3V, 100mV/step Vout = [1.8 + (Bit7-4) * 0.1] V 1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7 2.8 3.0 3.1 3.2 3.3
 * 7-4
 * LDO2 output voltage settings
 * LDO2 output voltage settings
 * RW
 * X
 * 3-0
 * LDO4 output voltage settings
 * LDO4 output voltage settings
 * RW
 * X
 * }
 * }

REG 29H: LDO3 output voltage settings

 * Default value: XXH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: LDO mode, the voltage is set by the [6:0] 1: switch-mode voltage is decided by LDO3IN 0.7-2.275V, 25mV/step Vout = [0.7 + (Bit6-0) * 0.025] V
 * 7
 * LDO3 mode select:
 * LDO3 mode select:
 * RW
 * 0
 * 6-0
 * LDO3 output voltage setting Bit6-Bit0
 * LDO3 output voltage setting Bit6-Bit0
 * RW
 * X
 * }
 * }

REG 30H: VBUS-IPSOUT channel management

 * Default value: 6XH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: N_VBUSEN ​​pin, to decide whether to open this path 1: VBUS-IPSOUT path select Open, regardless N_VBUSEN ​​state HOLD Pressure limiting control 0: not limited pressure; 1: limited pressure HOLD Set up V HOLD = [4.0 + (Bit5-3) * 0.1] V 00:900 mA; 01:500 mA; 10:100 mA; 11: not limit
 * 7
 * VBUS available when the VBUS-IPSOUT pathway selection control signal
 * VBUS available when the VBUS-IPSOUT pathway selection control signal
 * RW
 * 0
 * 6
 * VBUS V
 * VBUS V
 * RW
 * 1
 * 5-3
 * V
 * V
 * RW
 * 100
 * 2
 * Reservations, can not be changed
 * 1-0
 * VBUS current limit control open time limit stream selection
 * 1-0
 * VBUS current limit control open time limit stream selection
 * RW
 * 0
 * }
 * }

REG 31H: VOFF - Shutdown voltage setting

 * Default value: X3H of
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: off 1: Open After writing this bit automatically cleared each into Sleep mode again write 1
 * 7-4
 * Reservations, can not be changed
 * 3
 * Sleep mode the PEK or GPIO edge the wakeup enable set:
 * 3
 * Sleep mode the PEK or GPIO edge the wakeup enable set:
 * 3
 * Sleep mode the PEK or GPIO edge the wakeup enable set:
 * 2-0
 * VOFF Set up VOFF= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V
 * RW
 * 011
 * }
 * 011
 * }
 * }

REG 32H: Shutdown settings, battery detection and CHGLED pins control

 * Default value: 46H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value This bit write output closes AXP209 00: Hi-Z 01: 25% 1Hz blinking 10: 25% 4Hz blinking 11: output low 0: control by charging function 1: REG 32H [5:4] control by the register 0: Close 1: Contrary to start timing Delay time 00: 128mS; 01: 1S; 10: 2S; 11: 3S
 * 7
 * Shutdown control
 * Shutdown control
 * RW
 * 0
 * 6
 * Battery monitoring function set bit: 0: off; 1: Open
 * RW
 * 1
 * 5-4
 * CHGLED pin functions set
 * 5-4
 * CHGLED pin functions set
 * RW
 * 00
 * 3
 * CHGLED pin control set
 * CHGLED pin control set
 * RW
 * 0
 * 2
 * Output Close timing control
 * Output Close timing control
 * RW
 * 0
 * 1-0
 * Shutdown delay N_OE AXP209 from low to high
 * Shutdown delay N_OE AXP209 from low to high
 * RW
 * 10
 * }
 * }

REG 33H: Charge control

 * Default value: CXH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: Off, 1: open 00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V 0: The charging current is less than 10% of the set value, end-of-charge 1: The charging current is less than 15% of the set value, end-of-charge Icharge= [300 + (Bit3-0) * 100] mA
 * 7
 * Charging functions enable control bit
 * Charging functions enable control bit
 * RW
 * 1
 * 6-5
 * Charging the target voltage set
 * Charging the target voltage set
 * RW
 * 10
 * 4
 * Charging the end of the current set
 * Charging the end of the current set
 * RW
 * 0
 * 3-0
 * Charging current is set
 * Charging current is set
 * RW
 * X
 * }
 * }

REG 34H: Charge control

 * Default value: 45H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 00: 40 min; 01: 50min; 10: 60min; 11: 70min 0: Charging Steady 1: flashes when charging 00: 6Hours; 01: 8Hours; 10: 10Hours; 11: 12Hours
 * 7-6
 * Precharge timeout setting
 * Precharge timeout setting
 * RW
 * 1
 * 5
 * Retention
 * 4
 * CHGLED mode selection
 * 4
 * CHGLED mode selection
 * RW
 * 0
 * 3-2
 * Reservations, can not be changed
 * 1-0
 * The constant current mode timeout setting Bit1-0
 * 1-0
 * The constant current mode timeout setting Bit1-0
 * RW
 * 01
 * }
 * }

REG 35H: Spare battery charging control

 * Default value: 22H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: off; 1: open 00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V 00: 50uA; 01: 100uA; 10: 200uA; 11: 400uA
 * 7
 * Backup battery charge enable control
 * Backup battery charge enable control
 * RW
 * 0
 * 6-5
 * Target backup battery charging voltage set
 * Target backup battery charging voltage set
 * RW
 * 01
 * 4-2
 * Reservations, can not be changed
 * 1-0
 * Spare battery charging current is set
 * 1-0
 * Spare battery charging current is set
 * RW
 * 10
 * }
 * }

REG 36H: PEK key parameter settings

 * Default value: 9DH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 00: 128mS; 01: 3S; 10: 1S; 11: 2S. 00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S. 0: off; 1: open 0:8 mS; 1:64 mS 00: 4S; 01: 6S; 10: 8S; 11: 10S.
 * 7-6
 * Boot time settings
 * Boot time settings
 * RW
 * 01
 * 5-4
 * Long key time set
 * Long key time set
 * RW
 * 01
 * 3
 * Key long when you grew up in the shutdown automatic shutdown feature set
 * Key long when you grew up in the shutdown automatic shutdown feature set
 * RW
 * 1
 * 2
 * The complete power start PWROK signal delay
 * The complete power start PWROK signal delay
 * RW
 * 1
 * 1-0
 * Length setting shutdown
 * Length setting shutdown
 * RW
 * 01
 * }
 * }

REG 37H: DC-DC operating frequency is set

 * Default value: 08H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value Each level change of 5%, the default value of 1.5MHz F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz
 * 7-4
 * Reservations, can not be changed
 * 3-0
 * DC-DC switching frequency is set
 * 3-0
 * DC-DC switching frequency is set
 * RW
 * 1000
 * }
 * }

REG 38H: VLTF-charge Charging the battery temperature threshold set

 * Default value: A5H of
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value M * 10H, when M = A5H corresponding 2.112V; Corresponding voltage 0V3.264V V LTF-charge = M * 10H * 0.0008V
 * 7-0
 * When charging the battery temperature threshold settings, M
 * When charging the battery temperature threshold settings, M
 * RW
 * A5H
 * }
 * }

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

 * Default value: 1FH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value N * 10H, when N = 1FH corresponding 0.397V; can Corresponding voltage 0V3.264V VHTF-charge= N * 10H * 0.0008V
 * 7-0
 * Charging battery high temperature threshold settings, N
 * Charging battery high temperature threshold settings, N
 * RW
 * 1FH
 * }
 * }

REG 3AH: system IPSOUT Vwarning Level1

 * Default value: 68H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value
 * 7-0
 * System IPSOUT Vwarning Level1
 * RW
 * 68H
 * }
 * }
 * }

REG 3BH: IPSOUT Vwarning Level2

 * Default value: 5FH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n): Vwarning = 2.8672 + 1.4mV * n * 4
 * 7-0
 * System IPSOUT Vwarning Level2
 * RW
 * 5FH
 * }
 * }
 * }

REG 3CH: VLTF-discharge Battery discharge temperature threshold set

 * Default value: FCH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value M * 10H, when M = FCH corresponding 3.226V; Corresponding voltage 0V3.264V VLTF-discharge= M * 10H * 0.0008V
 * 7-0
 * Discharge the battery temperature threshold settings, M
 * Discharge the battery temperature threshold settings, M
 * RW
 * FCH
 * }
 * }

REG 3DH: VHTF-discharge Battery discharge high temperature threshold settings

 * Default value: 16H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value N * 10H, when of N = 16H, corresponding to 0.282V; can The voltage 0V3.264V, V LTF-discharge = N * 10H * 0.0008V
 * 7-0
 * Battery discharge high temperature threshold settings, N
 * Battery discharge high temperature threshold settings, N
 * RW
 * 16H
 * }
 * }

REG 80H: DC-DC mode selection

 * Default value: E0H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: PFM / PWM auto-switching 1: fixed PWM
 * 7-3
 * Reservations, can not be changed
 * 2
 * DC-DC2 operating mode control
 * RW
 * 0
 * 1
 * DC-DC3 operating mode control
 * 1
 * DC-DC3 operating mode control
 * DC-DC3 operating mode control
 * RW
 * 0
 * 0
 * Reservations, can not be changed
 * }
 * }
 * }

REG 82H: ADC Enable 1

 * Default value: 83H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: Off, 1: open
 * 7
 * Battery voltage ADC enable
 * RW
 * 1
 * 6
 * Battery current ADC enable
 * RW
 * 0
 * 5
 * The ACIN Voltage ADC is enabled.
 * RW
 * 0
 * 4
 * The ACIN current ADC is enabled.
 * RW
 * 0
 * 3
 * VBUS voltage ADC enable
 * RW
 * 0
 * 2
 * The VBUS current ADC enable
 * RW
 * 0
 * 1
 * APS voltage ADC enable
 * RW
 * 1
 * 0
 * TS pin ADC function is enabled
 * 1
 * APS voltage ADC enable
 * RW
 * 1
 * 0
 * TS pin ADC function is enabled
 * 0
 * TS pin ADC function is enabled
 * RW
 * 1
 * }
 * }

REG 83H: ADC Enable 2

 * Default value: 80H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: Off, 1: open 0: Off, 1: open
 * 7
 * AXP209 internal temperature monitoring ADC enable
 * AXP209 internal temperature monitoring ADC enable
 * RW
 * 1
 * 6-4
 * Reservations, can not be changed
 * 3
 * The GPIO0 ADC enable
 * RW
 * 0
 * 2
 * The GPIO1 ADC enable
 * RW
 * 0
 * 1-0
 * Reservations, can not be changed
 * 0
 * 1-0
 * Reservations, can not be changed
 * Reservations, can not be changed
 * }
 * }

REG 84H: ADC sample rate settings, the TS pin control

 * Default value: 32H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 25 × 2 n Sampling rates of 25, 50, 100, 200Hz 00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA 0: battery temperature monitoring function, 1: independent external ADC input path 00: Off 01: On when charging 10: On when ADC enabled 11: Always on
 * 7-6
 * ADC sampling rate is set
 * ADC sampling rate is set
 * RW
 * 0
 * 5-4
 * TS pin output current settings:
 * TS pin output current settings:
 * RW
 * 11
 * 3
 * Reservations, can not be changed
 * 2
 * TS pin function selection
 * 2
 * TS pin function selection
 * RW
 * 0
 * 1-0
 * TS pin current output settings
 * TS pin current output settings
 * RW
 * 10
 * }
 * }

REG 85H: ADC input range

 * Default value: X0H of
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0:0-2.0475 V 1:0.7-2.7475 V
 * 7-2
 * Reservations, can not be changed
 * 1
 * The GPIO1 ADC input range
 * RW
 * 0
 * 0
 * The GPIO0 ADC input range
 * 0
 * The GPIO0 ADC input range
 * The GPIO0 ADC input range
 * RW
 * 0
 * }
 * }

REG 86H: GPIO1 ADC IRQ rising edge threshold set

 * Default value: FFH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value
 * 7-0
 * One LSB 8mV
 * RW
 * FF
 * }
 * }
 * }

REG 87H: GPIO1 ADC IRQ falling edge threshold set

 * Default value: 00H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value
 * 7-0
 * One LSB 8mV
 * RW
 * 00
 * }
 * }
 * }

REG 8AH: Timer control

 * Default value: 00H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value Write 1 to clear this status To write 0 closed this timer
 * 7
 * Timer expires
 * Timer expires
 * RW
 * 0
 * 6-0
 * Set regular time in minutes
 * Set regular time in minutes
 * RW
 * 0000000
 * }
 * }

REG 8BH: VBUS pin function control monitoring SRP

 * Default value: 00H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V 0: Close VBUS discharge resistor; 1: VBUS discharge resistor 0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge
 * 7-6
 * Reservations, can not be changed
 * 5-4
 * VBUS valid voltage settings
 * 5-4
 * VBUS valid voltage settings
 * RW
 * 00
 * 3
 * VBUS Valid detection function settings: 0: Off, 1: Open
 * RW
 * 0
 * 2
 * VBUS Session detection function settings: 0: Off, 1: Open
 * RW
 * 0
 * 1
 * Discharge VBUS discharge feature set
 * 1
 * Discharge VBUS discharge feature set
 * Discharge VBUS discharge feature set
 * RW
 * 0
 * 0
 * Charge VBUS charge feature set
 * Charge VBUS charge feature set
 * RW
 * 0
 * }
 * }

REG 8FH: over-temperature shutdown feature set

 * Default value: 21H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: Shutdown; 1: Shutdown
 * 7-3
 * Reservations, can not be changed
 * RW
 * 0
 * 2
 * AXP209 internal over-temperature shutdown feature set
 * 2
 * AXP209 internal over-temperature shutdown feature set
 * RW
 * 0
 * 1-0
 * Reservations, can not be changed
 * }
 * }
 * }

REG 90H: GPIO0 feature set

 * Default value: 07H
 * {| class="wikitable"

! Bit !! Description !! Value !! R/W !! Default Value 0: disable 1: enable 000: low output 001: output (3.3V) 010: universal input function 011: low noise LDO5 100: ADC input 1XX: floating
 * 7
 * GPIO0 rising edge interrupt or wakeup
 * rowspan=2|
 * rowspan=2|
 * RW
 * 0
 * 6
 * GPIO0 falling edge interrupt or wakeup
 * RW
 * 0
 * 5-3
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * 2-0
 * GPIO0 pin function
 * 2-0
 * GPIO0 pin function
 * GPIO0 pin function
 * RW
 * 111
 * }

REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set

 * Default value: A5H of
 * {| class="wikitable"

! Bit !! Description !! Value !! R/W !! Default Value Vout = [1.8 + (Bit7-4) * 0.1] V default = 1.8 +10 * 0.1 = 2.8V 000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V 100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V
 * 7-4
 * LDO5 output voltage settings
 * LDO5 output voltage settings
 * RW
 * 1010
 * 3
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * 2-0
 * EXTEN, and GPIO [1:0] set the output high
 * 2-0
 * EXTEN, and GPIO [1:0] set the output high
 * RW
 * 101
 * }

REG 92H: GPIO1 feature set

 * Default value: 07H
 * {| class="wikitable"

! Bit !! Description !! Values !! R/W !! Default Value 0: disable 1: enable 000: GPIO output low 001: GPIO output high (3.3V) 010: GPIO input 011: low-noise LDO 100: ADC input 1XX: floating
 * 7
 * GPIO1 rising edge interrupt or wakeup
 * rowspan="2"|
 * rowspan="2"|
 * RW
 * 0
 * 6
 * GPIO1 falling edge interrupt or wakeup
 * RW
 * 0
 * 5-3
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * 2-0
 * GPIO1 pin function
 * 2-0
 * GPIO1 pin function
 * GPIO1 pin function
 * RW
 * 111
 * }
 * }

REG 93H: GPIO2 feature set

 * Default value: 07H
 * {| class="wikitable"

! Bit !! Description !! Values !! R/W !! Default Value 0: disable 1: enable 000: GPIO output low (open drain) 001: floating 010: GPIO input XXX: floating
 * 7
 * GPIO2 rising edge interrupt or wakeup
 * rowspan="2"|
 * rowspan="2"|
 * RW
 * 0
 * 6
 * GPIO2 falling edge interrupt or wakeup
 * RW
 * 0
 * 5-3
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * 2-0
 * GPIO2 pin function
 * 2-0
 * GPIO2 pin function
 * GPIO2 pin function
 * RW
 * 111
 * }

REG 94H: GPIO [2:0] signal state setting and monitoring

 * Default value: 00H
 * {| class="wikitable"

! Bit !! Description !! Values !! R/W !! Default Value 0: input low 1: input high
 * 7
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * 6
 * GPIO2 input state
 * rowspan="3"|
 * GPIO2 input state
 * rowspan="3"|
 * R
 * 5
 * GPIO1 input state
 * R
 * 4
 * GPIO0 input state
 * R
 * 3-0
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * }
 * R
 * 3-0
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * }
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * }

REG 95H: GPIO3 set

 * Default value: 00H
 * {| class="wikitable"

! Bit !! Description !! Values !! R/W !! Default Value 0: disable 1: enable 0: NMOS Open Drain Output 1: digital input function 0: output low, NMOS on 1: floating, NMOS off 0: input high 1: input low
 * 7
 * GPIO3 rising edge interrupt or wakeup
 * rowspan="2"|
 * rowspan="2"|
 * RW
 * 0
 * 6
 * GPIO3 falling edge interrupt or wakeup
 * RW
 * 0
 * 5-3
 * colspan="4" style="text-align: center"|Reserved, can not be changed
 * 2
 * GPIO3 pin function
 * 2
 * GPIO3 pin function
 * GPIO3 pin function
 * RW
 * 0
 * 1
 * GPIO3 output settings
 * GPIO3 output settings
 * RW
 * 1
 * 0
 * GPIO3 input state
 * GPIO3 input state
 * R
 * }

Interrupts
The AXP interrupt system has 2 bits for every interrupt, offset by 8 bytes. The first bit is to enable or disable (mask) an interrupt, the second bit, 8 bytes later, is to indicate the interrupt state, e.g. has the interrupt fired. Additionally, the interrupt status bit is also used to clear the interrupt, so that it can fire again.

For example, register 0x40 bit 7, ACIN Over-voltage, can be enabled or disabled by writing a 1 into bit 7 of reg 0x40. When an interrupt is fired and the interrupt line is pulled low, bit 7 of 0x48 will be set to 1. To clear this interrupt, write a 1 into bit 7 of 0x48.

REG 40H and 48H: Interrupt bank 1; Input power

 * IRQ enable 1 (0x40) default value: 0xd8
 * IRQ status 1 (0x48) default value: 0x00
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value
 * 7
 * AC IN Over-voltage
 * RW
 * 1
 * 6
 * AC IN connected
 * RW
 * 1
 * 5
 * AC In disconnected
 * RW
 * 0
 * 4
 * VBUS over-voltage
 * RW
 * 1
 * 3
 * VBUS connected
 * RW
 * 1
 * 2
 * VBUS disconnected
 * RW
 * 1
 * 1
 * VBUS available, but less than VHOLD
 * RW
 * 1
 * 0
 * Reserved
 * R
 * 0
 * }
 * RW
 * 1
 * 0
 * Reserved
 * R
 * 0
 * }
 * }
 * }

REG 41H and 49H: Interrupt bank 2; Battery

 * IRQ enable 2 (0x41) default value: 0xff
 * IRQ status 2 (0x49) default value: 0x00
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value
 * 7
 * Battery connected
 * RW
 * 1
 * 6
 * Battery disconnected
 * RW
 * 1
 * 5
 * Battery charging in activation mode
 * RW
 * 1
 * 4
 * Battery is no longer charging in activation mode
 * RW
 * 1
 * 3
 * Battery charging
 * RW
 * 1
 * 2
 * Battery charging has finished
 * RW
 * 1
 * 1
 * Battery temperature too high
 * RW
 * 1
 * 0
 * Battery temperature too low
 * RW
 * 1
 * }
 * RW
 * 1
 * 0
 * Battery temperature too low
 * RW
 * 1
 * }
 * }
 * }

REG 42H and 4AH: Interrupt bank 3

 * IRQ enable 2 (0x42) default value: 0x03
 * IRQ status 2 (0x4a) default value: 0x00
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value
 * 7
 * AXP209 internal temperature sensor temperature too high
 * RW
 * 0
 * 6
 * Charging current is less than the set current
 * RW
 * 0
 * 5
 * Reserved
 * R
 * 0
 * 4
 * DC-DC2 output voltage is less than the set value
 * RW
 * 0
 * 3
 * DC-DC3 output voltage is less than the set value
 * RW
 * 0
 * 2
 * LDO3 output voltage is less than the set value
 * RW
 * 0
 * 1
 * PEK short key press
 * RW
 * 1
 * 0
 * PEK long keys press
 * RW
 * 1
 * }
 * RW
 * 1
 * 0
 * PEK long keys press
 * RW
 * 1
 * }
 * }
 * }

REG 43H and 4BH: Interrupt bank 4

 * IRQ enable 4 (0x43) default value: 0x01
 * IRQ status 4 (0x4b) default value: 0x00
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value
 * 7
 * Started via N_OE
 * RW
 * 0
 * 6
 * Shutdown via N_OE
 * RW
 * 0
 * 5
 * VBUS power is valid
 * RW
 * 0
 * 4
 * VBUS power is invalid
 * RW
 * 0
 * 3
 * VBUS session A / B
 * RW
 * 0
 * 2
 * VBUS session end
 * RW
 * 0
 * 1
 * The APS low voltage (LEVEL1)
 * RW
 * 0
 * 0
 * The APS low voltage (LEVEL2)
 * RW
 * 1
 * }
 * RW
 * 0
 * 0
 * The APS low voltage (LEVEL2)
 * RW
 * 1
 * }
 * }
 * }

REG 44H and 4CH: Interrupt bank 5

 * IRQ enable 5 (0x44) default value: 0x00
 * IRQ status 5 (0x4c) default value: 0x00
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value
 * 7
 * Timer timeout
 * RW
 * 0
 * 6
 * PEK button on the rising edge
 * RW
 * 0
 * 5
 * PEK button on the falling edge
 * RW
 * 0
 * 4
 * Reserved
 * R
 * 0
 * 3
 * GPIO3 input edge-triggered
 * RW
 * 0
 * 2
 * GPIO2 input edge-triggered
 * RW
 * 0
 * 1
 * GPIO1 input edge-triggered or ADC input
 * RW
 * 0
 * 0
 * GPIO0 input edge-triggered
 * RW
 * 0
 * }
 * RW
 * 0
 * 0
 * GPIO0 input edge-triggered
 * RW
 * 0
 * }
 * }
 * }

ADC Measurement Values
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).
 * {| class="wikitable"

! Channel !! Registers !! 000h !! Step !! FFFh
 * ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V
 * ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A
 * VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V
 * VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A
 * Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C
 * Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V
 * APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V
 * Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V
 * Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A
 * Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A
 * }
 * Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V
 * APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V
 * Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V
 * Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A
 * Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A
 * }
 * Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A
 * Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A
 * }
 * }

REG B8H: Coulomb Counter Control

 * Default value: 00H
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: not completed 1: Complete
 * 7
 * The coulomb meter switch control
 * RW
 * 0
 * 6
 * Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from
 * RW
 * 0
 * 5
 * The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from
 * RW
 * 0
 * 4-2
 * Reservations, can not be changed
 * RW
 * 0
 * 1-0
 * The decryption start bit, decryption start automatically cleared
 * RW
 * 0
 * 0
 * Decryption is complete
 * The decryption start bit, decryption start automatically cleared
 * RW
 * 0
 * 0
 * Decryption is complete
 * Decryption is complete
 * RW
 * 0
 * }
 * }

REG B9H: power measurement results

 * Default value: 7FH
 * {| class="wikitable"

! Bit !! Description !! R/W !! Default Value 0: normal operating mode 1: suspend work
 * 7
 * Metering system control
 * Metering system control
 * RW
 * 0
 * 6-0
 * Measurement results, the percentage of
 * R
 * 7F
 * }
 * }
 * }

Spec Sheets

 * AXP209 Datasheet v1.0 English (PDF, ~2.4MB)
 * AXP209 Datasheet v1.0 Chinese (PDF, ~1.2MB)