https://linux-sunxi.org/api.php?action=feedcontributions&user=Oliver&feedformat=atom
linux-sunxi.org - User contributions [en]
2024-03-28T14:10:23Z
User contributions
MediaWiki 1.35.8
https://linux-sunxi.org/index.php?title=Inet_97f&diff=20897
Inet 97f
2018-01-21T15:12:46Z
<p>Oliver: annotated flash pinout</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:Device_front.jpg|250px]]<br />
| manufacturer = [http://www.inet-tek.com/ Inet-Tek]<br />
| dimensions = 192''mm'' x 124''mm'' x 12.8''mm''<br />
| release_date = January 2012<br />
| website = [http://manufacturer/device Device Product Page]<br />
| soc = [[A10]] @ 1Ghz<br />
| dram = 512MiB DDR3 @ 408MHz<br />
| nand = 4GB<br />
| power = DC 5V @ 2A, different 3.7V Li-Ion batteries.<br />
| lcd = 800x480 (7" 16:9)<br />
| touchscreen = 5-finger capacitive/resistive ([[Touchscreen#Goodix|Goodix GT80x]] or [[Touchscreen#Solomon|Solomon Systemtech Ltd. SSD2533]])<br />
| video = HDMI (Type C - mini)<br />
| audio = 3.5mm headphone plug, HDMI, internal speaker, internal microphone<br />
| network = WiFi 802.11 b/g/n (Unknown Realtek device(s))<br />
| storage = µSD<br />
| usb = 1 USB2.0 OTG<br />
| camera = 0.3MP (640x480) front<br />
| other = Accelerometer ([[Accelerometer#Device|Manufacturer device]] <small style="color:red">FIXME</small>)<br />
| headers = UART<br />
}}<br />
<br />
{{Remove|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
The Inet 97F was one of the earliest Allwinner based tablets and, due to its low price, got sold under many many guises, and with many different options. These changes are different battery sizes, wifi modules, touchscreen controllers, camera modules, and of course slightly differing cases.<br />
<br />
= Identification =<br />
<br />
In android, under Settings->About Tablet, you can look at the Build Number, and it should start with '''97F2''', like for the Yarvik Tab260:<br />
<br />
* Model Number: TAB260<br />
* Build Number: 97F2-R1-H1-H01-1366.20111219<br />
<br />
Most rebadgers did succeed in changing the Model Number.<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
<br />
Supported.<br />
<br />
== Images ==<br />
<br />
== HW-Pack ==<br />
<br />
== BSP ==<br />
<br />
== Manual build ==<br />
<br />
{{Remove|Clarify why these are 2 different fex files, one for the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a10/inet97f-ii.fex inet97f-ii.fex] and the one below.}}<br />
<br />
=== Yarvik Tab 260/264 ===<br />
* For building u-boot, use the "INet97F-II" target.<br />
* The .fex file can be found in sunxi-boards as [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a10/yarvik_tab260.fex yarvik_tab260.fex]<br />
<br />
Everything else is the same as the [[manual build howto]].<br />
<br />
== Mainline kernel ==<br />
<br />
Use the sun4i-a10-inet97fv2.dts device-tree file for the [[Mainline_Kernel_Howto|mainline kernel]].<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
== FEL mode ==<br />
<br />
The volume up button triggers [[FEL | FEL mode]].<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:Inet97f-TTL.jpg|thumb|240px|TTL connections]]<br />
== Device disassembly ==<br />
<br />
The precise disassembly procedure varies per brand since each put a different case around the board. The Cherry M667 has a screwless plastic case that consists of a white back and a black front. After inserting a thin flat screwdriver the white back can easily be pushed off of the rest of the device.<br />
<br />
It helps that for most tablets the plastic case will have a lot of empty space, since the iNet-97F board is less than half the size of the display. Put the tablet with its screen facing down, then use your hands to knock on the back cover to find any hollow areas. Those would be good places to start with the screwdriver.<br />
<br />
Inside the device you should find a few tiny screws to hold the PCB in place (about 5), but most things are held together by tape. In the Cherry M667 the battery pack was tightly taped to the back of the display assembly. It could only be removed by guessing where the tape was (3 strips: 1 on top, 1 in the middle, 1 below) and sticking a screwdriver underneath to cut the tape.<br />
<br />
Be very careful when removing the display assembly: its metal casing is not sealed shut very well and bends easily. In the Cherry M667 the touchscreen module is glued to the black plastic frontpanel, so when you pull out the LCD module you separate touchscreen and display. Be careful not to damage the touchscreen.<br />
<br />
== Locating the UART ==<br />
<br />
The [[UART]] seems to be the 3 big pads in the bottom left corner of the board. From left to right they are: GND, RX (connect to the TX on your TTL adapter), and TX (connect to the RX on your TTL adapter). If you connect a voltmeter between GND and RX (or GND and TX) you should measure around 3 V.<br />
<br />
The connection has been tested with a CP2102 USB to UART adapter, but others should work fine too. Do not connect the +3.3V or +5V VCC from your adapter to the PCB, this is not necessary.<br />
<br />
The pads are quite close to eachother. To make your life a little easier the GND runs around the edge of the board, so you have a lot of freedom to choose where to connect that wire.<br />
<br />
Serial speed is 115200.<br />
<br />
= Pictures =<br />
<br />
{{Remove|Take some pictures of your device, [[Special:Upload | upload them]], and add them here.}}<br />
<br />
<gallery><br />
File:Device_front.jpg<br />
File:Device_back.jpg<br />
File:Device_buttons_1.jpg<br />
File:Device_buttons_2.jpg<br />
File:Device_board_front.jpg<br />
File:Device_board_back.jpg<br />
</gallery><br />
<br />
== Yarvik 26x internals ==<br />
<gallery><br />
File:Yarvik_Tab26x_full.jpg<br />
File:Yarvik_Tab26x_PCB01.jpg<br />
File:Yarvik_Tab26x_PCB02.jpg<br />
File:Yarvik_Tab26x_PCB03.jpg<br />
File:Yarvik_Tab26x_PCB04.jpg<br />
File:Yarvik_Tab26x_PCB05.jpg<br />
File:Yarvik_Tab26x_PCB06.jpg<br />
File:Yarvik_Tab26x_PCB07.jpg<br />
File:Yarvik_Tab26x_PCB08.jpg<br />
File:Inet 97f Flash clopseup 01.JPG<br />
File:Inet 97f Flash clopseup 01 annotated.JPG<br />
</gallery><br />
<br />
= Cherry M667 internals =<br />
<br />
<gallery><br />
File:inet97f.jpg<br />
</gallery><br />
<br />
= Visual Land VL879 = <br />
<br />
<gallery><br />
File:VL879_Front.jpg<br />
File:VL-879 back.jpg<br />
File:VL-879 Edge.jpg<br />
File:VL-879 Internals.jpg<br />
File:VL-879 Serial.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
* [http://www.yarvik.com/en/product/tablets/tablets_7/TAB224/ Yarvik Tab224 GoTab Velocity 7"] This claims to have a 4000mAh battery.<br />
* [http://www.yarvik.com/en/product/tablets/tablets_7/TAB260/ Yarvik Tab260 GoTab Velocity 7"] This claims to have a 4200mAh battery.<br />
* [http://www.yarvik.com/en/product/tablets/tablets_7/TAB264/ Yarvik Tab264 GoTab Velocity 7"] Same as Tab260.<br />
* Primux Tech M705F Bora 7"<br />
* [http://www.mpmaneurope.com/en/products/internet-tablets-14/internet-tablet-mid74c-220/ mpmap MID74C] This has a 3500mAh battery, and different buttons.<br />
* Zero Tablet 7 inc, this tablet mount mb rev. 03<br />
<br />
Other possible names include (according to [http://tabletrepublic.com/forum/iview-760tpc-ployer-momo9/iview-760tpc-k-ployer-momo9-official-thread-883.html this forum post], unverified)<br />
* A71C<br />
* Benss B7<br />
* CherryPad Edwin C807 / M-677<br />
* Cougar Boxchip A10C<br />
* Intertoys Qware Pro 3<br />
* iView 760TPC<br />
* Eroda M701C<br />
* [http://mobiitab.com/index.php mobiitab 7]<br />
* Micromax funbook P300<br />
* Odys Xelio<br />
* Ployer Momo9<br />
* Picopad 7<br />
* Scroll Excel 3D<br />
* Skypad Alpha 2<br />
* Sumvision Cyclone Astro<br />
* Tracer OVO<br />
* VeeDee D10<br />
* vitalASC Center-ST0716<br />
* Visual Land VL-879<br />
* Wanxin TA-7B<br />
* [http://woxter.es/esp/es/tablets-pc/734-woxter-tablet-pc-65-cxi-7-outlet-8435089016109.html Woxter PC-65 CXi]<br />
* X10 AirPad 7p<br />
<br />
= See also =<br />
<br />
[[Category:Devices]]<br />
[[Category:A10 Tablets]]<br />
[[Category:Devices with HDMI port]]<br />
<br />
[[Category:Mainline_Kernel]]<br />
<br />
[[Category:NDH_TODO]]</div>
Oliver
https://linux-sunxi.org/index.php?title=File:Inet_97f_Flash_clopseup_01_annotated.JPG&diff=20896
File:Inet 97f Flash clopseup 01 annotated.JPG
2018-01-21T15:12:14Z
<p>Oliver: </p>
<hr />
<div></div>
Oliver
https://linux-sunxi.org/index.php?title=Inet_97f&diff=20890
Inet 97f
2018-01-20T16:42:25Z
<p>Oliver: Add inet97f flash closeup</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:Device_front.jpg|250px]]<br />
| manufacturer = [http://www.inet-tek.com/ Inet-Tek]<br />
| dimensions = 192''mm'' x 124''mm'' x 12.8''mm''<br />
| release_date = January 2012<br />
| website = [http://manufacturer/device Device Product Page]<br />
| soc = [[A10]] @ 1Ghz<br />
| dram = 512MiB DDR3 @ 408MHz<br />
| nand = 4GB<br />
| power = DC 5V @ 2A, different 3.7V Li-Ion batteries.<br />
| lcd = 800x480 (7" 16:9)<br />
| touchscreen = 5-finger capacitive/resistive ([[Touchscreen#Goodix|Goodix GT80x]] or [[Touchscreen#Solomon|Solomon Systemtech Ltd. SSD2533]])<br />
| video = HDMI (Type C - mini)<br />
| audio = 3.5mm headphone plug, HDMI, internal speaker, internal microphone<br />
| network = WiFi 802.11 b/g/n (Unknown Realtek device(s))<br />
| storage = µSD<br />
| usb = 1 USB2.0 OTG<br />
| camera = 0.3MP (640x480) front<br />
| other = Accelerometer ([[Accelerometer#Device|Manufacturer device]] <small style="color:red">FIXME</small>)<br />
| headers = UART<br />
}}<br />
<br />
{{Remove|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
The Inet 97F was one of the earliest Allwinner based tablets and, due to its low price, got sold under many many guises, and with many different options. These changes are different battery sizes, wifi modules, touchscreen controllers, camera modules, and of course slightly differing cases.<br />
<br />
= Identification =<br />
<br />
In android, under Settings->About Tablet, you can look at the Build Number, and it should start with '''97F2''', like for the Yarvik Tab260:<br />
<br />
* Model Number: TAB260<br />
* Build Number: 97F2-R1-H1-H01-1366.20111219<br />
<br />
Most rebadgers did succeed in changing the Model Number.<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
<br />
Supported.<br />
<br />
== Images ==<br />
<br />
== HW-Pack ==<br />
<br />
== BSP ==<br />
<br />
== Manual build ==<br />
<br />
{{Remove|Clarify why these are 2 different fex files, one for the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a10/inet97f-ii.fex inet97f-ii.fex] and the one below.}}<br />
<br />
=== Yarvik Tab 260/264 ===<br />
* For building u-boot, use the "INet97F-II" target.<br />
* The .fex file can be found in sunxi-boards as [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a10/yarvik_tab260.fex yarvik_tab260.fex]<br />
<br />
Everything else is the same as the [[manual build howto]].<br />
<br />
== Mainline kernel ==<br />
<br />
Use the sun4i-a10-inet97fv2.dts device-tree file for the [[Mainline_Kernel_Howto|mainline kernel]].<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
== FEL mode ==<br />
<br />
The volume up button triggers [[FEL | FEL mode]].<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:Inet97f-TTL.jpg|thumb|240px|TTL connections]]<br />
== Device disassembly ==<br />
<br />
The precise disassembly procedure varies per brand since each put a different case around the board. The Cherry M667 has a screwless plastic case that consists of a white back and a black front. After inserting a thin flat screwdriver the white back can easily be pushed off of the rest of the device.<br />
<br />
It helps that for most tablets the plastic case will have a lot of empty space, since the iNet-97F board is less than half the size of the display. Put the tablet with its screen facing down, then use your hands to knock on the back cover to find any hollow areas. Those would be good places to start with the screwdriver.<br />
<br />
Inside the device you should find a few tiny screws to hold the PCB in place (about 5), but most things are held together by tape. In the Cherry M667 the battery pack was tightly taped to the back of the display assembly. It could only be removed by guessing where the tape was (3 strips: 1 on top, 1 in the middle, 1 below) and sticking a screwdriver underneath to cut the tape.<br />
<br />
Be very careful when removing the display assembly: its metal casing is not sealed shut very well and bends easily. In the Cherry M667 the touchscreen module is glued to the black plastic frontpanel, so when you pull out the LCD module you separate touchscreen and display. Be careful not to damage the touchscreen.<br />
<br />
== Locating the UART ==<br />
<br />
The [[UART]] seems to be the 3 big pads in the bottom left corner of the board. From left to right they are: GND, RX (connect to the TX on your TTL adapter), and TX (connect to the RX on your TTL adapter). If you connect a voltmeter between GND and RX (or GND and TX) you should measure around 3 V.<br />
<br />
The connection has been tested with a CP2102 USB to UART adapter, but others should work fine too. Do not connect the +3.3V or +5V VCC from your adapter to the PCB, this is not necessary.<br />
<br />
The pads are quite close to eachother. To make your life a little easier the GND runs around the edge of the board, so you have a lot of freedom to choose where to connect that wire.<br />
<br />
Serial speed is 115200.<br />
<br />
= Pictures =<br />
<br />
{{Remove|Take some pictures of your device, [[Special:Upload | upload them]], and add them here.}}<br />
<br />
<gallery><br />
File:Device_front.jpg<br />
File:Device_back.jpg<br />
File:Device_buttons_1.jpg<br />
File:Device_buttons_2.jpg<br />
File:Device_board_front.jpg<br />
File:Device_board_back.jpg<br />
</gallery><br />
<br />
== Yarvik 26x internals ==<br />
<gallery><br />
File:Yarvik_Tab26x_full.jpg<br />
File:Yarvik_Tab26x_PCB01.jpg<br />
File:Yarvik_Tab26x_PCB02.jpg<br />
File:Yarvik_Tab26x_PCB03.jpg<br />
File:Yarvik_Tab26x_PCB04.jpg<br />
File:Yarvik_Tab26x_PCB05.jpg<br />
File:Yarvik_Tab26x_PCB06.jpg<br />
File:Yarvik_Tab26x_PCB07.jpg<br />
File:Yarvik_Tab26x_PCB08.jpg<br />
File:Inet 97f Flash clopseup 01.JPG<br />
</gallery><br />
<br />
= Cherry M667 internals =<br />
<br />
<gallery><br />
File:inet97f.jpg<br />
</gallery><br />
<br />
= Visual Land VL879 = <br />
<br />
<gallery><br />
File:VL879_Front.jpg<br />
File:VL-879 back.jpg<br />
File:VL-879 Edge.jpg<br />
File:VL-879 Internals.jpg<br />
File:VL-879 Serial.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
* [http://www.yarvik.com/en/product/tablets/tablets_7/TAB224/ Yarvik Tab224 GoTab Velocity 7"] This claims to have a 4000mAh battery.<br />
* [http://www.yarvik.com/en/product/tablets/tablets_7/TAB260/ Yarvik Tab260 GoTab Velocity 7"] This claims to have a 4200mAh battery.<br />
* [http://www.yarvik.com/en/product/tablets/tablets_7/TAB264/ Yarvik Tab264 GoTab Velocity 7"] Same as Tab260.<br />
* Primux Tech M705F Bora 7"<br />
* [http://www.mpmaneurope.com/en/products/internet-tablets-14/internet-tablet-mid74c-220/ mpmap MID74C] This has a 3500mAh battery, and different buttons.<br />
* Zero Tablet 7 inc, this tablet mount mb rev. 03<br />
<br />
Other possible names include (according to [http://tabletrepublic.com/forum/iview-760tpc-ployer-momo9/iview-760tpc-k-ployer-momo9-official-thread-883.html this forum post], unverified)<br />
* A71C<br />
* Benss B7<br />
* CherryPad Edwin C807 / M-677<br />
* Cougar Boxchip A10C<br />
* Intertoys Qware Pro 3<br />
* iView 760TPC<br />
* Eroda M701C<br />
* [http://mobiitab.com/index.php mobiitab 7]<br />
* Micromax funbook P300<br />
* Odys Xelio<br />
* Ployer Momo9<br />
* Picopad 7<br />
* Scroll Excel 3D<br />
* Skypad Alpha 2<br />
* Sumvision Cyclone Astro<br />
* Tracer OVO<br />
* VeeDee D10<br />
* vitalASC Center-ST0716<br />
* Visual Land VL-879<br />
* Wanxin TA-7B<br />
* [http://woxter.es/esp/es/tablets-pc/734-woxter-tablet-pc-65-cxi-7-outlet-8435089016109.html Woxter PC-65 CXi]<br />
* X10 AirPad 7p<br />
<br />
= See also =<br />
<br />
[[Category:Devices]]<br />
[[Category:A10 Tablets]]<br />
[[Category:Devices with HDMI port]]<br />
<br />
[[Category:Mainline_Kernel]]<br />
<br />
[[Category:NDH_TODO]]</div>
Oliver
https://linux-sunxi.org/index.php?title=File:Inet_97f_Flash_clopseup_01.JPG&diff=20889
File:Inet 97f Flash clopseup 01.JPG
2018-01-20T16:41:31Z
<p>Oliver: </p>
<hr />
<div></div>
Oliver
https://linux-sunxi.org/index.php?title=TZX-Q8-713B6&diff=20888
TZX-Q8-713B6
2018-01-20T16:39:32Z
<p>Oliver: Add foto's of NAND flash</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:TZX-Q8-713B-Front.jpg|250px]]<br />
| manufacturer = [http://tzx-china.com/en/ TZX technologies]<br />
| dimensions = 182''mm'' x 120''mm'' x 10''mm''<br />
| release_date = Month year<br />
| website = [http://manufacturer/device Device Product Page]<br />
| soc = [[A13]] @ 1Ghz<br />
| dram = 512MiB DDR3 @ 384MHz<br />
| nand = 4GB<br />
| power = DC 5V @ 2.0A, 1500mAh 3.7V Li-Ion battery<br />
| lcd = 800x480 (7" 16:9)<br />
| touchscreen = X-finger capacitive/resistive ([[Touchscreen#EKT3632|Elan EKT3632]])<br />
| audio = 3.5mm headphone plug, internal speaker, internal microphone<br />
| network = WiFi 802.11 b/g/n ([[Wifi#Realtek|Realtek RTL8188CTV]])<br />
| storage = µSD<br />
| usb = 1 USB2.0 OTG<br />
| camera = 0.3MP (640x480) front (Galaxycore GC0308)<br />
| other = Accelerometer ([[Accelerometer#MMA7660|Freescale MMA7660]])<br />
}}<br />
<br />
{{Remove|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
= Identification =<br />
<br />
{{Remove|Find out the strings as reported under settings.}}<br />
<br />
In android, under Settings->About Tablet, you will find:<br />
<br />
* Model Number: {{Remove|DEVICE}}<br />
* Build Number: {{Remove|SOC_BOARD_DEVICE_*.*}}<br />
<br />
The PCB shows:<br />
<pre><br />
TZX-Q8-713B6<br />
</pre><br />
<br />
= Sunxi support =<br />
<br />
== Current Status ==<br />
<br />
Supported.<br />
<br />
== Images ==<br />
<br />
== HW-Pack ==<br />
<br />
This board supports [http://dl.linux-sunxi.org/users/amery/sunxi-3.0/latest/a13_mid_hwpack.tar.xz HWPack of A13 MID devices].<br />
<br />
== BSP ==<br />
<br />
== Manual build ==<br />
<br />
* For building u-boot, use the "TZX-Q8-713B6" target.<br />
* The .fex file can be found in sunxi-boards as [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a13/tzx-q8-713b6.fex tzx-q8-713b6.fex]<br />
<br />
Everything else is the same as the [[manual build howto]].<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
== FEL mode ==<br />
<br />
The {{Remove|something}} button triggers [[FEL | FEL mode]].<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:TZX-Q8-713B-Board-UART.JPG|thumb|240px|DEVICE UART pads]]<br />
<br />
== Device disassembly ==<br />
<br />
See [[Format_Q8#Disassembly|the Q8 tablet format disassembly page]].<br />
<br />
== Locating the UART ==<br />
<br />
Uart has 2 pads on the back of the PCB (near the SoC). On A13 the UART's is on pins 151 and 152, which are left of the SoC. Just solder on some wires according to the [[UART|UART howto]]<br />
<br />
= Pictures =<br />
<gallery><br />
File:TZX-Q8-713B-Front.jpg<br />
File:TZX-Q8-713B-Back.jpg<br />
File:TZX-Q8-713B 01.JPG<br />
File:TZX-Q8-713B 02.JPG<br />
File:TZX-Q8-713B 03.JPG<br />
File:TZX-Q8-713B Flash closeup 01.JPG<br />
File:TZX-Q8-713B Flash closeup 01 annotated.JPG<br />
File:TZX-Q8-713B Flash closeup 02.JPG<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
{{Remove|List rebadged devices here.}}<br />
<br />
= See also =<br />
<br />
* [[Format_Q8#A13_based|A13 based format Q8 devices]]<br />
<br />
[[Category:Devices]]<br />
[[Category:A13 Tablets]]<br />
[[Category:Format_Q8_A13]]<br />
<br />
[[Category:NDH_TODO]]</div>
Oliver
https://linux-sunxi.org/index.php?title=File:TZX-Q8-713B_Flash_closeup_01_annotated.JPG&diff=20887
File:TZX-Q8-713B Flash closeup 01 annotated.JPG
2018-01-20T16:38:26Z
<p>Oliver: </p>
<hr />
<div></div>
Oliver
https://linux-sunxi.org/index.php?title=File:TZX-Q8-713B_Flash_closeup_02.JPG&diff=20886
File:TZX-Q8-713B Flash closeup 02.JPG
2018-01-20T15:00:50Z
<p>Oliver: </p>
<hr />
<div></div>
Oliver
https://linux-sunxi.org/index.php?title=File:TZX-Q8-713B_Flash_closeup_01.JPG&diff=20885
File:TZX-Q8-713B Flash closeup 01.JPG
2018-01-20T15:00:31Z
<p>Oliver: </p>
<hr />
<div></div>
Oliver
https://linux-sunxi.org/index.php?title=Fosdem&diff=20677
Fosdem
2017-12-03T13:14:39Z
<p>Oliver: Oliver moved page Fosdem2014 to Fosdem without leaving a redirect</p>
<hr />
<div>Linux sunxi was represented at [https://archive.fosdem.org/2014/schedule/event/arm_allwinner_sunxi_socs/ Fosdem 2014]!</div>
Oliver
https://linux-sunxi.org/index.php?title=Fosdem&diff=20676
Fosdem
2017-12-03T13:12:44Z
<p>Oliver: </p>
<hr />
<div>Linux sunxi was represented at [https://archive.fosdem.org/2014/schedule/event/arm_allwinner_sunxi_socs/ Fosdem 2014]!</div>
Oliver
https://linux-sunxi.org/index.php?title=Fosdem&diff=20675
Fosdem
2017-12-03T13:10:13Z
<p>Oliver: Created page with "Just dumping my slides here for those interested."</p>
<hr />
<div>Just dumping my slides here for those interested.</div>
Oliver
https://linux-sunxi.org/index.php?title=A13/PIO&diff=20555
A13/PIO
2017-10-31T10:06:50Z
<p>Oliver: /* PF */ the SD controller is abbreviated as SDC not SD.</p>
<hr />
<div><br />
== PB ==<br />
{| class="wikitable"<br />
! Port<br />
! Pin<br />
! Type<br />
! MUX 2<br />
! MUX 4<br />
! MUX 6<br />
|-<br />
| <tt>PB0</tt><br />
| 101<br />
| I/O<br />
| [[I²C|TWI0-SCK]]<br />
|-<br />
| <tt>PB1</tt><br />
| 102<br />
| I/O<br />
| [[I²C|TWI0-SDA]]<br />
|-<br />
| <tt>PB2</tt><br />
| 103<br />
| I/O<br />
| PWM<br />
| SPI2-MOSI<br />
| EINT16<br />
|-<br />
| <tt>PB3</tt><br />
| 150<br />
| I/O<br />
| IR_TX<br />
| SPI2_MISO<br />
| EINT17<br />
|-<br />
| <tt>PB4</tt><br />
| 104<br />
| I/O<br />
| IR_RX<br />
|<br />
| EINT18<br />
|-<br />
| <tt>PB10</tt><br />
| 10<br />
| I/O<br />
| SPI2_CS1<br />
|<br />
| EINT24<br />
|-<br />
| <tt>PB15</tt><br />
| 105<br />
| I/O<br />
| [[I²C|TWI1_SCK]]<br />
|-<br />
| <tt>PB16</tt><br />
| 106<br />
| I/O<br />
| [[I²C|TWI1_SDA]]<br />
|-<br />
| <tt>PB17</tt><br />
| 161<br />
| I/O<br />
| [[I²C|TWI2_SCK]]<br />
|-<br />
| <tt>PB18</tt><br />
| 160<br />
| I/O<br />
| [[I²C|TWI2_SDA]]<br />
|}<br />
<br />
== PC ==<br />
{| class="wikitable"<br />
! Port<br />
! Pin<br />
! Mux ?<br />
! Mux ?<br />
|-<br />
| <tt>PC0</tt><br />
| 8<br />
| NWE<br />
| SPI0_MOSI<br />
|-<br />
| <tt>PC1</tt><br />
| 7<br />
| NALE<br />
| SPI0_MISO<br />
|-<br />
| <tt>PC2</tt><br />
| 6<br />
| NCLE<br />
| SPI0_CLK<br />
|-<br />
| <tt>PC3</tt><br />
| 3<br />
| NCE1<br />
| SPI0_CS0<br />
|-<br />
| <tt>PC4</tt><br />
| 2<br />
| NCE0<br />
|-<br />
| <tt>PC5</tt><br />
| 1<br />
| NRE<br />
|-<br />
| <tt>PC6</tt><br />
| 176<br />
| NRB0<br />
| SDC2_CMD<br />
|-<br />
| <tt>PC7</tt><br />
| 175<br />
| NRB1<br />
| SDC2_CLK<br />
|-<br />
| <tt>PC8</tt><br />
| 174<br />
| NDQ0<br />
| SDC2_D0<br />
|-<br />
| <tt>PC9</tt><br />
| 172<br />
| NDQ1<br />
| SDC2_D1<br />
|-<br />
| <tt>PC10</tt><br />
| 171<br />
| NDQ2<br />
| SDC2_D2<br />
|-<br />
| <tt>PC11</tt><br />
| 170<br />
| NDQ3<br />
| SDC2_D3<br />
|-<br />
| <tt>PC12</tt><br />
| 168<br />
| NDQ4<br />
| SDC2_D4<br />
|-<br />
| <tt>PC13</tt><br />
| 167<br />
| NDQ5<br />
| SDC2_D5<br />
|-<br />
| <tt>PC14</tt><br />
| 166<br />
| NDQ6<br />
| SDC2_D6<br />
|-<br />
| <tt>PC15</tt><br />
| 165<br />
| NDC7<br />
| SDC2_D7<br />
|-<br />
| <tt>PC19</tt><br />
| 162<br />
| NDQS<br />
|}<br />
<br />
== PD ==<br />
{| class="wikitable"<br />
! Port<br />
! Pin<br />
! Mux ?<br />
! Mux ?<br />
|-<br />
| <tt>PD2</tt><br />
| 148<br />
| LCD_D2<br />
|-<br />
| <tt>PD3</tt><br />
| 147<br />
| LCD_D3<br />
|-<br />
| <tt>PD4</tt><br />
| 146<br />
| LCD_D4<br />
|-<br />
| <tt>PD5</tt><br />
| 145<br />
| LCD_D5<br />
|-<br />
| <tt>PD6</tt><br />
| 144<br />
| LCD_D6<br />
|-<br />
| <tt>PD7</tt><br />
| 143<br />
| LCD_D7<br />
|-<br />
| <tt>PD10</tt><br />
| 141<br />
| LCD_D10<br />
|-<br />
| <tt>PD11</tt><br />
| 140<br />
| LCD_D11<br />
|-<br />
| <tt>PD12</tt><br />
| 139<br />
| LCD_D12<br />
|-<br />
| <tt>PD13</tt><br />
| 138<br />
| LCD_D13<br />
|-<br />
| <tt>PD14</tt><br />
| 137<br />
| LCD_D14<br />
|-<br />
| <tt>PD15</tt><br />
| 136<br />
| LCD_D15<br />
|-<br />
| <tt>PD18</tt><br />
| 135<br />
| LCD_D18<br />
|-<br />
| <tt>PD19</tt><br />
| 134<br />
| LCD_D19<br />
|-<br />
| <tt>PD20</tt><br />
| 133<br />
| LCD_D20<br />
|-<br />
| <tt>PD21</tt><br />
| 132<br />
| LCD_D21<br />
|-<br />
| <tt>PD22</tt><br />
| 131<br />
| LCD_D22<br />
|-<br />
| <tt>PD23</tt><br />
| 130<br />
| LCD_D23<br />
|-<br />
| <tt>PD24</tt><br />
| 129<br />
| LCD_CLK<br />
|-<br />
| <tt>PD25</tt><br />
| 128<br />
| LCD_DE<br />
|-<br />
| <tt>PD26</tt><br />
| 127<br />
| LCD_HSYNC<br />
|-<br />
| <tt>PD27</tt><br />
| 126<br />
| LCD_VSYNC<br />
|}<br />
<br />
== PE ==<br />
<br />
{| class="wikitable"<br />
! Port<br />
! Pin<br />
! Type<br />
! MUX 3<br />
! MUX 4<br />
! MUX ?<br />
|-<br />
| PE0<br />
| 114<br />
| Input<br />
| CSI_PCLK<br />
| SPI2_CS0<br />
| EINT14<br />
|-<br />
| PE1<br />
| 115<br />
| Input<br />
| CSI_MCLK<br />
| SPI2_CLK<br />
| EINT15<br />
|-<br />
| PE2<br />
| 116<br />
| Input<br />
| CSI_HSYNC<br />
| SPI2_MOSI<br />
|-<br />
| PE3<br />
| 117<br />
| I/O<br />
| CSI_VSYNC<br />
| SPI2_MISO<br />
|-<br />
| PE4<br />
| 118<br />
| I/O<br />
| CSI_D0<br />
| SDC2_D0<br />
|-<br />
| PE5<br />
| 119<br />
| I/O<br />
| CSI_D1<br />
| SDC2_D1<br />
|-<br />
| PE6<br />
| 120<br />
| I/O<br />
| CSI_D2<br />
| SDC2_D2<br />
|-<br />
| PE7<br />
| 121<br />
| I/O<br />
| CSI_D3<br />
| SDC2_D3<br />
|-<br />
| PE8<br />
| 122<br />
| I/O<br />
| CSI_D4<br />
| SDC2_CMD<br />
|-<br />
| PE9<br />
| 123<br />
| I/O<br />
| CSI_D5<br />
| SDC2_CLK<br />
|-<br />
| PE10<br />
| 124<br />
| I/O<br />
| CSI_D6<br />
| UART1_TX<br />
|-<br />
| PE11<br />
| 125<br />
| I/O<br />
| CSI_D7<br />
| UART1_RX<br />
|-<br />
|}<br />
<br />
== PF ==<br />
{| class="wikitable"<br />
{{PIO/Header|F|Pin}}<br />
{{PIO|PF0|107|| SDC0_DATA1 || [[JTAG|JTAG_TMS]]}}<br />
{{PIO|PF1|108|| SDC0_DATA0 || [[JTAG|JTAG_TDI]]}}<br />
{{PIO|PF2|110|| SDC0_CLK || UART0_TX}}<br />
{{PIO|PF3|111|| SDC0_CMD || [[JTAG|JTAG_TDO]]}}<br />
{{PIO|PF4|112|| SDC0_DATA3 || UART0_RX}}<br />
{{PIO|PF5|113|| SDC0_DATA2 || [[JTAG|JTAG_TCK]]}}<br />
|}<br />
<br />
== PG ==<br />
{| class="wikitable"<br />
! Port<br />
! Pin<br />
! Type<br />
! MUX 2<br />
! MUX 3<br />
! MUX 6<br />
|-<br />
| <tt>PG0</tt><br />
| 155<br />
| Input<br />
|<br />
|<br />
| EINT0<br />
|-<br />
| <tt>PG1</tt><br />
| 154<br />
| Input<br />
|<br />
|<br />
| EINT1<br />
|-<br />
| <tt>PG2</tt><br />
| 153<br />
| Input<br />
|<br />
|<br />
| EINT2<br />
|-<br />
| <tt>PG3</tt><br />
| 152<br />
| I/O<br />
| UART1_TX<br />
|<br />
| EINT3<br />
|-<br />
| <tt>PG4</tt><br />
| 151<br />
| I/O<br />
| UART1_RX<br />
|<br />
| EINT4<br />
|-<br />
| <tt>PG9</tt><br />
| 12<br />
| I/O<br />
| SPI1_CS0<br />
| UART3_TX<br />
| EINT9<br />
|-<br />
| <tt>PG10</tt><br />
| 13<br />
| I/O<br />
| SPI1_CLK<br />
| UART3_RX<br />
| EINT10<br />
|-<br />
| <tt>PG11</tt><br />
| 14<br />
| I/O<br />
| SPI1_MOSI<br />
| UART3_CTS<br />
| EINT11<br />
|-<br />
| <tt>PG12</tt><br />
| 15<br />
| I/O<br />
| SPI1_MISO<br />
| UART3_RTS<br />
| EINT12<br />
|}<br />
<br />
[[Category:Hardware]]<br />
[[Category:PIO]]</div>
Oliver
https://linux-sunxi.org/index.php?title=A20/PIO&diff=20208
A20/PIO
2017-06-29T13:14:58Z
<p>Oliver: Split up the big table into small tables with headers giving us a jumpable index!</p>
<hr />
<div>== Programmable I/O Pins ==<br />
<br />
== Port bank A ==<br />
{| class="wikitable"<br />
{{PIO/Header|A (0)}}<br />
{{PIO|PA00 (0)| D05 || [[EMAC|ERXD3]] | [[SPI|SPI1_CS0]] | [[UART|UART2_RTS]] | [[GMAC|GRXD3]]}}<br />
{{PIO|PA01 (1)| E05 || [[EMAC|ERXD2]] | [[SPI|SPI1_CLK]] | [[UART|UART2_CTS]] | [[GMAC|GRXD2]]}}<br />
{{PIO|PA02 (2)| D06 || [[EMAC|ERXD1]] | [[SPI|SPI1_MOSI]] | [[UART|UART2_TX]] | [[GMAC|GRXD1]]}}<br />
{{PIO|PA03 (3)| E06 || [[EMAC|ERXD0]] | [[SPI|SPI1_MISO]] | [[UART|UART2_RX]] | [[GMAC|GRXD0]]}}<br />
{{PIO|PA04 (4)| D07 || [[EMAC|ETXD3]] | [[SPI|SPI1_CS1]] | | [[GMAC|GTXD3]]}}<br />
{{PIO|PA05 (5)| E07 || [[EMAC|ETXD2]] | [[SPI|SPI3_CS0]] | | [[GMAC|GTXD2]]}}<br />
{{PIO|PA06 (6)| D08 || [[EMAC|ETXD1]] | [[SPI|SPI3_CLK]] | | [[GMAC|GTXD1]]}}<br />
{{PIO|PA07 (7)| E08 || [[EMAC|ETXD0]] | [[SPI|SPI3_MOSI]] | | [[GMAC|GTXD0]]}}<br />
{{PIO|PA08 (8)| D09 || [[EMAC|ERXCK]] | [[SPI|SPI3_MISO]] | | [[GMAC|GRXCK]]}}<br />
{{PIO|PA09 (9)| E09 || [[EMAC|ERXERR]] | [[SPI|SPI3_CS1]] | | [[GMAC|GNULL/ERXERR]] | [[I2S|I²S1_MCLK]]}}<br />
{{PIO|PA10 (10)| D10 || [[EMAC|ERXDV]] | | [[UART|UART1_TX]] | [[GMAC|RXDV]]}}<br />
{{PIO|PA11 (11)| E10 || [[EMAC|EMDC]] | | [[UART|UART1_RX]] | [[GMAC|GMDC]]}}<br />
{{PIO|PA12 (12)| D11 || [[EMAC|EMDIO]] | [[UART|UART6_TX]] | [[UART|UART1_RTS]] | [[GMAC|GMDIO]]}}<br />
{{PIO|PA13 (13)| E11 || [[EMAC|ETXEN]] | [[UART|UART6_RX]] | [[UART|UART1_CTS]] | [[GMAC|GTXCTL/ETXCK]]}}<br />
{{PIO|PA14 (14)| D12 || [[EMAC|ETXCK]] | [[UART|UART7_TX]] | [[UART|UART1_DTR]] | [[GMAC|GNULL/ETXCK]] | [[I2S|I²S1_BCLK]]}}<br />
{{PIO|PA15 (15)| E12 || [[EMAC|ECRS]] | [[UART|UART7_RX]] | [[UART|UART1_DSR]] | [[GMAC|GTXCK/ECRS]] | [[I2S|I²S1_LRCK]]}}<br />
{{PIO|PA16 (16)| D13 || [[EMAC|ECOL]] | [[CAN|CAN_TX]] | [[UART|UART1_DCD]] | [[GMAC|GCLKIN/ECOL]] | [[I2S|I²S1_DO]]}}<br />
{{PIO|PA17 (17)| C13 || [[EMAC|ETXERR]] | [[CAN|CAN_RX]] | [[UART|UART1_RING]] | [[GMAC|GNULL/ETXERR]] | [[I2S|I²S1_DI]]}}<br />
|}<br />
<br />
== Port bank B ==<br />
{| class="wikitable"<br />
{{PIO/Header|B (1)}}<br />
! notes<br />
{{PIO|PB00 (32)| A15 || [[I²C|TWI0_SCK]]}}<br />
{{PIO|PB01 (33)| B15 || [[I²C|TWI0_SDA]]}}<br />
{{PIO|PB02 (34)| A14 || PWM0}}<br />
{{PIO|PB03 (35)| B14 || IR0_TX || SPDIF_MCLK}}<br />
| verify SPDIF_MCLK<br />
{{PIO|PB04 (36)| A13 || IR0_RX}}<br />
{{PIO|PB05 (37)| B13 || I²S0_MCLK | AC97_MCLK}}<br />
{{PIO|PB06 (38)| A12 || I²S0_BCLK | AC97_BCLK}}<br />
{{PIO|PB07 (39)| B12 || I²S0_LRCK | AC97_SYNC}}<br />
{{PIO|PB08 (40)| A11 || I²S0_DO0 | AC97_DO}}<br />
| verify AC97_DO<br />
{{PIO|PB09 (41)| C12 || I²S0_DO1}}<br />
| verify AC97_DO<br />
{{PIO|PB10 (42)| C11 || I²S0_DO2}}<br />
{{PIO|PB11 (43)| C10 || I²S0_DO3}}<br />
{{PIO|PB12 (44)| C9 || I²S0_DI | AC97_DI | SPDIF_DI}}<br />
| verify SPDIF_DI<br />
{{PIO|PB13 (45)| B11 || SPI2_CS1 || SPDIF_DO}}<br />
| verify SPDIF_DO<br />
{{PIO|PB14 (46)| A10 || SPI2_CS0 | JTAG_MS0}}<br />
{{PIO|PB15 (47)| B10 || SPI2_CLK | JTAG_CK0}}<br />
{{PIO|PB16 (48)| A9 || SPI2_MOSI| JTAG_DO0}}<br />
{{PIO|PB17 (49)| B9 || SPI2_MISO| JTAG_DI0}}<br />
{{PIO|PB18 (50)| A8 || [[I²C|TWI1_SCK]]}}<br />
{{PIO|PB19 (51)| B8 || [[I²C|TWI1_SDA]]}}<br />
{{PIO|PB20 (52)| C8 || [[I²C|TWI2_SCK]]}}<br />
{{PIO|PB21 (53)| C7 || [[I²C|TWI2_SDA]]}}<br />
{{PIO|PB22 (54)| A7 || UART0_TX | IR1_TX}}<br />
{{PIO|PB23 (55)| B7 || UART0_RX | IR1_RX}}<br />
|}<br />
<br />
== Port bank C ==<br />
{| class="wikitable"<br />
{{PIO/Header|C (2)}}<br />
{{PIO|PC00 (64)|M23|| [[NFC|NAND_WE#]] | SPI0_MOSI}}<br />
{{PIO|PC01 (65)|M22|| [[NFC|NALE]] | SPI0_MISO}}<br />
{{PIO|PC02 (66)|L23|| [[NFC|NCLE]] | SPI0_CLK}}<br />
{{PIO|PC03 (67)|L22|| [[NFC|NCE1]]}}<br />
{{PIO|PC04 (68)|K23|| [[NFC|NCE0]]}}<br />
{{PIO|PC05 (69)|K22|| [[NFC|NRE#]]}}<br />
{{PIO|PC06 (70)|J23|| [[NFC|NRB0]] | SDC2_CMD}}<br />
{{PIO|PC07 (71)|J22|| [[NFC|NRB1]] | SDC2_CLK}}<br />
{{PIO|PC08 (72)|H23|| [[NFC|NDQ0]] | SDC2_D0}}<br />
{{PIO|PC09 (73)|H22|| [[NFC|NDQ1]] | SDC2_D1}}<br />
{{PIO|PC10 (74)|G23|| [[NFC|NDQ2]] | SDC2_D2}}<br />
{{PIO|PC11 (75)|G22|| [[NFC|NDQ3]] | SDC2_D3}}<br />
{{PIO|PC12 (76)|H21|| [[NFC|NDQ4]]}}<br />
{{PIO|PC13 (77)|H20|| [[NFC|NDQ5]]}}<br />
{{PIO|PC14 (78)|G21|| [[NFC|NDQ6]]}}<br />
{{PIO|PC15 (79)|G20|| [[NFC|NDQ7]]}}<br />
{{PIO|PC16 (80)|M21|| [[NFC|NWP]]}}<br />
{{PIO|PC17 (81)|F23|| [[NFC|NCE2]]}}<br />
{{PIO|PC18 (82)|F22|| [[NFC|NCE3]]}}<br />
{{PIO|PC19 (83)|L21|| [[NFC|NCE4]] | SPI2_CS0}}<br />
{{PIO|PC20 (84)|K21|| [[NFC|NCE5]] | SPI2_CLK}}<br />
{{PIO|PC21 (85)|J21|| [[NFC|NCE6]] | SPI2_MOSI}}<br />
{{PIO|PC22 (86)|J20|| [[NFC|NCE7]] | SPI2_MISO}}<br />
{{PIO|PC23 (87)|G19|| | SPI0_CS0}}<br />
{{PIO|PC24 (88)|F21|| [[NFC|NDQS]]}}<br />
|}<br />
<br />
== Port bank D ==<br />
{| class="wikitable"<br />
{{PIO/Header|D (3)}}<br />
{{PIO|PD00 (96)| AB15 || LCD0_D0 | LVDS0_VP0}}<br />
{{PIO|PD01 (97)| AC15 || LCD0_D1 | LVDS0_VN0}}<br />
{{PIO|PD02 (98)| AB14 || LCD0_D2 | LVDS0_VP1}}<br />
{{PIO|PD03 (99)| AC14 || LCD0_D3 | LVDS0_VN1}}<br />
{{PIO|PD04 (100)| AB13 || LCD0_D4 | LVDS0_VP2}}<br />
{{PIO|PD05 (101)| AC13 || LCD0_D5 | LVDS0_VN2}}<br />
{{PIO|PD06 (102)| AB12 || LCD0_D6 | LVDS0_VPC}}<br />
{{PIO|PD07 (103)| AC12 || LCD0_D7 | LVDS0_VNC}}<br />
{{PIO|PD08 (104)| AB11 || LCD0_D8 | LVDS0_VP3}}<br />
{{PIO|PD09 (105)| AC11 || LCD0_D9 | LVDS0_VN3}}<br />
{{PIO|PD10 (106)| Y15 || LCD0_D10 | LVDS1_VP0}}<br />
{{PIO|PD11 (107)| AA15 || LCD0_D11 | LVDS1_VN0}}<br />
{{PIO|PD12 (108)| Y14 || LCD0_D12 | LVDS1_VP1}}<br />
{{PIO|PD13 (109)| AA14 || LCD0_D13 | LVDS1_VN1}}<br />
{{PIO|PD14 (110)| Y13 || LCD0_D14 | LVDS1_VP2}}<br />
{{PIO|PD15 (111)| AA13 || LCD0_D15 | LVDS1_VN2}}<br />
{{PIO|PD16 (112)| Y12 || LCD0_D16 | LVDS1_VPC}}<br />
{{PIO|PD17 (113)| AA12 || LCD0_D17 | LVDS1_VNC}}<br />
{{PIO|PD18 (114)| Y11 || LCD0_D18 | LVDS1_VP3}}<br />
{{PIO|PD19 (115)| AA11 || LCD0_D19 | LVDS1_VN3}}<br />
{{PIO|PD20 (116)| Y10 || LCD0_D20 | CSI1_MCLK}}<br />
{{PIO|PD21 (117)| AA10 || LCD0_D21 | SMC_VPPEN}}<br />
{{PIO|PD22 (118)| AB10 || LCD0_D22 | SMC_VPPPP}}<br />
{{PIO|PD23 (119)| AC10 || LCD0_D23 | SMC_DET}}<br />
{{PIO|PD24 (120)| Y9 || LCD0_CLK | SMC_VCCEN}}<br />
{{PIO|PD25 (121)| AA9 || LCD0_DE | SMC_RST}}<br />
{{PIO|PD26 (122)| AB9 || LCD0_HSYNC | SMC_SCK}}<br />
{{PIO|PD27 (123)| AC9 || LCD0_VSYNC | SMC_SDA}}<br />
|}<br />
<br />
== Port bank E ==<br />
{| class="wikitable"<br />
{{PIO/Header|E (4)}}<br />
{{PIO|PE00 (128)|E23|| TS0_CLK | CSI0_PCK}}<br />
{{PIO|PE01 (129)|E22|| TS0_ERR | CSI0_CK}}<br />
{{PIO|PE02 (130)|D23|| TS0_SYNC | CSI0_HSYNC}}<br />
{{PIO|PE03 (131)|D22|| TS0_DVLD | CSI0_VSYNC}}<br />
{{PIO|PE04 (132)|C23|| TS0_D0 | CSI0_D0}}<br />
{{PIO|PE05 (133)|C22|| TS0_D1 | CSI0_D1}}<br />
{{PIO|PE06 (134)|B23|| TS0_D2 | CSI0_D2}}<br />
{{PIO|PE07 (135)|B22|| TS0_D3 | CSI0_D3}}<br />
{{PIO|PE08 (136)|A23|| TS0_D4 | CSI0_D4}}<br />
{{PIO|PE09 (137)|A22|| TS0_D5 | CSI0_D5}}<br />
{{PIO|PE10 (138)|B21|| TS0_D6 | CSI0_D6}}<br />
{{PIO|PE11 (139)|A21|| TS0_D7 | CSI0_D7}}<br />
|}<br />
<br />
== Port bank F ==<br />
{| class="wikitable"<br />
{{PIO/Header|F (5)}}<br />
{{PIO|PF00 (160)|M20|| SDC0_D1 || JTAG_MS1}}<br />
{{PIO|PF01 (161)|M19|| SDC0_D0 || JTAG_DI1}}<br />
{{PIO|PF02 (162)|L20|| SDC0_CLK || UART0_TX}}<br />
{{PIO|PF03 (163)|L19|| SDC0_CMD || JTAG_DO1}}<br />
{{PIO|PF04 (164)|K20|| SDC0_D3 || UART0_RX}}<br />
{{PIO|PF05 (165)|K19|| SDC0_D2 || JTAG_CK1}}<br />
|}<br />
<br />
== Port bank G ==<br />
{| class="wikitable"<br />
{{PIO/Header|G (6)}}<br />
{{PIO|PG00 (192)|F20|| TS1_CLK | CSI1_PCK | SDC1_CMD}}<br />
{{PIO|PG01 (193)|E21|| TS1_ERR | CSI1_CK | SDC1_CLK}}<br />
{{PIO|PG02 (194)|E20|| TS1_SYNC | CSI1_HSYNC | SDC1_D0}}<br />
{{PIO|PG03 (195)|D21|| TS1_DVLD | CSI1_VSYNC | SDC1_D1}}<br />
{{PIO|PG04 (196)|D20|| TS1_D0 | CSI1_D0 | SDC1_D2 | CSI0_D8}}<br />
{{PIO|PG05 (197)|C21|| TS1_D1 | CSI1_D1 | SDC1_D3 | CSI0_D9}}<br />
{{PIO|PG06 (198)|E19|| TS1_D2 | CSI1_D2 | UART3_TX | CSI0_D10}}<br />
{{PIO|PG07 (199)|C20|| TS1_D3 | CSI1_D3 | UART3_RX | CSI0_D11}}<br />
{{PIO|PG08 (200)|D19|| TS1_D4 | CSI1_D4 | UART3_RTS | CSI0_D12}}<br />
{{PIO|PG09 (201)|C19|| TS1_D5 | CSI1_D5 | UART3_CTS | CSI0_D13}}<br />
{{PIO|PG10 (202)|D18|| TS1_D6 | CSI1_D6 | UART4_TX | CSI0_D14}}<br />
{{PIO|PG11 (203)|C18|| TS1_D7 | CSI1_D7 | UART4_RX | CSI0_D15}}<br />
|}<br />
<br />
== Port bank H ==<br />
{| class="wikitable"<br />
{{PIO/Header|H (7)}}<br />
{{PIO|PH00 (224)|A6|| LCD1_D00 || UART3_TX | | EINT0 | CSI1_D0 }}<br />
{{PIO|PH01 (225)|B6|| LCD1_D01 || UART3_RX | | EINT1 | CSI1_D1 }}<br />
{{PIO|PH02 (226)|C6|| LCD1_D02 || UART3_RTS| | EINT2 | CSI1_D2 }}<br />
{{PIO|PH03 (227)|A5|| LCD1_D03 || UART3_CTS| | EINT3 | CSI1_D3 }}<br />
{{PIO|PH04 (228)|B5|| LCD1_D04 || UART4_TX | | EINT4 | CSI1_D4 }}<br />
{{PIO|PH05 (229)|C5|| LCD1_D05 || UART4_RX | | EINT5 | CSI1_D5 }}<br />
{{PIO|PH06 (230)|A4|| LCD1_D06 || UART5_TX | MS_BS | EINT6 | CSI1_D6 }}<br />
{{PIO|PH07 (231)|B4|| LCD1_D07 || UART5_RX | MS_CLK | EINT7 | CSI1_D7 }}<br />
{{PIO|PH08 (232)|C4|| LCD1_D08 | [[EMAC|ERXD3]] | KP_IN0 | MS_D1 | EINT8 | CSI1_D9 }}<br />
{{PIO|PH09 (233)|D4|| LCD1_D09 | [[EMAC|ERXD2]] | KP_IN1 | MS_D0 | EINT9 | CSI1_D8 }}<br />
{{PIO|PH10 (234)|A3|| LCD1_D10 | [[EMAC|ERXD1]] | KP_IN2 | MS_D2 | EINT10 | CSI1_D10 }}<br />
{{PIO|PH11 (235)|B3|| LCD1_D11 | [[EMAC|ERXD0]] | KP_IN3 | MS_D3 | EINT11 | CSI1_D11 }}<br />
{{PIO|PH12 (236)|C3|| LCD1_D12 || PS2_SCK1 | | EINT12 | CSI1_D12 }}<br />
{{PIO|PH13 (237)|A2|| LCD1_D13 || PS2_SDA1 | SMC_RST | EINT13 | CSI1_D13 }}<br />
{{PIO|PH14 (238)|B2|| LCD1_D14 | [[EMAC|ETXD3]] | KP_IN4 | SMC_VPPEN | EINT14 | CSI1_D14 }}<br />
{{PIO|PH15 (239)|A1|| LCD1_D15 | [[EMAC|ETXD2]] | KP_IN5 | SMC_VPPPP | EINT15 | CSI1_D15 }}<br />
{{PIO|PH16 (240)|B1|| LCD1_D16 | [[EMAC|ETXD1]] | KP_IN6 | | EINT16 | CSI1_D16 }}<br />
{{PIO|PH17 (241)|C1|| LCD1_D17 | [[EMAC|ETXD0]] | KP_IN7 | SMC_VCCEN | EINT17 | CSI1_D17 }}<br />
{{PIO|PH18 (242)|C2|| LCD1_D18 | [[EMAC|ERXCK]] | KP_OUT0 | SMC_SCK | EINT18 | CSI1_D18 }}<br />
{{PIO|PH19 (243)|D1|| LCD1_D19 | [[EMAC|ERXERR]] | KP_OUT1 | SMC_SDA | EINT19 | CSI1_D19 }}<br />
{{PIO|PH20 (244)|D2|| LCD1_D20 | [[EMAC|ERXDV]] | CAN_TX | | EINT20 | CSI1_D20 }}<br />
{{PIO|PH21 (245)|D3|| LCD1_D21 | [[EMAC|EMDC]] | CAN_RX | | EINT21 | CSI1_D21 }}<br />
{{PIO|PH22 (246)|E1|| LCD1_D22 | [[EMAC|EMDIO]] | KP_OUT2 | SDC1_CMD | | CSI1_D22 }}<br />
{{PIO|PH23 (247)|E2|| LCD1_D23 | [[EMAC|ETEN]] | KP_OUT3 | SDC1_CLK | | CSI1_D23 }}<br />
{{PIO|PH24 (248)|E3|| LCD1_CLK | [[EMAC|ETXCK]] | KP_OUT4 | SDC1_D0 | | CSI1_FIELD }}<br />
{{PIO|PH25 (249)|E4|| LCD1_DE | [[EMAC|ECRS]] | KP_OUT5 | SDC1_D1 | | CSI1_PCLK }}<br />
{{PIO|PH26 (250)|F3|| LCD1_HSYNC | [[EMAC|ECOL]] | KP_OUT6 | SDC1_D2 | | CSI1_HSYNC }}<br />
{{PIO|PH27 (251)|F4|| LCD1_VSYNC | [[EMAC|ETXERR]] | KP_OUT7 | SDC1_D3 | | CSI1_VSYNC }}<br />
|}<br />
<br />
== Port bank I ==<br />
{| class="wikitable"<br />
{{PIO/Header|I (8)}}<br />
{{PIO|PI00 (256)|A20|| | [[TWI TWI3_SCK]]}}<br />
{{PIO|PI01 (257)|B20|| | [[TWI TWI3_SDA]]}}<br />
{{PIO|PI02 (258)|A19|| | [[TWI TWI4_SCK]]}}<br />
{{PIO|PI03 (259)|B19|| [[A10/PWM|PWM1]] | [[TWI TWI4_SDA]]}}<br />
{{PIO|PI04 (260)|A18|| [[A10/SDC|SDC3_CMD]]}}<br />
{{PIO|PI05 (261)|B18|| [[A10/SDC|SDC3_CLK]]}}<br />
{{PIO|PI06 (262)|A17|| [[A10/SDC|SDC3_D0]]}}<br />
{{PIO|PI07 (263)|B17|| [[A10/SDC|SDC3_D1]]}}<br />
{{PIO|PI08 (264)|A16|| [[A10/SDC|SDC3_D2]]}}<br />
{{PIO|PI09 (265)|B16|| [[A10/SDC|SDC3_D3]]}}<br />
{{PIO|PI10 (266)|C17|| [[A10/SPI|SPI0_CS0]] | [[A10/UART|UART5_TX]] | | | EINT22 }}<br />
{{PIO|PI11 (267)|D17|| [[A10/SPI|SPI0_CLK]] | [[A10/UART|UART5_RX]] | | | EINT23 }}<br />
{{PIO|PI12 (268)|C16|| [[A10/SPI|SPI0_MOSI]] | [[A10/UART|UART6_TX]] | CLK_OUT_A | | EINT24 }}<br />
{{PIO|PI13 (269)|D16|| [[A10/SPI|SPI0_MISO]] | [[A10/UART|UART6_RX]] | CLK_OUT_B | | EINT25 }}<br />
{{PIO|PI14 (270)|C15|| [[A10/SPI|SPI0_CS1]] | [[A10/PS2|PS2_SCK1]] | TCLKIN0 | TCLKIN0 | EINT26 }}<br />
{{PIO|PI15 (271)|D15|| [[A10/SPI|SPI1_CS1]] | [[A10/PS2|PS2_SDA1]] | TCLKIN1 | TCLKIN1 | EINT27 }}<br />
{{PIO|PI16 (272)|E17|| [[A10/SPI|SPI1_CS0]] | [[A10/UART|UART2_RTS]] | | | EINT28 }}<br />
{{PIO|PI17 (273)|E16|| [[A10/SPI|SPI1_CLK]] | [[A10/UART|UART2_CTS]] | | | EINT29 }}<br />
{{PIO|PI18 (274)|E15|| [[A10/SPI|SPI1_MOSI]] | [[A10/UART|UART2_TX]] | | | EINT30 }}<br />
{{PIO|PI19 (275)|D14|| [[A10/SPI|SPI1_MISO]] | [[A10/UART|UART2_RX]] | | | EINT31 }}<br />
{{PIO|PI20 (276)|E14|| [[A10/PS2|PS2_SCK0]] | [[A10/UART|UART7_TX]] | HSCL}}<br />
{{PIO|PI21 (277)|E13|| [[A10/PS2|PS2_SDA0]] | [[A10/UART|UART7_RX]] | HSDA}}<br />
|}<br />
<br />
== Other Pins ==<br />
{| class="wikitable"<br />
! Port !! Ball !! Function !! Type<br />
|-<br />
| {{tta|XP_TP}} || Y22 || Output || AI<br />
|-<br />
| {{tta|XN_TP}} || AA22 || Output || AI<br />
|-<br />
| {{tta|YP_TP}} || Y23 || Output || AI<br />
|-<br />
| {{tta|YN_TP}} || AA23 || Output || AI<br />
|}<br />
<br />
== See also ==<br />
* [[A20]]<br />
* [[A10/PIO]]<br />
* [[A13/PIO]]<br />
<br />
[[Category:Hardware]]<br />
[[Category:PIO]]</div>
Oliver
https://linux-sunxi.org/index.php?title=KOHOTECH_KP100_MB_V3.0&diff=19916
KOHOTECH KP100 MB V3.0
2017-05-02T15:27:21Z
<p>Oliver: Move photo to UART section</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:03_beam_flat.jpg|250px]]<br />
| manufacturer = [http://www.kohotech.com/ KOHO]<br />
| dimensions = 150''mm'' x 110''mm''<br />
| release_date = 02 2015<br />
| website = [http://beamlabsinc.com/ Device Product Page]<br />
| soc = [[A20]] @ 1Ghz<br />
| dram = 1GiB DDR3 @ 384MHz<br />
| nand = 4GB<br />
| power = AC 230V @ 0.5A<br />
| lcd = 854 x 480<br />
| touchscreen = no<br />
| video = LCD<br />
| audio = PAM8403 audio amplifier<br />
| network = WiFi 802.11 b/g/n ([[Wifi#Ampak|Ampak AP6210]])<br />
| storage = NAND, µSD (assembly variant)<br />
| usb = 1 USB2.0 Host (assembly variant), 1 USB2.0 OTG (assembly variant)<br />
| camera = N/A<br />
| other = N/A<br />
| headers = N/A<br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
{{Remove|If a device is special, then feel free to provide a terse description of what makes this device so special. But terse, no novels, no marketing blurb.}}<br />
<br />
= Identification =<br />
On the back of the device, the following is printed:<br />
<pre>Beam<br />
v1.01</pre><br />
<br />
The PCB has the following silkscreened on it:<br />
<pre>KP100_MB_V3.0</pre><br />
<br />
In android, under Settings->About Tablet, you will find:<br />
* Model Number: ''{{Beam}}''<br />
* Build Number: ''{{KRT16S}}''<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
Fex file added to sunxi-boards<br />
{{Remove|Give a brief overview of the current status of support under sunxi here.}}<br />
<br />
== Manual build ==<br />
<br />
You can build things for yourself by following our [[Manual_build_howto | Manual build howto]] and by choosing from the configurations available below.<br />
<br />
=== U-Boot ===<br />
<br />
==== Sunxi/Legacy U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
==== Mainline U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
=== Linux Kernel ===<br />
<br />
==== Sunxi/Legacy Kernel ====<br />
<br />
Use the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/SOC/MANUFACTURER_DEVICE.fex ''{{Edit|MANUFACTURER_DEVICE.fex}}''] file.<br />
<br />
==== Mainline kernel ====<br />
<br />
Use the ''{{Edit|FAMILY-CHIP-DEVICE.dtb}}'' device-tree binary.<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
{{Remove|Add MANUFACTURER DEVICE specific tips, tricks, Caveats and nice to have changes here.}}<br />
<br />
== FEL mode ==<br />
<br />
The {{Edit|something}} button triggers [[FEL | FEL mode]].<br />
<br />
== {{Edit|Device specific topic}} ==<br />
<br />
{{Remove|If there are no further device specific topics to add, remove these sections.}}<br />
<br />
== {{Edit|...}} ==<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:KP100_MB_V3.0_UART.jpg|thumb|240px|{{Remove|DEVICE}} UART pads]]<br />
<br />
{{Remove|This section explains how to attach a serial port to the device. Make sure it refers to our [[UART|UART howto]]. For a development board, you can just mention how to find the header with the pins and include a picture, and you can remove the warranty voiding warning.}}<br />
<br />
== Device disassembly ==<br />
<br />
{{Remove|If necessary, provide a short description of how to open the device. Perhaps explain how the pins can be most easily popped. If pins do need to be popped, mention the [[Plastic_tool|Plastic tool howto]].}}<br />
<br />
== Locating the UART ==<br />
The UART pins are jus tsome testpads hidden on the bottom side of the PCB. It requires opening up the device to get to them!<br />
<br />
<gallery><br />
File:KP100_MB_V3.0_UART.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
{{Remove|List rebadged devices here.}}<br />
<br />
= See also =<br />
<br />
{{Remove|Add some nice to have links here. This includes related devices, and external links.}}<br />
<br />
[[Category:A20 Boards]]<br />
[[Category:Devices with Wifi]]</div>
Oliver
https://linux-sunxi.org/index.php?title=KOHOTECH_KP100_MB_V3.0&diff=19915
KOHOTECH KP100 MB V3.0
2017-05-02T15:26:24Z
<p>Oliver: I2S is defined but not used in the fex, remove</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:03_beam_flat.jpg|250px]]<br />
| manufacturer = [http://www.kohotech.com/ KOHO]<br />
| dimensions = 150''mm'' x 110''mm''<br />
| release_date = 02 2015<br />
| website = [http://beamlabsinc.com/ Device Product Page]<br />
| soc = [[A20]] @ 1Ghz<br />
| dram = 1GiB DDR3 @ 384MHz<br />
| nand = 4GB<br />
| power = AC 230V @ 0.5A<br />
| lcd = 854 x 480<br />
| touchscreen = no<br />
| video = LCD<br />
| audio = PAM8403 audio amplifier<br />
| network = WiFi 802.11 b/g/n ([[Wifi#Ampak|Ampak AP6210]])<br />
| storage = NAND, µSD (assembly variant)<br />
| usb = 1 USB2.0 Host (assembly variant), 1 USB2.0 OTG (assembly variant)<br />
| camera = N/A<br />
| other = N/A<br />
| headers = N/A<br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
{{Remove|If a device is special, then feel free to provide a terse description of what makes this device so special. But terse, no novels, no marketing blurb.}}<br />
<br />
= Identification =<br />
On the back of the device, the following is printed:<br />
<pre>Beam<br />
v1.01</pre><br />
<br />
The PCB has the following silkscreened on it:<br />
<pre>KP100_MB_V3.0</pre><br />
<br />
In android, under Settings->About Tablet, you will find:<br />
* Model Number: ''{{Beam}}''<br />
* Build Number: ''{{KRT16S}}''<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
Fex file added to sunxi-boards<br />
{{Remove|Give a brief overview of the current status of support under sunxi here.}}<br />
<br />
== Manual build ==<br />
<br />
You can build things for yourself by following our [[Manual_build_howto | Manual build howto]] and by choosing from the configurations available below.<br />
<br />
=== U-Boot ===<br />
<br />
==== Sunxi/Legacy U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
==== Mainline U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
=== Linux Kernel ===<br />
<br />
==== Sunxi/Legacy Kernel ====<br />
<br />
Use the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/SOC/MANUFACTURER_DEVICE.fex ''{{Edit|MANUFACTURER_DEVICE.fex}}''] file.<br />
<br />
==== Mainline kernel ====<br />
<br />
Use the ''{{Edit|FAMILY-CHIP-DEVICE.dtb}}'' device-tree binary.<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
{{Remove|Add MANUFACTURER DEVICE specific tips, tricks, Caveats and nice to have changes here.}}<br />
<br />
== FEL mode ==<br />
<br />
The {{Edit|something}} button triggers [[FEL | FEL mode]].<br />
<br />
== {{Edit|Device specific topic}} ==<br />
<br />
{{Remove|If there are no further device specific topics to add, remove these sections.}}<br />
<br />
== {{Edit|...}} ==<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:device_uart.jpg|thumb|240px|{{Remove|DEVICE}} UART pads]]<br />
<br />
{{Remove|This section explains how to attach a serial port to the device. Make sure it refers to our [[UART|UART howto]]. For a development board, you can just mention how to find the header with the pins and include a picture, and you can remove the warranty voiding warning.}}<br />
<br />
== Device disassembly ==<br />
<br />
{{Remove|If necessary, provide a short description of how to open the device. Perhaps explain how the pins can be most easily popped. If pins do need to be popped, mention the [[Plastic_tool|Plastic tool howto]].}}<br />
<br />
== Locating the UART ==<br />
The UART pins are jus tsome testpads hidden on the bottom side of the PCB. It requires opening up the device to get to them!<br />
<br />
<gallery><br />
File:KP100_MB_V3.0_UART.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
{{Remove|List rebadged devices here.}}<br />
<br />
= See also =<br />
<br />
{{Remove|Add some nice to have links here. This includes related devices, and external links.}}<br />
<br />
[[Category:A20 Boards]]<br />
[[Category:Devices with Wifi]]</div>
Oliver
https://linux-sunxi.org/index.php?title=KOHOTECH_KP100_MB_V3.0&diff=19914
KOHOTECH KP100 MB V3.0
2017-05-02T15:23:32Z
<p>Oliver: add audio data</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:03_beam_flat.jpg|250px]]<br />
| manufacturer = [http://www.kohotech.com/ KOHO]<br />
| dimensions = 150''mm'' x 110''mm''<br />
| release_date = 02 2015<br />
| website = [http://beamlabsinc.com/ Device Product Page]<br />
| soc = [[A20]] @ 1Ghz<br />
| dram = 1GiB DDR3 @ 384MHz<br />
| nand = 4GB<br />
| power = AC 230V @ 0.5A<br />
| lcd = 854 x 480<br />
| touchscreen = no<br />
| video = LCD<br />
| audio = I2S audio; PAM8403 audio amplifier<br />
| network = WiFi 802.11 b/g/n ([[Wifi#Ampak|Ampak AP6210]])<br />
| storage = NAND, µSD (assembly variant)<br />
| usb = 1 USB2.0 Host (assembly variant), 1 USB2.0 OTG (assembly variant)<br />
| camera = N/A<br />
| other = N/A<br />
| headers = N/A<br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
{{Remove|If a device is special, then feel free to provide a terse description of what makes this device so special. But terse, no novels, no marketing blurb.}}<br />
<br />
= Identification =<br />
On the back of the device, the following is printed:<br />
<pre>Beam<br />
v1.01</pre><br />
<br />
The PCB has the following silkscreened on it:<br />
<pre>KP100_MB_V3.0</pre><br />
<br />
In android, under Settings->About Tablet, you will find:<br />
* Model Number: ''{{Beam}}''<br />
* Build Number: ''{{KRT16S}}''<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
Fex file added to sunxi-boards<br />
{{Remove|Give a brief overview of the current status of support under sunxi here.}}<br />
<br />
== Manual build ==<br />
<br />
You can build things for yourself by following our [[Manual_build_howto | Manual build howto]] and by choosing from the configurations available below.<br />
<br />
=== U-Boot ===<br />
<br />
==== Sunxi/Legacy U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
==== Mainline U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
=== Linux Kernel ===<br />
<br />
==== Sunxi/Legacy Kernel ====<br />
<br />
Use the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/SOC/MANUFACTURER_DEVICE.fex ''{{Edit|MANUFACTURER_DEVICE.fex}}''] file.<br />
<br />
==== Mainline kernel ====<br />
<br />
Use the ''{{Edit|FAMILY-CHIP-DEVICE.dtb}}'' device-tree binary.<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
{{Remove|Add MANUFACTURER DEVICE specific tips, tricks, Caveats and nice to have changes here.}}<br />
<br />
== FEL mode ==<br />
<br />
The {{Edit|something}} button triggers [[FEL | FEL mode]].<br />
<br />
== {{Edit|Device specific topic}} ==<br />
<br />
{{Remove|If there are no further device specific topics to add, remove these sections.}}<br />
<br />
== {{Edit|...}} ==<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:device_uart.jpg|thumb|240px|{{Remove|DEVICE}} UART pads]]<br />
<br />
{{Remove|This section explains how to attach a serial port to the device. Make sure it refers to our [[UART|UART howto]]. For a development board, you can just mention how to find the header with the pins and include a picture, and you can remove the warranty voiding warning.}}<br />
<br />
== Device disassembly ==<br />
<br />
{{Remove|If necessary, provide a short description of how to open the device. Perhaps explain how the pins can be most easily popped. If pins do need to be popped, mention the [[Plastic_tool|Plastic tool howto]].}}<br />
<br />
== Locating the UART ==<br />
The UART pins are jus tsome testpads hidden on the bottom side of the PCB. It requires opening up the device to get to them!<br />
<br />
<gallery><br />
File:KP100_MB_V3.0_UART.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
{{Remove|List rebadged devices here.}}<br />
<br />
= See also =<br />
<br />
{{Remove|Add some nice to have links here. This includes related devices, and external links.}}<br />
<br />
[[Category:A20 Boards]]<br />
[[Category:Devices with Wifi]]</div>
Oliver
https://linux-sunxi.org/index.php?title=KOHOTECH_KP100_MB_V3.0&diff=19913
KOHOTECH KP100 MB V3.0
2017-05-02T15:22:37Z
<p>Oliver: fix some template typo</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:03_beam_flat.jpg|250px]]<br />
| manufacturer = [http://www.kohotech.com/ KOHO]<br />
| dimensions = 150''mm'' x 110''mm''<br />
| release_date = 02 2015<br />
| website = [http://beamlabsinc.com/ Device Product Page]<br />
| soc = [[A20]] @ 1Ghz<br />
| dram = 1GiB DDR3 @ 384MHz<br />
| nand = 4GB<br />
| power = AC 230V @ 0.5A<br />
| lcd = 854 x 480<br />
| touchscreen = no<br />
| video = HDMI (Type A/B/C - full/mini/micro), VGA<br />
| audio = 3.5mm headphone plug, 3.5mm microphone plug, HDMI, SPDIF, internal stereo speakers, internal speaker, internal microphone<br />
| network = WiFi 802.11 b/g/n ([[Wifi#Ampak|Ampak AP6210]])<br />
| storage = NAND, µSD (assembly variant)<br />
| usb = 1 USB2.0 Host (assembly variant), 1 USB2.0 OTG (assembly variant)<br />
| camera = N/A<br />
| other = PAM8403 audio amplifier<br />
| headers = N/A<br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
{{Remove|If a device is special, then feel free to provide a terse description of what makes this device so special. But terse, no novels, no marketing blurb.}}<br />
<br />
= Identification =<br />
On the back of the device, the following is printed:<br />
<pre>Beam<br />
v1.01</pre><br />
<br />
The PCB has the following silkscreened on it:<br />
<pre>KP100_MB_V3.0</pre><br />
<br />
In android, under Settings->About Tablet, you will find:<br />
* Model Number: ''{{Beam}}''<br />
* Build Number: ''{{KRT16S}}''<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
Fex file added to sunxi-boards<br />
{{Remove|Give a brief overview of the current status of support under sunxi here.}}<br />
<br />
== Manual build ==<br />
<br />
You can build things for yourself by following our [[Manual_build_howto | Manual build howto]] and by choosing from the configurations available below.<br />
<br />
=== U-Boot ===<br />
<br />
==== Sunxi/Legacy U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
==== Mainline U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
=== Linux Kernel ===<br />
<br />
==== Sunxi/Legacy Kernel ====<br />
<br />
Use the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/SOC/MANUFACTURER_DEVICE.fex ''{{Edit|MANUFACTURER_DEVICE.fex}}''] file.<br />
<br />
==== Mainline kernel ====<br />
<br />
Use the ''{{Edit|FAMILY-CHIP-DEVICE.dtb}}'' device-tree binary.<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
{{Remove|Add MANUFACTURER DEVICE specific tips, tricks, Caveats and nice to have changes here.}}<br />
<br />
== FEL mode ==<br />
<br />
The {{Edit|something}} button triggers [[FEL | FEL mode]].<br />
<br />
== {{Edit|Device specific topic}} ==<br />
<br />
{{Remove|If there are no further device specific topics to add, remove these sections.}}<br />
<br />
== {{Edit|...}} ==<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:device_uart.jpg|thumb|240px|{{Remove|DEVICE}} UART pads]]<br />
<br />
{{Remove|This section explains how to attach a serial port to the device. Make sure it refers to our [[UART|UART howto]]. For a development board, you can just mention how to find the header with the pins and include a picture, and you can remove the warranty voiding warning.}}<br />
<br />
== Device disassembly ==<br />
<br />
{{Remove|If necessary, provide a short description of how to open the device. Perhaps explain how the pins can be most easily popped. If pins do need to be popped, mention the [[Plastic_tool|Plastic tool howto]].}}<br />
<br />
== Locating the UART ==<br />
The UART pins are jus tsome testpads hidden on the bottom side of the PCB. It requires opening up the device to get to them!<br />
<br />
<gallery><br />
File:KP100_MB_V3.0_UART.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
{{Remove|List rebadged devices here.}}<br />
<br />
= See also =<br />
<br />
{{Remove|Add some nice to have links here. This includes related devices, and external links.}}<br />
<br />
[[Category:A20 Boards]]<br />
[[Category:Devices with Wifi]]</div>
Oliver
https://linux-sunxi.org/index.php?title=KOHOTECH_KP100_MB_V3.0&diff=19912
KOHOTECH KP100 MB V3.0
2017-05-02T15:22:02Z
<p>Oliver: Set dram data</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:03_beam_flat.jpg|250px]]<br />
| manufacturer = [http://www.kohotech.com/ KOHO]<br />
| dimensions = 150''mm'' x 110''mm''<br />
| release_date = {{Edit|02 2015}}<br />
| website = [http://beamlabsinc.com/ Device Product Page]<br />
| soc = [[A20]] @ {{1}}Ghz<br />
| dram = 1GiB DDR3 @ {{384}}MHz<br />
| nand = 4GB<br />
| power = AC 230V @ 0.5A<br />
| lcd = 854 x 480<br />
| touchscreen = no<br />
| video = HDMI (Type A/B/C - full/mini/micro), VGA<br />
| audio = 3.5mm headphone plug, 3.5mm microphone plug, HDMI, SPDIF, internal stereo speakers, internal speaker, internal microphone<br />
| network = WiFi 802.11 b/g/n ([[Wifi#Ampak|Ampak AP6210]])<br />
| storage = NAND, µSD (assembly variant)<br />
| usb = 1 USB2.0 Host (assembly variant), 1 USB2.0 OTG (assembly variant)<br />
| camera = N/A<br />
| other = PAM8403 audio amplifier<br />
| headers = N/A<br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
{{Remove|If a device is special, then feel free to provide a terse description of what makes this device so special. But terse, no novels, no marketing blurb.}}<br />
<br />
= Identification =<br />
On the back of the device, the following is printed:<br />
<pre>Beam<br />
v1.01</pre><br />
<br />
The PCB has the following silkscreened on it:<br />
<pre>KP100_MB_V3.0</pre><br />
<br />
In android, under Settings->About Tablet, you will find:<br />
* Model Number: ''{{Beam}}''<br />
* Build Number: ''{{KRT16S}}''<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
Fex file added to sunxi-boards<br />
{{Remove|Give a brief overview of the current status of support under sunxi here.}}<br />
<br />
== Manual build ==<br />
<br />
You can build things for yourself by following our [[Manual_build_howto | Manual build howto]] and by choosing from the configurations available below.<br />
<br />
=== U-Boot ===<br />
<br />
==== Sunxi/Legacy U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
==== Mainline U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
=== Linux Kernel ===<br />
<br />
==== Sunxi/Legacy Kernel ====<br />
<br />
Use the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/SOC/MANUFACTURER_DEVICE.fex ''{{Edit|MANUFACTURER_DEVICE.fex}}''] file.<br />
<br />
==== Mainline kernel ====<br />
<br />
Use the ''{{Edit|FAMILY-CHIP-DEVICE.dtb}}'' device-tree binary.<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
{{Remove|Add MANUFACTURER DEVICE specific tips, tricks, Caveats and nice to have changes here.}}<br />
<br />
== FEL mode ==<br />
<br />
The {{Edit|something}} button triggers [[FEL | FEL mode]].<br />
<br />
== {{Edit|Device specific topic}} ==<br />
<br />
{{Remove|If there are no further device specific topics to add, remove these sections.}}<br />
<br />
== {{Edit|...}} ==<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:device_uart.jpg|thumb|240px|{{Remove|DEVICE}} UART pads]]<br />
<br />
{{Remove|This section explains how to attach a serial port to the device. Make sure it refers to our [[UART|UART howto]]. For a development board, you can just mention how to find the header with the pins and include a picture, and you can remove the warranty voiding warning.}}<br />
<br />
== Device disassembly ==<br />
<br />
{{Remove|If necessary, provide a short description of how to open the device. Perhaps explain how the pins can be most easily popped. If pins do need to be popped, mention the [[Plastic_tool|Plastic tool howto]].}}<br />
<br />
== Locating the UART ==<br />
The UART pins are jus tsome testpads hidden on the bottom side of the PCB. It requires opening up the device to get to them!<br />
<br />
<gallery><br />
File:KP100_MB_V3.0_UART.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
{{Remove|List rebadged devices here.}}<br />
<br />
= See also =<br />
<br />
{{Remove|Add some nice to have links here. This includes related devices, and external links.}}<br />
<br />
[[Category:A20 Boards]]<br />
[[Category:Devices with Wifi]]</div>
Oliver
https://linux-sunxi.org/index.php?title=KOHOTECH_KP100_MB_V3.0&diff=19911
KOHOTECH KP100 MB V3.0
2017-05-02T15:21:16Z
<p>Oliver: temp save</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:03_beam_flat.jpg|250px]]<br />
| manufacturer = [http://www.kohotech.com/ KOHO]<br />
| dimensions = 150''mm'' x 110''mm''<br />
| release_date = {{Edit|02 2015}}<br />
| website = [http://beamlabsinc.com/ Device Product Page]<br />
| soc = [[A20]] @ {{1}}Ghz<br />
| dram = 512MiB/1GiB/2GiB DDR3 @ {{Edit|xxx}}MHz<br />
| nand = 4GB<br />
| power = AC 230V @ 0.5A<br />
| lcd = 854 x 480<br />
| touchscreen = no<br />
| video = HDMI (Type A/B/C - full/mini/micro), VGA<br />
| audio = 3.5mm headphone plug, 3.5mm microphone plug, HDMI, SPDIF, internal stereo speakers, internal speaker, internal microphone<br />
| network = WiFi 802.11 b/g/n ([[Wifi#Ampak|Ampak AP6210]])<br />
| storage = NAND, µSD (assembly variant)<br />
| usb = 1 USB2.0 Host (assembly variant), 1 USB2.0 OTG (assembly variant)<br />
| camera = N/A<br />
| other = PAM8403 audio amplifier<br />
| headers = N/A<br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
{{Remove|If a device is special, then feel free to provide a terse description of what makes this device so special. But terse, no novels, no marketing blurb.}}<br />
<br />
= Identification =<br />
On the back of the device, the following is printed:<br />
<pre>Beam<br />
v1.01</pre><br />
<br />
The PCB has the following silkscreened on it:<br />
<pre>KP100_MB_V3.0</pre><br />
<br />
In android, under Settings->About Tablet, you will find:<br />
* Model Number: ''{{Beam}}''<br />
* Build Number: ''{{KRT16S}}''<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
Fex file added to sunxi-boards<br />
{{Remove|Give a brief overview of the current status of support under sunxi here.}}<br />
<br />
== Manual build ==<br />
<br />
You can build things for yourself by following our [[Manual_build_howto | Manual build howto]] and by choosing from the configurations available below.<br />
<br />
=== U-Boot ===<br />
<br />
==== Sunxi/Legacy U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
==== Mainline U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
=== Linux Kernel ===<br />
<br />
==== Sunxi/Legacy Kernel ====<br />
<br />
Use the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/SOC/MANUFACTURER_DEVICE.fex ''{{Edit|MANUFACTURER_DEVICE.fex}}''] file.<br />
<br />
==== Mainline kernel ====<br />
<br />
Use the ''{{Edit|FAMILY-CHIP-DEVICE.dtb}}'' device-tree binary.<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
{{Remove|Add MANUFACTURER DEVICE specific tips, tricks, Caveats and nice to have changes here.}}<br />
<br />
== FEL mode ==<br />
<br />
The {{Edit|something}} button triggers [[FEL | FEL mode]].<br />
<br />
== {{Edit|Device specific topic}} ==<br />
<br />
{{Remove|If there are no further device specific topics to add, remove these sections.}}<br />
<br />
== {{Edit|...}} ==<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:device_uart.jpg|thumb|240px|{{Remove|DEVICE}} UART pads]]<br />
<br />
{{Remove|This section explains how to attach a serial port to the device. Make sure it refers to our [[UART|UART howto]]. For a development board, you can just mention how to find the header with the pins and include a picture, and you can remove the warranty voiding warning.}}<br />
<br />
== Device disassembly ==<br />
<br />
{{Remove|If necessary, provide a short description of how to open the device. Perhaps explain how the pins can be most easily popped. If pins do need to be popped, mention the [[Plastic_tool|Plastic tool howto]].}}<br />
<br />
== Locating the UART ==<br />
The UART pins are jus tsome testpads hidden on the bottom side of the PCB. It requires opening up the device to get to them!<br />
<br />
<gallery><br />
File:KP100_MB_V3.0_UART.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
{{Remove|List rebadged devices here.}}<br />
<br />
= See also =<br />
<br />
{{Remove|Add some nice to have links here. This includes related devices, and external links.}}<br />
<br />
[[Category:A20 Boards]]<br />
[[Category:Devices with Wifi]]</div>
Oliver
https://linux-sunxi.org/index.php?title=File:KP100_MB_V3.0_UART.jpg&diff=19910
File:KP100 MB V3.0 UART.jpg
2017-05-02T14:34:36Z
<p>Oliver: Uart pins on the KP100 MB V3.0 motherboard</p>
<hr />
<div>Uart pins on the KP100 MB V3.0 motherboard</div>
Oliver
https://linux-sunxi.org/index.php?title=KOHOTECH_KP100_MB_V3.0&diff=19878
KOHOTECH KP100 MB V3.0
2017-04-25T15:58:33Z
<p>Oliver: temporary save</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:03_beam_flat.jpg|250px]]<br />
| manufacturer = [http://www.kohotech.com/ KOHO]<br />
| dimensions = 150''mm'' x 110''mm''<br />
| release_date = {{Edit|02 2015}}<br />
| website = [http://beamlabsinc.com/ Device Product Page]<br />
| soc = [[A20]] @ {{1}}Ghz<br />
| dram = 512MiB/1GiB/2GiB DDR3 @ {{Edit|xxx}}MHz<br />
| nand = 4GB<br />
| power = AC 230V @ 0.5A<br />
| lcd = 854 x 480<br />
| touchscreen = no<br />
| video = HDMI (Type A/B/C - full/mini/micro), VGA<br />
| audio = 3.5mm headphone plug, 3.5mm microphone plug, HDMI, SPDIF, internal stereo speakers, internal speaker, internal microphone<br />
| network = WiFi 802.11 b/g/n ([[Wifi#Manufacturer|Manufacturer device]]), 10/100/1000Mbps Ethernet ([[Ethernet#Phyceiver|Manufacturer device]])<br />
| storage = µSD, SATA<br />
| usb = X USB2.0 Host, X USB2.0 OTG<br />
| camera = ??.?MP (????x????) front, ??.?MP (????x????) rear<br />
| other = Accelerometer ([[Accelerometer#Device|Manufacturer device]]), GPS, IRDA<br />
| headers = UART, JTAG, LCD, VGA, ...<br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
{{Remove|If a device is special, then feel free to provide a terse description of what makes this device so special. But terse, no novels, no marketing blurb.}}<br />
<br />
= Identification =<br />
{{Remove|This section explains how to most easily identify your device. For a development board, explain the name(s) printed on the board. For an android device, find out the strings as reported under settings.}}<br />
<br />
On the back of the device, the following is printed:<br />
<pre>Manufacturer Marketing Name<br />
ModelNumber</pre><br />
<br />
The PCB has the following silkscreened on it:<br />
<pre>LIA-BB-V6.66<br />
1970-01-01</pre><br />
<br />
In android, under Settings->About Tablet, you will find:<br />
* Model Number: ''{{Edit|DEVICE}}''<br />
* Build Number: ''{{Edit|SOC_BOARD_DEVICE_*.*}}''<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
<br />
{{Remove|Give a brief overview of the current status of support under sunxi here.}}<br />
<br />
== Images ==<br />
<br />
{{Remove|Optional. Add MANUFACTURER DEVICE specific sunxi ROM images here. E.g. a livesuit image or some other linux image which uses linux-sunxi code. Do not put non-sunxi images here, they should live under [[#See_also|See also]]. If no sunxi based images are available, this section can be removed.}}<br />
<br />
== HW-Pack ==<br />
<br />
{{Remove|Optional. Add MANUFACTURER DEVICE sunxi HW-pack specifics here. When empty, this section can be removed.}}<br />
<br />
== BSP ==<br />
<br />
{{Remove|Optional. Add MANUFACTURER DEVICE sunxi BSP specifics here. When empty, this section can be removed.}}<br />
<br />
== Manual build ==<br />
<br />
You can build things for yourself by following our [[Manual_build_howto | Manual build howto]] and by choosing from the configurations available below.<br />
<br />
=== U-Boot ===<br />
<br />
==== Sunxi/Legacy U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
==== Mainline U-Boot ====<br />
<br />
Use the ''{{Edit|MANUFACTURER_DEVICE}}'' build target.<br />
<br />
=== Linux Kernel ===<br />
<br />
==== Sunxi/Legacy Kernel ====<br />
<br />
Use the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/SOC/MANUFACTURER_DEVICE.fex ''{{Edit|MANUFACTURER_DEVICE.fex}}''] file.<br />
<br />
==== Mainline kernel ====<br />
<br />
Use the ''{{Edit|FAMILY-CHIP-DEVICE.dtb}}'' device-tree binary.<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
{{Remove|Add MANUFACTURER DEVICE specific tips, tricks, Caveats and nice to have changes here.}}<br />
<br />
== FEL mode ==<br />
<br />
The {{Edit|something}} button triggers [[FEL | FEL mode]].<br />
<br />
== {{Edit|Device specific topic}} ==<br />
<br />
{{Remove|If there are no further device specific topics to add, remove these sections.}}<br />
<br />
== {{Edit|...}} ==<br />
<br />
= Adding a serial port ('''voids warranty''') =<br />
<br />
[[File:device_uart.jpg|thumb|240px|{{Remove|DEVICE}} UART pads]]<br />
<br />
{{Remove|This section explains how to attach a serial port to the device. Make sure it refers to our [[UART|UART howto]]. For a development board, you can just mention how to find the header with the pins and include a picture, and you can remove the warranty voiding warning.}}<br />
<br />
== Device disassembly ==<br />
<br />
{{Remove|If necessary, provide a short description of how to open the device. Perhaps explain how the pins can be most easily popped. If pins do need to be popped, mention the [[Plastic_tool|Plastic tool howto]].}}<br />
<br />
== Locating the UART ==<br />
<br />
{{Remove|Describe how to find the RX,TX,GND signals here, and mention the [[UART|UART howto]].}}<br />
<br />
= Pictures =<br />
<br />
{{Remove|Take some pictures of your device, [[Special:Upload | upload them]], and add them here. DO NOT UPLOAD PICTURES WHICH YOU PLUCKED OFF THE INTERNET.}}<br />
<br />
<gallery><br />
File:Device_front.jpg<br />
File:Device_back.jpg<br />
File:Device_buttons_1.jpg<br />
File:Device_buttons_2.jpg<br />
File:Device_board_front.jpg<br />
File:Device_board_back.jpg<br />
</gallery><br />
<br />
= Also known as =<br />
<br />
{{Remove|List rebadged devices here.}}<br />
<br />
= See also =<br />
<br />
{{Remove|Add some nice to have links here. This includes related devices, and external links.}}<br />
<br />
== Manufacturer images ==<br />
<br />
{{Remove|Optional. Add non-sunxi images in this section.}}<br />
<br />
[[Category:Devices]]<br />
[[Category:CATEGORY]]</div>
Oliver
https://linux-sunxi.org/index.php?title=File:03_beam_flat.jpg&diff=19877
File:03 beam flat.jpg
2017-04-25T15:20:43Z
<p>Oliver: </p>
<hr />
<div></div>
Oliver
https://linux-sunxi.org/index.php?title=A10/UART&diff=19736
A10/UART
2017-03-24T14:29:44Z
<p>Oliver: Redirected page to File:Dw apb uart db.pdf</p>
<hr />
<div>#REDIRECT [[File:Dw_apb_uart_db.pdf]]</div>
Oliver
https://linux-sunxi.org/index.php?title=A10/UART&diff=19735
A10/UART
2017-03-24T14:29:15Z
<p>Oliver: Created page with "File:Dw_apb_uart_db.pdf"</p>
<hr />
<div>File:Dw_apb_uart_db.pdf</div>
Oliver
https://linux-sunxi.org/index.php?title=File:Dw_apb_uart_db.pdf&diff=19734
File:Dw apb uart db.pdf
2017-03-24T14:28:00Z
<p>Oliver: Designware 8250 IP block</p>
<hr />
<div>Designware 8250 IP block</div>
Oliver
https://linux-sunxi.org/index.php?title=Clock_Control_Module&diff=19661
Clock Control Module
2017-03-10T16:06:38Z
<p>Oliver: /* CCM_MMC0_CLK */ Document output and sample clock delay/phase TODO: copy to mmc 1 - 3</p>
<hr />
<div>= Clock Control Module =<br />
== Overview ==<br />
Allwinner's A10 has 10 timing or clock sources. 7 [http://en.wikipedia.org/wiki/Phase-locked_loop Phase Locking Loop's (PLL's)], a 24MHz main crystal oscillator, an RC based internal on chip based oscillator and a low-power 32kHz crystal oscillator.<br />
<br />
The 24MHz crystal oscillator is mandatory and is responsible for supplying a clock source for the PLL. The 32kHz crystal oscillator is connected only to the RTC to ensure proper time is kept.<br />
<br />
Many devices being driving by any of these clocks have often 2 clocks connected to them. One of the clocks drives the chip itself, the other clock matches the bus to whatever it is connected (usually the CPU).<br />
<br />
== Clock domain ==<br />
{| class="wikitable" |<br />
! Clock domain<br />
! Used module<br />
! Speed range<br />
! Description<br />
|-<br />
| 24MHZ_CLK<br />
| Main clock<br />
| <tt>24.000 MHz</tt><br />
| Core clock source, feeds the PLL and some timers.<br />
|-<br />
| RC_CLK<br />
| Timers, key<br />
| <tt>32 kHz</tt><br />
| Internal 32 kHz source for timers and the RTC.<br /><br />
As it is RC based, it is not highly accurate.<br />
|-<br />
| 32KHZ_CLK<br />
| Timers, key<br />
| <tt>32.768 kHz</tt><br />
| External 32 kHz source for timers and the RTC.<br /><br />
If an accurate 32.768 kHz crystal oscillator is used, this should provide the most accurate timing reference.<br />
|-<br />
| CPU_CLK<br />
| CPU<br />
| <tt>2 kHz - 1200 MHz</tt><br />
| The clock for the CPU clock domain is divided from either the CPU_CLK or the 24MHZ_CLK.<br />
|-<br />
| AHB_CLK<br />
| Advanced High-performance Bus clock domain<br />
| <tt>8 kHz - 276 MHz</tt><br />
| The clock for the AHB clock domain is divided from the CPU_CLK.<br />
|-<br />
| APB_CLK<br />
| Advanced Peripherals Bus clock domain<br />
| <tt>0.5 kHz - 138 MHz</tt><br />
| The clock for the peripherals clock domain is divided from the AHB_CLK.<br />
|-<br />
| SDRAM_CLK<br />
| SDRAM clock domain<br />
| <tt>0 - 400 MHz</tt><br />
| The clock for the SDRAM clock domain is provided by the PLL.<br />
|-<br />
| USB_CLK<br />
| USB<br />
| <tt>480 MHz</tt><br />
| The clock for the USB clock domain is provided by the PLL.<br />
|-<br />
| AUDIO_CLK<br />
| A/D and D/A devices<br />
| <tt>[http://en.wikipedia.org/wiki/Crystal_oscillator_frequencies 24.576 MHz] or [http://en.wikipedia.org/wiki/Crystal_oscillator_frequencies 22.5792 MHz]</tt><br />
| The clock for the Audio clock domain is provided by the PLL.<br />
|}<br />
<br />
== Clock generation ==<br />
All PLL's are fed from the 24 MHz reference clock.<br />
<br />
=== PLL ===<br />
{| class="wikitable" |<br />
! Name<br />
! Input<br />
! Speed range<br />
! Output<br />
! Defines<br />
|-<br />
| PLL1<br />
| 24 MHz<br />
| <tt>240 MHz - 2 GHz</tt><br />
| <math>\frac{24 \, \mathrm{MHz} \times N \times K}{M \times P}</math><br />
| <tt><br />
N = {0, 1 ... 31}<br /><br />
K = {1, 2, 3, 4}<br /><br />
M = {1, 2, 3, 4}<br /><br />
P = {1, 2, 4, 8}<br /><br />
</tt><br />
|-<br />
| PLL2<br />
| 24 MHz<br />
| <tt>22.5792 MHz or 24.576 MHz</tt><br />
| 22.5792 MHz or 24.576 MHz<br />
| <br />
|-<br />
| PLL3<br />
| 24 MHz<br />
| <tt>27 MHz - 381 MHz</tt><br />
| Integer mode: <math>3 \, \mathrm{MHz} \times M</math><br /><br /><br />
Fractional mode: <math>270 \, \mathrm{MHz} \lor 297 \, \mathrm{MHz}</math><br />
| <tt>M = {9, 10 ... 127}</tt><br />
|-<br />
| PLL4<br />
| 24 MHz<br />
| <tt>240 MHz - 2 GHz</tt><br />
| <math>\frac{24 \, \mathrm{MHz} \times N \times K}{M \times P}</math><br />
| <tt><br />
N = {0, 1 ... 31}<br /><br />
K = {1, 2, 3, 4}<br /><br />
M = {1, 2, 3, 4}<br /><br />
P = {1, 2, 4, 8}<br /><br />
</tt><br />
|-<br />
| PLL5<br />
| 24 MHz<br />
| <tt>240 MHz - 2 GHz</tt><br />
| <math>\frac{24 \, \mathrm{MHz} \times N \times K}{M}</math><br /><br /><br />
<math>\frac{24 \, \mathrm{MHz} \times N \times K}{P}</math><br />
| <tt><br />
N = {0, 1 ... 31}<br /><br />
K = {1, 2, 3, 4}<br /><br />
M = {1, 2, 3, 4}<br /><br />
P = {1, 2, 4, 8}<br /><br />
</tt><br />
|-<br />
| PLL6<br />
| 24 MHz<br />
| SATA mode: <tt>100 MHz</tt><br /><br />
PLL6 mode: <tt>240 MHz - 2 GHz</tt><br />
| SATA mode: <math>\frac{24 \, \mathrm{MHz} \times N \times K}{M \times 6}</math><br /><br /><br />
PLL6 mode: <math>\frac{24 \, \mathrm{MHz} \times N \times K}{2}</math><br /><br /><br />
PLL6 * 2 mode: <math>24 \, \mathrm{MHz} \times N \times K</math><br />
| <tt><br />
N = {0, 1 ... 31}<br /><br />
K = {1, 2, 3, 4}<br /><br />
M = {1, 2, 3, 4}<br /><br />
P = {1, 2, 4, 8}<br /><br />
</tt><br />
|-<br />
| PLL7<br />
| 24 MHz<br />
| <tt>27 MHz - 381 MHz</tt><br />
| Integer mode: <math>3 \, \mathrm{MHz} \times M</math><br /><br /><br />
Fractional mode: <math>270 \, \mathrm{MHz} \lor 297 \, \mathrm{MHz}</math><br />
| <tt>M = {9, 10 ... 127}</tt><br />
|}<br />
<br />
=== Bus clock generation ===<br />
{| class="wikitable" |<br />
! Name<br />
! Input<br />
! Output<br />
! Defines<br />
|-<br />
| CPU_CLK<br />
| {32KHZ_CLK, 24MHZ_CLK, PLL1, <math>\frac{\mathrm{PLL6}}{6}</math>}<br />
|<br />
|<br />
|-<br />
| AXI_CLK<br />
| CPU_CLK<br />
| <math>\frac{\mathrm{Input}}{N}</math><br />
| <tt>N = {1, 2, 3, 4}</tt><br />
|-<br />
| AHB_CLK<br />
| AXI_CLK<br />
| <math>\frac{\mathrm{Input}}{N}</math><br />
| <tt>N = {1, 2, 4, 8}</tt><br />
|-<br />
| APB0_CLK<br />
| AHB_CLK<br />
| <math>\frac{\mathrm{Input}}{N}</math><br />
| <tt>N = {2, 4, 8}</tt><br />
|-<br />
| APB1_CLK<br />
| {32KHZ_CLK, 24MHZ_CLK, PLL6}<br />
| <math>\frac{\mathrm{Input}}{M \times N}</math><br />
| <tt><br />
M = {1, 2 ... 32}<br /><br />
N = {1, 2, 4, 8}<br />
</tt><br />
|-<br />
| {TWI_CLK, UART_CLK, PS2_CLK, CAN_CLK, SCR_CLK}<br />
| APB1_CLK<br />
|<br />
|<br />
|-<br />
| {NAND_CLK, <unknown>_CLK, SD[0123]_CLK, TS_CLK, SS_CLK, SPI[0123]_CLK, IR[01]_CLK}<br />
| {24MHZ_CLK, PLL5, PLL6}<br />
| <math>\frac{\mathrm{Input}}{M \times N}</math><br />
| <tt><br />
M = {1, 2 ... 16}<br /><br />
N = {1, 2, 4, 8}<br />
</tt><br />
|-<br />
| PATA_CLK<br />
| {PLL5, PLL6}<br />
| <math>\frac{\mathrm{Input}}{M \times N}</math><br />
| <tt><br />
M = {1, 2 ... 32}<br /><br />
N = {1, 2, 4, 8}<br />
</tt><br />
|-<br />
| {IIS_CLK, <unknown>}<br />
| 8 * PLL2<br />
| <math>\frac{\mathrm{Input}}{N}</math><br />
| <tt>N = {1, 2, 4, 8}</tt><br />
|-<br />
| KEYPAD_CLK<br />
| {32KHZ_CLK, 24MHZ_CLK}<br />
| <math>\frac{\mathrm{Input}}{M \times N}</math><br />
| <tt><br />
M = {1, 2 ... 32}<br /><br />
N = {1, 2, 4, 8}<br />
</tt><br />
|-<br />
| USB_CLK<br />
| USB_CLK<br />
|<br />
|<br />
|-<br />
| <unknown><br />
| AHB_CLK<br />
| <math>\frac{\mathrm{Input}}{M \times N}</math><br />
| <tt><br />
M = {1, 2 ... 32}<br /><br />
N = {1, 2, 4, 8}<br />
</tt><br />
|-<br />
| {DE-BE[01]_CLK, FE[01]_CLK, MP_CLK}<br />
| {PLL3, PLL5, PLL7}<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2 ... 16}</tt><br />
|-<br />
| IEP_CLK<br />
| BE_CLK<br />
|<br />
|<br />
|-<br />
| VE_CLK<br />
| PLL4<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2 ... 8}</tt><br />
|-<br />
| LCD_CH0_CLK<br />
| {1 * PLL3, 2 * PLL3, 1 * PLL7, 2 * PLL7}<br />
|<br />
|<br />
|-<br />
| LCD[01]_CH1_CLK2<br />
| {1 * PLL3, 2 * PLL3, 1 * PLL7, 2 * PLL7}<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2 ... 16}</tt><br />
|-<br />
| LCD[01]_CH1_CLK1<br />
| LCD[01]_CH1_CLK2<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2}</tt><br />
|-<br />
| CSI_ISP_CLK<br />
| {PLL3, PLL4, PLL5, PLL6}<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2 ... 16}</tt><br />
|-<br />
| AUDIO_CODEC_CLK<br />
| PLL2<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
|<br />
|-<br />
| SATA_CLK<br />
| PLL6<br />
|<br />
|<br />
|-<br />
| AVS_CLK<br />
| 24MHZ_CLK<br />
|<br />
|<br />
|-<br />
| HDMI_CLK<br />
| {1 * PLL3, 2 * PLL3, 1 * PLL7, 2 * PLL7}<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2 ... 16}</tt><br />
|-<br />
| ACE_CLK<br />
| {PLL4, PLL5, 24MHZ_CLK}<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2 ... 16}</tt><br />
|-<br />
| CSI[01]_CLK<br />
| {1 * PLL3, 2 * PLL3, 1 * PLL7, 2 * PLL7}<br />
| <math>\frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2 ... 32}</tt><br />
|-<br />
| MALI400_CLK<br />
| {PLL3, PLL4, PLL5, PLL7}<br />
| <math>381 \, \mathrm{MHz} \ge \frac{\mathrm{Input}}{M}</math><br />
| <tt>M = {1, 2 ... 16}</tt><br />
|}<br />
<br />
== Timer Registers ==<br />
Timer Base address: 0x01c20000<br />
<br />
{| class="wikitable" |<br />
! Register Name<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| <tt>CCM_PLL1_CFG</tt><br />
| <tt>0x0000</tt><br />
| <tt>4B</tt><br />
| <tt>PLL1 Control (Core)</tt><br />
|-<br />
| <tt>CCM_PLL1_TUN</tt><br />
| <tt>0x0004</tt><br />
| <tt>4B</tt><br />
| <tt>PLL1 Tuning</tt><br />
|-<br />
| <tt>CCM_PLL2_CFG</tt><br />
| <tt>0x0008</tt><br />
| <tt>4B</tt><br />
| <tt>PLL2 Control (Audio))</tt><br />
|-<br />
| <tt>CCM_PLL2_TUN</tt><br />
| <tt>0x000c</tt><br />
| <tt>4B</tt><br />
| <tt>PLL1 Tuning</tt><br />
|-<br />
| <tt>CCM_PLL3_CFG</tt><br />
| <tt>0x0010</tt><br />
| <tt>4B</tt><br />
| <tt>PLL3 Control (Video0)</tt><br />
|-<br />
| <tt>CCM_PLL3_TUN (No Tuning 3 seems to exist)</tt><br />
| <tt>0x0014 (Should be here if it exists)</tt><br />
| <tt>4B</tt><br />
| <tt>PLL3 Tuning (Unconfirmed)</tt><br />
|-<br />
| <tt>CCM_PLL4_CFG</tt><br />
| <tt>0x0018</tt><br />
| <tt>4B</tt><br />
| <tt>PLL4 Control (VE)</tt><br />
|-<br />
| <tt>CCM_PLL4_TUN (No Tuning 4 seems to exist)</tt><br />
| <tt>0x001c (Should be here if it exists)</tt><br />
| <tt>4B</tt><br />
| <tt>PLL4 Tuning (Unconfirmed)</tt><br />
|-<br />
| <tt>CCM_PLL5_CFG</tt><br />
| <tt>0x0020</tt><br />
| <tt>4B</tt><br />
| <tt>PLL5 Control (DDR)</tt><br />
|-<br />
| <tt>CCM_PLL5_TUN</tt><br />
| <tt>0x0024</tt><br />
| <tt>4B</tt><br />
| <tt>PLL5 Tuning</tt><br />
|-<br />
| <tt>CCM_PLL6_CFG</tt><br />
| <tt>0x0028</tt><br />
| <tt>4B</tt><br />
| <tt>PLL6 Control (SATA)</tt><br />
|-<br />
| <tt>CCM_PLL6_TUN</tt><br />
| <tt>0x002c</tt><br />
| <tt>4B</tt><br />
| <tt>PLL6 Tuning</tt><br />
|-<br />
| <tt>CCM_PLL7_CFG</tt><br />
| <tt>0x0030</tt><br />
| <tt>4B</tt><br />
| <tt>PLL7 Control (Video1)</tt><br />
|-<br />
| <tt>CCM_PLL7_TUN (No Tuning 7 seems to exist)</tt><br />
| <tt>0x0034 (Should be here if it exists)</tt><br />
| <tt>4B</tt><br />
| <tt>PLL7 Tuning (Unconfirmed)</tt><br />
|-<br />
| <tt>CCM_PLL1_TUN2</tt><br />
| <tt>0x0038</tt><br />
| <tt>4B</tt><br />
| <tt>PLL1 Secondary Tuning</tt><br />
|-<br />
| <tt>CCM_PLL5_TUN2</tt><br />
| <tt>0x003c</tt><br />
| <tt>4B</tt><br />
| <tt>PLL5 Secondary Tuning</tt><br />
|-<br />
| <tt>Reserved</tt><br />
| <tt>0x0040</tt><br />
| <tt>12B</tt><br />
|<br />
|-<br />
| <tt>CCM_PLL_LOCK_DBG</tt><br />
| <tt>0x004c</tt><br />
| <tt>4B</tt><br />
| <tt>PLL Lock Debug</tt><br />
|-<br />
| <tt>CCM_OSC24M_CFG</tt><br />
| <tt>0x0050</tt><br />
| <tt>4B</tt><br />
| <tt>OSC24M control</tt><br />
|-<br />
| <tt>CCM_CPU_AHB_APB0_CFG</tt><br />
| <tt>0x0054</tt><br />
| <tt>4B</tt><br />
| <tt>CPU, AHB and APB0 division ratio</tt><br />
|-<br />
| <tt>CCM_APB1_CLK_DIV</tt><br />
| <tt>0x0058</tt><br />
| <tt>4B</tt><br />
| <tt>APB1 clock division ratio</tt><br />
|-<br />
| <tt>CCM_AXI_GATING</tt><br />
| <tt>0x005c</tt><br />
| <tt>4B</tt><br />
| <tt>AXI module clock gating</tt><br />
|-<br />
| <tt>CCM_AHB_GATING0</tt><br />
| <tt>0x0060</tt><br />
| <tt>4B</tt><br />
| <tt>AHB module clock gating 0</tt><br />
|-<br />
| <tt>CCM_AHB_GATING1</tt><br />
| <tt>0x0064</tt><br />
| <tt>4B</tt><br />
| <tt>AHB module clock gating 1</tt><br />
|-<br />
| <tt>CCM_APB0_GATING</tt><br />
| <tt>0x0068</tt><br />
| <tt>4B</tt><br />
| <tt>APB0 module clock gating</tt><br />
|-<br />
| <tt>CCM_APB1_GATING</tt><br />
| <tt>0x006c</tt><br />
| <tt>4B</tt><br />
| <tt>APB1 module clock gating</tt><br />
|-<br />
| <tt>Reserved</tt><br />
| <tt>0x0070</tt><br />
| <tt>16B</tt><br />
|<br />
|-<br />
| <tt>CCM_NAND_SCLK_CFG</tt><br />
| <tt>0x0080</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_MS_SCLK_CFG</tt><br />
| <tt>0x0084</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_MMC0_SCLK_CFG</tt><br />
| <tt>0x0088</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_MMC1_SCLK_CFG</tt><br />
| <tt>0x008c</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_MMC2_SCLK_CFG</tt><br />
| <tt>0x0090</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_MMC3_SCLK_CFG</tt><br />
| <tt>0x0094</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_TS_CLK</tt><br />
| <tt>0x0098</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_SS_CLK</tt><br />
| <tt>0x009c</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_SPI0_CLK</tt><br />
| <tt>0x00a0</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_SPI1_CLK</tt><br />
| <tt>0x00a4</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_SPI2_CLK</tt><br />
| <tt>0x00a8</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_PATA_CLK</tt><br />
| <tt>0x00ac</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_IR0_CLK</tt><br />
| <tt>0x00b0</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_IR1_CLK</tt><br />
| <tt>0x00b4</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 0</tt><br />
|-<br />
| <tt>CCM_IIS_CLK</tt><br />
| <tt>0x00b8</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 1</tt><br />
|-<br />
| <tt>CCM_AC97_CLK</tt><br />
| <tt>0x00bc</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 1</tt><br />
|-<br />
| <tt>CCM_SPDIF_CLK</tt><br />
| <tt>0x00c0</tt><br />
| <tt>4B</tt><br />
| <tt>Module clock type 1</tt><br />
|-<br />
| <tt>CCM_KEYPAD_CLK</tt><br />
| <tt>0x00c4</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_SATA_CLK</tt><br />
| <tt>0x00c8</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_USB_CLK</tt><br />
| <tt>0x00cc</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_GPS_CLK</tt><br />
| <tt>0x00d0</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_SPI3_CLK</tt><br />
| <tt>0x00d4</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>Reserved</tt><br />
| <tt>0x00d8</tt><br />
| <tt>40B</tt><br />
|<br />
|-<br />
| <tt>CCM_DRAM_CLK</tt><br />
| <tt>0x0100</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_BE0_SCLK</tt><br />
| <tt>0x0104</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_BE1_SCLK</tt><br />
| <tt>0x0108</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_FE0_CLK</tt><br />
| <tt>0x010c</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_FE1_CLK</tt><br />
| <tt>0x0110</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_MP_CLK</tt><br />
| <tt>0x0114</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_LCD0_CH0_CLK</tt><br />
| <tt>0x0118</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_LCD1_CH0_CLK</tt><br />
| <tt>0x011c</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_CSI_ISP_CLK</tt><br />
| <tt>0x0120</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>Reserved</tt><br />
| <tt>0x0124</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_TVD_CLK</tt><br />
| <tt>0x0128</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_LCD0_CH1_CLK</tt><br />
| <tt>0x012c</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_LCD1_CH1_CLK</tt><br />
| <tt>0x0130</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_CS0_CLK</tt><br />
| <tt>0x0134</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_CS1_CLK</tt><br />
| <tt>0x0138</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_VE_CLK</tt><br />
| <tt>0x013c</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_AUDIO_CODEC_CLK</tt><br />
| <tt>0x0140</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_AVS_CLK</tt><br />
| <tt>0x0144</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_ACE_CLK</tt><br />
| <tt>0x0148</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_LVDS_CLK</tt><br />
| <tt>0x014c</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_HDMI_CLK</tt><br />
| <tt>0x0150</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_MALI400_CLK</tt><br />
| <tt>0x0154</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_MBUS_CLK</tt><br />
| <tt>0x015c</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_GMAC_CLK</tt><br />
| <tt>0x0164</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_HDMI1_RST_CLK</tt><br />
| <tt>0x0170</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_HDMI1_CTRL_CLK</tt><br />
| <tt>0x0174</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_HDMI1_SLOW_CLK</tt><br />
| <tt>0x0178</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_HDMI1_REPEAT_CLK</tt><br />
| <tt>0x017c</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_OUTA_CLK</tt><br />
| <tt>0x01F0</tt><br />
| <tt>4B</tt><br />
|<br />
|-<br />
| <tt>CCM_OUTB_CLK</tt><br />
| <tt>0x01F4</tt><br />
| <tt>4B</tt><br />
|<br />
|}<br />
<br />
=== CCM_PLL1_CFG ===<br />
Default value: 0x21005000<br /><br />
Offset: 0x0000<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL1_M</tt><br />
| <tt>0:1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt><br />
| PLL1 factor M<br />
|-<br />
| <tt>CCM_PLL1_SD</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| Sigma-delta pattern enable<br />
|-<br />
| <tt>CCM_PLL1_SD_IN</tt><br />
| <tt>3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
|<br />
| Sigma-delta pattern input<br />
|-<br />
| <tt>CCM_PLL1_K</tt><br />
| <tt>4:5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt><br />
| PLL1 factor K<br />
|-<br />
| <tt>no operation</tt><br />
| <tt>6:7</tt><br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL1_N</tt><br />
| <tt>8:12</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x10</tt><br />
| <tt><br />
0x00 = 0<br />
0x01 = 1<br />
...<br />
0x1f = 31<br />
</tt><br />
| PLL1 factor N<br />
|-<br />
| <tt>CCM_PLL1_LCK_CTRL</tt><br />
| <tt>13:15</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <br />
| PLL1 lock timer control<br />
|-<br />
| <tt>CCM_PLL1_P</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| External factor P<br />
|-<br />
| <tt>no operation</tt><br />
| <tt>18:19</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL1_BIAS</tt><br />
| <tt>20:24</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
|<br />
| PLL1 bias current<br />
|-<br />
| <tt>CCM_PLL1_PLL4_EX</tt><br />
| <tt>25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt>{unverified}<br />
| Exchange with PLL4 enable<br />
|-<br />
| <tt>CCM_PLL1_VCO_BIAS</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
| <unknown><br />
| PLL1 VCO bias control (e.g. pre-div)<br />
|-<br />
| <tt>CCM_PLL1_VCO_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = no operation<br />
1 = reset<br />
</tt>{unverified}<br />
| PLL1 VCO reset in<br />
|-<br />
| <tt>CCM_PLL1</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| <math>\frac{24 \, \mathrm{MHz} \times N \times K}{M \times P}</math><br /><br />
The default value for the output is 384 MHz.<br /><br />
If bypass is disabled, the result must be <tt>240 MHz - 2 GHz</tt><br />
|}<br />
<br />
=== CCM_PLL1_TUN ===<br />
Default value: unknown<br /><br />
Offset: 0x0004<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:15</tt><br />
|<br />
|<br />
|<br />
| Reserved for verification<br />
|-<br />
| <tt>CCM_FREQ_INIT</tt><br />
| <tt>16:25</tt><br />
| <tt>Read/Write</tt><br />
|<br />
|<br />
| PLL1 initial frequency control<br />
|-<br />
| <tt>CCM_PLL1_VCO_GAIN</tt><br />
| <tt>26</tt><br />
| <tt>Read/Write</tt><br />
|<br />
| <tt><br />
0 = no operation<br />
1 = enable<br />
</tt>{unverified}<br />
| PLL5 VCO gain control<br />
|-<br />
| <tt>CCM_PLL1_BW</tt><br />
| <tt>27</tt><br />
| <tt>Read/Write</tt><br />
|<br />
| <tt><br />
0 = narrow<br />
1 = wide<br />
</tt>{unverified}<br />
| PLL1 bandwith control<br />
|-<br />
| <tt>CCM_PLL1_DAMP</tt><br />
| <tt>28:31</tt><br />
| <tt>Read/Write</tt><br />
|<br />
|<br />
| PLL1 dampening factor<br />
|}<br />
<br />
=== CCM_PLL1_TUN2 ===<br />
Default value: unknown<br /><br />
Offset: 0x0038<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL1_WAV_BOT</tt><br />
| <tt>0:16</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL1_FREQ</tt><br />
| <tt>17:18</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 31.5 kHz<br />
0x01 = 32.0 kHz<br />
0x02 = 32.5 kHz<br />
0x03 = 33.0 kHz<br />
</tt><br />
| PLL1 frequency<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>19</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL1_WAV_STP</tt><br />
| <tt>20:28</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
|<br />
| PLL1 Wave step<br />
|-<br />
| <tt>CCM_PLL1_FREQ_MOD</tt><br />
| <tt>29:30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = DC=0<br />
0x01 = DC=1<br />
0x02 = triangular<br />
0x03 = awmode<br />
</tt><br />
| PLL1 Spread spectrum frequency mode<br />
|-<br />
| <tt>CCM_PLL1_SD_PAT</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL1 Sigma delta pattern enable<br />
|}<br />
<br />
=== CCM_PLL2_CFG ===<br />
Default value: 0x81000010<br /><br />
Offset: 0x0008<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL2_VCO_BIAS</tt><br />
| <tt>0:4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x10</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt><br />
| PLL2 VCO bias control (e.g. pre-div)<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>5:7</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL2_N</tt><br />
| <tt>8:14</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 1<br />
0x02 = 2<br />
...<br />
0x7f = 127<br />
</tt><br />
| PLL2 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL2_BIAS</tt><br />
| <tt>16:20</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x02</tt><br />
| <tt><br />
0x00 = 0<br />
0x01 = 1<br />
...<br />
0x0f = 15<br />
</tt>{unverified}<br />
| PLL2 bias current control (e.g. post-div)<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>21:27</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL2_SD_OUT</tt><br />
| <tt>28</tt><br />
| <tt>Read/Write</tt><br />
|<br />
|<br />
| PLL2 sigma delta output<br />
|-<br />
| <tt>no operation</tt><br />
| <tt>29:31</tt><br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL2</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL2 is used for Audio. Output formula:<br />
<math>\frac{24 \, \mathrm{MHz} \times N}{\mathrm{CCM\_PLL\_VCO\_BIAS} \times \mathrm{CCM\_PLL\_BIAS}}</math><br /><br />
<br /><br />
1x <math>\frac{(2 \times 24 \, \mathrm{MHz}) \times N}{\mathrm{CCM\_PLL\_VCO\_BIAS} \times \mathrm{CCM\_PLL\_BIAS} \times 2}</math>(Not 50% duty cycle)<br /><br />
<br /><br />
2x <math>\frac{(2 \times 24 \, \mathrm{MHz}) \times N}{\mathrm{CCM\_PLL\_VCO\_BIAS} \times \mathrm{CCM\_PLL\_BIAS} \times 4}</math>(8 x /4 50% duty cycle)<br /><br />
<br /><br />
4x <math>\frac{(2 \times 24 \, \mathrm{MHz}) \times N}{\mathrm{CCM\_PLL\_VCO\_BIAS} \times \mathrm{CCM\_PLL\_BIAS} \times 2}</math>(8 x /2 50% duty cycle)<br /><br />
<br /><br />
8x <math>\frac{(2 \times 24 \, \mathrm{MHz}) \times N}{\mathrm{CCM\_PLL\_VCO\_BIAS} \times \mathrm{CCM\_PLL\_BIAS}}</math>(Not 50% duty cycle)<br />
|}<br />
<br />
<br />
=== CCM_PLL2_TUN ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x000c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL2_WAV_BOTTOM</tt><br />
| <tt>0:16</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
|<br />
| Wave bottom<br />
|-<br />
| <tt>CCM_PLL2_FREQ</tt><br />
| <tt>17:18</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 31.5 kHz<br />
0x01 = 32.0 kHz<br />
0x02 = 32.5 kHz<br />
0x03 = 33.0 kHz<br />
</tt><br />
| PLL2 Frequency<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>19</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL2_WAV_STEP</tt><br />
| <tt>20:28</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
|<br />
| PLL2 Wave step<br />
|-<br />
| <tt>CCM_PLL2_SPRD_FREQ</tt><br />
| <tt>29:30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = DC=0<br />
0x01 = DC=1<br />
0x02 = Triangle<br />
0x03 = awmode<br />
</tt><br />
| PLL2 Spread spectrum frequency mode<br />
|-<br />
| <tt>CCM_PLL2_SD_PAT</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL2 Sigma delta pattern enable<br />
|}<br />
<br />
<br />
=== CCM_PLL3_CFG ===<br />
Default value: 0x0010d063<br /><br />
Offset: 0x0010<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL3_M</tt><br />
| <tt>0:6</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x63</tt><br />
| <tt><br />
0x00 = no operation<br />
...<br />
0x09 = 9<br />
...<br />
0x7f = 127<br />
</tt><br />
| PLL3 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>7</tt><br />
| <br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL3_BIAS</tt><br />
| <tt>8:12</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0x00 = 0<br />
0x01 = 1<br />
...<br />
0x0f = 15<br />
</tt>{unverified}<br />
| PLL3 bias current control (e.g. post-div)<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>13</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL3_FRAC</tt><br />
| <tt>14</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = 270 MHz<br />
1 = 297 MHz <br />
</tt>{unverified}<br />
| PLL3 fractional frequency setting<br />
|-<br />
| <tt>CCM_PLL3_MODE</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = fractional<br />
1 = integer<br />
</tt><br />
| PLL3 mode<br />
|-<br />
| <tt>CCM_PLL3_VCO_BIAS</tt><br />
| <tt>16:20</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt>{unverified}<br />
| PLL3 bias current control (e.g. pre-div)<br />
|-<br />
| <tt>CCM_PLL3_DAMP</tt><br />
| <tt>21:23</tt><br />
| <unknown><br />
|<br />
| PLL3 dampening factor<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>24:26</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL3</tt><br />
| <tt></tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL3 output range: <tt>27 MHz - 381 MHz</tt><br /><br />
Integer mode: <math>3 \, \mathrm{MHz} \times M</math><br /><br /><br />
Fractional mode: <math>270 \, \mathrm{MHz} \lor 297 \, \mathrm{MHz}</math> (see bit 14)<br />
|}<br />
<br />
=== CCM_PLL4_CFG ===<br />
Default value: 0x21081000<br /><br />
Offset: 0x0018<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL4_M</tt><br />
| <tt>0:1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x01 = 1<br />
0x02 = 2<br />
0x03 = 3<br />
0x04 = 4<br />
</tt><br />
| PLL4 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>2:3</tt><br />
| <br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL4_K</tt><br />
| <tt>4:5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x01 = 1<br />
0x02 = 2<br />
0x03 = 3<br />
0x04 = 4<br />
</tt><br />
| PLL4 factor K<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>6:7</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL4_N</tt><br />
| <tt>8:12</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x10</tt><br />
| <tt><br />
0x00 = 0<br />
0x01 = 1<br />
...<br />
0x1f = 31<br />
</tt><br />
| PLL4 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>13:14</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL4_SW</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disabled<br />
1 = enabled<br />
</tt><br />
| When enabled, PLL4 is sourced by PLL6<br />
|-<br />
| <tt>CCM_PLL4_P</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| PLL4 external factor P<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL4_VCO_GAIN</tt><br />
| <tt>19</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0 = disabled<br />
1 = enabled<br />
</tt>{unverified}<br />
| PLL4 VCO bias control<br />
|-<br />
| <tt>CCM_PLL4_BIAS</tt><br />
| <tt>20:24</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt>{unverified}<br />
| PLL4 bias control<br />
|-<br />
| <tt>CCM_PLL4_VCO_GAIN</tt><br />
| <tt>25:29</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt>{unverified}<br />
| PLL4 VCO gain control<br />
|-<br />
| <tt>CCM_PLL4_BYPASS</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL4 bypass, when enabled 24 MHz is being output<br />
|-<br />
| <tt>CCM_PLL4</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL4 output range: <tt>24 MHz</tt> or <tt>240 MHz - 2 GHz</tt><br /><br />
<math>\frac{24 \, \mathrm{MHz} \times N \times K}{M \times P}</math><br /><br />
Output when CCM_PLL4_BYPASS is disabled must be in the <tt>240 MHz - 2 GHz</tt> range<br />
|}<br />
<br />
=== CCM_PLL5_CFG ===<br />
Default value: 0x11049280<br /><br />
Offset: 0x0020<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL5_M</tt><br />
| <tt>0:1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt><br />
| PLL5 factor M<br />
|-<br />
| <tt>CCM_PLL5_M1</tt><br />
| <tt>2:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt>{unconfirmed}<br />
| PLL5 factor M1<br />
|-<br />
| <tt>CCM_PLL5_K</tt><br />
| <tt>4:5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt><br />
| PLL5 factor K<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>6</tt><br />
| <br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL5_LDO</tt><br />
| <tt>7</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = no operation<br />
1 = enable<br />
</tt><br />
| PLL5 LDO enable<br />
|-<br />
| <tt>CCM_PLL5_N</tt><br />
| <tt>8:12</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x12</tt><br />
| <tt><br />
0x00 = 0<br />
0x01 = 1<br />
...<br />
0x1f = 31<br />
</tt><br />
| PLL5 factor N<br />
|-<br />
| <tt>CCM_PLL5_P</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt><br />
| PLL5 external factor P<br />
|-<br />
| <tt>CCM_PLL5_BW</tt><br />
| <tt>18</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0 = narrow<br />
1 = wide<br />
</tt><br />
| PLL5 bandwith control<br />
|-<br />
| <tt>CCM_PLL5_VCO_GAIN</tt><br />
| <tt>19</tt><br />
| <tt>Read/Write</tt><br />
|<br />
| <tt><br />
0 = no operation<br />
1 = enable<br />
</tt>{unverified}<br />
| PLL5 VCO gain control<br />
|-<br />
| <tt>CCM_PLL5_BIAS</tt><br />
| <tt>20:24</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt>{unverified}<br />
| PLL5 bias current control<br />
|-<br />
| <tt>CCM_PLL5_VCO_BIAS</tt><br />
| <tt>25:28</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt>{unverified}<br />
| PLL5 VCO bias control (e.g. pre-div)<br />
|-<br />
| <tt>CCM_PLL5_DDR_CLK</tt><br />
| <tt>29</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = no operation<br />
1 = enable<br />
</tt>{unverified}<br />
| PLL5 DDR clock output enable<br />
|-<br />
| <tt>CCM_PLL5_BYPASS</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL5 bypass, when enabled 24 MHz is being output<br />
|-<br />
| <tt>CCM_PLL5</tt><br />
| <tt></tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL5 output range: <tt>24 MHz</tt> or <tt>240 MHz - 2 GHz</tt><br /><br /><br />
DDR: <math>\frac{24 \, \mathrm{MHz} \times N \times K}{M}</math><br /><br /><br />
Others: <math>\frac{24 \, \mathrm{MHz} \times N \times K}{P}</math><br /><br /><br />
Output when CCM_PLL5_BYPASS is disabled must be in the <tt>240 MHz - 2 GHz</tt> range<br />
|}<br />
<br />
=== CCM_PLL5_TUN ===<br />
Default value: unknown<br /><br />
Offset: 0x0024<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL5_FREQ_INIT</tt><br />
| <tt>16:22</tt><br />
| <tt>Read/Write</tt><br />
|<br />
|<br />
| PLL5 initial frequency control<br />
|-<br />
| <tt>CCM_PLL5_VCO_RST</tt><br />
| <tt>23</tt><br />
| <tt>Read/Write</tt><br />
|<br />
| <tt><br />
0 = no operation<br />
1 = reset<br />
</tt>{unverified}<br />
| PLL5 VCO reset in<br />
|-<br />
| <tt>CCM_PLL5_LCK_CTRL</tt><br />
| <tt>24:26</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
|<br />
| PLL5 lock timer control<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>27</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL5_VREG1</tt><br />
| <tt>28</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
|<br />
| VReg1 output enable<br />
|-<br />
| <tt>CCM_PLL5_DAMP</tt><br />
| <tt>29:31</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
|<br />
| PLL5 dampening factor<br />
|}<br />
<br />
=== CCM_PLL5_TUN2 ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x003c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL5_WAV_BOT</tt><br />
| <tt>0:16</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL5_FREQ</tt><br />
| <tt>17:18</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 31.5 kHz<br />
0x01 = 32.0 kHz<br />
0x02 = 32.5 kHz<br />
0x03 = 33.0 kHz<br />
</tt><br />
| PLL5 frequency<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>19</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL5_WAV_STP</tt><br />
| <tt>20:28</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
|<br />
| PLL5 Wave step<br />
|-<br />
| <tt>CCM_PLL5_FREQ_MOD</tt><br />
| <tt>29:30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = DC=0<br />
0x01 = DC=1<br />
0x02 = triangular<br />
0x03 = awmode<br />
</tt><br />
| PLL5 Spread spectrum frequency mode<br />
|-<br />
| <tt>CCM_PLL5_SD_PAT</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL5 Sigma delta pattern enable<br />
|}<br />
<br />
=== CCM_PLL6_CFG ===<br />
Default value: 0x21009911<br /><br />
Offset: 0x0028<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL6_M</tt><br />
| <tt>0:1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt><br />
| PLL6 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>2:3</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL6_K</tt><br />
| <tt>4:5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt><br />
| PLL6 factor K<br />
|-<br />
| <tt>CCM_PLL6_DAMP</tt><br />
| <tt>6:7</tt><br />
| <tt>Read/Write</tt><br />
|<br />
| PLL6 dampening factor<br />
|-<br />
| <tt>CCM_PLL6_N</tt><br />
| <tt>8:12</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x19</tt><br />
| <tt><br />
0x00 = 0<br />
0x01 = 1<br />
...<br />
0x1f = 31<br />
</tt><br />
| PLL6 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>13</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL6_SATA_CLK</tt><br />
| <tt>14</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0 = no operation<br />
1 = enabled<br />
</tt>{unconfirmed}<br />
| PLL6 SATA clock output enable<br />
|-<br />
| <tt>CCM_PLL6_BW</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
| <tt><br />
0 = narrow<br />
1 = wide<br />
</tt>{unconfirmed}<br />
| PLL6 bandwidth control<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>16:19</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL6_BIAS</tt><br />
| <tt>20:24</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
|<br />
| PLL6 bias current<br />
|-<br />
| <tt>CCM_PLL6_VCO_BIAS</tt><br />
| <tt>25:29</tt><br />
|<br />
|<br />
| <unknown><br />
| PLL6 VCO bias control (e.g. pre-div)<br />
|-<br />
| <tt>CCM_PLL6_BYPASS</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disabled<br />
1 = enabled<br />
</tt><br />
| PLL6 bypass, when enabled 24 MHz is being output<br />
|-<br />
| <tt>CCM_PLL6</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL6 output range: <tt>24 MHz</tt> or <tt>240 MHz - 2 GHz</tt><br /><br /><br />
DDR: <math>\frac{24 \, \mathrm{MHz} \times N \times K}{M \times 6}</math><br /><br /><br />
Others: <math>\frac{24 \, \mathrm{MHz} \times N \times K}{2}</math><br /><br /><br />
Output when CCM_PLL6_BYPASS is disabled must be in the <tt>240 MHz - 2 GHz</tt> range<br />
|}<br />
<br />
<br />
=== CCM_PLL6_TUN ===<br />
Default value: unknown<br /><br />
Offset: 0x002c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:31</tt><br />
|<br />
|<br />
|<br />
|<br />
|}<br />
<br />
=== CCM_PLL7_CFG ===<br />
Default value: 0x0010d063<br /><br />
Offset: 0x0030<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_PLL7_M</tt><br />
| <tt>0:6</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x63</tt><br />
| <tt><br />
0x00 = no operation<br />
...<br />
0x09 = 9<br />
...<br />
0x7f = 127<br />
</tt><br />
| PLL7 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>7</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL7_BIAS</tt><br />
| <tt>8:12</tt><br />
| <tt>Read/Write</tt><br />
| <unknown><br />
|<br />
| PLL6 bias current<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>13</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL7_FRAC</tt><br />
| <tt>14</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = 270 MHz<br />
1 = 297 MHz <br />
</tt><br />
| PLL7 fractional frequency setting<br />
|-<br />
| <tt>CCM_PLL7_MODE</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = fractional<br />
1 = integer<br />
</tt><br />
| PLL7 mode<br />
|-<br />
| <tt>CCM_PLL7_VCO_BIAS</tt><br />
| <tt>16:20</tt><br />
|<br />
|<br />
| <unknown><br />
| PLL7 VCO bias control (e.g. pre-div)<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>21:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL7_DAMP</tt><br />
| <tt>24:26</tt><br />
| <unknown><br />
|<br />
| PLL7 dampening factor<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>27:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_PLL7</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| PLL7 output range: <tt>27 MHz - 381 MHz</tt><br /><br />
Integer mode: <math>3 \, \mathrm{MHz} \times M</math><br /><br /><br />
Fractional mode: <math>270 \, \mathrm{MHz} \lor 297 \, \mathrm{MHz}</math> (see bit 14)<br />
|}<br />
<br />
<br />
=== CCM_OSC24M_CFG ===<br />
Default value: 0x001380133<br /><br />
Offset: 0x0050<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_OSC24M</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| Enable or disable the external 24 MHz Oscillator<br />
|-<br />
| <tt>CCM_OSC24M_GSM</tt><br />
| <tt>1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt>{Unconfirmed}<br />
|<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>2:14</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_OSC24M_PLL_BIAS</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| OSC24M PLL bias current<br />
|-<br />
| <tt>CCM_OSC24M_LDO</tt><br />
| <tt>16</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| OSCM24M LDO<br />
|-<br />
| <tt>CCM_OSC24M_PWR</tt><br />
| <tt>17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0 = 2.5 V<br />
1 = 3.3 V<br />
</tt><br />
| OSC24M input power select<br />
|-<br />
| <tt>CCM_OSC24M_LDO_OUT</tt><br />
| <tt>18:20</tt><br />
| <tt>Read/Write</tt><br />
| <tt>unknown</tt><br />
| <tt><br />
0x00 = ???<br />
...<br />
0x04 = 1.25 V<br />
...<br />
</tt><br />
| OSC24M LDO output<br />
|-<br />
| <tt>CCM_OSC24M_KEYFIELD</tt><br />
| <tt>21:31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x538<tt><br />
| <br />
| OSC24M keyfield for LDO. Bits 24 - 31 are valid. Writing "strb" will do nothing.<br />
|}<br />
<br />
=== CCM_CPU_AXI_AHB_APB0_CFG ===<br />
Default value: 0x00010010<br /><br />
Offset: 0x0054<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_AXI_CLK_DIV</tt><br />
| <tt>0:1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 3<br />
0x03 = 4<br />
</tt><br />
| Choose the clock divider for the AXI-bus when the AXI clock source is the CPU clock.<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>2:3</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_AHB_CLK_DIV</tt><br />
| <tt>4:5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| Choose the clock divider for the AHB when the AHB clock source is the AXI clock.<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>5:7</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_APB0_CLK_DIV</tt><br />
| <tt>8:9</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 2<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| Choose the clock divider for the APB0 when the APB0 clock source is the AHB2 clock.<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>10:15</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_CPU_CLK_SRC</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0x00 = 32 KHz internal RC clock<br />
0x01 = 24 MHz external Oscillator<br />
0x02 = PLL1<br />
0x03 = 200 MHz sourced from PPL6<br />
</tt><br />
| Change the CPU Clock source. After changing the clock source, at least 8 clock cycles need to pass before changes are active.<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:31</tt><br />
|<br />
|<br />
|<br />
|}<br />
<br />
=== CCM_APB1_CLK_DIV_CFG ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0058<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_APB1_M</tt><br />
| <tt>0:4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt><br />
| APB1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>5:15</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_APB1_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x01</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| APB1 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_APB1_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 24 MHz<br />
0x01 = 1.2 GHz (from PLL6)<br />
0x02 = 32 kHz<br />
0x03 = no operation<br />
</tt><br />
| APB1 clock source<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>31</tt><br />
|<br />
|<br />
|<br />
| Could possibly be APBI Enable/disable?<br /><br />
Some special modules (twi, uart, ps2, can, scr) using the APB_CLK use this clock as they need a special clock rate, even if APB_CLK is changed.<br />
<math>\frac{\mathrm{CCM\_APB1\_CLK\_SRC}}{M \times N}</math><br /><br /><br />
|}<br />
<br />
=== CCM_AXI_CLK_GATE ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x005c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_AXI_GATE_MASK</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AXI dram clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>1:31</tt><br />
|<br />
|<br />
|<br />
|}<br />
<br />
=== CCM_AHB_GATING0 ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0060<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_AHB_GATE_USB0</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB USB 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_EHCI0</tt><br />
| <tt>1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB USB EHCI 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_OHCI0</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB USB OHCI 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_EHCI1</tt><br />
| <tt>3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB USB EHCI 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_OHCI1</tt><br />
| <tt>4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB USB OHCI 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SS</tt><br />
| <tt>5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SS clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_DMA</tt><br />
| <tt>6</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB DMA clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_BIST</tt><br />
| <tt>7</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB BIST clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SDMMC0</tt><br />
| <tt>8</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SD/MMC 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SDMMC1</tt><br />
| <tt>9</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SD/MMC 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SDMMC2</tt><br />
| <tt>10</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SD/MMC 2 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SDMMC3</tt><br />
| <tt>11</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SD/MMC 3 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_MS</tt><br />
| <tt>12</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB MS clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_NAND</tt><br />
| <tt>13</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB NAND clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SDRAM</tt><br />
| <tt>14</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SDRAM clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_DLL</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB DLL clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_ACE</tt><br />
| <tt>16</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB ACE clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_EMAC</tt><br />
| <tt>17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB EMAC clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_TS</tt><br />
| <tt>18</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB TS clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>19</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_AHB_GATE_SPI0</tt><br />
| <tt>20</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SPI 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SPI1</tt><br />
| <tt>21</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SPI 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SPI2</tt><br />
| <tt>22</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SPI 2 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SPI3</tt><br />
| <tt>23</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SPI 3 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_PATA</tt><br />
| <tt>24</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB PATA clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_SATA</tt><br />
| <tt>25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB SATA clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_GPS</tt><br />
| <tt>26</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB GPS clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>27</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>28</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>29</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>30</tt><br />
|<br />
|<br />
|<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>31</tt><br />
|<br />
|<br />
|<br />
|}<br />
<br />
=== CCM_AHB_GATING1 ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0064<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_AHB_GATE_VE</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB VE clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_TVD</tt><br />
| <tt>1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB TVD clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_TVE0</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB TVE 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_TVE1</tt><br />
| <tt>3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB TVE 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_LCD0</tt><br />
| <tt>4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB LCD 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_LCD1</tt><br />
| <tt>5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB LCD 1 clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>6</tt><br />
|<br />
|<br />
| Possibly for AVS? (LVDS)?<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>7</tt><br />
|<br />
|<br />
|<br />
| Possibly for AVS? (LVDS)?<br />
|-<br />
| <tt>CCM_AHB_GATE_CS0</tt><br />
| <tt>8</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB CS 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_CS1</tt><br />
| <tt>9</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB CS 1 clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>10</tt><br />
|<br />
|<br />
|<br />
| Possibly LVDS? AVS?<br />
|-<br />
| <tt>CCM_AHB_GATE_HDMI</tt><br />
| <tt>11</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB HDMI clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_DE-BE0</tt><br />
| <tt>12</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB DE-BE 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_DE-BE1</tt><br />
| <tt>13</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB DE-BE 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_DE-FE0</tt><br />
| <tt>14</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB DE-FE 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_AHB_GATE_DE-FE1</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB DE-FE 1 clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>16</tt><br />
|<br />
|<br />
|<br />
| Possibly LVDS? AVS?<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>17</tt><br />
|<br />
|<br />
|<br />
| Possibly LVDS? AVS?<br />
|-<br />
| <tt>CCM_AHB_GATE_MP</tt><br />
| <tt>18</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB MP clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>19</tt><br />
|<br />
|<br />
|<br />
| Possibly LVDS? AVS?<br />
|-<br />
| <tt>CCM_AHB_GATE_MALI400</tt><br />
| <tt>20</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AHB Mali-400 clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>21:31</tt><br />
|<br />
|<br />
|<br />
|}<br />
<br />
<br />
=== CCM_APB0_GATING ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0068<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_APB_AUDIOCODEC</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 0 audiocodec clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_SPDIF</tt><br />
| <tt>1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 0 SPDIF clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_AC97</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 0 AC97 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_IIS</tt><br />
| <tt>3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 0 IIS clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_APB_GATE_PIO</tt><br />
| <tt>5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 0 PIO clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_IR0</tt><br />
| <tt>6</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 0 IR 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_IR1</tt><br />
| <tt>7</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 0 IR 1 clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>8</tt><br />
|<br />
|<br />
|<br />
| Possibly LVDS? AVS?<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>9</tt><br />
|<br />
|<br />
|<br />
| Possibly LVDS? AVS?<br />
|-<br />
| <tt>CCM_APB_GATE_KEYPAD</tt><br />
| <tt>10</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 0 Keypad clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>11:31</tt><br />
|<br />
|<br />
|<br />
|<br />
|}<br />
<br />
=== CCM_APB1_GATING ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x006c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_APB_GATE_TWI0</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 TWI 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_TWI1</tt><br />
| <tt>1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 TWI 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_TWI2</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 TWI 2 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_TWI3</tt><br />
| <tt>3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 TWI 3 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_CAN</tt><br />
| <tt>4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 CAN clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_SCR</tt><br />
| <tt>5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 SCR clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_PS20</tt><br />
| <tt>6</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 PS/2 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_PS21</tt><br />
| <tt>7</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 PS/2 1 clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>8:14</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_APB_GATE_TWI4</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 TWI 4 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_UART0</tt><br />
| <tt>16</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 UART 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_UART1</tt><br />
| <tt>17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 UART 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_UART2</tt><br />
| <tt>18</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 UART 2 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_UART3</tt><br />
| <tt>19</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 UART 3 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_UART4</tt><br />
| <tt>20</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 UART 4 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_UART5</tt><br />
| <tt>21</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 UART 5 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_UART6</tt><br />
| <tt>22</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 UART 6 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_APB_GATE_UART70</tt><br />
| <tt>23</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| APB 1 UART 7 clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>24:31</tt><br />
|<br />
|<br />
|<br />
|<br />
|}<br />
<br />
=== CCM_NAND_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0080<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_NAND_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| NAND factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_NAND_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| NAND factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_NAND_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for NAND controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_NAND_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| NAND special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_NAND\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_MMC0_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0088<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_MMC0_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SD/MMC 0 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:7</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC_CTRL_OCLK_DLY</tt><br />
| <tt>8:10</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
|<br />
| Output clock phase control; The output clock phase delay is based on the number of<br />
source clock that is from 0 to 7.<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>11:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC0_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SD/MMC 0 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:19</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC_CTRL_SCLK_DLY</tt><br />
| <tt>20:22</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
|<br />
| Sample clock phase control; The sample clock phase delay is based on the number of<br />
source clock that is from 0 to 7.<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC0_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SD/MMC 0 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC0_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SD/MMC 0 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_MMC0\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_MMC1_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x008c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_MMC1_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SD/MMC 1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC1_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SD/MMC 1 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC1_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SD/MMC 1 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC1_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SD/MMC 1 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_MMC1\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_MMC2_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0090<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_MMC2_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SD/MMC 2 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC2_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SD/MMC 2 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC2_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SD/MMC 2 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC2_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SD/MMC 2 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_MMC2\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_MMC3_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0094<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_MMC3_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SD/MMC 3 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC3_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SD/MMC 3 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC3_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SD/MMC 3 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MMC3_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SD/MMC 3 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_MMC3\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_SS_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x009c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_SS_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SS factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SS_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SS factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SS_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SS controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SS_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SS special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_SS\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
<br />
=== CCM_SPI0_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00a0<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_SPI0_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SPI 0 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI0_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SPI 0 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI0_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SPI 0 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI0_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SPI 0 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_SPI0\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_SPI1_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00a4<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_SPI1_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SPI 1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI1_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SPI 1 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI1_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SPI 1 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI1_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SPI 1 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_SPI1\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_SPI2_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00a8<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_SPI2_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SPI 2 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI2_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SPI 2 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI2_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SPI 2 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI2_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SPI 2 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_SPI2\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_SPI3_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00d4<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_SPI3_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| SPI 3 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI3_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| SPI 3 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI3_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for SPI 3 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPI3_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SPI 3 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_SPI3\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_IR0_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00b0<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_IR0_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| IR 0 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_IR0_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| IR 0 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_IR0_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for IR 0 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_IRI0_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| IR 0 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_IR0\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_IR1_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00b4<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_IR1_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| IR 1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_IR1_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| IR 1 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_IR1_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for IR 1 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_IR1_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| IR 1 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_IR1\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_IIS_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00b8<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_IIS_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x08 = 8<br />
</tt><br />
| IIS factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_IIS_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| IIS special clock gating (Max clock = 100 MHz):<br /><br />
<math>\frac{8 \times \mathrm{PLL2}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_A97_CLK ===<br />
Default value: 0x00030000<br /><br />
Offset: 0x00bc<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_AC97_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x03</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x08 = 8<br />
</tt><br />
| AC97 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_AC97_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AC97 special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{8 \times \mathrm{PLL2}}{N}</math><br />
|}<br />
<br />
<br />
=== CCM_SPDIF_CLK ===<br />
Default value: 0x00030000<br /><br />
Offset: 0x00c0<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPDIF_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x03</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x08 = 8<br />
</tt><br />
| SPDIF factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SPDIF_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SPDIF special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{8 \times \mathrm{PLL2}}{N}</math><br />
|}<br />
<br />
<br />
=== CCM_KPAD_CLK ===<br />
Default value: 0x0000001f<br /><br />
Offset: 0x00c4<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_KPAD_M</tt><br />
| <tt>0:4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x1f</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt><br />
| Keypad factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>5:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_KPAD_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
0x02 = 4<br />
0x03 = 8<br />
</tt><br />
| Keypad factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_KPAD_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = no operation<br />
0x02 = RC_CLK<br />
0x03 = no operation<br />
</tt><br />
| Clock source for keypad controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_KPAD_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| Keypad special clock gating (Max clock = 100 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_KPAD\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
<br />
=== CCM_SATA_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00c8<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SATA_CLK_SRC</tt><br />
| <tt>24</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = PLL6 (100 MHz)<br />
1 = External Clock<br />
</tt><br />
| Clock source for SATA controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>25:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_SATA_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| SATA clock gate pass- or masking<br />
|}<br />
<br />
=== CCM_USB_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00cc<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_USB0_RESET</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| USB PHY0 reset control<br />
|-<br />
| <tt>CCM_USB1_RESET</tt><br />
| <tt>1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| USB PHY1 reset control<br />
|-<br />
| <tt>CCM_USB2_RESET</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| USB PHY2 reset control<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>3</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_USB_CLK_SRC</tt><br />
| <tt>4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = PLL6 / 25<br />
1 = 48 MHz<br />
</tt><br />
| Clock source for USB controller:<br /><br />
48 MHz is generated from a 24 MHz sample taken from PLL6<br />
|-<br />
| <tt>CCM_USB_CLK_SW</tt><br />
| <tt>5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = ?<br />
1 = ?<br />
</tt><br />
| USB Clock switch<br />
|-<br />
| <tt>CCM_USB_OHCI0_GATE</tt><br />
| <tt>6</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| Special USB clock gating for USB OHCI 0<br />
|-<br />
| <tt>CCM_USB_OHCI1_GATE</tt><br />
| <tt>7</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| Special USB clock gating for USB OHCI 1<br />
|-<br />
| <tt>CCM_USB_GATE</tt><br />
| <tt>8</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| Special USB clock gating for USB PHY[012]<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>9:31</tt><br />
|<br />
|<br />
|<br />
|<br />
|}<br />
<br />
<br />
=== CCM_GPS_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x00d0<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_GPS_RESET</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>unknown</tt><br />
| <tt><br />
0 = disable <br />
1 = enable<br />
</tt>{unconfirmed}<br />
| Enable reset for the GPS module<br />
|-<br />
| <tt>CCM_GPS_GATE</tt><br />
| <tt>1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| GPS clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>2:31</tt><br />
|<br />
|<br />
|<br />
|<br />
|}<br />
<br />
=== CCM_DRAM_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0100<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_DRAM_VE_GATE</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM VE clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_CSI0_GATE</tt><br />
| <tt>1</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM CSI 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_CSI1_GATE</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM CSI 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_TS_GATE</tt><br />
| <tt>3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM TS clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_TVD_GATE</tt><br />
| <tt>4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM TVD clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_TVE0_GATE</tt><br />
| <tt>5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM TVE 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_TVE1_GATE</tt><br />
| <tt>6</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM TVE 1 clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>7:14</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DRAM_CLK_OUT</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = disable<br />
1 = enable<br />
</tt><br />
| Enable or disable DRAM clock output<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>16:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DRAM_FE1_GATE</tt><br />
| <tt>24</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM FE 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_FE0_GATE</tt><br />
| <tt>25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM FE 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_BE0_GATE</tt><br />
| <tt>26</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM BE 0 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_BE1_GATE</tt><br />
| <tt>27</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM BE 1 clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_MP_GATE</tt><br />
| <tt>28</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM MP clock gate pass- or masking<br />
|-<br />
| <tt>CCM_DRAM_ACE_GATE</tt><br />
| <tt>29</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DRAM ACE clock gate pass- or masking<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>30:31</tt><br />
|<br />
|<br />
|<br />
|<br />
|}<br />
<br />
<br />
=== CCM_DE-BE0_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0104<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_DE-BE0_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| DE-BE 0 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DE-BE0_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3<br />
0x01 = PLL7<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for DE-BE 0<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DE-BE0_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| DE-BE0 reset<br />
|-<br />
| <tt>CCM_DE-BE0_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DE-BE 0 special clock gating:<br /><br />
<math>\frac{\mathrm{CCM\_DE-BE0\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
<br />
=== CCM_DE-BE1_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0108<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_DE-BE1_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| DE-BE 1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DE-BE1_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3<br />
0x01 = PLL7<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for DE-BE1<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DE-BE1_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| DE-BE1 reset<br />
|-<br />
| <tt>CCM_DE-BE1_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DE-BE 1 special clock gating:<br /><br />
<math>\frac{\mathrm{CCM\_DE-BE1\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
=== CCM_DE-FE0_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x010c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_DE-FE0_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| DE-FE 0 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DE-FE0_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3<br />
0x01 = PLL7<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for DE-FE 0<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DE-FE0_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| DE-FE0 reset<br />
|-<br />
| <tt>CCM_DE-FE0_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DE-FE 0 special clock gating:<br /><br />
<math>\frac{\mathrm{CCM\_DE-FE0\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
=== CCM_DE-FE1_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0110<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_DE-FE1_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| DE-FE 1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DE-FE1_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3<br />
0x01 = PLL7<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for DE-FE 1<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_DE-FE1_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| DE-FE1 reset<br />
|-<br />
| <tt>CCM_DE-FE1_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| DE-FE 1 special clock gating:<br /><br />
<math>\frac{\mathrm{CCM\_DE-FE1\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
=== CCM_MP_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0114<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_MP_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| MP factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MP_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3<br />
0x01 = PLL7<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for MP<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MP_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| MP reset<br />
|-<br />
| <tt>CCM_MP_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| MP special clock gating:<br /><br />
<math>\frac{\mathrm{CCM\_MP\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
<br />
=== CCM_LCD0_CH0_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0118<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD0_CH0_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3 (x1)<br />
0x01 = PLL7 (x1)<br />
0x02 = PLL3 (x2)<br />
0x03 = PLL7 (x2)<br />
</tt><br />
| Clock source for LCD 0 CH 0<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD0_CH0_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| LCD 0 CH 0 reset<br />
|-<br />
| <tt>CCM_LCD0_CH0_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| LCD 0 channel 0 special clock gating:<br /><br />
<math>\mathrm{CCM\_LCD0\_CH0\_CLK\_SRC}</math><br />
|}<br />
<br />
=== CCM_LCD0_CH1_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x012c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_LCD0_CH1_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| LCD 0 CH 1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:10</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD0_CH1_CLK_SRC0</tt><br />
| <tt>11</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = CCM_LCD0_CH1_CLK_SRC1<br />
1 = CCM_LCD0_CH1_CLK_SRC1 / 2<br />
</tt><br />
| Clock source 0 for LCD 0 CH 1<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>12:14</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD0_CH1_GATE0</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| LCD 0 channel 1 special clock 0 gating<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>16:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD0_CH1_CLK_SRC1</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3 (x1)<br />
0x01 = PLL7 (x1)<br />
0x02 = PLL3 (x2)<br />
0x03 = PLL7 (x2)<br />
</tt><br />
| Clock source 1 for LCD 0 CH 1<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD0_CH1_GATE1</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| LCD 0 channel 1 special clock 1 gating:<br /><br />
<math>\frac{\mathrm{CCM\_LCD0\_CH1\_CLK\_SRC1}}{M}</math><br />
|}<br />
<br />
=== CCM_LCD1_CH0_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x011c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD1_CH0_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3 (x1)<br />
0x01 = PLL7 (x1)<br />
0x02 = PLL3 (x2)<br />
0x03 = PLL7 (x2)<br />
</tt><br />
| Clock source for LCD 1 CH 0<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD1_CH0_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| LCD 1 CH 0 reset<br />
|-<br />
| <tt>CCM_LCD1_CH0_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| LCD 1 channel 0 special clock gating:<br /><br />
<math>\mathrm{CCM\_LCD1\_CH0\_CLK\_SRC}</math><br />
|}<br />
<br />
<br />
=== CCM_LCD1_CH1_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0130<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_LCD1_CH1_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| LCD 1 CH 1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:10</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD1_CH1_CLK_SRC0</tt><br />
| <tt>11</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = CCM_LCD1_CH1_CLK_SRC1<br />
1 = CCM_LCD1_CH1_CLK_SRC1 / 2<br />
</tt><br />
| Clock source 0 for LCD 1 CH 1<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>12:14</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD1_CH1_GATE0</tt><br />
| <tt>15</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| LCD 1 channel 1 special clock 0 gating<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>16:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD1_CH1_CLK_SRC1</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3 (x1)<br />
0x01 = PLL7 (x1)<br />
0x02 = PLL3 (x2)<br />
0x03 = PLL7 (x2)<br />
</tt><br />
| Clock source 1 for LCD1 CH 1<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LCD1_CH1_GATE1</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| LCD 1 channel 1 special clock 1 gating:<br /><br />
<math>\frac{\mathrm{CCM\_LCD1\_CH1\_CLK\_SRC1}}{M}</math><br />
|}<br />
<br />
<br />
=== CCM_CSI-ISP_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0120<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_CSI-ISP_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| CSI-ISP factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_CSI-ISP_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3<br />
0x01 = PLL4<br />
0x02 = PLL5<br />
0x03 = PLL6<br />
</tt><br />
| Clock source for CSI-ISP<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_CSI-ISP_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| CSI-ISP clock gate pass- or masking:<br /><br />
<math>\frac{\mathrm{CCM\_CSI-ISP\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
=== CCM_TVD_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0128<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_TVD_CLK_SRC</tt><br />
| <tt>24</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = PLL3<br />
1 = PLL7<br />
</tt><br />
| Clock source for TVD<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>25:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_TVD_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| TVD clock gate pass- or masking:<br /><br />
<math>\frac{\mathrm{CCM\_TVD\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
=== CCM_CSI0_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0134<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_CSI0_M</tt><br />
| <tt>0:4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt><br />
| CSI 0 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>5:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_CSI0_CLK_SRC</tt><br />
| <tt>24:26</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL3 (x1)<br />
0x02 = PLL7 (x1)<br />
0x03 = no operation<br />
0x04 = no operation<br />
0x05 = PLL3 (x2)<br />
0x06 = PLL7 (x2)<br />
0x07 = no operation<br />
</tt><br />
| Clock source for CSI 0<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>27:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_CSI0_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| CSI 0 reset<br />
|-<br />
| <tt>CCM_CSI0_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| CSI special clock gating:<br /><br />
<math>\frac{\mathrm{CCM\_CSI0\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
=== CCM_CSI1_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0138<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_CSI1_M</tt><br />
| <tt>0:4</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x1f = 32<br />
</tt><br />
| CSI 1 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>5:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_CSI1_CLK_SRC</tt><br />
| <tt>24:26</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL3 (x1)<br />
0x02 = PLL7 (x1)<br />
0x03 = no operation<br />
0x04 = no operation<br />
0x05 = PLL3 (x2)<br />
0x06 = PLL7 (x2)<br />
0x07 = no operation<br />
</tt><br />
| Clock source for CSI 1<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>27:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_CSI1_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| CSI 1 reset<br />
|-<br />
| <tt>CCM_CSI1_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| CSI special clock gating:<br /><br />
<math>\frac{\mathrm{CCM\_CSI1\_CLK\_SRC1}}{M}</math><br />
|}<br />
<br />
=== CCM_VE_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x013c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_VE_RESET</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| VE reset<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>1:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_VE_N</tt><br />
| <tt>16:18</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x7 = 8<br />
</tt><br />
| CSI 0 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>19:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_VE_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| CSI special clock gating:<br /><br />
<math>\frac{\mathrm{PLL4}}{M}</math><br />
|}<br />
<br />
<br />
=== CCM_ADDA_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0140<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_ADDA_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AD/DA (audiocodec) special clock gating:<br /><br />
<math>\mathrm{PLL2}</math><br />
|}<br />
<br />
=== CCM_AVS_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0144<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_AVS_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| AVS special clock gating:<br /><br />
<math>\mathrm{OSC24M}</math><br />
|}<br />
<br />
<br />
=== CCM_ACE_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0148<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_ACE_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| ACE factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_ACE_RESET</tt><br />
| <tt>16</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| ACE 1 reset<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>17:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_ACE_CLK_SRC</tt><br />
| <tt>24</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = PLL4<br />
1 = PLL5<br />
</tt><br />
| Clock source for CSI 1<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>25:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_ACE_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| CSI special clock gating (Max clock = 200 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_ACE\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
<br />
=== CCM_LVDS_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x014c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>0:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_LVDS_RESET</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| LVDS reset<br />
|}<br />
<br />
<br />
=== CCM_HDMI_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0150<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_HDMI_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| HDMI factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_HDMI_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3 (x1)<br />
0x01 = PLL7 (x1)<br />
0x02 = PLL3 (x2)<br />
0x03 = PLL7 (x2)<br />
</tt><br />
| Clock source for HDMI<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_HDMI_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| HDMI special clock gating:<br /><br />
<math>\frac{\mathrm{CCM\_HDMI\_CLK\_SRC1}}{M}</math><br />
|}<br />
<br />
<br />
=== CCM_MALI400_CLK ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0154<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_MALI400_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| MALI 400 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:23</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MALI400_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = PLL3<br />
0x01 = PLL4<br />
0x02 = PLL5<br />
0x03 = PLL7<br />
</tt><br />
| Clock source for MALI400<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:29</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MALI400_RESET</tt><br />
| <tt>30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = reset<br />
1 = no reset<br />
</tt><br />
| MALI 400 reset<br />
|-<br />
| <tt>CCM_MALI400_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| MALI 400 special clock gating (Max clock = 381 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_MALI400\_CLK\_SRC}}{M}</math><br />
|}<br />
<br />
=== CCM_MBUS_CTRL ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x015c<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_MBUS_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| MBUS factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MBUS_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| MBUS factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
| <br />
|-<br />
| <tt>CCM_MBUS_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6 (*2 for A20)<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for MBUS controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
| <br />
|-<br />
| <tt>CCM_MBUS_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| MBUS special clock gating (Max clock = 300 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_MBUS\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
=== CCM_MBUS_CH2_CTRL ===<br />
Default value: 0x00000000<br /><br />
Offset: 0x0160<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>CCM_MBUS_M</tt><br />
| <tt>0:3</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| MBUS Channel 2 factor M<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>4:15</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>CCM_MBUS_N</tt><br />
| <tt>16:17</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = 1<br />
0x01 = 2<br />
...<br />
0x0f = 16<br />
</tt><br />
| MBUS Channel 2 factor N<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>18:23</tt><br />
|<br />
|<br />
|<br />
| <br />
|-<br />
| <tt>CCM_MBUS_CLK_SRC</tt><br />
| <tt>24:25</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0x00 = OSC24M<br />
0x01 = PLL6<br />
0x02 = PLL5<br />
0x03 = no operation<br />
</tt><br />
| Clock source for MBUS Channel 2 controller<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>26:30</tt><br />
|<br />
|<br />
|<br />
| <br />
|-<br />
| <tt>CCM_MBUS_GATE</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x00</tt><br />
| <tt><br />
0 = mask<br />
1 = pass<br />
</tt><br />
| MBUS Channel 2 special clock gating (Max clock = 300 MHz):<br /><br />
<math>\frac{\mathrm{CCM\_MBUS\_CLK\_SRC}}{M \times N}</math><br />
|}<br />
<br />
== Initial values ==<br />
=== default map ===<br />
md 0x01c20000 0x56<br />
<pre><br />
01c20000: a1005000 0a101010 08100010 00000000 .P..............<br />
01c20010: 0010d063 00000000 21081000 00000000 c..........!....<br />
01c20020: b1059491 14888020 21009911 00000000 .... ......!....<br />
01c20030: 0010d063 00000000 00000000 00000000 c...............<br />
01c20040: 00000000 00000000 00000000 00000000 ................<br />
01c20050: 00138013 00020010 00000000 00000000 ................<br />
01c20060: 00004140 00000000 00000020 00010001 @A...... .......<br />
01c20070: 00000000 00000000 00000000 00000000 ................<br />
01c20080: 00000000 00000000 82000004 00000000 ................<br />
01c20090: 00000000 00000000 00000000 00000000 ................<br />
01c200a0: 00000000 00000000 00000000 00000000 ................<br />
01c200b0: 00000000 00000000 00000000 00030000 ................<br />
01c200c0: 00010000 0000001f 00000000 00000000 ................<br />
01c200d0: 00000000 00000000 00000000 00000000 ................<br />
01c200e0: 00000000 00000000 00000000 00000000 ................<br />
01c200f0: 00000000 00000000 00000000 00000000 ................<br />
01c20100: 00008000 00000000 00000000 00000000 ................<br />
01c20110: 00000000 00000000 00000000 00000000 ................<br />
01c20120: 00000000 00000000 00000000 00000000 ................<br />
01c20130: 00000000 00000000 00000000 00000000 ................<br />
01c20140: 00000000 00000000 00000000 00000000 ................<br />
01c20150: 00000000 00000000 ........<br />
</pre><br />
<br />
=== All to 1 (except main clock) ===<br />
<pre><br />
</pre><br />
<br />
=== All to 0 (except main clock) ===<br />
<pre><br />
</pre><br />
<br />
== Code References ==<br />
https://github.com/hno/uboot-allwinner/blob/lichee/lichee-dev-mmc/arch/arm/include/asm/arch-sunxi/clock.h<br />
https://github.com/amery/linux-allwinner/blob/allwinner-v3.0-android-v2/arch/arm/mach-sun4i/include/mach/ccmu_regs.h<br />
<br />
[[Category:A10 Register guide]]<br />
[[Category:A13 Register guide]]<br />
<br />
[[Category:A20 Register guide]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19646
AXP209
2017-03-02T08:36:20Z
<p>Oliver: /* REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings */ add notes on the error in the datasheet</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 5fH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 voltage rate control<br />
1: enable; 0: disable<br /><br />
Note, [http://linux-sunxi.org/File:Initial_ramp_up.png the 'instant' rate is approx. 0.0167 V/uS].<br />
* The datasheet is incorrect here.<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 voltage rate control<br />
1: enable; 0: disable<br />
* The datasheet is incorrect here.<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 5 ====<br />
::IRQ enable 5 (0x44) default value: 0x00<br />
::IRQ status 5 (0x4c) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19637
AXP209
2017-03-01T16:03:12Z
<p>Oliver: /* REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings */ fix enable/disable</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 5fH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 voltage rate control<br />
1: enable; 0: disable<br /><br />
Note, [http://linux-sunxi.org/File:Initial_ramp_up.png the 'instant' rate is approx. 0.0167 V/uS].<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 voltage rate control<br />
1: enable; 0: disable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 5 ====<br />
::IRQ enable 5 (0x44) default value: 0x00<br />
::IRQ status 5 (0x4c) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19621
AXP209
2017-02-28T14:27:18Z
<p>Oliver: /* REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings */ typo</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 5fH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 voltage rate control<br />
0: enable; 1: disable<br />
Note, [http://linux-sunxi.org/File:Initial_ramp_up.png the 'instant' rate is approx. 0.0167 V/uS].<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 voltage rate control<br />
0: enable; 1: disable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 5 ====<br />
::IRQ enable 5 (0x44) default value: 0x00<br />
::IRQ status 5 (0x4c) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19620
AXP209
2017-02-28T14:25:28Z
<p>Oliver: /* REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings */ describe default ramp up</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 5fH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 voltage rate control<br />
0: enable; 1: disable<br />
Note, [http://linux-sunxi.org/File:Initial_ramp_up.png the 'instant' rate is approx. 0.0167 V/uS (16 V per second)].<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 voltage rate control<br />
0: enable; 1: disable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 5 ====<br />
::IRQ enable 5 (0x44) default value: 0x00<br />
::IRQ status 5 (0x4c) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=File:Initial_ramp_up.png&diff=19619
File:Initial ramp up.png
2017-02-28T14:23:01Z
<p>Oliver: Initial ramp up of LDO3 without any rate control</p>
<hr />
<div>Initial ramp up of LDO3 without any rate control</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19618
AXP209
2017-02-28T14:02:54Z
<p>Oliver: /* REG 12H: Power output control */</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 5fH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 voltage rate control<br />
0: enable; 1: disable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 voltage rate control<br />
0: enable; 1: disable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 5 ====<br />
::IRQ enable 5 (0x44) default value: 0x00<br />
::IRQ status 5 (0x4c) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19615
AXP209
2017-02-28T09:42:19Z
<p>Oliver: fix vrc</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 57H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 voltage rate control<br />
0: enable; 1: disable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 voltage rate control<br />
0: enable; 1: disable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 slew rate<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 5 ====<br />
::IRQ enable 5 (0x44) default value: 0x00<br />
::IRQ status 5 (0x4c) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19564
AXP209
2017-02-24T12:58:48Z
<p>Oliver: /* REG 44H and 4CH: Interrupt bank 4 */ fix copy paste errors</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 57H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 5 ====<br />
::IRQ enable 5 (0x44) default value: 0x00<br />
::IRQ status 5 (0x4c) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19563
AXP209
2017-02-24T12:55:24Z
<p>Oliver: /* REG 40H and 48H: Interrupt bank 2; Battery */ correct address</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 57H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 4 ====<br />
::IRQ enable 2 (0x41) default value: 0x00<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19555
AXP209
2017-02-24T12:15:13Z
<p>Oliver: /* REG 12H: Power output control */ set cold boot values, not reboot values.</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 57H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 40H and 48H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 4 ====<br />
::IRQ enable 2 (0x41) default value: 0x00<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19554
AXP209
2017-02-24T12:13:51Z
<p>Oliver: /* REG 23H: DC-DC2 output voltage setting */</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 17H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reserved<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 40H and 48H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 4 ====<br />
::IRQ enable 2 (0x41) default value: 0x00<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19553
AXP209
2017-02-24T12:13:22Z
<p>Oliver: /* REG 12H: Power output control */ set default values</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: 17H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 40H and 48H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 4 ====<br />
::IRQ enable 2 (0x41) default value: 0x00<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19552
AXP209
2017-02-24T12:09:35Z
<p>Oliver: set default value for 0x23</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
||RW<br />
X<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
||RW<br />
||X<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||X<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||X<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||X<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||X<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||0x16 (1.25 V)<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 40H and 48H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 4 ====<br />
::IRQ enable 2 (0x41) default value: 0x00<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=SRAM_Controller_Register_Guide&diff=19546
SRAM Controller Register Guide
2017-02-24T10:20:07Z
<p>Oliver: add ema reg</p>
<hr />
<div>__NOTOC__<br />
= SRAM Controller =<br />
== Overview ==<br />
Static Random Access Memory [http://en.wikipedia.org/wiki/Static_random-access_memory SRAM] is used by devices, such as the CPU, for extra fast memory or as cache.<br />
<br />
On the the SRAM is split up into segments, A, B, C, D, NAND and CPU, A - is generally usable ram 48kB <br />
CPU caches not mapped to address space and can't be used by any other purpose C,D sections can be mapped over SRAM config<br />
but it required for internal hardware caches for VE, NAND, ISP<br />
<br />
== SRAM Sections ==<br />
{| class="wikitable" |<br />
! Section<br />
! Subsection<br />
! Address<br />
! Size<br />
! Description<br />
! Usable<br />
! A10<br />
! A13<br />
! A20<br />
! A31<br />
! A23<br />
|-<br />
| '''A''' <br />
| A1<br />
| <tt>0x00000000 - 0x00003fff</tt><br />
| 16 kiB / 32kiB on A31<br />
|<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
|-<br />
|<br />
| A2<br />
| <tt>0x00004000 - 0x00007fff</tt><br />
| 16 kiB<br />
|<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| N<br />
| N <br />
|-<br />
|<br />
| A3<br />
| <tt>0x00008000 - 0x0000b3ff</tt><br />
| 13 kiB<br />
| EMAC<br />
| Y<br />
| Y<br />
| Y<br />
| Y<ref>For A20 SRAM_A3_A4_MAP set up for emac by default, so you should change it for make it usable</ref><br />
| N<br />
| N<br />
|-<br />
|<br />
| A4<br />
| <tt>0x0000b400 - 0x0000bfff</tt><br />
| 3 kiB<br />
| EMAC<br />
| Y<br />
| Y<br />
| ?<br />
| Y<ref>For A20 SRAM_A3_A4_MAP set up for emac by default, so you should change it for make it usable</ref><br />
| N<br />
| N<br />
|-<br />
|<br />
| A2<br />
| <tt>0x00044000 - 0x00053fff</tt><br />
| 64 kiB<br />
| Shared with AR100 OpenRISC core<br />
| N<br />
| N<br />
| N<br />
| N<br />
| Y<br />
| Y<br />
|-<br />
|<br />
| VE SRAM<br />
| <tt>0x00004000 - 0x0000ffff</tt><br />
| 64 kiB<br />
| <br />
| N<br />
| N<br />
| N<br />
| N<br />
| ?<br />
| Y<br />
|-<br />
| '''B'''<br />
| B <br />
| <tt>0x00020000 - 0x0002ffff</tt><br />
| 64 kiB<br />
| Secure RAM<br />
| Y<br />
| Y<br />
| N <br />
| Y<br />
| Y<br />
| N<br />
|-<br />
| '''C'''<br />
| C1<br />
| <tt>0x01d00000 - 0x01d7ffff</tt><br />
| 512 kiB {first 62 kiB work on A10, rest is partly read only, wraps around after 0x01d40000}<br />
| CedarV<br />
| Y<ref>VE must be enabled (AHB gate and VE SCLK)</ref><br />
| Y<br />
| Y<br />
| Y<br />
| N<br />
| N<br />
|-<br />
|<br />
| C2<br />
| <tt>0x01d80000 - 0x01d9ffff</tt><br />
| 128 kiB {first 6912 B work on A10, rest is partly forced zero}<br />
| CedarA<br />
| Y<ref>ACE must be enabled (AHB gate and ACE SCLK)</ref><br />
| Y<br />
| ?<br />
| Y<br />
| N<br />
| N<br />
|-<br />
|<br />
| C3<br />
| <tt>0x01dc0000 - 0x01dcffff</tt><br />
| 64 kiB {unconfirmed}<br />
| ISP/BIST<br />
| N<ref>Changing bit SRAM_C3_MAP doesn't allow writing to SRAM_C3( as like others there should be need enable ISP/BIST gate and clock but uncheked)</ref><br />
| Y<br />
| Y<br />
| Y<br />
| N<br />
| N<br />
|-<br />
| '''D'''<br />
| D<br />
| <tt>0x00010000 - 0x00010fff</tt><br />
| 4 kiB {unconfirmed}<br />
| USB FIFOs<br />
| Y<ref>Register SRAM_CTL1_CFG needs SRAM_D_MAP set to 0 to allow access</ref><br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| N<br />
|-<br />
| '''NAND'''<br />
| NAND<br />
| <tt>0x01c03400 - 0x01c03c00</tt> {unconfirmed}<br />
| 2 kiB<br />
| NAND flash controller<br />
| Y<br />
| Y<br />
| Y<br />
| ? <br />
|-<br />
| '''CPU'''<br />
| CPU I-cache<br />
| Not mapped<br />
| 32 kiB<br />
| <br />
| N<br />
| Y<br />
| Y<br />
| Y <br />
| Y<br />
| Y<br />
|-<br />
|<br />
| CPU D-Cache<br />
| Not mapped<br />
| 32 kiB<br />
| <br />
| N<br />
| Y<br />
| Y<br />
| Y <br />
| Y<br />
| Y<br />
|-<br />
|<br />
| CPU L2 Cache<br />
| Not mapped<br />
| 256/128 kiB <br />
|<br />
| N<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
|}<br />
<br />
<references /><br />
It should be noted, that all accessability tests where done using the u-boot console. It is possible that some secret combination (like emac) needs to be set to actually allow writing.<br />
<br />
== SRAM Registers ==<br />
SRAM Base address: 0x01c00000<br />
<br />
{| class="wikitable" |<br />
! Register Name<br />
! Offset<br />
! Size<br />
! Description<br />
! A31<br />
! A20<br />
|-<br />
| <tt>SRAM_CTL0_CFG</tt><br />
| <tt>0x0000</tt><br />
| <tt>DWORD</tt><br />
| SRAM Control register 0<br />
| Y<br />
| Y<br />
|-<br />
| <tt>SRAM_CTL1_CFG</tt><br />
| <tt>0x0004</tt><br />
| <tt>DWORD</tt><br />
| SRAM Control register 1<br />
| Y<br />
| Y<br />
|-<br />
| <tt>SRAM_TIMING_CTRL</tt><br />
| <tt>0x0008</tt><br />
| <tt>DWORD</tt><br />
| {unconfirmed} 000000ff on a20 set possible<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_BIST_CTRL</tt><br />
| <tt>0x0014</tt><br />
| <tt>DWORD</tt><br />
| {looks present but don't know how it works}<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_BIST_??</tt><br />
| <tt>0x0018</tt><br />
| <tt>DWORD</tt><br />
| {looks present but don't know how it works}<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_BIST_START_ADDR</tt><br />
| <tt>0x001c</tt><br />
| <tt>DWORD</tt><br />
| {looks present but don't know how it works}<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_BIST_END_ADDR</tt><br />
| <tt>0x0020</tt><br />
| <tt>DWORD</tt><br />
| {looks present but don't know how it works}<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_VER_REG</tt><br />
| <tt>0x0024</tt><br />
| <tt>DWORD</tt><br />
| Version Register<br />
| Y<br />
| Y<br />
|-<br />
| <tt>SRAM_NMI_CTRL</tt><br />
| <tt>0x0030</tt><br />
| <tt>DWORD</tt><br />
| see A20 manual {others unconfirmed}<br />
| N<br />
| Y<br />
|-<br />
| <tt>SRAM_NMI_PEND</tt><br />
| <tt>0x0034</tt><br />
| <tt>DWORD</tt><br />
| see A20 manual {others unconfirmed}<br />
| N<br />
| Y<br />
|-<br />
| <tt>SRAM_NMI_EN</tt><br />
| <tt>0x0038</tt><br />
| <tt>DWORD</tt><br />
| see A20 manual<br />
| N<br />
| Y<br />
|-<br />
| <tt>SRAM_EMA</tt><br />
| <tt>0x0044</tt><br />
| <tt>DWORD</tt><br />
| Undocumented magic in boot0.<br />
| N<br />
| Y<br />
|-<br />
| <tt> SRAM_GPU_DXT_BC_EN</tt><br />
| <tt>0x0050</tt><br />
| <tt>DWORD</tt><br />
| GPU DXT BC Enable (A31 only)<br />
| Y<br />
| N<br />
|-<br />
| <tt> SRAM_GPU_SW_GATE</tt><br />
| <tt>0x0054</tt><br />
| <tt>DWORD</tt><br />
| GPU SW Gathing (A31 only)<br />
| Y<br />
| N<br />
|-<br />
| <tt> SRAM_GPU_POWER_STATUS</tt><br />
| <tt>0x0060</tt><br />
| <tt>DWORD</tt><br />
| GPU Power Status(A31 only)<br />
| Y<br />
| N<br />
|-<br />
<br />
|}<br />
<br />
=== SRAM_CTL0_CFG ===<br />
Default value: 0x7fffffff<br /><br />
Offset: 0x0000<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>SRAM_C1_MAP</tt><br />
| <tt>0:30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x7fffffff</tt><br />
| <tt><br />
0 = CPU/DMA<br />
1 = VE<br />
</tt><br />
| Each bit represents a page to be mapped to the CPU/DMA unit or to the VE. Each bit (combination) may represent a byte/page of sram C1<br />
|-<br />
| <br />
| <tt>31</tt><br />
|<br />
|<br />
|<tt>reserved</tt><br />
|}<br />
<br />
=== SRAM_CTL1_CFG ===<br />
Default value A10: 0x1300<br /><br />
Default value A20: 0x1314<br />
Default value A13: 0x1000<br /><br />
<br />
Offset: 0x0004<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Binary)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>SRAM_D_MAP</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b0</tt><br />
| <tt><br />
0 = CPU/DMA<br />
1 = USB0<br />
</tt><br />
| Map SRAM D to either the CPU/DMA unit or to USB0<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>1</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>SRAM_</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b0</tt><br />
| <tt><br />
0 = ?<br />
1 = ?<br />
</tt><br />
| [https://github.com/amery/linux-allwinner/blob/import/lichee-3.3/a20-dev/drivers/net/ethernet/sun7i/sun7i_wemac.c#L478 EMAC] at the least changes this.A20 have this set by default<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>3</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>SRAM_A3_A4_MAP</tt><br />
| <tt>4:5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b00</tt><br />
| <tt><br />
00 = CPU/DMA<br />
01 = EMAC<br />
10 = no operation<br />
11 = no operation<br />
</tt><br />
| Map SRAM A3 and A4 to either the CPU/DMA unit or to EMAC<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>6:7</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>SRAM_C2_MAP</tt><br />
| <tt>8:9</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b11</tt><br />
| <tt><br />
00 = CPU/BIST<br />
01 = AE<br />
10 = CE<br />
11 = ACE<br />
</tt><br />
| Map SRAM C2 to either the CPU/BIST unit or to the AE or to the CE or to the ACE<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>10:11</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>SRAM_C3_MAP</tt><br />
| <tt>12</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b1</tt><br />
| <tt><br />
0 = CPU/BIST<br />
1 = ISP<br />
</tt><br />
| Map SRAM C3 to either the CPU/BIST unit or to ISP<br />
|-<br />
| <tt>reserved?</tt><br />
| <tt>13:22</tt><br />
|<tt>Read/Write</tt><br />
| <tt>0</tt><br />
|<br />
|<br />
|-<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>22:30</tt><br />
| <tt>Read Only</tt><br />
| <tt>0b0</tt><br />
| Reserved<br />
|<br />
|-<br />
| <tt>SRAM_BIST_DMA_CTL</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b0</tt><br />
| <tt><br />
0 = DMA<br />
1 = BIST<br />
</tt><br />
| Normal DMA or BIST control (build in self test)<br />
|}<br />
<br />
=== SRAM_VER_REG ===<br />
Default value: 0x0000100 <br /><br />
Offset: 0x0024 <br /><br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default<br />
! Values<br />
! Description<br />
|-<br />
| VER_CHIP_ID<br />
| 31:16<br />
| Readonly<br />
| 0x0000<br />
| <tt><br />
if VER_R_EN is set:<br />
0x1623 = A10<br />
0x1625 = A13/A10s/R8<br />
0x1633 = A31/A31s<br />
0x1639 = A80<br />
0x1650 = A23<br />
0x1651 = A20<br />
0x1667 = A33<br />
0x1680 = H3<br />
0x1689 = A64/H64<br />
0x1701 = R40<br />
0x1718 = H5<br />
otherwise<br />
0<br />
</tt><br />
| Chip ID. Requires VER_R_EN to be set.<br />
|-<br />
| VER_R_EN<br />
| 15<br />
| Read/Write<br />
| 0<br />
| <tt><br />
0 = Disabled<br />
1 = Enabled<br />
</tt><br />
| Enable VER_CHIP_ID reading in upper bits<br />
|-<br />
| BOOT_SEL_PAD_STA<br />
| 6:8<br />
| Read<br />
| -<br />
| For A10<br />
<pre><br />
0b000 = U-BOOT button pressed<br />
0b001 = U-BOOT button released<br />
</pre><br />
For A31<br />
<pre><br />
0b000 = All buttons pressed<br />
0b100 = U-BOOT button released<br />
0b111 = Boot from NAND<br />
0b110 = Boot from SD2<br />
0b101 = Boot from eMMC2<br />
0b100 = Boot from SPI-NOR<br />
0b111 = All buttons released<br />
</pre><br />
| Current status of BootSelect pin(s), should be sampled by APB clock, no hardware debounce<br />
<ref>https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L2402</ref><br />
|-<br />
| VER_BITS<br />
| 7:0<br />
| Read<br />
| 0b001<br />
|<br />
| Mask revision level of SoC<br />
|-<br />
|}<br />
<references /><br />
<br />
=== SRAM_BIST_CTRL ===<br />
Default value: 0x0000100 <br /><br />
Offset: 0x0024 <br /><br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default<br />
! Values<br />
! Description<br />
|-<br />
| SRAM_BIST_EN<br />
| 0<br />
| Read/Write<br />
| 0<br />
| <tt><br />
<br />
</tt><br />
| looks like enable bit<br />
|-<br />
| SRAM_BIST_START<br />
| 1<br />
| Read/Write<br />
| 0<br />
| <tt><br />
<br />
</tt><br />
| looks like start, toggle it to 0 than to 1 when enable bit set will change RO register part<br />
|-<br />
| SRAM_BIST_TOGGLE_?<br />
| 7<br />
| Read/Write<br />
| 0<br />
| <tt><br />
<br />
</tt><br />
| enable crc like value on RO part<br />
|}<br />
<br />
=== SRAM_EMA ===<br />
Default value: 0x00<br /><br />
Offset: 0x0044<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>SRAM_EMA_EN</tt><br />
| <tt>0:31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x0000</tt><br />
| <tt><br />
<br />
</tt><br />
| Some caching related DRAM setup; boot0 sources describe this as "config ema for cache sram". It is initialized to 0x1800 very early in u-boot.<br />
|-<br />
| <br />
| <tt>31</tt><br />
|<br />
|<br />
|<tt>reserved</tt><br />
|}<br />
<br />
== Initial values ==<br />
In the 0x01c00000 - 0x01c00fff region, designated as SRAM Register, only a small section here is documented. It can be found using the u-boot console, some other default values.<br />
0x01c00016 = 0x0200<br />
0x01c00026 = 0x0100<br />
0x01c00030 - 0x01c000f0 appears to be 0. 0x01c000100 - 0x1c00fff appears to 'wrap around' and display the same section again, so higher address lines seem to be unmapped.<br />
<br />
=== Default map ===<br />
==== A20 ====<br />
<pre><br />
01c00000: 7fffffff 00001314 00000000 00000000 ................<br />
01c00010: 00000000 00000200 00000000 00000000 ................<br />
01c00020: 00000000 00000100 00000000 00000000 ................<br />
01c00030: 00000000 00000001 00000000 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: 00000000 00000000 00000000 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
</pre><br />
All to 1<br />
<pre><br />
01c00000: ffffffff 80ff13ff 000000ff 00000000 ................<br />
01c00010: 00000000 000001ff ffffffff ffffffff ................<br />
01c00020: ffffffff 16518100 00000000 00000000 ......Q.........<br />
01c00030: 00000003 00000000 00000001 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: ffffffff 00ffffff 0000ffff 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
<br />
</pre><br />
<br />
==== A10 ====<br />
<pre><br />
md 0x01c00000 0x40<br />
01c00000: 7fffffff 00001300 00000000 00000000 ................<br />
01c00010: 00000000 00000200 00000000 00000000 ................<br />
01c00020: 00000000 00000100 00000000 00000000 ................<br />
01c00030: 00000000 00000000 00000000 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: 00000000 00000000 00000000 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
</pre><br />
<br />
==== A31 ====<br />
<pre><br />
01c00000: 7fffffff 00001300 00000000 00000000 ................<br />
01c00010: 00000000 00000200 00000000 00000000 ................<br />
01c00020: 00000000 16338700 00000000 00000000 ......3.........<br />
01c00030: 00000000 00000000 00000000 00000000 ................<br />
01c00040: 22222222 22223a22 00000000 00000000 """"":""........<br />
01c00050: 00000000 00000001 00000001 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000200 00000000 00000000 00000000 ................<br />
</pre><br />
<br />
=== All to 1 ===<br />
mw 0x01c00000 0xffffffff 0x40<br /><br />
md 0x01c00000 0x40<br />
<pre><br />
01c00000: ffffffff 800f13ff ffffffff 00000000 ................<br />
01c00010: 00000000 000002ff ffffffff ffffffff ................<br />
01c00020: ffffffff 16238100 000f0007 00000000 ......#.........<br />
01c00030: 00000000 00000000 00000000 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: ffffffff 00ffffff 0000ffff 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
</pre><br />
<br />
=== All to 0 ===<br />
mw 0x01c00000 0x00 0x40<br /><br />
md 0x01c00000 0x40<br />
<pre><br />
01c00000: 00000000 00000000 00000000 00000000 ................<br />
01c00010: 00000000 00000200 00000000 00000000 ................<br />
01c00020: 00000000 00000100 00000000 00000000 ................<br />
01c00030: 00000000 00000000 00000000 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: 00000000 00000000 00000000 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
</pre><br />
[[Category:A10 Register guide]]<br />
[[Category:A13 Register guide]]<br />
[[Category:A20 Register guide]]</div>
Oliver
https://linux-sunxi.org/index.php?title=SRAM_Controller_Register_Guide&diff=19545
SRAM Controller Register Guide
2017-02-24T10:16:36Z
<p>Oliver: add 0x44 to sramc</p>
<hr />
<div>__NOTOC__<br />
= SRAM Controller =<br />
== Overview ==<br />
Static Random Access Memory [http://en.wikipedia.org/wiki/Static_random-access_memory SRAM] is used by devices, such as the CPU, for extra fast memory or as cache.<br />
<br />
On the the SRAM is split up into segments, A, B, C, D, NAND and CPU, A - is generally usable ram 48kB <br />
CPU caches not mapped to address space and can't be used by any other purpose C,D sections can be mapped over SRAM config<br />
but it required for internal hardware caches for VE, NAND, ISP<br />
<br />
== SRAM Sections ==<br />
{| class="wikitable" |<br />
! Section<br />
! Subsection<br />
! Address<br />
! Size<br />
! Description<br />
! Usable<br />
! A10<br />
! A13<br />
! A20<br />
! A31<br />
! A23<br />
|-<br />
| '''A''' <br />
| A1<br />
| <tt>0x00000000 - 0x00003fff</tt><br />
| 16 kiB / 32kiB on A31<br />
|<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
|-<br />
|<br />
| A2<br />
| <tt>0x00004000 - 0x00007fff</tt><br />
| 16 kiB<br />
|<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| N<br />
| N <br />
|-<br />
|<br />
| A3<br />
| <tt>0x00008000 - 0x0000b3ff</tt><br />
| 13 kiB<br />
| EMAC<br />
| Y<br />
| Y<br />
| Y<br />
| Y<ref>For A20 SRAM_A3_A4_MAP set up for emac by default, so you should change it for make it usable</ref><br />
| N<br />
| N<br />
|-<br />
|<br />
| A4<br />
| <tt>0x0000b400 - 0x0000bfff</tt><br />
| 3 kiB<br />
| EMAC<br />
| Y<br />
| Y<br />
| ?<br />
| Y<ref>For A20 SRAM_A3_A4_MAP set up for emac by default, so you should change it for make it usable</ref><br />
| N<br />
| N<br />
|-<br />
|<br />
| A2<br />
| <tt>0x00044000 - 0x00053fff</tt><br />
| 64 kiB<br />
| Shared with AR100 OpenRISC core<br />
| N<br />
| N<br />
| N<br />
| N<br />
| Y<br />
| Y<br />
|-<br />
|<br />
| VE SRAM<br />
| <tt>0x00004000 - 0x0000ffff</tt><br />
| 64 kiB<br />
| <br />
| N<br />
| N<br />
| N<br />
| N<br />
| ?<br />
| Y<br />
|-<br />
| '''B'''<br />
| B <br />
| <tt>0x00020000 - 0x0002ffff</tt><br />
| 64 kiB<br />
| Secure RAM<br />
| Y<br />
| Y<br />
| N <br />
| Y<br />
| Y<br />
| N<br />
|-<br />
| '''C'''<br />
| C1<br />
| <tt>0x01d00000 - 0x01d7ffff</tt><br />
| 512 kiB {first 62 kiB work on A10, rest is partly read only, wraps around after 0x01d40000}<br />
| CedarV<br />
| Y<ref>VE must be enabled (AHB gate and VE SCLK)</ref><br />
| Y<br />
| Y<br />
| Y<br />
| N<br />
| N<br />
|-<br />
|<br />
| C2<br />
| <tt>0x01d80000 - 0x01d9ffff</tt><br />
| 128 kiB {first 6912 B work on A10, rest is partly forced zero}<br />
| CedarA<br />
| Y<ref>ACE must be enabled (AHB gate and ACE SCLK)</ref><br />
| Y<br />
| ?<br />
| Y<br />
| N<br />
| N<br />
|-<br />
|<br />
| C3<br />
| <tt>0x01dc0000 - 0x01dcffff</tt><br />
| 64 kiB {unconfirmed}<br />
| ISP/BIST<br />
| N<ref>Changing bit SRAM_C3_MAP doesn't allow writing to SRAM_C3( as like others there should be need enable ISP/BIST gate and clock but uncheked)</ref><br />
| Y<br />
| Y<br />
| Y<br />
| N<br />
| N<br />
|-<br />
| '''D'''<br />
| D<br />
| <tt>0x00010000 - 0x00010fff</tt><br />
| 4 kiB {unconfirmed}<br />
| USB FIFOs<br />
| Y<ref>Register SRAM_CTL1_CFG needs SRAM_D_MAP set to 0 to allow access</ref><br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| N<br />
|-<br />
| '''NAND'''<br />
| NAND<br />
| <tt>0x01c03400 - 0x01c03c00</tt> {unconfirmed}<br />
| 2 kiB<br />
| NAND flash controller<br />
| Y<br />
| Y<br />
| Y<br />
| ? <br />
|-<br />
| '''CPU'''<br />
| CPU I-cache<br />
| Not mapped<br />
| 32 kiB<br />
| <br />
| N<br />
| Y<br />
| Y<br />
| Y <br />
| Y<br />
| Y<br />
|-<br />
|<br />
| CPU D-Cache<br />
| Not mapped<br />
| 32 kiB<br />
| <br />
| N<br />
| Y<br />
| Y<br />
| Y <br />
| Y<br />
| Y<br />
|-<br />
|<br />
| CPU L2 Cache<br />
| Not mapped<br />
| 256/128 kiB <br />
|<br />
| N<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
| Y<br />
|}<br />
<br />
<references /><br />
It should be noted, that all accessability tests where done using the u-boot console. It is possible that some secret combination (like emac) needs to be set to actually allow writing.<br />
<br />
== SRAM Registers ==<br />
SRAM Base address: 0x01c00000<br />
<br />
{| class="wikitable" |<br />
! Register Name<br />
! Offset<br />
! Size<br />
! Description<br />
! A31<br />
! A20<br />
|-<br />
| <tt>SRAM_CTL0_CFG</tt><br />
| <tt>0x0000</tt><br />
| <tt>DWORD</tt><br />
| SRAM Control register 0<br />
| Y<br />
| Y<br />
|-<br />
| <tt>SRAM_CTL1_CFG</tt><br />
| <tt>0x0004</tt><br />
| <tt>DWORD</tt><br />
| SRAM Control register 1<br />
| Y<br />
| Y<br />
|-<br />
| <tt>SRAM_TIMING_CTRL</tt><br />
| <tt>0x0008</tt><br />
| <tt>DWORD</tt><br />
| {unconfirmed} 000000ff on a20 set possible<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_BIST_CTRL</tt><br />
| <tt>0x0014</tt><br />
| <tt>DWORD</tt><br />
| {looks present but don't know how it works}<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_BIST_??</tt><br />
| <tt>0x0018</tt><br />
| <tt>DWORD</tt><br />
| {looks present but don't know how it works}<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_BIST_START_ADDR</tt><br />
| <tt>0x001c</tt><br />
| <tt>DWORD</tt><br />
| {looks present but don't know how it works}<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_BIST_END_ADDR</tt><br />
| <tt>0x0020</tt><br />
| <tt>DWORD</tt><br />
| {looks present but don't know how it works}<br />
| ?<br />
| Y<br />
|-<br />
| <tt>SRAM_VER_REG</tt><br />
| <tt>0x0024</tt><br />
| <tt>DWORD</tt><br />
| Version Register<br />
| Y<br />
| Y<br />
|-<br />
| <tt>SRAM_NMI_CTRL</tt><br />
| <tt>0x0030</tt><br />
| <tt>DWORD</tt><br />
| see A20 manual {others unconfirmed}<br />
| N<br />
| Y<br />
|-<br />
| <tt>SRAM_NMI_PEND</tt><br />
| <tt>0x0034</tt><br />
| <tt>DWORD</tt><br />
| see A20 manual {others unconfirmed}<br />
| N<br />
| Y<br />
|-<br />
| <tt>SRAM_NMI_EN</tt><br />
| <tt>0x0038</tt><br />
| <tt>DWORD</tt><br />
| see A20 manual<br />
| N<br />
| Y<br />
|-<br />
| <tt>SRAM_EMA</tt><br />
| <tt>0x0044</tt><br />
| <tt>DWORD</tt><br />
| Undocumented magic in boot0. In the boot0 sources this is described as "config ema for cache sram".<br />
| N<br />
| Y<br />
|-<br />
| <tt> SRAM_GPU_DXT_BC_EN</tt><br />
| <tt>0x0050</tt><br />
| <tt>DWORD</tt><br />
| GPU DXT BC Enable (A31 only)<br />
| Y<br />
| N<br />
|-<br />
| <tt> SRAM_GPU_SW_GATE</tt><br />
| <tt>0x0054</tt><br />
| <tt>DWORD</tt><br />
| GPU SW Gathing (A31 only)<br />
| Y<br />
| N<br />
|-<br />
| <tt> SRAM_GPU_POWER_STATUS</tt><br />
| <tt>0x0060</tt><br />
| <tt>DWORD</tt><br />
| GPU Power Status(A31 only)<br />
| Y<br />
| N<br />
|-<br />
<br />
|}<br />
<br />
=== SRAM_CTL0_CFG ===<br />
Default value: 0x7fffffff<br /><br />
Offset: 0x0000<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Hex)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>SRAM_C1_MAP</tt><br />
| <tt>0:30</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0x7fffffff</tt><br />
| <tt><br />
0 = CPU/DMA<br />
1 = VE<br />
</tt><br />
| Each bit represents a page to be mapped to the CPU/DMA unit or to the VE. Each bit (combination) may represent a byte/page of sram C1<br />
|-<br />
| <br />
| <tt>31</tt><br />
|<br />
|<br />
|<tt>reserved</tt><br />
|}<br />
<br />
=== SRAM_CTL1_CFG ===<br />
Default value A10: 0x1300<br /><br />
Default value A20: 0x1314<br />
Default value A13: 0x1000<br /><br />
<br />
Offset: 0x0004<br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default (Binary)<br />
! Values<br />
! Description<br />
|-<br />
| <tt>SRAM_D_MAP</tt><br />
| <tt>0</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b0</tt><br />
| <tt><br />
0 = CPU/DMA<br />
1 = USB0<br />
</tt><br />
| Map SRAM D to either the CPU/DMA unit or to USB0<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>1</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>SRAM_</tt><br />
| <tt>2</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b0</tt><br />
| <tt><br />
0 = ?<br />
1 = ?<br />
</tt><br />
| [https://github.com/amery/linux-allwinner/blob/import/lichee-3.3/a20-dev/drivers/net/ethernet/sun7i/sun7i_wemac.c#L478 EMAC] at the least changes this.A20 have this set by default<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>3</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>SRAM_A3_A4_MAP</tt><br />
| <tt>4:5</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b00</tt><br />
| <tt><br />
00 = CPU/DMA<br />
01 = EMAC<br />
10 = no operation<br />
11 = no operation<br />
</tt><br />
| Map SRAM A3 and A4 to either the CPU/DMA unit or to EMAC<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>6:7</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>SRAM_C2_MAP</tt><br />
| <tt>8:9</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b11</tt><br />
| <tt><br />
00 = CPU/BIST<br />
01 = AE<br />
10 = CE<br />
11 = ACE<br />
</tt><br />
| Map SRAM C2 to either the CPU/BIST unit or to the AE or to the CE or to the ACE<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>10:11</tt><br />
|<br />
|<br />
|<br />
|<br />
|-<br />
| <tt>SRAM_C3_MAP</tt><br />
| <tt>12</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b1</tt><br />
| <tt><br />
0 = CPU/BIST<br />
1 = ISP<br />
</tt><br />
| Map SRAM C3 to either the CPU/BIST unit or to ISP<br />
|-<br />
| <tt>reserved?</tt><br />
| <tt>13:22</tt><br />
|<tt>Read/Write</tt><br />
| <tt>0</tt><br />
|<br />
|<br />
|-<br />
|-<br />
| <tt>reserved</tt><br />
| <tt>22:30</tt><br />
| <tt>Read Only</tt><br />
| <tt>0b0</tt><br />
| Reserved<br />
|<br />
|-<br />
| <tt>SRAM_BIST_DMA_CTL</tt><br />
| <tt>31</tt><br />
| <tt>Read/Write</tt><br />
| <tt>0b0</tt><br />
| <tt><br />
0 = DMA<br />
1 = BIST<br />
</tt><br />
| Normal DMA or BIST control (build in self test)<br />
|}<br />
<br />
=== SRAM_VER_REG ===<br />
Default value: 0x0000100 <br /><br />
Offset: 0x0024 <br /><br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default<br />
! Values<br />
! Description<br />
|-<br />
| VER_CHIP_ID<br />
| 31:16<br />
| Readonly<br />
| 0x0000<br />
| <tt><br />
if VER_R_EN is set:<br />
0x1623 = A10<br />
0x1625 = A13/A10s/R8<br />
0x1633 = A31/A31s<br />
0x1639 = A80<br />
0x1650 = A23<br />
0x1651 = A20<br />
0x1667 = A33<br />
0x1680 = H3<br />
0x1689 = A64/H64<br />
0x1701 = R40<br />
0x1718 = H5<br />
otherwise<br />
0<br />
</tt><br />
| Chip ID. Requires VER_R_EN to be set.<br />
|-<br />
| VER_R_EN<br />
| 15<br />
| Read/Write<br />
| 0<br />
| <tt><br />
0 = Disabled<br />
1 = Enabled<br />
</tt><br />
| Enable VER_CHIP_ID reading in upper bits<br />
|-<br />
| BOOT_SEL_PAD_STA<br />
| 6:8<br />
| Read<br />
| -<br />
| For A10<br />
<pre><br />
0b000 = U-BOOT button pressed<br />
0b001 = U-BOOT button released<br />
</pre><br />
For A31<br />
<pre><br />
0b000 = All buttons pressed<br />
0b100 = U-BOOT button released<br />
0b111 = Boot from NAND<br />
0b110 = Boot from SD2<br />
0b101 = Boot from eMMC2<br />
0b100 = Boot from SPI-NOR<br />
0b111 = All buttons released<br />
</pre><br />
| Current status of BootSelect pin(s), should be sampled by APB clock, no hardware debounce<br />
<ref>https://github.com/hno/Allwinner-Info/blob/master/BROM/ffff4000.s#L2402</ref><br />
|-<br />
| VER_BITS<br />
| 7:0<br />
| Read<br />
| 0b001<br />
|<br />
| Mask revision level of SoC<br />
|-<br />
|}<br />
<references /><br />
<br />
=== SRAM_BIST_CTRL ===<br />
Default value: 0x0000100 <br /><br />
Offset: 0x0024 <br /><br />
{| class="wikitable" |<br />
! Name<br />
! Bit<br />
! Read/Write<br />
! Default<br />
! Values<br />
! Description<br />
|-<br />
| SRAM_BIST_EN<br />
| 0<br />
| Read/Write<br />
| 0<br />
| <tt><br />
<br />
</tt><br />
| looks like enable bit<br />
|-<br />
| SRAM_BIST_START<br />
| 1<br />
| Read/Write<br />
| 0<br />
| <tt><br />
<br />
</tt><br />
| looks like start, toggle it to 0 than to 1 when enable bit set will change RO register part<br />
|-<br />
| SRAM_BIST_TOGGLE_?<br />
| 7<br />
| Read/Write<br />
| 0<br />
| <tt><br />
<br />
</tt><br />
| enable crc like value on RO part<br />
|}<br />
<br />
== Initial values ==<br />
In the 0x01c00000 - 0x01c00fff region, designated as SRAM Register, only a small section here is documented. It can be found using the u-boot console, some other default values.<br />
0x01c00016 = 0x0200<br />
0x01c00026 = 0x0100<br />
0x01c00030 - 0x01c000f0 appears to be 0. 0x01c000100 - 0x1c00fff appears to 'wrap around' and display the same section again, so higher address lines seem to be unmapped.<br />
<br />
=== Default map ===<br />
==== A20 ====<br />
<pre><br />
01c00000: 7fffffff 00001314 00000000 00000000 ................<br />
01c00010: 00000000 00000200 00000000 00000000 ................<br />
01c00020: 00000000 00000100 00000000 00000000 ................<br />
01c00030: 00000000 00000001 00000000 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: 00000000 00000000 00000000 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
</pre><br />
All to 1<br />
<pre><br />
01c00000: ffffffff 80ff13ff 000000ff 00000000 ................<br />
01c00010: 00000000 000001ff ffffffff ffffffff ................<br />
01c00020: ffffffff 16518100 00000000 00000000 ......Q.........<br />
01c00030: 00000003 00000000 00000001 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: ffffffff 00ffffff 0000ffff 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
<br />
</pre><br />
<br />
==== A10 ====<br />
<pre><br />
md 0x01c00000 0x40<br />
01c00000: 7fffffff 00001300 00000000 00000000 ................<br />
01c00010: 00000000 00000200 00000000 00000000 ................<br />
01c00020: 00000000 00000100 00000000 00000000 ................<br />
01c00030: 00000000 00000000 00000000 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: 00000000 00000000 00000000 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
</pre><br />
<br />
==== A31 ====<br />
<pre><br />
01c00000: 7fffffff 00001300 00000000 00000000 ................<br />
01c00010: 00000000 00000200 00000000 00000000 ................<br />
01c00020: 00000000 16338700 00000000 00000000 ......3.........<br />
01c00030: 00000000 00000000 00000000 00000000 ................<br />
01c00040: 22222222 22223a22 00000000 00000000 """"":""........<br />
01c00050: 00000000 00000001 00000001 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000200 00000000 00000000 00000000 ................<br />
</pre><br />
<br />
=== All to 1 ===<br />
mw 0x01c00000 0xffffffff 0x40<br /><br />
md 0x01c00000 0x40<br />
<pre><br />
01c00000: ffffffff 800f13ff ffffffff 00000000 ................<br />
01c00010: 00000000 000002ff ffffffff ffffffff ................<br />
01c00020: ffffffff 16238100 000f0007 00000000 ......#.........<br />
01c00030: 00000000 00000000 00000000 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: ffffffff 00ffffff 0000ffff 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
</pre><br />
<br />
=== All to 0 ===<br />
mw 0x01c00000 0x00 0x40<br /><br />
md 0x01c00000 0x40<br />
<pre><br />
01c00000: 00000000 00000000 00000000 00000000 ................<br />
01c00010: 00000000 00000200 00000000 00000000 ................<br />
01c00020: 00000000 00000100 00000000 00000000 ................<br />
01c00030: 00000000 00000000 00000000 00000000 ................<br />
01c00040: 00000000 00000000 00000000 00000000 ................<br />
01c00050: 00000000 00000000 00000000 00000000 ................<br />
01c00060: 00000000 00000000 00000000 00000000 ................<br />
01c00070: 00000000 00000000 00000000 00000000 ................<br />
01c00080: 00000000 00000000 00000000 00000000 ................<br />
01c00090: 00000000 00000000 00000000 00000000 ................<br />
01c000a0: 00000000 00000000 00000000 00000000 ................<br />
01c000b0: 00000000 00000000 00000000 00000000 ................<br />
01c000c0: 00000000 00000000 00000000 00000000 ................<br />
01c000d0: 00000000 00000000 00000000 00000000 ................<br />
01c000e0: 00000000 00000000 00000000 00000000 ................<br />
01c000f0: 00000000 00000000 00000000 00000000 ................<br />
</pre><br />
[[Category:A10 Register guide]]<br />
[[Category:A13 Register guide]]<br />
[[Category:A20 Register guide]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19544
AXP209
2017-02-24T10:00:28Z
<p>Oliver: /* REG 44H and 4CH: Interrupt bank 4 */</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
||RW<br />
X<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
||RW<br />
||X<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||X<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||X<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||X<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||X<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 40H and 48H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 4 ====<br />
::IRQ enable 2 (0x41) default value: 0x00<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19543
AXP209
2017-02-24T10:00:06Z
<p>Oliver: /* REG 40H and 48H: Interrupt bank 1; Input power */</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
||RW<br />
X<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
||RW<br />
||X<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||X<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||X<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||X<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||X<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||VBUS available, but less than V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 40H and 48H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 4 ====<br />
::IRQ enable 2 (0x41) default value: 0x00<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19542
AXP209
2017-02-24T09:59:23Z
<p>Oliver: /* Interrupts */</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
||RW<br />
X<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
||RW<br />
||X<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||X<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||X<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||X<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||X<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== REG 40H and 48H: Interrupt bank 1; Input power ====<br />
::IRQ enable 1 (0x40) default value: 0xd8<br />
::IRQ status 1 (0x48) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AC IN Over-voltage<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||AC IN connected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||AC In disconnected<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS over-voltage<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||VBUS connected<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||VBUS disconnected<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||VBUS available, but less thant V<sub>HOLD</sub><br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 40H and 48H: Interrupt bank 2; Battery ====<br />
::IRQ enable 2 (0x41) default value: 0xff<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery connected<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery disconnected<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Battery charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||Battery is no longer charging in [[AXP209#Battery_activation_mode|activation]] mode<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||Battery charging<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||Battery charging has finished<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery temperature too high<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||Battery temperature too low<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 42H and 4AH: Interrupt bank 3 ====<br />
::IRQ enable 2 (0x42) default value: 0x03<br />
::IRQ status 2 (0x4a) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature sensor temperature too high<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Charging current is less than the set current<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||PEK short key press<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys press<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 43H and 4BH: Interrupt bank 4 ====<br />
::IRQ enable 4 (0x43) default value: 0x01<br />
::IRQ status 4 (0x4b) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Started via N_OE<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Shutdown via N_OE<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS power is valid<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS power is invalid<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS session A / B<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS session end<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low voltage (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low voltage (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4CH: Interrupt bank 4 ====<br />
::IRQ enable 2 (0x41) default value: 0x00<br />
::IRQ status 2 (0x49) default value: 0x00<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK button on the falling edge<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reserved<br />
||R<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The GPIO1 input edge-triggered or ADC input<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19537
AXP209
2017-02-24T09:13:27Z
<p>Oliver: Add battery activation mode</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Battery activation mode ==<br />
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.<br />
AXP209 will exit activate mode and release IRQ11 only if the battery voltage has reached V RCH.<br />
AXP209 will indicate whether the charger is in battery activate mode or not in register REG01H.<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
||RW<br />
X<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
||RW<br />
||X<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||X<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||X<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||X<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||X<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
==== REG 40H and 48H: IRQ enable IRQ state ====<br />
The IRQ enable 1, REG40H: The default value: D8H<br />
IRQ state REG48H: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits of each bit corresponding to 40H;<br />
For example: Bit7 is ACIN overvoltage IRQ status bits<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H of the: IRQ Enable IRQ state 2 ====<br />
::IRQ energy 2 REG41H: default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||IRQ enable battery access<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||IRQ enable battery removed<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||The battery activation patterns IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||The exit cell activation patterns IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||The is charging IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The charging completed IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery over-temperature IRQ enabled<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||IRQ Enable battery low temperature<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The ACIN overvoltage IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||The ACIN access IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||ACIN out of IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS overvoltage IRQ enabled<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||And VBUS access IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The VBUS removed IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||VBUS available but less than V<sub>HOLD</sub><br />
IRQ is enabled<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::The IRQ state REG49H: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 41H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 42H 4AH: IRQ enable IRQ state ====<br />
::IRQ can 3 REG42H: default value: 03H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 Internal overtemperature IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||The charging current is less than the set current IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value IRQ enable<br />
|-<br />
|1<br />
||The PEK short key IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::The IRQ state REG4AH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 42H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 43H 4BH: IRQ Enable 4 and IRQ state ====<br />
::IRQ Enable 4, REG43H: default value: 01H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||N_OE boot IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||IRQ enable N_OE shutdown<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS valid IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS invalid IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS Session A / B IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session End IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low pressure IRQ Enable (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low pressure IRQ Enable (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::The IRQ state REG4BH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 43H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4C: IRQ enable IRQ state 5 ====<br />
::IRQ can 5 REG44H default value: 00H;<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK buttons enable falling edge of IRQ<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The GPIO1 input edge-triggered or ADC input IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::The the IRQ state of 5 REG4CH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 44H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::Note: All IRQ status register corresponding bit write clears state.<br />
<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19531
AXP209
2017-02-23T16:25:04Z
<p>Oliver: /* REG 34H: Charge control */</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
||RW<br />
X<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
||RW<br />
||X<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||X<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||X<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||X<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||X<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Precharge timeout setting<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
==== REG 40H and 48H: IRQ enable IRQ state ====<br />
The IRQ enable 1, REG40H: The default value: D8H<br />
IRQ state REG48H: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits of each bit corresponding to 40H;<br />
For example: Bit7 is ACIN overvoltage IRQ status bits<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H of the: IRQ Enable IRQ state 2 ====<br />
::IRQ energy 2 REG41H: default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||IRQ enable battery access<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||IRQ enable battery removed<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||The battery activation patterns IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||The exit cell activation patterns IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||The is charging IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The charging completed IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery over-temperature IRQ enabled<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||IRQ Enable battery low temperature<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The ACIN overvoltage IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||The ACIN access IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||ACIN out of IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS overvoltage IRQ enabled<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||And VBUS access IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The VBUS removed IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||VBUS available but less than V<sub>HOLD</sub><br />
IRQ is enabled<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::The IRQ state REG49H: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 41H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 42H 4AH: IRQ enable IRQ state ====<br />
::IRQ can 3 REG42H: default value: 03H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 Internal overtemperature IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||The charging current is less than the set current IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value IRQ enable<br />
|-<br />
|1<br />
||The PEK short key IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::The IRQ state REG4AH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 42H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 43H 4BH: IRQ Enable 4 and IRQ state ====<br />
::IRQ Enable 4, REG43H: default value: 01H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||N_OE boot IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||IRQ enable N_OE shutdown<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS valid IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS invalid IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS Session A / B IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session End IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low pressure IRQ Enable (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low pressure IRQ Enable (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::The IRQ state REG4BH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 43H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4C: IRQ enable IRQ state 5 ====<br />
::IRQ can 5 REG44H default value: 00H;<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK buttons enable falling edge of IRQ<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The GPIO1 input edge-triggered or ADC input IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::The the IRQ state of 5 REG4CH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 44H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::Note: All IRQ status register corresponding bit write clears state.<br />
<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19521
AXP209
2017-02-22T13:07:29Z
<p>Oliver: fix typo</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
||RW<br />
X<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
||RW<br />
||X<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||X<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||X<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||X<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||X<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Precharge timeout settings Bit1<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Precharge timeout setting Bit0<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
==== REG 40H and 48H: IRQ enable IRQ state ====<br />
The IRQ enable 1, REG40H: The default value: D8H<br />
IRQ state REG48H: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits of each bit corresponding to 40H;<br />
For example: Bit7 is ACIN overvoltage IRQ status bits<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H of the: IRQ Enable IRQ state 2 ====<br />
::IRQ energy 2 REG41H: default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||IRQ enable battery access<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||IRQ enable battery removed<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||The battery activation patterns IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||The exit cell activation patterns IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||The is charging IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The charging completed IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery over-temperature IRQ enabled<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||IRQ Enable battery low temperature<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The ACIN overvoltage IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||The ACIN access IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||ACIN out of IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS overvoltage IRQ enabled<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||And VBUS access IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The VBUS removed IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||VBUS available but less than V<sub>HOLD</sub><br />
IRQ is enabled<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::The IRQ state REG49H: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 41H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 42H 4AH: IRQ enable IRQ state ====<br />
::IRQ can 3 REG42H: default value: 03H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 Internal overtemperature IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||The charging current is less than the set current IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value IRQ enable<br />
|-<br />
|1<br />
||The PEK short key IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::The IRQ state REG4AH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 42H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 43H 4BH: IRQ Enable 4 and IRQ state ====<br />
::IRQ Enable 4, REG43H: default value: 01H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||N_OE boot IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||IRQ enable N_OE shutdown<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS valid IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS invalid IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS Session A / B IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session End IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low pressure IRQ Enable (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low pressure IRQ Enable (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::The IRQ state REG4BH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 43H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4C: IRQ enable IRQ state 5 ====<br />
::IRQ can 5 REG44H default value: 00H;<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK buttons enable falling edge of IRQ<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The GPIO1 input edge-triggered or ADC input IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::The the IRQ state of 5 REG4CH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 44H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::Note: All IRQ status register corresponding bit write clears state.<br />
<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=AXP209&diff=19520
AXP209
2017-02-22T13:06:56Z
<p>Oliver: /* REG 03H */</p>
<hr />
<div>The '''AXP209''' is the PMU (Power Management Unit) used by [[A10]], [[A13]] and [[A20]] [[SoC]]s and developed by [http://www.x-powers.com X-Powers], a sister company of [[Allwinner]].<br />
<br />
== Tips and tricks ==<br />
<br />
* shorting pin25 to gnd will reset the power/board<br />
* 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)<br />
* you should press at least 6 seconds (defaults). and if you build your own uboot check that you don't write bad values to [[AXP209#REG_36H:_PEK_key_parameter_settings | reg 36]]<br />
<br />
== GPIO ==<br />
<br />
The '''AXP209''' has 4 [[GPIO]]s which can be addressed from [[Fex Guide|fex]] files as <tt>port:powerN</tt> (<tt>N</tt> in [0..3]).<br />
<br />
== Spec Sheets ==<br />
[[File:AXP209 Datasheet v1.0 cn.pdf|Original Spec Sheet - AXP209 Datasheet v1.0 cn.pdf]]<br /><br />
<br />
[[File:AXP209_Datasheet_v1.0en.pdf|English Translated Spec Sheet with correct text formatting - AXP209 v1.0]]<br /><br />
<br />
[[File:AXP202_Datasheet_v1.0_en.pdf|Original English Datasheet Sheet - AXP202 Datasheet v1.0 en]]<br /><br />
<br />
The correct address for AXP209 on A20 is 0x34<br />
<br />
== Overview ==<br />
<br />
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. <br />
<br />
AXP209 integrates <br />
* an adaptive USB-Compatible PWM charger<br />
* 2-way step-down converter (Buck DC-DC converter)<br />
* 5-channel linear regulator device (LDO) voltage / current / temperature multi-channel 12-Bit ADC<br />
* 4 configurable GPIO. Sustaining Card power system security the stable<br />
* AXP209 integrated over / under voltage (OVP / UVP), over temperature (OTP), overcurrent protection (OCP) circuit.<br />
<br />
=== Package ===<br />
AXP209 6mm x 6mm 48-pin QFN package.<br />
<br />
[[File:AXP209-pins.png|AXP209 Pins|center]]<br />
<br />
== Features ==<br />
* Automatic gapless power source change ('''IPS''' - Intelligent Power Select)<br />
** Voltage range: 2.9 V - 6.3V (AMR:-0.3V-11V)<br />
** Configurable high efficient IPS system<br />
** Adjustable USB or AC-adapter current limit (4.4V/900mA/500mA/100mA)<br />
** Battery Power Path resistance less than 75mΩ<br />
* Fully integrated PWM Charger<br />
** Maximum charging current of up to 1.8A<br />
** Full support USB charging <br />
** Battary voltage range: 4.1V/4.15V/4.2V/4.36V<br />
** Battery temperature monitoring<br />
** Automatic charging process control<br />
** Support charger LED <br />
** Automatically adjust charge current according to system load<br />
* Backup battery<br />
** Support backup battery (can be used for RTC module)<br />
** Support for backup battery, charging current can be set<br />
* 2 synchronous buck DC-DC converters<br />
** DC-DC2: can be adjusted between 0.7-2.275V 25mV/step, drive capability 1.6A support VRC<br />
** DC-DC3: can be adjusted between 0.7-3.5V, 25mV/step, drive capacity 1.2A<br />
* 5 low drop-out linear regulators<br />
** LDO1: Always-on 30mA<br />
** LDO2: Low noise with voltage from 1.8V to 3.3V adjustable 100mV/step, drive capability 200mA<br />
** LDO3: 0.7-3 .5 V adjustable, 25mV/step, Drive capacity 200mA<br />
** LDO4: low noise LDO, 1.8V-3.3V adjustable 100mV/step, drive capability of 200mA<br />
** LDO5: low-noise LDO, 1.8-3.3V adjustable 100mV/step, drive capability 50mA<br />
* Timer (Timer)<br />
** 7bit Timer, Timing Range 1127 minutes<br />
** Timer outputs interrupts<br />
* Signal acquisition system <br />
** Built-in 12 Bit ADC, 12-way for current and voltage control with two additional external signal input<br />
** Built-in Fuelgauge system <br />
** 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<br />
** Two-level low-power warning and protection<br />
** Internal temperature sensor<br />
* Application Processor Interface (Host Interface)<br />
** TWSI (I2C) interface for data exchange<br />
** IRQs and Sleep Managment<br />
** Built-in GPIO <br />
** Built-in configurable timer<br />
** Provide 12 registers for data storage during system power-off<br />
* System Management<br />
** Soft reset and hard reset support<br />
** Soft and hard power shutdown support<br />
** Support for external wake source<br />
** Support the output voltage monitoring, self-diagnostic function<br />
** Output PWROK, indicating system reset or shutdown instructions<br />
** External power detection (insert / remove / drive capacity)<br />
** Supports soft power-on for input & output<br />
** Over/Under-voltage protection (OVP / UVP)<br />
** Overcurrent protection (OCP)<br />
** Overtemperature protection (OTP)<br />
** Support OTG VBUS power state setting / monitoring<br />
* Highly integrated<br />
** Internal precision reference voltage (0.5%)<br />
** Built-in MOSFET<br />
** timing and the output voltage can be customized<br />
* Decryption module<br />
** 128bit OTP password storage<br />
** dynamic real-time decryption algorithm<br />
<br />
== Pin Description ==<br />
{| class="wikitable"<br />
|-<br />
! Num !! Name !! Type !! Condition !! Function Description<br />
|-<br />
| 1 || SDA || IO || || Data pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 2 || SCK || I || || Clock pin for serial interface, normally connect a 2.2K resistor to 3.3V I/O power<br />
|-<br />
| 3 || GPIO3 || IO || REG9EH[7] || GPIO 3<br />
|-<br />
| 4 || N_OE || I || || Power output on/off switch<br />
<br />
GND: on<br />
<br />
IPSOUT: off<br />
|-<br />
| 5 || GPIO2 || IO || REG92H[2:0] ||GPIO 2<br />
|-<br />
| 6 || N_VBUSEN || I || || VBUS to IPSOUT Selection<br />
<br />
GND:IPSOUT select VBUS<br />
<br />
High:IPSOUT do not select VBUS<br />
|-<br />
| 7 || VIN2 || PI || || DCDC2 input source<br />
|-<br />
| 8 || LX2 || IO || || Inductor Pin for DCDC2<br />
|-<br />
| 9 || PGND2 || G || || NMOS Ground for DCDC2<br />
|-<br />
| 10 || DCDC2 || I || || DC-DC2 feedback pin<br />
|-<br />
| 11 || LDO4 || O || || Output Pin of LDO4<br />
|-<br />
| 12 || LDO2 || O || || Output Pin of LDO2<br />
|-<br />
| 13 || LDO24IN || PI || || Input to LDO2 and LDO4<br />
|-<br />
| 14 || VIN3 || PI || || DCDC3 input source<br />
|-<br />
| 15 || LX3 || IO || || Inductor Pin for DCDC3<br />
|-<br />
| 16 || PGND3 || G || || NMOS GND for DCDC3<br />
|-<br />
| 17 || DCDC3 || I || || Feed back to DCDC3<br />
|-<br />
| 18 || GPIO1 || IO || REG93H[2:0] || GPIO 1<br />
<br />
ADC Input<br />
|-<br />
| 19 || GPIO0 || IO || REG90H[2:0] || GPIO 0<br />
<br />
Low noise LDO/Switch<br />
<br />
ADC Input<br />
|-<br />
| 20 || EXTEN || O || || External Power Enable<br />
|-<br />
| 21 || APS || PI || || Internal Power Input<br />
|-<br />
| 22 || AGND || G || || Analog Ground<br />
|-<br />
| 23 || BIAS || IO || || External 200Kohm 1% resistor<br />
|-<br />
| 24 || VREF || O || || Internal reference voltage<br />
|-<br />
| 25 || PWROK || O || || Power Good Indication Output<br />
|-<br />
| 26 || VINT || PO || || Internal logic power, 2.5V<br />
|-<br />
| 27 || LDO1SET || I || || It set the LDO1 default voltage.<br />
|-<br />
| 28 || LDO1 || O || || LDO1 output,for Host RTC block<br />
|-<br />
| 29 || DC3SET || I || || It set the DCDC3 default voltage<br />
|-<br />
| 30 || BACKUP || IO || || Backup battery pin<br />
|-<br />
| 31 || VBUS || PI || || USB VBUS input<br />
|-<br />
| 32, 33 || ACIN || PI || || Adapter input<br />
|-<br />
| 34, 35 || IPSOUT || IO || || Main Battery<br />
|-<br />
| 36 || CHGLED || O || || charger status indication<br />
|-<br />
| 37 || TS || I || || Battery Temperature sensor input or an external ADC input<br />
|-<br />
| 38, 39 || BAT || PO || || System power source<br />
|-<br />
| 40 || LDO3IN || O || || LDO3 input source<br />
|-<br />
| 41 || LDO3 || I || || Output Pin of LDO3<br />
|-<br />
| 42 || BATSENSE || I || || Current sense port1<br />
|-<br />
| 43 || CHSENSE || O || || Current sense port2<br />
|-<br />
| 44 || VIN1 || PI || || DCDC1 input source<br />
|-<br />
| 45 || LX1 || IO || || Inductor Pin for DCDC1<br />
|-<br />
| 46 || PGND1 || G || || NMOS Ground for DCDC1<br />
|-<br />
| 47 || PWRON || I || ||Power On-Off key input,Internal 100k pull high to APS<br />
|-<br />
| 48 || IRQ/WAKEUP || IO || || IRQ output or wakeup<br />
|-<br />
| 49 || EP || G || || Exposed Pad, need to connect to system ground<br />
|}<br />
<br />
== Registers Description ==<br />
<br />
=== REG 00H: Power input status===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7 <br />
|| Indicates ACIN presence <br />
0: ACIN does not exist; 1: ACIN present <br />
|| R<br />
|-<br />
| 6 || Instructions the ACIN whether available || R<br />
|-<br />
| 5 || VBUS is present indication<br />
0: VBUS does not exist; 1: VBUS exist<br />
|| R<br />
|-<br />
| 4 || Indicate the VBUS whether available || R <br />
|-<br />
| 3 || The directions VBUS access before use is greater than V<sub>HOLD</sub> || R<br />
|-<br />
| 2 || Indicates that the battery current direction<br />
0: battery discharge; 1: The battery is charged <br />
||R<br />
|-<br />
| 1 || Indicate whether ACIN and VBUS input is shorted on the PCB || R<br />
|-<br />
| 0 || The instructions start ACIN source is or VBUS 0: Start source non-ACIN / VBUS is;: Start source ACIN / VBUS || R<br />
|-<br />
|}<br />
<br />
=== REG 01H: Power operating mode and charge status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
| 7<br />
||Indicating AXP209 whether over-temperature<br />
0: not too warm; 1: overtemperature<br />
||R<br />
|-<br />
| 6<br />
||Charging indicator<br />
0: not charging or charging has been completed; 1: Charging<br />
||R<br />
|-<br />
| 5<br />
||The battery state of existence indicates<br />
0: no battery connected to AXP209; 1: the battery has been connected to the AXP209<br />
||R<br />
|-<br />
| 4<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
| 3<br />
||Indicates whether the battery into the active mode<br />
0: not to enter the the battery activation patterns; 1: has entered the battery activation mode<br />
||R<br />
|-<br />
| 2<br />
||Indicate the charging current is less than the desired current<br />
0: The actual charge current is equal to the desired current;<br />
1: the actual charge current is less than the desired current<br />
||R<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
||R<br />
|-<br />
|}<br />
<br />
=== REG 02H: USB OTG VBUS status indication ===<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||Indicate the VBUS whether effective, effective<br />
||R<br />
|-<br />
|1<br />
||The directions VBUS Session A / B is effective, and 1 indicates that a valid<br />
||R<br />
|-<br />
|0<br />
||Indicative Session End state 1 indicates<br />
||R<br />
|}<br />
<br />
=== REG 03H: AXP 209 Chip Version<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W<br />
|-<br />
|7-4<br />
||Unknown, likely unused.<br />
|-<br />
|3-0<br />
||Indicate the AXP Chip version number; Currently, U-Boot only knows of version 0x1.<br />
||R<br />
|}<br />
<br />
=== REG 04-0FH: Data cache ===<br />
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.<br />
<br />
=== REG 12H: Power output control ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
||RW<br />
X<br />
|-<br />
|6<br />
||LDO3 switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
||RW<br />
||X<br />
|-<br />
|4<br />
||DC-DC2 switch control<br />
||RW<br />
||X<br />
|-<br />
|3<br />
||LDO4 switch control<br />
||RW<br />
||X<br />
|-<br />
|2<br />
||LDO2 switch control<br />
||RW<br />
||X<br />
|-<br />
|1<br />
||DC-DC3 switch control<br />
||RW<br />
||X<br />
|-<br />
|0<br />
||The EXTEN switch control<br />
0: off; 1: open<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 23H: DC-DC2 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-0<br />
||DC-DC2 output voltage setting<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit5-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 25H: DC-DC2/LDO3 dynamic voltage scaling parameter settings ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||LDO3 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||DC-DC2 VRC enable control<br />
0: open; 1: Close<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||LDO3 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||DC-DC2 VRC control the slope of the voltage rise<br />
0: 25mV/15.625us = 1.6mV/us<br />
1: 25mV/31.250us = 0.8mV/us<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 27H: DC-DC3 output voltage setting ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Reservations, can not be changed<br />
|-<br />
|6-0<br />
||DC-DC3 output voltage setting<br />
0.7-3.5V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 28H: LDO2 / 4 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO2 output voltage settings<br />
1.8-3.3V, 100mV/step<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
||RW<br />
||X<br />
|-<br />
|3-0<br />
||LDO4 output voltage settings<br />
1.25 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.5 2.7<br />
2.8 3.0 3.1 3.2 3.3<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 29H: LDO3 output voltage settings ===<br />
:: Default value: XXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||LDO3 mode select:<br />
0: LDO mode, the voltage is set by the [6:0]<br />
1: switch-mode voltage is decided by LDO3IN<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||LDO3 output voltage setting Bit6-Bit0<br />
0.7-2.275V, 25mV/step<br />
Vout = [0.7 + (Bit6-0) * 0.025] V<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 30H: VBUS-IPSOUT channel management ===<br />
:: Default value: 6XH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||VBUS available when the VBUS-IPSOUT pathway selection control signal<br />
0: N_VBUSEN pin, to decide whether to open this path<br />
1: VBUS-IPSOUT path select Open, regardless N_VBUSEN state<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||VBUS V<br />
HOLD<br />
Pressure limiting control<br />
0: not limited pressure; 1: limited pressure<br />
||RW<br />
||1<br />
|-<br />
|5-3<br />
||V<br />
HOLD<br />
Set up<br />
V<br />
HOLD<br />
= [4.0 + (Bit5-3) * 0.1] V<br />
||RW<br />
||100<br />
|-<br />
|2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||VBUS current limit control open time limit stream selection<br />
00:900 mA; 01:500 mA; 10:100 mA; 11: not limit<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 31H: V<sub>OFF</sub> - Shutdown voltage setting ===<br />
:: Default value: X3H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
||<br />
||<br />
|-<br />
|3<br />
||Sleep mode the PEK or GPIO edge the wakeup enable set:<br />
0: off<br />
1: Open<br />
After writing this bit automatically cleared each into Sleep mode again write 1<br />
||<br />
|-<br />
|2-0<br />
||V<sub>OFF</sub> Set up V<sub>OFF</sub>= [2.6 + (Bit2-0) * 0.1] V Default: 2.9V<br />
||RW<br />
||011<br />
|-<br />
|}<br />
<br />
=== REG 32H: Shutdown settings, battery detection and CHGLED pins control ===<br />
:: Default value: 46H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Shutdown control<br />
This bit write output closes AXP209<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Battery monitoring function set bit: 0: off; 1: Open<br />
||RW<br />
||1<br />
|-<br />
|5-4<br />
||CHGLED pin functions set<br />
00: Hi-Z<br />
01: 25% 1Hz blinking<br />
10: 25% 4Hz blinking<br />
11: output low<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||CHGLED pin control set<br />
0: control by charging function<br />
1: REG 32H [5:4] control by the register<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||Output Close timing control<br />
0: Close<br />
1: Contrary to start timing<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Shutdown delay N_OE AXP209 from low to high<br />
Delay time<br />
00: 128mS; 01: 1S;<br />
10: 2S;<br />
11: 3S<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 33H: Charge control ===<br />
:: Default value: CXH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Charging functions enable control bit<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-5<br />
||Charging the target voltage set<br />
00:4.1 V; 01:4.15 V; 10:4.2 V; 11:4.36 V<br />
||RW<br />
||10<br />
|-<br />
|4<br />
||Charging the end of the current set<br />
0: The charging current is less than 10% of the set value, end-of-charge<br />
1: The charging current is less than 15% of the set value, end-of-charge<br />
||RW<br />
||0<br />
|-<br />
|3-0<br />
||Charging current is set<br />
I<sub>charge</sub>= [300 + (Bit3-0) * 100] mA<br />
||RW<br />
||X<br />
|-<br />
|}<br />
<br />
=== REG 34H: Charge control ===<br />
:: Default value: 45H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Precharge timeout settings Bit1<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Precharge timeout setting Bit0<br />
00: 40 min; 01: 50min;<br />
10: 60min; 11: 70min<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||Retention<br />
|-<br />
|4<br />
||CHGLED mode selection<br />
0: Charging Steady<br />
1: flashes when charging<br />
||RW<br />
||0<br />
|-<br />
|3-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||The constant current mode timeout setting Bit1-0<br />
00: 6Hours; 01: 8Hours;<br />
10: 10Hours; 11: 12Hours<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 35H: Spare battery charging control ===<br />
:: Default value: 22H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Backup battery charge enable control<br />
0: off; 1: open<br />
||RW<br />
||0<br />
|-<br />
|6-5<br />
||Target backup battery charging voltage set<br />
00:3.1 V; 01:3.0 V; 10:3.6 V; 11:2.5 V<br />
||RW<br />
||01<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
|-<br />
|1-0<br />
||Spare battery charging current is set<br />
00: 50uA; 01: 100uA; 10: 200uA; 11:<br />
400uA<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 36H: PEK key parameter settings ===<br />
:: Default value: 9DH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Boot time settings<br />
00: 128mS; 01: 3S; 10: 1S; 11: 2S.<br />
||RW<br />
||01<br />
|-<br />
|5-4<br />
||Long key time set<br />
00: 1S; 01: 1.5S; 10: 2S; 11: 2.5S.<br />
||RW<br />
||01<br />
|-<br />
|3<br />
||Key long when you grew up in the shutdown automatic shutdown feature set<br />
0: off; 1: open<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The complete power start PWROK signal delay<br />
0:8 mS; 1:64 mS<br />
||RW<br />
||1<br />
|-<br />
|1-0<br />
||Length setting shutdown<br />
00: 4S; 01: 6S; 10: 8S; 11: 10S.<br />
||RW<br />
||01<br />
|-<br />
|}<br />
<br />
=== REG 37H: DC-DC operating frequency is set ===<br />
:: Default value: 08H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||Reservations, can not be changed<br />
|-<br />
|3-0<br />
||DC-DC switching frequency is set<br />
Each level change of 5%, the default value of 1.5MHz<br />
F = [1 + / - (Bit3-0) * 5%)] * 1.5MHz<br />
||RW<br />
||1000<br />
|-<br />
|}<br />
<br />
=== REG 38H: V<sub>LTF-charge</sub> Charging the battery temperature threshold set ===<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||When charging the battery temperature threshold settings, M<br />
M * 10H, when M = A5H corresponding 2.112V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||A5H<br />
|-<br />
|}<br />
V<br />
LTF-charge<br />
= M * 10H * 0.0008V<br />
<br />
=== REG 39H: V<sub>HTF-charge</sub> Battery charging high temperature threshold settings ===<br />
:: Default value: 1FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Charging battery high temperature threshold settings, N<br />
N * 10H, when N = 1FH corresponding 0.397V; can<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||1FH<br />
|-<br />
|}<br />
V<sub>HTF-charge</sub>= N * 10H * 0.0008V<br />
<br />
=== REG 3AH: system IPSOUT Vwarning Level1 ===<br />
:: Default value: 68H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level1<br />
||RW<br />
||68H<br />
|-<br />
|}<br />
<br />
=== REG 3BH: IPSOUT Vwarning Level2 ===<br />
:: Default value: 5FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||System IPSOUT Vwarning Level2<br />
||RW<br />
||5FH<br />
|-<br />
|}<br />
The voltage setting of REG3AH, REG3BH corresponding relations as follows (assuming that the register value of n):<br />
Vwarning = 2.8672 + 1.4mV * n * 4<br />
<br />
=== REG 3CH: V<sub>LTF-discharge</sub> Battery discharge temperature threshold set ===<br />
:: Default value: FCH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Discharge the battery temperature threshold settings, M<br />
M * 10H, when M = FCH corresponding 3.226V;<br />
Corresponding voltage 0V3.264V<br />
||RW<br />
||FCH<br />
|-<br />
|}<br />
V<sub>LTF-discharge</sub>= M * 10H * 0.0008V<br />
<br />
=== REG 3DH: V<sub>HTF-discharge</sub> Battery discharge high temperature threshold settings ===<br />
:: Default value: 16H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||Battery discharge high temperature threshold settings, N<br />
N * 10H, when of N = 16H, corresponding to 0.282V; can<br />
The voltage 0V3.264V,<br />
||RW<br />
||16H<br />
|-<br />
|}<br />
V<br />
LTF-discharge<br />
= N * 10H * 0.0008V<br />
<br />
=== REG 80H: DC-DC mode selection ===<br />
:: Default value: E0H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||DC-DC2 operating mode control<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||DC-DC3 operating mode control<br />
0: PFM / PWM auto-switching<br />
1: fixed PWM<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== REG 82H: ADC Enable 1 ===<br />
:: Default value: 83H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Battery voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||Battery current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The ACIN Voltage ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||The ACIN current ADC is enabled.<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS voltage ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The VBUS current ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||APS voltage ADC enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||TS pin ADC function is enabled<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|}<br />
<br />
=== REG 83H: ADC Enable 2 ===<br />
:: Default value: 80H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 internal temperature monitoring ADC enable<br />
0: Off, 1: open<br />
||RW<br />
||1<br />
|-<br />
|6-4<br />
||Reservations, can not be changed<br />
|-<br />
|3<br />
||The GPIO0 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||The GPIO1 ADC enable<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
0: Off, 1: open<br />
|-<br />
|}<br />
<br />
=== REG 84H: ADC sample rate settings, the TS pin control ===<br />
:: Default value: 32H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||ADC sampling rate is set<br />
25 × 2<br />
n<br />
Sampling rates of 25, 50, 100, 200Hz<br />
||RW<br />
||0<br />
|-<br />
|5-4<br />
||TS pin output current settings:<br />
00:20 uA; 01:40 uA; 10:60 uA; 11:80 uA<br />
||RW<br />
||11<br />
|-<br />
|3<br />
||Reservations, can not be changed<br />
|-<br />
|2<br />
||TS pin function selection<br />
0: battery temperature monitoring function, 1: independent external ADC input path<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||TS pin current output settings<br />
00: Off<br />
01: On when charging<br />
10: On when ADC enabled<br />
11: Always on<br />
||RW<br />
||10<br />
|-<br />
|}<br />
<br />
=== REG 85H: ADC input range ===<br />
:: Default value: X0H of<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-2<br />
||Reservations, can not be changed<br />
|-<br />
|1<br />
||The GPIO1 ADC input range<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The GPIO0 ADC input range<br />
0:0-2.0475 V<br />
1:0.7-2.7475 V<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 86H: GPIO1 ADC IRQ rising edge threshold set ===<br />
:: Default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||FF<br />
|-<br />
|}<br />
<br />
=== REG 87H: GPIO1 ADC IRQ falling edge threshold set ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||One LSB 8mV<br />
||RW<br />
||00<br />
|-<br />
|}<br />
<br />
=== REG 8AH: Timer control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer expires<br />
Write 1 to clear this status<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Set regular time in minutes<br />
To write 0 closed this timer<br />
||RW<br />
||0000000<br />
|-<br />
|}<br />
=== REG 8BH: VBUS pin function control monitoring SRP ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-6<br />
||Reservations, can not be changed<br />
|-<br />
|5-4<br />
||VBUS valid voltage settings<br />
00:4.0 V; 01:4.15 V; 10:4.45 V; 11:4.55 V<br />
||RW<br />
||00<br />
|-<br />
|3<br />
||VBUS Valid detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session detection function settings: 0: Off, 1: Open<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||Discharge VBUS discharge feature set<br />
0: Close VBUS discharge resistor; 1: VBUS discharge resistor<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Charge VBUS charge feature set<br />
0: Disconnect VBUS charge resistor; 1: VBUS charging resistor to VBUS charge<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
=== REG 8FH: over-temperature shutdown feature set ===<br />
:: Default value: 21H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-3<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||AXP209 internal over-temperature shutdown feature set<br />
0: Shutdown; 1: Shutdown<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||Reservations, can not be changed<br />
|-<br />
|}<br />
<br />
=== GPIO controls ===<br />
<br />
==== REG 90H: GPIO0 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO0 rising edge interrupt or wakeup<br />
|rowspan=2|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO0 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO0 pin function<br />
||<br />
000: low output<br />
001: output (3.3V)<br />
010: universal input function<br />
011: low noise LDO5<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 91H: LDO5 output voltage as well as the EXTEN / GPIO output high set ====<br />
:: Default value: A5H of<br />
::{| class="wikitable"<br />
! Bit !! Description !! Value !! R/W !! Default Value<br />
|-<br />
|7-4<br />
||LDO5 output voltage settings<br />
||<br />
Vout = [1.8 + (Bit7-4) * 0.1] V<br />
default = 1.8 +10 * 0.1 = 2.8V<br />
||RW<br />
||1010<br />
|-<br />
|3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||EXTEN, and GPIO [1:0] set the output high<br />
||<br />
000:1.8 V; 001:2.5 V; 010:2.8 V; 011:3.0 V<br />
100:3.1 V; 101:3.3 V; 110:3.4 V; 111:3.5 V<br />
||RW<br />
||101<br />
|}<br />
<br />
==== REG 92H: GPIO1 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO1 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO1 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO1 pin function<br />
||<br />
000: GPIO output low<br />
001: GPIO output high (3.3V)<br />
010: GPIO input<br />
011: low-noise LDO<br />
100: ADC input<br />
1XX: floating<br />
||RW<br />
||111<br />
|-<br />
|}<br />
<br />
==== REG 93H: GPIO2 feature set ====<br />
:: Default value: 07H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO2 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO2 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2-0<br />
||GPIO2 pin function<br />
||<br />
000: GPIO output low (open drain)<br />
001: floating<br />
010: GPIO input<br />
XXX: floating<br />
||RW<br />
||111<br />
|}<br />
<br />
==== REG 94H: GPIO [2:0] signal state setting and monitoring ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|6<br />
||GPIO2 input state<br />
|rowspan="3"|<br />
0: input low<br />
1: input high<br />
||R<br />
||<br />
|-<br />
|5<br />
||GPIO1 input state<br />
||R<br />
||<br />
|-<br />
|4<br />
||GPIO0 input state<br />
||R<br />
||<br />
|-<br />
|3-0<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|}<br />
<br />
==== REG 95H: GPIO3 set ====<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
! Bit !! Description !! Values !! R/W !! Default Value<br />
|-<br />
|7<br />
||GPIO3 rising edge interrupt or wakeup<br />
|rowspan="2"|<br />
0: disable<br />
1: enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||GPIO3 falling edge interrupt or wakeup<br />
||RW<br />
||0<br />
|-<br />
|5-3<br />
|colspan="4" style="text-align: center"|Reserved, can not be changed<br />
|-<br />
|2<br />
||GPIO3 pin function<br />
||<br />
0: NMOS Open Drain Output<br />
1: digital input function<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||GPIO3 output settings<br />
||<br />
0: output low, NMOS on<br />
1: floating, NMOS off<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||GPIO3 input state<br />
||<br />
0: input high<br />
1: input low<br />
||R<br />
|}<br />
<br />
=== Interrupts ===<br />
<br />
==== REG 40H and 48H: IRQ enable IRQ state ====<br />
The IRQ enable 1, REG40H: The default value: D8H<br />
IRQ state REG48H: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits of each bit corresponding to 40H;<br />
For example: Bit7 is ACIN overvoltage IRQ status bits<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 41H and 49H of the: IRQ Enable IRQ state 2 ====<br />
::IRQ energy 2 REG41H: default value: FFH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||IRQ enable battery access<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||IRQ enable battery removed<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||The battery activation patterns IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|4<br />
||The exit cell activation patterns IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||The is charging IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The charging completed IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|1<br />
||Battery over-temperature IRQ enabled<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||IRQ Enable battery low temperature<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The ACIN overvoltage IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|6<br />
||The ACIN access IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|5<br />
||ACIN out of IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS overvoltage IRQ enabled<br />
||RW<br />
||1<br />
|-<br />
|3<br />
||And VBUS access IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|2<br />
||The VBUS removed IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||VBUS available but less than V<sub>HOLD</sub><br />
IRQ is enabled<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::The IRQ state REG49H: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 41H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 42H 4AH: IRQ enable IRQ state ====<br />
::IRQ can 3 REG42H: default value: 03H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||AXP209 Internal overtemperature IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||The charging current is less than the set current IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||Reservations, can not be changed<br />
|-<br />
|4<br />
||DC-DC2 output voltage is less than the set value IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||DC-DC3 output voltage is less than the set value IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||LDO3 output voltage is less than the set value IRQ enable<br />
|-<br />
|1<br />
||The PEK short key IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|0<br />
||PEK long keys IRQ enable<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::The IRQ state REG4AH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 42H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 43H 4BH: IRQ Enable 4 and IRQ state ====<br />
::IRQ Enable 4, REG43H: default value: 01H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||N_OE boot IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||IRQ enable N_OE shutdown<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||VBUS valid IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||VBUS invalid IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||VBUS Session A / B IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||VBUS Session End IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The APS low pressure IRQ Enable (LEVEL1)<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||The APS low pressure IRQ Enable (LEVEL2)<br />
||RW<br />
||1<br />
|-<br />
|}<br />
::The IRQ state REG4BH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 43H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG 44H and 4C: IRQ enable IRQ state 5 ====<br />
::IRQ can 5 REG44H default value: 00H;<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Timer timeout IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||PEK button on the rising edge IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||PEK buttons enable falling edge of IRQ<br />
||RW<br />
||0<br />
|-<br />
|4<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|3<br />
||GPIO3 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|2<br />
||GPIO2 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|1<br />
||The GPIO1 input edge-triggered or ADC input IRQ enabled<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||GPIO0 input edge-triggered IRQ enable<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::The the IRQ state of 5 REG4CH: default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7-0<br />
||The meaning of the status bits, respectively, each bit of the corresponding 44H<br />
||RW<br />
||0<br />
|-<br />
|}<br />
::Note: All IRQ status register corresponding bit write clears state.<br />
<br />
<br />
=== ADC Measurement Values ===<br />
First register is high 8 bits, second is lower 4 (lower 5 for battery discharge current).<br />
::{| class="wikitable"<br />
! Channel !! Registers !! 000h !! Step !! FFFh<br />
|-<br />
| ACIN Voltage || 56h, 57h || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| ACIN Current || 58h, 59h || 0 mA || 0.625 mA || 2.5594 A<br />
|-<br />
| VBUS voltage || 5Ah, 5Bh || 0 mV || 1.7 mV || 6.9615 V<br />
|-<br />
| VBUS Current || 5Ch, 5Dh || 0 mA || 0.375 mA || 1.5356 A<br />
|-<br />
| Internal Temperature || 5Eh, 5Fh || -144.7 C || 0.1 C || 264.8 C<br />
|-<br />
| Temperature Sensor Voltage || 62h, 63h || 0 mV || 0.8 mV || 3.276 V<br />
|-<br />
| APS (IPSOUT) Voltage || 7Eh, 7Fh || 0 mV || 1.4 mV || 5.733 V<br />
|-<br />
| Battery Voltage || 78h, 79h || 0 mV || 1.1 mV || 4.5045 V<br />
|-<br />
| Battery Discharge Current || 7Ah, 7Bh || 0 mA || 0.5 mA || 4.095 A<br />
|-<br />
| Battery Charge Current || 7Ch, 7Dh || 0 mA || 0.5 mA || 4.095 A<br />
|}<br />
<br />
=== REG B8H: Coulomb Counter Control ===<br />
:: Default value: 00H<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||The coulomb meter switch control<br />
||RW<br />
||0<br />
|-<br />
|6<br />
||Coulomb Counter pause control, the write will be suspended Coulomb counting while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|5<br />
||The clear Coulomb Counter control bit write Coulomb Counter will be cleared while this bit is cleared from<br />
||RW<br />
||0<br />
|-<br />
|4-2<br />
||Reservations, can not be changed<br />
||RW<br />
||0<br />
|-<br />
|1-0<br />
||The decryption start bit, decryption start automatically cleared<br />
||RW<br />
||0<br />
|-<br />
|0<br />
||Decryption is complete<br />
0: not completed<br />
1: Complete<br />
||RW<br />
||0<br />
|-<br />
|}<br />
<br />
==== REG B9H: power measurement results ====<br />
:: Default value: 7FH<br />
::{| class="wikitable"<br />
|-<br />
! Bit !! Description !! R/W !! Default Value<br />
|-<br />
|7<br />
||Metering system control<br />
0: normal operating mode<br />
1: suspend work<br />
||RW<br />
||0<br />
|-<br />
|6-0<br />
||Measurement results, the percentage of<br />
||R<br />
||7F<br />
|-<br />
|}<br />
<br />
== Spec Sheets ==<br />
* [http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf AXP209 Datasheet v1.0 English] <small>(PDF, ~2.4MB)</small><br />
* [http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf AXP209 Datasheet v1.0 Chinese] <small>(PDF, ~1.2MB)</small><br />
<br />
== External links ==<br />
* [http://www.x-powers.com/product/axp209.html Product web page]<br />
<br />
[[Category:PMIC]]<br />
<br />
[[Category:Power]]</div>
Oliver
https://linux-sunxi.org/index.php?title=Olimex_A20-OLinuXino-Lime2&diff=18437
Olimex A20-OLinuXino-Lime2
2016-11-02T16:18:53Z
<p>Oliver: </p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:Lime2_top.jpg|250px]]<br />
| manufacturer = [https://www.olimex.com/ Olimex]<br />
| dimensions = 84''mm'' x 60''mm'' x 20''mm''<br />
| release_date = September 2014<br />
| website = [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2 Device Product Page]<br />
| soc = [[A20]] @ 1Ghz<br />
| dram = 1GiB DDR3 @ 480MHz<br />
| nand = 4GB (optional)<br />
| emmc = 4GB (optional)<br />
| power = DC 5V ([https://www.olimex.com/wiki/PWRJACK 5.5/2.1 jack]), 3.7V LiPo (JST PHR-2 header)<br />
| video = HDMI (Type A, full)<br />
| network = 10/100/1000Mbps Ethernet ([[Ethernet#Realtek_RTL8211CL|Realtek RTL8211CL]])<br />
| storage = µSD, SATA<br />
| usb = 2x USB2.0 Host, 1x mini USB2.0 OTG<br />
| headers = UART, 5x GPIO headers<br />
}}<br />
<br />
The [https://www.olimex.com/wiki/A20-OLinuXino-LIME2 A20 Olinuxino LIME2] is an [[OSHW]] board produced by [[Olimex]].<br />
<br />
The A20-OLinuXino-LIME2 is an upgrade of the [[Olimex A20-OLinuXino-Lime]], but it comes with 1GiB RAM and gigabit ethernet. There are also two extra variants with onboard storage: [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2-4GB A20-OLinuXIno-LIME2-4GB] with 4GB NAND and [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2-eMMC A20-OLinuXino-LIME2-eMMC] with 4GB eMMC.<br />
<br />
= Identification =<br />
<br />
The board is marked as ''A20-OLinuXino-Lime'' on both the top and bottom of the PCB.<br />
<br />
Note that it is not marked as Lime2. The Lime2 variant can be distinguished by the presence of two dram chips on the top of the board between the SoC and the USB connectors, also the ethernet phy is on the bottom of the board instead of the top.<br />
<br />
= Sunxi support =<br />
<br />
== Current status ==<br />
<br />
Supported.<br />
* Mainline kernel patches posted to linux-arm-kernel mailing list 2014-09-28<br />
* Mainline u-boot patches posted to u-boot mailing list 2014-09-28<br />
<br />
== Manual build ==<br />
<br />
You can build things for yourself by following our [[Manual_build_howto | Manual build howto]] and by choosing from the configurations available below.<br />
<br />
=== U-Boot ===<br />
<br />
==== Sunxi/Legacy U-Boot ====<br />
<br />
Use the ''A20-OLinuXino_Lime2'' build target. ''_FEL'' version is also available for USB booting.<br />
<br />
==== Mainline U-Boot ====<br />
<br />
Use the ''A20-OLinuXino-Lime2_defconfig'' build target. <br />
<br />
=== Linux Kernel ===<br />
<br />
==== Sunxi/Legacy Kernel ====<br />
<br />
Use the [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a20/a20-olinuxino_lime2.fex ''a20-olinuxino_lime2.fex''] file. (Please note that this fex file adopted DRAM clock setting from the Lime2's predecessor - only ''dram_tpr4'' differs for unknown reasons. Using this fex file the DRAM is clocked with just 384&nbsp;MHz, which costs some few percent performance depending on the application used.)<br />
<br />
==== Mainline kernel ====<br />
<br />
Use the ''sun7i-a20-olinuxino-lime2.dtb'' device-tree binary.<br />
<br />
[[File:Lime2_fel.jpg|thumb|240px|Recovery button]]<br />
= Tips, Tricks, Caveats =<br />
<br />
== FEL mode ==<br />
<br />
The Recovery button (under sata connector, nearest hdmi connector) triggers [[FEL | FEL mode]].<br />
<br />
[[File:Lime2_uext.jpg|thumb|240px|Lime2 UEXT connector]]<br />
== Expansion ports ==<br />
<br />
The internal GPIO headers appear to be mirrored compared to the original Lime boards [https://olimex.wordpress.com/2014/10/27/a20-olinuxino-lime2-review-and-updates/]. Due to this there are specific A20-OLinuXino-Lime2-UEXT adapters, however as of 2014-09-28 these do not appear to be available directly from the Olimex shop.<br />
<br />
== Booting from SPI Flash ==<br />
<br />
See the main [[Bootable_SPI_flash]] article for generic guides on how to boot from SPI flash. Included here are two pictures of a SPI NOR Flash setup with a LIME2. This requires soldering wires to 3 pads on the empty NAND socket in order to get access to the PC0,PC1,PC2 pins, which makes it more or less just a proof of concept solution. But it would be great if Olimex considers adding an on-board SPI flash to the future revisions of the A20-OLinuXino-Lime2 board just like they have recently [https://olimex.wordpress.com/2016/05/04/lime2-get-better-now-with-emmc-flash-a20-olinuxino-lime2-emmc/ done this with eMMC]. Because this can allow having SATA or network boot without any need to use an SD card for storing the U-Boot bootloader.<br />
<br />
<gallery><br />
File:A20_LIME2_with_SPI0_soldered.jpg<br />
File:A20_LIME2_with_SPI0_soldered-part-2.jpg<br />
</gallery><br />
<br />
== SATA power connector ==<br />
<br />
Unlike other sunxi boards the Olimex boards don't use the JST XH 0.1"/2.5mm header for SATA power but the smaller JST PHR-2 header normally used for connecting LiPo batteries.<br />
<br />
== Hardware reliability ==<br />
There are known cases where Lime2 boards are failing in the wild. The main suspects are DRAM clock speed and CPU core voltage. For more information see [Hardware Reliability Tests].<br />
<br />
=== DRAM clock speed limit ===<br />
DRAM is clocked at '''480 MHz''' by the hardware vendor (in fact even [https://olimex.wordpress.com/2014/10/27/a20-olinuxino-lime2-review-and-updates/ 532Mhz is mentioned in the blog]). The board uses somewhat non-standard resistors for ZQ calibration (ZQ = '''330 Ohm''', SZQ = '''330 Ohm'''), but at least they seem to be the same in Lime2 revisions from Rev.B to Rev.E according to the board schematics. Still it's best to always mention the board revision in the results table in order to avoid any surprises.<br />
<br />
=== DRAM test results ===<br />
Having done runs on a larger set of boards, initial test results looked appalling. Machines that where known to have caused trouble in the past, failed within the hour. Others kept going for a few hours actually. We did notice temperature variation influences. On a Monday, the heating in the building was broken and the ambient temperature was only 20 degrees Celsius and 3 boards ran overnight without a problem. On Wednesday the heating was fixed and the ambient temperature rose to 23 degrees Celsius and all three boards had crashed. All of the initial 6 test subjects crashed and failed at their stock 480 DRAM frequency setting!<br />
<br />
Expanding this test to influence ambient temperature, even more interesting results where found. For example, 456 Mhz seemed stable at 22 degrees Celsius, but with an ambient temperature of 50 degrees Celsius a few boards still crashed. Lowering the frequency even more, to 432 MHz stabilized that and thus the ambient temperature was increased to 70 degrees Celsius. Here the sunxi_tp_temp, which is very unreliable, reported core temperatures of about 77 degrees Celsius. The board however remained running stable at least one hour.<br />
<br />
The full tests results can be seen in this [http://dl.linux-sunxi.org/users/oliver/Lime2_memory_stability.ods sheet], and can eventually be modified into table below.<br />
<br />
{| class="wikitable"<br />
! Hardware<br />
! Diagnostic software<br />
! lima-memtester passes<br />
! lima-memtester fails<br />
! Notes<br />
|-<br />
| [[User:JohnDoe]]'s A20-OLinuXino-Lime2 Rev.? || fel-boot-lima-memtester-on-a20-lime2-v1.tar.gz || ? MHz || ? MHz || ? MHz fails after running for ? minutes<br />
|}<br />
<br />
= Adding a serial port =<br />
<br />
[[File:Lime2-uart.jpg|thumb|240px|UART connector]]<br />
<br />
There is a clearly marked UART0 connector on the edge of the board beside the ethernet connector. All you have to do is attach some leads according to our [[UART|UART howto]].<br />
<br />
= Pictures =<br />
<br />
<gallery><br />
File:Lime2_top.jpg<br />
File:Lime2_bot.jpg<br />
File:Lime2_fel.jpg<br />
File:Lime2_uext.jpg<br />
</gallery><br />
<br />
= See also =<br />
<br />
* [[Olimex A10-OLinuXino-Lime]]<br />
* [[Olimex A20-OLinuXino-Lime]]<br />
* [https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A20-OLinuXino-LIME2 Lime2 schematics & CAD files]<br />
== Manufacturer images ==<br />
<br />
[https://www.olimex.com/wiki/A20-OLinuXino-LIME2#Linux Olimex images for Lime2]<br />
<br />
[[Category:Devices]]<br />
[[Category:Mainline_U-Boot]]<br />
[[Category:Mainline_Kernel]]<br />
[[Category:A20 Boards]]<br />
[[Category:OSHW]]<br />
[[Category:Community_Devices]]<br />
[[Category:Olimex]]<br />
[[Category:Devices with Ethernet port]]<br />
[[Category:Devices with HDMI port]]<br />
[[Category:Devices with SATA port]]</div>
Oliver
https://linux-sunxi.org/index.php?title=Hardware_Reliability_Tests&diff=18436
Hardware Reliability Tests
2016-11-02T16:15:18Z
<p>Oliver: </p>
<hr />
<div>== The importance of the hardware diagnostic tools ==<br />
<br />
Because of the diversity of various Allwinner based devices we have to deal with different DRAM, CPU clock speed and voltage settings. They are primarily derived from the fex files found in the vendor provided firmware on NAND and also based on the information retrieved by the [[Sunxi-tools#meminfo|meminfo tool]]. Some dishonest sellers also happily advertise way higher specs than the hardware can actually handle (for example, unrealistic 1.5GHz CPU clock speeds). Moreover, different chips have their own individual voltage and clock frequency tolerances within a certain range. So that the borderline stable settings may be good for one unit and bad for another.<br />
<br />
In order to quickly identify obviously misconfigured hardware, we need some easy to use diagnostic tools. There is no magic involved. The general idea behind them is to find some real life or synthetic workloads, which are more likely to cause troubles. Then identify, which parts of these workloads are most problematic and convert them into (hopefully) user friendly test tools. Some of these tools are listed below.<br />
<br />
<b>Note:</b> naturally, the majority of devices are expected to pass these tests and you are likely not to get any exciting results. Still this is not a good justification for the "nah, this may happen to anyone, but me" attitude. The experience shows that there are definitely faulty/misconfigured devices out there. If you are experiencing occasional crashes or freezes once in a while, then making sure that these tests pass is strongly recommended before trying anything else.<br />
<br />
== My device is failing these reliability tests. What to do now?! ==<br />
<br />
First of all, make sure that you are using an up to date u-boot bootloader, an up to date linux kernel and correct hardware description data (script.bin for the sunxi-3.4 kernel or a *.dtb file for the mainline kernel). It may be a matter of some hardware misconfiguration ([https://github.com/linux-sunxi/sunxi-boards/commit/2d3330814b38a2a857958b3b3fd97c3f473bfd7b just like it happened with the cubieboard2/cubietruck before]), and the intention is to have all of these problems ironed out eventually.<br />
<br />
If the tests are still failing with the up to date software, be sure to report the problem in the linux-sunxi mailing list or in the irc channel. Please also include all the relevant information (the board type, the kernel version, the bootloader version, etc.). Even if you can resolve the problem yourself (by adjusting the voltages or the clock speed), reporting the incident is still rather important to ensure that other people don't encounter the same problem in the future. Thanks!<br />
<br />
== '''DRAM''' ==<br />
<br />
==== Reliability ====<br />
<br />
<div class="mw-collapsible mw-collapsed"><br />
The [https://github.com/ssvb/lima-memtester lima-memtester tool] can be used to check if the dram settings are reasonable and dcdc3 voltage is sufficient. If you have a shell access to your device, then you can download a static binary compiled for ARM (or click on the 'Expand' link to see how to compile it from sources):<br />
<div class="mw-collapsible-content"><br />
git clone https://github.com/ssvb/lima-memtester.git<br />
cd lima-memtester<br />
cmake .<br />
make -j2<br />
</div><br />
</div><br />
# The wget option --no-check-certificate is only here to make it work even if the date is set wrong (no RTC battery)<br />
wget --no-check-certificate https://github.com/ssvb/lima-memtester/releases/download/static-binary-20150126/lima-memtester<br />
chmod +x lima-memtester<br />
<br />
The lima-memtester static binary requires only the sunxi-3.4 kernel with the mali kernel module and framebuffer enabled to run. This test does not depend on anything in the userland and should work with any Linux distribution (this also means that it does NOT require the userland [[Mali binary driver]]). Just run lima-memtester with root privileges as:<br />
./lima-memtester 100M<br />
<br />
If everything is working fine, there should be a spinning cube demo running indefinitely. If something is very wrong, then the test fails after just a few seconds! If something is mildly wrong, this usually gets detected in less than 15-20 minutes. However even running for a few hours can still detect some problems. In the case of troubles, the following symptoms may be observed.<br />
* the system freezes<br />
* the display background starts glowing red (normally it is gray)<br />
<br />
For even more confidence, it is a good idea to keep it running overnight (8-10 hours) at least once and if possible, over the weekend.<br />
<br />
On the [[Olimex_A20-OLinuXino-Lime2#Hardware_reliability#DRAM_test_results|Lime2 page]] there are some test results.<br />
<br />
== '''CPU''' ==<br />
<br />
==== Reliability of cpufreq voltage/frequency settings ====<br />
<br />
The following ruby script can run basic reliability tests (correctness of jpeg decompression) for all cpufreq operating points. The kernel config needs to have support for 'userspace' cpufreq governor.<br />
<br />
cd /tmp<br />
git clone https://github.com/ssvb/cpuburn-arm.git<br />
cd cpuburn-arm<br />
./cpufreq-ljt-stress-test<br />
<br />
Example output:<br />
<pre><br />
Creating './whitenoise-1920x1080.jpg' ... done<br />
CPU stress test, which is doing JPEG decoding by libjpeg-turbo<br />
at different cpufreq operating points.<br />
<br />
Testing CPU 0<br />
1200 MHz SKIPPED<br />
1152 MHz SKIPPED<br />
1104 MHz SKIPPED<br />
1056 MHz SKIPPED<br />
1008 MHz ............................................................ OK<br />
960 MHz ............................................................ OK<br />
912 MHz ............................................................ OK<br />
864 MHz ............................................................ OK<br />
816 MHz ............................................................ OK<br />
768 MHz ............................................................ OK<br />
744 MHz ............................................................ OK<br />
720 MHz ............................................................ OK<br />
696 MHz SKIPPED<br />
672 MHz SKIPPED<br />
648 MHz SKIPPED<br />
600 MHz SKIPPED<br />
528 MHz SKIPPED<br />
480 MHz SKIPPED<br />
408 MHz SKIPPED<br />
384 MHz SKIPPED<br />
360 MHz SKIPPED<br />
336 MHz SKIPPED<br />
288 MHz SKIPPED<br />
264 MHz SKIPPED<br />
240 MHz SKIPPED<br />
216 MHz SKIPPED<br />
204 MHz SKIPPED<br />
192 MHz SKIPPED<br />
180 MHz SKIPPED<br />
168 MHz SKIPPED<br />
156 MHz SKIPPED<br />
144 MHz SKIPPED<br />
132 MHz SKIPPED<br />
120 MHz SKIPPED<br />
96 MHz SKIPPED<br />
84 MHz SKIPPED<br />
72 MHz SKIPPED<br />
60 MHz SKIPPED<br />
</pre><br />
<br />
If voltage is configured wrong for one of the operating points, then data corruption may be detected and reported.<br />
<br />
'''Be aware:''' Please take the results of this script with a grain of salt. There are border cases in which extended tests show a device might not be stable at certain settings even though they pass the tests in this script. Especially on a multi-core system you may want to run CPU-intensive tasks in the background while running cpufreq-ljt-stress-test in order to keep all cores busy. The cpuburn scripts (see below) or compiling a kernel might be suitable tasks for this end. You may also want to change the duration of the tests by changing the number of test iterations per frequency setting (see line 203 of the script: the default value is 60 - feel free to set a higher value to make this script run longer).<br />
<br />
==== Overheating ====<br />
If the CPU is overclocked and/or overvolted, then it may overheat and fail under heavy load. To check for the potential CPU overheating (with or without overclocking), it is possible to use the [https://github.com/ssvb/cpuburn-arm cpuburn] tool.<br />
<br />
To run this test on the Allwinner A10 hardware:<br />
git clone https://github.com/ssvb/cpuburn-arm.git<br />
cd cpuburn-arm<br />
gcc -o cpuburn-a8 cpuburn-a8.S<br />
./cpuburn-a8<br />
Or on the Allwinner A20 hardware:<br />
git clone https://github.com/ssvb/cpuburn-arm.git<br />
cd cpuburn-arm<br />
gcc -o cpuburn-a7 cpuburn-a7.S<br />
./cpuburn-a7<br />
<br />
The cpuburn programs are only heating the CPU and are not providing any visible feedback. It may make sense to also run some other non CPU hungry program simultaneously to monitor whether it is still alive or not. Running some Mali400 graphics demo is the best for this purpose. And the GPU is also providing an extra source of heat.<br />
<br />
<span style="color:red">'''WARNING: if the device is recklessly overclocked/overvolted too much, then some permanent hardware damage may theoretically happen.'''</span></div>
Oliver