<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jbit</id>
	<title>PINE64 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jbit"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/Jbit"/>
	<updated>2026-04-25T14:36:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_1.2_VCONN_Hardware_Fix&amp;diff=6830</id>
		<title>PinePhone 1.2 VCONN Hardware Fix</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_1.2_VCONN_Hardware_Fix&amp;diff=6830"/>
		<updated>2020-09-02T11:47:53Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details a hardware fix for an issue that affects some early PinePhone units (fixed since 1.2a included).&lt;br /&gt;
&lt;br /&gt;
The issue was [[PinePhone_v1.1_-_Braveheart#USB-C_CC_pins_are_pulled_to_the_GND_by_AW3512_.28VCONN_switches.29_when_VCONN_is_off | originally reported here]] by megi.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more pictures and schematics, better reference the fix origin and tradeofs, remove TODOs/FIXMEs.&lt;br /&gt;
&lt;br /&gt;
== Affected Units ==&lt;br /&gt;
# (FIXME confirm this) [[Project Don't be evil|&amp;quot;Project Don't Be Evil&amp;quot; devkit]]&lt;br /&gt;
# (FIXME confirm this)[[PinePhone v1.0 - Dev|PinePhone v1.0 - Developer batch]]&lt;br /&gt;
# [[PinePhone v1.1 - Braveheart]]&lt;br /&gt;
# [[PinePhone v1.2‎]] - Community Edition&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
&lt;br /&gt;
This fix requires desoldering tiny (1 mm per 1 mm, from the datasheet) BGA components, therefore some experience with soldering is highly recommended.&lt;br /&gt;
&lt;br /&gt;
== Issue description ==&lt;br /&gt;
[[File:Martjin_VCONN_switches_1.1.jpg|thumb|frame|Close-up picture of the two identical switches the issue originates from, with the ANX USB controller in the frame]]&lt;br /&gt;
&lt;br /&gt;
[[File:Schematic_VCONN_switches.png|thumb|frame|Excerpt from the PinePhone schematic showing the two components.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The USB standard [https://microchipdeveloper.com/usb:tc-pins specifies] that both halves (top and bottom) of the USB-C port contains one &amp;quot;CC&amp;quot; pin (CC1 and CC2, respectively). A regular cable will connect a CC pin from one end to the other end. This allows detecting which way the cable is plugged. Some active USB-C cables exist (both &amp;quot;e-marked&amp;quot; and &amp;quot;managed active cables&amp;quot;); they contain a chip, which needs to be powered. This is done by having one of the cable end connect its CC pins to 5V and VCONN, and requires switches to plug the right CC pin to the right voltage.&lt;br /&gt;
&lt;br /&gt;
The issue arises due to the switches that were chosen up to v1.2a (the a revision excluded) of the PCB assembly: the [https://www.awinic.com/cn/index/pageview/catid/122/id/2.html infamous AW3512], labelled U1305 and U1309 on the schematic. Instead of leaving the output pin &amp;quot;dangling&amp;quot; with a high impedance when disabled, the switch pull the output down. This feature is intended for discharging a capacitor, hence its &amp;quot;Quick output discharge&amp;quot; name. This is an excerpt from the datasheet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;q&amp;gt; The AW3512/AW35122 includes  the  Quick  Output  Discharge  (QOD)  feature, in  order  to  discharge  the application  capacitor  connected  on  OUT  pin.When  EN  pin  is  set to  low  level  (disable  state), a  discharge resistance  with  a  typical  value  of 276Ω (AW35122:  75Ω)is  connected  between  the  output  and  ground,  pull down the output and prevent it from floating when the device is disabled.&amp;lt;/q&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This issue prevents cable plug/orientation detection and USB-PD communication. ANX always sees cable as plugged even if none is plugged. There's no SW workaround for automatic detection of cable plug or power role.&lt;br /&gt;
&lt;br /&gt;
In SW this could theoretically be worked around by manual selection of PinePhone's data and power role by the user, but hasn't been attempted, and might damage hardware if done incorrectly.&lt;br /&gt;
&lt;br /&gt;
== Workaround ==&lt;br /&gt;
&lt;br /&gt;
HW workaround is desoldering U1305 and U1309 switches (BGA like packages). This will void the VCONN control, but it will release the CC pins for their proper connection detection and negotiation roles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tradeoffs ===&lt;br /&gt;
Voiding the VCONN control might (TODO: gather more data) prevent some accessories from working, notably those using an active cable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Proper fix ==&lt;br /&gt;
&lt;br /&gt;
HW fix is to replace AW3512 with a variant of the chip that preserves the EN signal polarity and that doesn't have the &amp;quot;quick discharge function&amp;quot; that ties the output to the GND via a 75 Ohm resistor when the switch is OFF. mozzwald used NCP334FCT2G as a replacement.&lt;br /&gt;
&lt;br /&gt;
PCBA revision 1.2a onwards should incorporate that fix. (TODO: confirm this).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sources and tutorials ==&lt;br /&gt;
* [https://megous.com/dl/tmp/pp-usbc-fix.jpg megi's writeup]&lt;br /&gt;
* [https://xnux.eu/devices/feature/anx7688.html another writeup from megi] with a few words on firmware&lt;br /&gt;
* [https://www.youtube.com/watch?v=xf8OJtjNWUM Video: &amp;quot;The right way&amp;quot;] with a hot air gun/reflow station, by mozzwald&lt;br /&gt;
* [https://www.youtube.com/watch?v=ZqOb45N2sMc Vdeo: &amp;quot;The equally stupid way&amp;quot;], workaround video by Dalton, using a soldering iron. Less chances to permanently damage the board than the next if you are handy with a soldering iron, but still high.&lt;br /&gt;
* [https://www.youtube.com/watch?v=j3jc7Mvn9Eo Video: &amp;quot;The stupid way&amp;quot;] workaround video by Lukasz, with pliers. Slightly damages the circuit board, preventing you from soldering the replacement chips at a later point. You might be fine with this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Hardware_Accessory_Compatibility&amp;diff=6829</id>
		<title>PinePhone Hardware Accessory Compatibility</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Hardware_Accessory_Compatibility&amp;diff=6829"/>
		<updated>2020-09-02T11:45:45Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of devices that have been tried on the PinePhone, and the results.&lt;br /&gt;
&lt;br /&gt;
== Peripheral equipment ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Type || Make/Model || Connected&amp;lt;br&amp;gt; via || Hardware IDs || Result || Tested OS || Notes&lt;br /&gt;
|-&lt;br /&gt;
|5-1 USB-C hub || [https://www.aliexpress.com/item/32954358411.html from aliexpress] || USBC ||  05e3:0626 hub || PD not working,&amp;lt;br&amp;gt;rest not working yet  ||UBPorts/pmOS || HDMI, GBit eth, 2xUSB-3, USB-C PD &amp;lt;br&amp;gt; [http://www.sympato.ch/~dryak/files/usbc-dock.jpg image]&lt;br /&gt;
|-&lt;br /&gt;
|Generic Bluetooth keyboard || generic || BT ||  -- || No pairing via ui, but functional via terminal || pmOS || [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#Bluetooth Instructions]&lt;br /&gt;
|-&lt;br /&gt;
|UMAX U-Connect Type-C Multiport H7 || [https://www.tsbohemia.cz/umax-u-connect-type-c-multiport-h7_d350000.html ts-bohemia] || USBC ||  - || USB-A ports, PD, HDMI works, SD card reader not enumerating on PP with removed VCONN switches (may need VCONN)  || Arch Linux || HDMI, 3xUSB-3, USB-C PD, SD reader&lt;br /&gt;
|-&lt;br /&gt;
|Google Pixel USB-C to 3.5mm adapter || [https://store.google.com/?srp=/product/usb_c_headphone_adapter google] || USBC ||  18d1:5029 || Works, recognized as usb soundcard, but only if a cable is plugged in  || pmOS || &lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|Anker PowerExpand+ 7-in-1 USB-C PD Ethernet Hub || [https://www.anker.com/products/variant/powerexpand--7in1-usbc-pd-ethernet-hub/A83520A1 Anker] || USBC ||  -- || USB Ports and HDMI Port work, can charge while using this device (needs VCONN HW mod)  || [https://wiki.mobian-project.org/doku.php?id=mods Mobian] || HDMI, USB3, Ethernet, PD-USBC, SD Card, Micro SD Card&lt;br /&gt;
|-&lt;br /&gt;
|Dell WD-15 Docking station || [https://www.dell.com/support/article/en-us/sln296829/how-to-use-and-troubleshoot-dell-docking-station-wd15?lang=en Dell] || USB-C ||  0424:2807 || USB Ports and charging works. Audio sinks and DP status changes are detected (needs VCONN HW mod and ANX firmware) || pmOS || HDMI, VGA and DP might work after a kernel update. ANX firmware is needed for charging after VCONN mod.&lt;br /&gt;
|-&lt;br /&gt;
|Microsoft HD-500 Dock || [https://www.microsoft.com/en-us/mobile/accessory/hd-500/specifications Microsoft Docs] || USB-C || -- || USB Hub, Display Out, and Power Delivery all works. (needs VCONN HW mod and ANX firmware) || [https://wiki.mobian-project.org/doku.php?id=mods Mobian] || &lt;br /&gt;
|-&lt;br /&gt;
|HP Elite x3 LapDock || [https://support.hp.com/us-en/product/hp-elite-x3-lap-dock/12088822/document/c05320203 HP Product Info] || USB-C || -- || Dock display, keyboard/trackpad, and Power Delivery all works. (needs VCONN HW mod and ANX firmware) || [https://wiki.mobian-project.org/doku.php?id=mods Mobian] || Haven't tested micro-HDMI port or the internal USB-C hub.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Protection ==&lt;br /&gt;
&lt;br /&gt;
=== Screen protector ===&lt;br /&gt;
&lt;br /&gt;
Official: [https://store.pine64.org/product/pinephone-tempered-glass-screen-protector/ PinePhone Tempered Glass Screen Protector]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most screen protectors for the iPhone 11 Pro Max and the iPhone XS Max fit the PinePhone (if the top notch is not obscured by a black foil or similar).&lt;br /&gt;
&lt;br /&gt;
=== Case ===&lt;br /&gt;
&lt;br /&gt;
The Pine store got official cases:&lt;br /&gt;
&lt;br /&gt;
* [https://store.pine64.org/?product=pinephone-hard-protective-case PinePhone Hard Protective Case]&lt;br /&gt;
* [https://store.pine64.org/?product=pinephone-soft-tpu-protective-case-reduce-digital-gap-donation-program PinePhone Soft TPU Protective Case - &amp;quot;Reduce Digital Gap&amp;quot; Donation Program]&lt;br /&gt;
&lt;br /&gt;
Tight-fit cases of other phones can't be alienated for the PinePhone due as most times the proportions and/or camera notch won't fit. The phone can however also be used with &amp;quot;phone sleeves&amp;quot;, such as those from fitBAG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=Category:PinePhone&amp;diff=6828</id>
		<title>Category:PinePhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=Category:PinePhone&amp;diff=6828"/>
		<updated>2020-09-02T10:24:54Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Make a category for PinePhone articles&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Articles related to [[PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:Oogwaymaki/PinePhone_Multiboot&amp;diff=6827</id>
		<title>User:Oogwaymaki/PinePhone Multiboot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:Oogwaymaki/PinePhone_Multiboot&amp;diff=6827"/>
		<updated>2020-09-02T10:23:38Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Tips on creating a Multi Boot Configuration for an SDCARD and EMMC  ==&lt;br /&gt;
&lt;br /&gt;
= Manual MultiBoot Configuration = &lt;br /&gt;
&lt;br /&gt;
First, and foremost these steps do the following for you:&lt;br /&gt;
&lt;br /&gt;
* HOLD VOLUME UP AND POWER =&amp;gt; BOOT JUMPDRIVE&lt;br /&gt;
* HOLD VOLUME DOWN AND POWER =&amp;gt; BOOT YOUR SD CARD OS&lt;br /&gt;
* HOLD NOTHING REGULAR BOOT =&amp;gt; BOOT EMMC DRIVE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is series of steps, which will enable MultiBoot on an external SD Card for the PinePhone.&lt;br /&gt;
You will not be required to edit the EMMC in any way at all, leaving the the EMMC intact with original software &lt;br /&gt;
or with your own Primary OS, that is only for stable use of the phone, without worrying about breaking your permanent software.&lt;br /&gt;
&lt;br /&gt;
You could potentially use this for 3 OS's, but ideally only 2 with this current instruction set because you want to keep JumpDrive to make it easy to mount the cards with an option on booting the device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After reading and following these steps, you should able to do the following with a bit more research and a &lt;br /&gt;
few tweaks:&lt;br /&gt;
&lt;br /&gt;
* Change the PostMarketOS to Mobian or another Distro of your choice pretty easily.&lt;br /&gt;
* Use these instructions to create a More Advanced boot structure, using Volume Up and Volume Down with a menu system (This endeavour may take you a while this is a programming exercise within Uboot.scr)&lt;br /&gt;
&lt;br /&gt;
Essentially you are experimenting without the risk of complications with your EMMC.&lt;br /&gt;
&lt;br /&gt;
For example of these instructions , with slight differences for Mobian see below:&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/user/enterusernamo/featured&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
After following these steps:&lt;br /&gt;
----&lt;br /&gt;
* You'll have a Custom UBOOT (Crust ENABLED) that allows MultiBOOT Using 3 different OS's depending on key combo of volume up / volume down or none pressing on boot&lt;br /&gt;
* You'll be able to experiment on SD Card without Touching your EMMC&lt;br /&gt;
* You'll learn how to take a part a PINE PHONE IMAGE (most, and put each OS On one partition&lt;br /&gt;
----&lt;br /&gt;
All the information here, has been discussed in the open source community on web sites. I have simply developed a process on how to do this on the pine phone.&lt;br /&gt;
&lt;br /&gt;
We use utilities such as Cross Compilation, Uboot, Patches, which will be credited.&lt;br /&gt;
&lt;br /&gt;
First step, make sure you have a cross compiler for your Computer, for particularly the arm device, you will need to download a few packages, I assume we're using Debian Linux (if your using another OS you can find similar commands by searching on the web or to make it simpler download a docker Debian image, and install the pre-requisites which I will list here for Debian)&lt;br /&gt;
&lt;br /&gt;
You an also use vagrant/virtual box VMware or other virtualization platforms.&lt;br /&gt;
&lt;br /&gt;
the tools mentioned are the following (in my words possible not maintainers):&lt;br /&gt;
&lt;br /&gt;
Below are all more or less free:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vagrant: A multi/functional wrapper tool to make using Virtual Box, VMWARE , and other virtualization components easier. There are default images(Preconfigured operating systems you can download) or you can make your own.&lt;br /&gt;
&lt;br /&gt;
VirtualBox: This is a free virtualization tool, I don't think you can use prebundled images as without vagrant, but it allows you to freshly install operating systems from disk. It's like using a computer within a computer to install an OS.&lt;br /&gt;
&lt;br /&gt;
Docker: A linux container system, that allows you to have many different snapshots running in the same linux environment. Similar to jails, quicker and faster than Vagrant and VirtualBox, and not an actual computer emulation....&lt;br /&gt;
&lt;br /&gt;
Commercial  Tools available, non free:&lt;br /&gt;
&lt;br /&gt;
VMWARE...numerous ones.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
pick your poison! j/k&lt;br /&gt;
&lt;br /&gt;
===Installing Dependencies===&lt;br /&gt;
First please install these Dependencies:&lt;br /&gt;
&lt;br /&gt;
 apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu build-essential autoconf libtool cmake pkg-config git python-dev swig3.0 libpcre3-dev nodejs-dev crossbuild-essential-arm64 git losetup rsync&lt;br /&gt;
&lt;br /&gt;
The following main sources are needed:&lt;br /&gt;
&lt;br /&gt;
This will download quite a few sources needed for Uboot and existing OS's available to PinePhone&lt;br /&gt;
&lt;br /&gt;
 https://github.com/crust-firmware/meta.git&lt;br /&gt;
&lt;br /&gt;
We will also apply this patch:&lt;br /&gt;
&lt;br /&gt;
 https://megous.com/git/u-boot/patch/?id=0ab6225154c3d8b74f06fb3b181b52a9a64b4602&lt;br /&gt;
&lt;br /&gt;
(I will attach the one I used I had to modify the above patch to work with the code.)&lt;br /&gt;
&lt;br /&gt;
The crust-firmware also says you need to download the or1k compiler:&lt;br /&gt;
&lt;br /&gt;
 https://musl.cc/or1k-linux-musl-cross.tgz&lt;br /&gt;
&lt;br /&gt;
I suggest untarring this in the /opt folder.&lt;br /&gt;
&lt;br /&gt;
===Preparing Crust===&lt;br /&gt;
&lt;br /&gt;
* You will see we are patching crust, from the original code, the reason why we are doing this is to ENABLE the Volume UP and VOLUME DOWN Environment variables&lt;br /&gt;
* so the script knows when a user presses up and down on the volume button on pine phone&lt;br /&gt;
* Without the patch this functionality isn't there.&lt;br /&gt;
* Feel free to look through the patch to see how its done, I did not make this patch its found on a gmail thread through another site.  I just cleaned it up so it won't have rejects.&lt;br /&gt;
&lt;br /&gt;
Once you have these dependencies:&lt;br /&gt;
&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # git clone https://github.com/crust-firmware/meta.git&lt;br /&gt;
 # cd /usr/src/meta&lt;br /&gt;
&lt;br /&gt;
Edit the following file Make file &lt;br /&gt;
&lt;br /&gt;
 # Cross compiler&lt;br /&gt;
 CROSS_aarch64	 = aarch64-linux-musl-&lt;br /&gt;
 CROSS_or1k	 = or1k-linux-musl-&lt;br /&gt;
 &lt;br /&gt;
 # General options&lt;br /&gt;
 DEBUG		?= 0&lt;br /&gt;
 REPRODUCIBLE	?= 0&lt;br /&gt;
 &lt;br /&gt;
 # Board selection&lt;br /&gt;
 BOARD		?= pinebook&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 # Cross compiler&lt;br /&gt;
 CROSS_aarch64	 =  /usr/bin/aarch64-linux-gnu-&lt;br /&gt;
 CROSS_or1k	 = /opt/or1k-linux-musl-cross/bin/or1k-linux-musl-&lt;br /&gt;
 &lt;br /&gt;
 # General options&lt;br /&gt;
 DEBUG		?= 0&lt;br /&gt;
 REPRODUCIBLE	?= 0&lt;br /&gt;
 &lt;br /&gt;
 # Board selection&lt;br /&gt;
 BOARD		?= pinephone&lt;br /&gt;
&lt;br /&gt;
 # make&lt;br /&gt;
&lt;br /&gt;
(this should take a 10-30 mins depending on speed..I hope less than 30 mins!!)k&lt;br /&gt;
&lt;br /&gt;
 # cd u-boot&lt;br /&gt;
 # make clean&lt;br /&gt;
 # cd ..&lt;br /&gt;
&lt;br /&gt;
  FIND THIS PATCH AT END OF DOCUMENT CUT AND PASTE INTO FILE&lt;br /&gt;
&lt;br /&gt;
 # patch -p1 &amp;lt; volumecontrol.patch&lt;br /&gt;
 # make&lt;br /&gt;
===Partitioning===&lt;br /&gt;
now, go to your sdcard (use a CLEAN scard NO Partitions)&lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/sd#&lt;br /&gt;
create 4 primary partitions,&lt;br /&gt;
the 1rst one should be the &amp;quot;boot&amp;quot; partition containing Uboot stuff, I'd suggest a gigabyte&lt;br /&gt;
the other 3 could be your choice&lt;br /&gt;
&lt;br /&gt;
After creating partitions, flash the image:&lt;br /&gt;
&lt;br /&gt;
 # cd build/pinephone&lt;br /&gt;
&lt;br /&gt;
Do not use wrong drive, and copy exactly as this erases and puts the new Uboot on the sdcard&lt;br /&gt;
the first 512 sectors are partition you do NOT want to write that or you lose your partition&lt;br /&gt;
 # dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8 conv=sync&lt;br /&gt;
&lt;br /&gt;
Make sure your disk is OK.&lt;br /&gt;
&lt;br /&gt;
 # fdisk -l&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Disk model: e microSD       &lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: dos&lt;br /&gt;
Disk identifier: 0x50fdd1d4&lt;br /&gt;
&lt;br /&gt;
Device     Boot     Start       End   Sectors  Size Id Type&lt;br /&gt;
/dev/sdb1            2048   2099199   2097152    1G 83 Linux&lt;br /&gt;
/dev/sdb2         2099200  65013759  62914560   30G 83 Linux&lt;br /&gt;
/dev/sdb3        65013760 127928319  62914560   30G 83 Linux&lt;br /&gt;
/dev/sdb4       127928320 251131903 123203584 58.8G 83 Linux&lt;br /&gt;
root@wifirouter:/usr/src# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If it looks like above its ok.&lt;br /&gt;
&lt;br /&gt;
===Flashing JumpDrive===&lt;br /&gt;
Lets start with the first OS were going to use:&lt;br /&gt;
&lt;br /&gt;
JumpDrive (allows booting the EMMC and fixing it if we break it!!!)&lt;br /&gt;
&lt;br /&gt;
Download it here:&lt;br /&gt;
&lt;br /&gt;
 https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/0.4/pine64-pinephone.img.xz&lt;br /&gt;
&lt;br /&gt;
then use losetup to mount the image to copy the files needed&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/home/dave# losetup -P -f pine64-pinephone.img &lt;br /&gt;
&lt;br /&gt;
it'll mount a loop back&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/home/dave# ls /dev/loop0*&lt;br /&gt;
 /dev/loop0  /dev/loop0p1&lt;br /&gt;
&lt;br /&gt;
Mount there first image:&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/home/dave# mkdir /media/jumpdrive&lt;br /&gt;
 root@wifirouter:/home/dave# mount /dev/loop0p1 /media/jumpdrive/&lt;br /&gt;
&lt;br /&gt;
mount the sd card:&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/media# mkdir /media/boot&lt;br /&gt;
 root@wifirouter:/media# fdisk -l&lt;br /&gt;
&lt;br /&gt;
Your sd card should look like below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 119.8 GiB, 128579534848 bytes, 251131904 sectors&lt;br /&gt;
Disk model: e microSD       &lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: dos&lt;br /&gt;
Disk identifier: 0x50fdd1d4&lt;br /&gt;
&lt;br /&gt;
Device     Boot     Start       End   Sectors  Size Id Type&lt;br /&gt;
/dev/sdb1            2048   2099199   2097152    1G 83 Linux&lt;br /&gt;
/dev/sdb2         2099200  65013759  62914560   30G 83 Linux&lt;br /&gt;
/dev/sdb3        65013760 127928319  62914560   30G 83 Linux&lt;br /&gt;
/dev/sdb4       127928320 251131903 123203584 58.8G 83 Linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/media# mount /dev/sdb1 /media/boot/&lt;br /&gt;
 root@wifirouter:/media# cd /media/boot&lt;br /&gt;
 root@wifirouter:/media/boot# mkdir boot&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/media/boot# mkdir -p multiboot/jumpdrive&lt;br /&gt;
 root@wifirouter:/media/boot# cp * multiboot/jumpdrive &lt;br /&gt;
&lt;br /&gt;
End result should be like this ( this is complete file)&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/media/boot/multiboot/jumpdrive# ls -la&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
total 4988&lt;br /&gt;
drwxr-xr-x 2 root  root     4096 Jun 25 05:51 .&lt;br /&gt;
drwxr-xr-x 3 root  root     4096 Jun 25 05:46 ..&lt;br /&gt;
-rwxr-xr-x 1 32011 32011 3991895 Jun 25 05:45 Image.gz&lt;br /&gt;
-rwxr-xr-x 1 32011 32011 1068435 Jun 25 05:45 initramfs.gz&lt;br /&gt;
-rwxr-xr-x 1 32011 32011   33457 Jun 25 05:45 sun50i-a64-pinephone.dtb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 root@wifirouter:/media/boot/multiboot/jumpdrive# pwd&lt;br /&gt;
&lt;br /&gt;
Now we need to create the boot.txt for uboot to load:&lt;br /&gt;
&lt;br /&gt;
Your text file should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv kernel_addr_z 0x44080000&lt;br /&gt;
&lt;br /&gt;
setenv bootargs loglevel=0 silent console=tty0 vt.global_cursor_default=0&lt;br /&gt;
&lt;br /&gt;
if test &amp;quot;${volume_key}&amp;quot; = &amp;quot;up&amp;quot; ; then &lt;br /&gt;
echo &amp;quot;yes im here&amp;quot;&lt;br /&gt;
setenv devtype mmc&lt;br /&gt;
setenv devnum 0&lt;br /&gt;
setenv distro_bootpart 1&lt;br /&gt;
if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_z} /multiboot/jumpdrive/Image.gz; then&lt;br /&gt;
  unzip ${kernel_addr_z} ${kernel_addr_r}&lt;br /&gt;
  if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /multiboot/jumpdrive/sun50i-a64-pinephone.dtb; then&lt;br /&gt;
    if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /multiboot/jumpdrive/initramfs.gz; then&lt;br /&gt;
      booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};&lt;br /&gt;
    else&lt;br /&gt;
      booti ${kernel_addr_r} - ${fdt_addr_r};&lt;br /&gt;
    fi;&lt;br /&gt;
  fi;&lt;br /&gt;
fi&lt;br /&gt;
exit&lt;br /&gt;
fi&lt;br /&gt;
if test &amp;quot;${volume_key}&amp;quot; = &amp;quot;down&amp;quot; ; then &lt;br /&gt;
echo &amp;quot;down&amp;quot;&lt;br /&gt;
ext4load mmc 0:2 ${kernel_addr_r} /boot/Image&lt;br /&gt;
ext4load mmc 0:2 ${fdt_addr_r} /boot/dtb/sun50i-a64-pinephone-1.2.dtb&lt;br /&gt;
setenv bootargs root=/dev/mmcblk0p2 rw console=ttyS0,115200 console=tty1 initrd=/boot/initrd.img quiet&lt;br /&gt;
booti ${kernel_addr_r} - ${fdt_addr_r} &lt;br /&gt;
else&lt;br /&gt;
setenv devtype mmc&lt;br /&gt;
setenv devnum 1&lt;br /&gt;
setenv partnum 4&lt;br /&gt;
load ${devtype} ${devnum}:2 ${scriptaddr} /boot.scr&lt;br /&gt;
source ${scriptaddr}&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Compile the boot script:&lt;br /&gt;
&lt;br /&gt;
 mkimage -C none -A arm -T script -d boot.text boot.scr&lt;br /&gt;
 cp boot.scr /media/boot/boot&lt;br /&gt;
&lt;br /&gt;
This should now be working with JumpDrive..&lt;br /&gt;
&lt;br /&gt;
===Flashing PostMarketOS===&lt;br /&gt;
Now lets download PostMarketOS&lt;br /&gt;
&lt;br /&gt;
 # wget http://images.postmarketos.org/pinephone/pine-pinephone-20200624-phosh-crust.img.xz&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/home/dave# unxz pine-pinephone-20200624-phosh-crust.img.xz&lt;br /&gt;
 root@wifirouter:/home/dave# losetup -P -f pine-pinephone-20200624-phosh-crust.img&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/home/dave# ls /dev/loop1*&lt;br /&gt;
 /dev/loop1  /dev/loop1p1  /dev/loop1p2&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/home/dave# mount /dev/loop1p1 /media/postmarketboot/&lt;br /&gt;
 root@wifirouter:/home/dave# mount /dev/loop1p2 /media/postmarket/&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/home/dave# fdisk -l /dev/loop1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Disk /dev/loop1: 1.4 GiB, 1504706560 bytes, 2938880 sectors&lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: dos&lt;br /&gt;
Disk identifier: 0x0eef1887&lt;br /&gt;
&lt;br /&gt;
Device       Boot  Start     End Sectors  Size Id Type&lt;br /&gt;
/dev/loop1p1 *      2048  249855  247808  121M 83 Linux&lt;br /&gt;
/dev/loop1p2      249856 2938879 2689024  1.3G 83 Linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 root@wifirouter:/media# ls -la /media/postmarketboot/&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
total 40202&lt;br /&gt;
drwxr-xr-x  3 root root     1024 Jun 24 08:40 .&lt;br /&gt;
drwxr-xr-x 16 root root     4096 Jun 25 21:24 ..&lt;br /&gt;
-rw-r--r--  1 root root      949 Jun 17 05:19 boot.scr&lt;br /&gt;
-rw-r--r--  1 root root  1431266 Jun 24 08:40 initramfs-postmarketos-allwinner&lt;br /&gt;
-rw-r--r--  1 root root  6875596 Jun 24 08:40 initramfs-postmarketos-allwinner-extra&lt;br /&gt;
drwx------  2 root root    12288 Jun 24 08:42 lost+found&lt;br /&gt;
-rw-r--r--  1 root root    33835 Jun 24 08:40 sun50i-a64-pinephone-1.1.dtb&lt;br /&gt;
-rw-r--r--  1 root root 15601736 Jun 24 08:40 uImage-postmarketos-allwinner&lt;br /&gt;
-rw-r--r--  1 root root  1431330 Jun 24 08:40 uInitrd-postmarketos-allwinner&lt;br /&gt;
-rw-r--r--  1 root root 15601672 Jun 21 16:57 vmlinuz-postmarketos-allwinner&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Take a look at how the boot.scr works with postmarketos:&lt;br /&gt;
&lt;br /&gt;
 root@wifirouter:/media# cat /media/postmarketboot/boot.scr &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
'Vi?_^??;u??npostmarketosmgpio set 98&lt;br /&gt;
gpio set 114&lt;br /&gt;
&lt;br /&gt;
if test ${mmc_bootdev} -eq 0 ; then&lt;br /&gt;
	echo &amp;quot;Booting from SD&amp;quot;;&lt;br /&gt;
	setenv bootdev 0;&lt;br /&gt;
else&lt;br /&gt;
	echo &amp;quot;Booting from eMMC&amp;quot;;&lt;br /&gt;
	setenv bootdev 2;&lt;br /&gt;
fi;&lt;br /&gt;
&lt;br /&gt;
setenv bootargs init=/init.sh rw console=tty0 console=ttyS0,115200 no_console_suspend earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1 cma=256M PMOS_NO_OUTPUT_REDIRECT pmos_boot=/dev/mmcblk${bootdev}p1 pmos_root=/dev/mmcblk${bootdev}p2&lt;br /&gt;
&lt;br /&gt;
printenv&lt;br /&gt;
&lt;br /&gt;
echo Loading DTB&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${fdt_addr_r} sun50i-a64-pinephone-1.1.dtb&lt;br /&gt;
&lt;br /&gt;
echo Loading Initramfs&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} uInitrd-postmarketos-allwinner&lt;br /&gt;
&lt;br /&gt;
echo Loading Kernel&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${kernel_addr_r} vmlinuz-postmarketos-allwinner&lt;br /&gt;
&lt;br /&gt;
gpio set 115&lt;br /&gt;
&lt;br /&gt;
echo Resizing FDT&lt;br /&gt;
fdt addr ${fdt_addr_r}&lt;br /&gt;
fdt resize&lt;br /&gt;
&lt;br /&gt;
echo Booting kernel&lt;br /&gt;
gpio set 116&lt;br /&gt;
gpio clear 98&lt;br /&gt;
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # mkdir -p /media/boot/multiboot/postmarketos/&lt;br /&gt;
 # cd /media/postmarketboot&lt;br /&gt;
 # cp -r * /media/boot/multiboot/postmarketos/&lt;br /&gt;
&lt;br /&gt;
 # mkfs.ext4 /dev/sdb#&lt;br /&gt;
 # mkdir -p /media/newpostmarketbin&lt;br /&gt;
 # mount /dev/sdb# /media/newpostmarketbin&lt;br /&gt;
 # cd /media/postmarketos&lt;br /&gt;
 # rsync -avh * /media/newpostmarketbin&lt;br /&gt;
 # cp /media/postmarketboot /media/newpostmarketbin/boot&lt;br /&gt;
 # cp /media/postmarketboot /media/newpostmarketbin/&lt;br /&gt;
&lt;br /&gt;
=== This is the script UBOOT with load and ch use different OS's === &lt;br /&gt;
&lt;br /&gt;
now edit the boot.text to reflect the changes of the images&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv kernel_addr_z 0x44080000&lt;br /&gt;
&lt;br /&gt;
setenv bootargs loglevel=0 silent console=tty0 vt.global_cursor_default=0&lt;br /&gt;
&lt;br /&gt;
# This if statement boots up jumpdrive, if you notice there is an environment variable&lt;br /&gt;
# which is what the uboot patch does, it allows you to have an environment variable&lt;br /&gt;
# if someone holds the volume UP key it is set&lt;br /&gt;
&lt;br /&gt;
if test &amp;quot;${volume_key}&amp;quot; = &amp;quot;up&amp;quot; ; then &lt;br /&gt;
echo &amp;quot;yes im here&amp;quot;&lt;br /&gt;
setenv devtype mmc&lt;br /&gt;
setenv devnum 0&lt;br /&gt;
setenv distro_bootpart 1&lt;br /&gt;
if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_z} /multiboot/jumpdrive/Image.gz; then&lt;br /&gt;
  unzip ${kernel_addr_z} ${kernel_addr_r}&lt;br /&gt;
  if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /multiboot/jumpdrive/sun50i-a64-pinephone.dtb; then&lt;br /&gt;
    if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /multiboot/jumpdrive/initramfs.gz; then&lt;br /&gt;
      booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};&lt;br /&gt;
    else&lt;br /&gt;
      booti ${kernel_addr_r} - ${fdt_addr_r};&lt;br /&gt;
    fi;&lt;br /&gt;
  fi;&lt;br /&gt;
fi&lt;br /&gt;
exit&lt;br /&gt;
fi&lt;br /&gt;
# BOOT UP SECONDARY OS, this is customized for Postmarket OS make your changes here to change the OS LOADED&lt;br /&gt;
# and specific boot OPTIONS For your Second boot environment&lt;br /&gt;
# Again if the volume_key is pressed down, do this which is set by environment variable&lt;br /&gt;
&lt;br /&gt;
if test &amp;quot;${volume_key}&amp;quot; = &amp;quot;down&amp;quot; ; then &lt;br /&gt;
echo &amp;quot;down&amp;quot;&lt;br /&gt;
&lt;br /&gt;
setenv bootdev 0&lt;br /&gt;
setenv bootargs init=/init.sh rw console=tty0 console=ttyS0,115200 no_console_suspend earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1 cma=256M PMOS_NO_OUTPUT_REDIRECT pmos_boot=/dev/mmcblk${bootdev}p3 pmos_root=/dev/mmcblk${bootdev}p3&lt;br /&gt;
&lt;br /&gt;
printenv&lt;br /&gt;
&lt;br /&gt;
echo Loading DTB&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${fdt_addr_r} /multiboot/postmarketos/sun50i-a64-pinephone-1.1.dtb&lt;br /&gt;
&lt;br /&gt;
echo Loading Initramfs&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} /multiboot/postmarketos/uInitrd-postmarketos-allwinner&lt;br /&gt;
&lt;br /&gt;
echo Loading Kernel&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${kernel_addr_r} /multiboot/postmarketos/vmlinuz-postmarketos-allwinner&lt;br /&gt;
&lt;br /&gt;
gpio set 115&lt;br /&gt;
&lt;br /&gt;
echo Resizing FDT&lt;br /&gt;
fdt addr ${fdt_addr_r}&lt;br /&gt;
fdt resize&lt;br /&gt;
&lt;br /&gt;
echo Booting kernel&lt;br /&gt;
gpio set 116&lt;br /&gt;
gpio clear 98&lt;br /&gt;
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}&lt;br /&gt;
&lt;br /&gt;
# This ELSE statement assumes you have UBUNTU PORTS on your EMMC by default it says the following&lt;br /&gt;
# If nothing is being pressed than load the boot script on the EMMC drive, 1,4 where the boot script resides&lt;br /&gt;
# on UBUNTU PORTS EMMC device&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
setenv devtype mmc&lt;br /&gt;
setenv devnum 1&lt;br /&gt;
setenv partnum 4&lt;br /&gt;
load ${devtype} ${devnum}:2 ${scriptaddr} /boot.scr&lt;br /&gt;
source ${scriptaddr}&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
compile it:&lt;br /&gt;
&lt;br /&gt;
 # mkimage -C none -A arm -T script -d boot.text boot.scr&lt;br /&gt;
&lt;br /&gt;
Once booted, you will need to run depmod -a after logging into it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sites Referenced/Inspiration===&lt;br /&gt;
&lt;br /&gt;
* https://www.96boards.org/documentation/iot/&lt;br /&gt;
* https://github.com/dreemurrs-embedded/Jumpdrive&lt;br /&gt;
* https://github.com/dreemurrs-embedded/Pineloader&lt;br /&gt;
* https://www.thegeekstuff.com/2014/12/patch-command-examples/&lt;br /&gt;
* https://stackoverflow.com/questions/9980186/how-to-create-a-patch-for-a-whole-directory-to-update-it&lt;br /&gt;
* https://courses.linuxchix.org/kernel-hacking-2002/11-creating-applying-and-submitting-patches.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Patch To Cut And Paste into file for uboot ===&lt;br /&gt;
PATCH BELOW CUT AND PASTE INTO FILE! &lt;br /&gt;
&lt;br /&gt;
volumecontrol.patch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
diff -urN u-boot2/board/sunxi/Makefile u-boot/board/sunxi/Makefile&lt;br /&gt;
--- u-boot2/board/sunxi/Makefile	2020-06-27 01:09:17.687936000 +0000&lt;br /&gt;
+++ u-boot/board/sunxi/Makefile	2020-06-27 01:11:32.102472000 +0000&lt;br /&gt;
@@ -11,3 +11,4 @@&lt;br /&gt;
 obj-$(CONFIG_MACH_SUN4I)	+= dram_sun4i_auto.o&lt;br /&gt;
 obj-$(CONFIG_MACH_SUN5I)	+= dram_sun5i_auto.o&lt;br /&gt;
 obj-$(CONFIG_MACH_SUN7I)	+= dram_sun5i_auto.o&lt;br /&gt;
+obj-$(CONFIG_MACH_SUN50I)	+= lradc.o&lt;br /&gt;
diff -urN u-boot2/board/sunxi/board.c u-boot/board/sunxi/board.c&lt;br /&gt;
--- u-boot2/board/sunxi/board.c	2020-06-27 01:09:17.687936000 +0000&lt;br /&gt;
+++ u-boot/board/sunxi/board.c	2020-06-27 01:19:15.609314000 +0000&lt;br /&gt;
@@ -44,6 +44,7 @@&lt;br /&gt;
 #include &amp;lt;spl.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sy8106a.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;asm/setup.h&amp;gt;&lt;br /&gt;
+#include &amp;quot;lradc.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 #if defined CONFIG_VIDEO_LCD_PANEL_I2C &amp;amp;&amp;amp; !(defined CONFIG_SPL_BUILD)&lt;br /&gt;
 /* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */&lt;br /&gt;
@@ -639,6 +640,11 @@&lt;br /&gt;
 void sunxi_board_init(void)&lt;br /&gt;
 {&lt;br /&gt;
 	int power_failed = 0;&lt;br /&gt;
+#ifdef CONFIG_MACH_SUN50I&lt;br /&gt;
+	// we init the lradc in SPL to get the ADC started early to have&lt;br /&gt;
+	// a valid sample when U-Boot main binary gets executed.&lt;br /&gt;
+	lradc_enable();&lt;br /&gt;
+#endif&lt;br /&gt;
 &lt;br /&gt;
 #ifdef CONFIG_SY8106A_POWER&lt;br /&gt;
 	power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);&lt;br /&gt;
@@ -899,6 +905,17 @@&lt;br /&gt;
 		env_set(&amp;quot;fdtfile&amp;quot;, str);&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
+#ifdef CONFIG_MACH_SUN50I&lt;br /&gt;
+	int key = lradc_get_pressed_key();&lt;br /&gt;
+	if (key == KEY_VOLUMEDOWN)&lt;br /&gt;
+		env_set(&amp;quot;volume_key&amp;quot;, &amp;quot;down&amp;quot;);&lt;br /&gt;
+	else if (key == KEY_VOLUMEUP)&lt;br /&gt;
+		env_set(&amp;quot;volume_key&amp;quot;, &amp;quot;up&amp;quot;);&lt;br /&gt;
+	&lt;br /&gt;
+	// no longer needed&lt;br /&gt;
+	lradc_disable();&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
 	setup_environment(gd-&amp;gt;fdt_blob);&lt;br /&gt;
 &lt;br /&gt;
 #ifdef CONFIG_USB_ETHER&lt;br /&gt;
diff -urN u-boot2/board/sunxi/board.c.orig u-boot/board/sunxi/board.c.orig&lt;br /&gt;
--- u-boot2/board/sunxi/board.c.orig	1970-01-01 00:00:00.000000000 +0000&lt;br /&gt;
+++ u-boot/board/sunxi/board.c.orig	2020-06-27 01:03:03.795626000 +0000&lt;br /&gt;
@@ -0,0 +1,982 @@&lt;br /&gt;
+// SPDX-License-Identifier: GPL-2.0+&lt;br /&gt;
+/*&lt;br /&gt;
+ * (C) Copyright 2012-2013 Henrik Nordstrom &amp;lt;henrik@henriknordstrom.net&amp;gt;&lt;br /&gt;
+ * (C) Copyright 2013 Luke Kenneth Casson Leighton &amp;lt;lkcl@lkcl.net&amp;gt;&lt;br /&gt;
+ *&lt;br /&gt;
+ * (C) Copyright 2007-2011&lt;br /&gt;
+ * Allwinner Technology Co., Ltd. &amp;lt;www.allwinnertech.com&amp;gt;&lt;br /&gt;
+ * Tom Cubie &amp;lt;tangliang@allwinnertech.com&amp;gt;&lt;br /&gt;
+ *&lt;br /&gt;
+ * Some board init for the Allwinner A10-evb board.&lt;br /&gt;
+ */&lt;br /&gt;
+&lt;br /&gt;
+#include &amp;lt;common.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;dm.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;env.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;hang.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;image.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;init.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;log.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;mmc.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;axp_pmic.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;generic-phy.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;phy-sun4i-usb.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/arch/clock.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/arch/cpu.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/arch/display.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/arch/dram.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/arch/gpio.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/arch/mmc.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/arch/prcm.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/arch/spl.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;linux/delay.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;u-boot/crc.h&amp;gt;&lt;br /&gt;
+#ifndef CONFIG_ARM64&lt;br /&gt;
+#include &amp;lt;asm/armv7.h&amp;gt;&lt;br /&gt;
+#endif&lt;br /&gt;
+#include &amp;lt;asm/gpio.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/io.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;u-boot/crc.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;env_internal.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;linux/libfdt.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;nand.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;net.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;spl.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;sy8106a.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/setup.h&amp;gt;&lt;br /&gt;
+&lt;br /&gt;
+#if defined CONFIG_VIDEO_LCD_PANEL_I2C &amp;amp;&amp;amp; !(defined CONFIG_SPL_BUILD)&lt;br /&gt;
+/* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */&lt;br /&gt;
+int soft_i2c_gpio_sda;&lt;br /&gt;
+int soft_i2c_gpio_scl;&lt;br /&gt;
+&lt;br /&gt;
+static int soft_i2c_board_init(void)&lt;br /&gt;
+{&lt;br /&gt;
+	int ret;&lt;br /&gt;
+&lt;br /&gt;
+	soft_i2c_gpio_sda = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_PANEL_I2C_SDA);&lt;br /&gt;
+	if (soft_i2c_gpio_sda &amp;lt; 0) {&lt;br /&gt;
+		printf(&amp;quot;Error invalid soft i2c sda pin: '%s', err %d\n&amp;quot;,&lt;br /&gt;
+		       CONFIG_VIDEO_LCD_PANEL_I2C_SDA, soft_i2c_gpio_sda);&lt;br /&gt;
+		return soft_i2c_gpio_sda;&lt;br /&gt;
+	}&lt;br /&gt;
+	ret = gpio_request(soft_i2c_gpio_sda, &amp;quot;soft-i2c-sda&amp;quot;);&lt;br /&gt;
+	if (ret) {&lt;br /&gt;
+		printf(&amp;quot;Error requesting soft i2c sda pin: '%s', err %d\n&amp;quot;,&lt;br /&gt;
+		       CONFIG_VIDEO_LCD_PANEL_I2C_SDA, ret);&lt;br /&gt;
+		return ret;&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	soft_i2c_gpio_scl = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_PANEL_I2C_SCL);&lt;br /&gt;
+	if (soft_i2c_gpio_scl &amp;lt; 0) {&lt;br /&gt;
+		printf(&amp;quot;Error invalid soft i2c scl pin: '%s', err %d\n&amp;quot;,&lt;br /&gt;
+		       CONFIG_VIDEO_LCD_PANEL_I2C_SCL, soft_i2c_gpio_scl);&lt;br /&gt;
+		return soft_i2c_gpio_scl;&lt;br /&gt;
+	}&lt;br /&gt;
+	ret = gpio_request(soft_i2c_gpio_scl, &amp;quot;soft-i2c-scl&amp;quot;);&lt;br /&gt;
+	if (ret) {&lt;br /&gt;
+		printf(&amp;quot;Error requesting soft i2c scl pin: '%s', err %d\n&amp;quot;,&lt;br /&gt;
+		       CONFIG_VIDEO_LCD_PANEL_I2C_SCL, ret);&lt;br /&gt;
+		return ret;&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	return 0;&lt;br /&gt;
+}&lt;br /&gt;
+#else&lt;br /&gt;
+static int soft_i2c_board_init(void) { return 0; }&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+DECLARE_GLOBAL_DATA_PTR;&lt;br /&gt;
+&lt;br /&gt;
+void i2c_init_board(void)&lt;br /&gt;
+{&lt;br /&gt;
+#ifdef CONFIG_I2C0_ENABLE&lt;br /&gt;
+#if defined(CONFIG_MACH_SUN4I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN5I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN7I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN8I_R40)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN4I_GPB_TWI0);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN4I_GPB_TWI0);&lt;br /&gt;
+	clock_twi_onoff(0, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN6I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(14), SUN6I_GPH_TWI0);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(15), SUN6I_GPH_TWI0);&lt;br /&gt;
+	clock_twi_onoff(0, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN8I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(2), SUN8I_GPH_TWI0);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(3), SUN8I_GPH_TWI0);&lt;br /&gt;
+	clock_twi_onoff(0, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN50I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(0), SUN50I_GPH_TWI0);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(1), SUN50I_GPH_TWI0);&lt;br /&gt;
+	clock_twi_onoff(0, 1);&lt;br /&gt;
+#endif&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_I2C1_ENABLE&lt;br /&gt;
+#if defined(CONFIG_MACH_SUN4I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN7I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN8I_R40)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(18), SUN4I_GPB_TWI1);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(19), SUN4I_GPB_TWI1);&lt;br /&gt;
+	clock_twi_onoff(1, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN5I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(15), SUN5I_GPB_TWI1);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(16), SUN5I_GPB_TWI1);&lt;br /&gt;
+	clock_twi_onoff(1, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN6I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(16), SUN6I_GPH_TWI1);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(17), SUN6I_GPH_TWI1);&lt;br /&gt;
+	clock_twi_onoff(1, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN8I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(4), SUN8I_GPH_TWI1);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(5), SUN8I_GPH_TWI1);&lt;br /&gt;
+	clock_twi_onoff(1, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN50I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(2), SUN50I_GPH_TWI1);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(3), SUN50I_GPH_TWI1);&lt;br /&gt;
+	clock_twi_onoff(1, 1);&lt;br /&gt;
+#endif&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_I2C2_ENABLE&lt;br /&gt;
+#if defined(CONFIG_MACH_SUN4I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN7I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN8I_R40)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(20), SUN4I_GPB_TWI2);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(21), SUN4I_GPB_TWI2);&lt;br /&gt;
+	clock_twi_onoff(2, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN5I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(17), SUN5I_GPB_TWI2);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPB(18), SUN5I_GPB_TWI2);&lt;br /&gt;
+	clock_twi_onoff(2, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN6I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(18), SUN6I_GPH_TWI2);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPH(19), SUN6I_GPH_TWI2);&lt;br /&gt;
+	clock_twi_onoff(2, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN8I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPE(12), SUN8I_GPE_TWI2);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPE(13), SUN8I_GPE_TWI2);&lt;br /&gt;
+	clock_twi_onoff(2, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN50I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPE(14), SUN50I_GPE_TWI2);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPE(15), SUN50I_GPE_TWI2);&lt;br /&gt;
+	clock_twi_onoff(2, 1);&lt;br /&gt;
+#endif&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_I2C3_ENABLE&lt;br /&gt;
+#if defined(CONFIG_MACH_SUN6I)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPG(10), SUN6I_GPG_TWI3);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPG(11), SUN6I_GPG_TWI3);&lt;br /&gt;
+	clock_twi_onoff(3, 1);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN7I) || \&lt;br /&gt;
+      defined(CONFIG_MACH_SUN8I_R40)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPI(0), SUN7I_GPI_TWI3);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPI(1), SUN7I_GPI_TWI3);&lt;br /&gt;
+	clock_twi_onoff(3, 1);&lt;br /&gt;
+#endif&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_I2C4_ENABLE&lt;br /&gt;
+#if defined(CONFIG_MACH_SUN7I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN8I_R40)&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPI(2), SUN7I_GPI_TWI4);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPI(3), SUN7I_GPI_TWI4);&lt;br /&gt;
+	clock_twi_onoff(4, 1);&lt;br /&gt;
+#endif&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_R_I2C_ENABLE&lt;br /&gt;
+#ifdef CONFIG_MACH_SUN50I&lt;br /&gt;
+	clock_twi_onoff(5, 1);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPL(8), SUN50I_GPL_R_TWI);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPL(9), SUN50I_GPL_R_TWI);&lt;br /&gt;
+#else&lt;br /&gt;
+	clock_twi_onoff(5, 1);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPL(0), SUN8I_H3_GPL_R_TWI);&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPL(1), SUN8I_H3_GPL_R_TWI);&lt;br /&gt;
+#endif&lt;br /&gt;
+#endif&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+#if defined(CONFIG_ENV_IS_IN_MMC) &amp;amp;&amp;amp; defined(CONFIG_ENV_IS_IN_FAT)&lt;br /&gt;
+enum env_location env_get_location(enum env_operation op, int prio)&lt;br /&gt;
+{&lt;br /&gt;
+	switch (prio) {&lt;br /&gt;
+	case 0:&lt;br /&gt;
+		return ENVL_FAT;&lt;br /&gt;
+&lt;br /&gt;
+	case 1:&lt;br /&gt;
+		return ENVL_MMC;&lt;br /&gt;
+&lt;br /&gt;
+	default:&lt;br /&gt;
+		return ENVL_UNKNOWN;&lt;br /&gt;
+	}&lt;br /&gt;
+}&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_DM_MMC&lt;br /&gt;
+static void mmc_pinmux_setup(int sdc);&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+/* add board specific code here */&lt;br /&gt;
+int board_init(void)&lt;br /&gt;
+{&lt;br /&gt;
+	__maybe_unused int id_pfr1, ret, satapwr_pin, macpwr_pin;&lt;br /&gt;
+&lt;br /&gt;
+	gd-&amp;gt;bd-&amp;gt;bi_boot_params = (PHYS_SDRAM_0 + 0x100);&lt;br /&gt;
+&lt;br /&gt;
+#ifndef CONFIG_ARM64&lt;br /&gt;
+	asm volatile(&amp;quot;mrc p15, 0, %0, c0, c1, 1&amp;quot; : &amp;quot;=r&amp;quot;(id_pfr1));&lt;br /&gt;
+	debug(&amp;quot;id_pfr1: 0x%08x\n&amp;quot;, id_pfr1);&lt;br /&gt;
+	/* Generic Timer Extension available? */&lt;br /&gt;
+	if ((id_pfr1 &amp;gt;&amp;gt; CPUID_ARM_GENTIMER_SHIFT) &amp;amp; 0xf) {&lt;br /&gt;
+		uint32_t freq;&lt;br /&gt;
+&lt;br /&gt;
+		debug(&amp;quot;Setting CNTFRQ\n&amp;quot;);&lt;br /&gt;
+&lt;br /&gt;
+		/*&lt;br /&gt;
+		 * CNTFRQ is a secure register, so we will crash if we try to&lt;br /&gt;
+		 * write this from the non-secure world (read is OK, though).&lt;br /&gt;
+		 * In case some bootcode has already set the correct value,&lt;br /&gt;
+		 * we avoid the risk of writing to it.&lt;br /&gt;
+		 */&lt;br /&gt;
+		asm volatile(&amp;quot;mrc p15, 0, %0, c14, c0, 0&amp;quot; : &amp;quot;=r&amp;quot;(freq));&lt;br /&gt;
+		if (freq != COUNTER_FREQUENCY) {&lt;br /&gt;
+			debug(&amp;quot;arch timer frequency is %d Hz, should be %d, fixing ...\n&amp;quot;,&lt;br /&gt;
+			      freq, COUNTER_FREQUENCY);&lt;br /&gt;
+#ifdef CONFIG_NON_SECURE&lt;br /&gt;
+			printf(&amp;quot;arch timer frequency is wrong, but cannot adjust it\n&amp;quot;);&lt;br /&gt;
+#else&lt;br /&gt;
+			asm volatile(&amp;quot;mcr p15, 0, %0, c14, c0, 0&amp;quot;&lt;br /&gt;
+				     : : &amp;quot;r&amp;quot;(COUNTER_FREQUENCY));&lt;br /&gt;
+#endif&lt;br /&gt;
+		}&lt;br /&gt;
+	}&lt;br /&gt;
+#endif /* !CONFIG_ARM64 */&lt;br /&gt;
+&lt;br /&gt;
+	ret = axp_gpio_init();&lt;br /&gt;
+	if (ret)&lt;br /&gt;
+		return ret;&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_SATAPWR&lt;br /&gt;
+	satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);&lt;br /&gt;
+	gpio_request(satapwr_pin, &amp;quot;satapwr&amp;quot;);&lt;br /&gt;
+	gpio_direction_output(satapwr_pin, 1);&lt;br /&gt;
+	/* Give attached sata device time to power-up to avoid link timeouts */&lt;br /&gt;
+	mdelay(500);&lt;br /&gt;
+#endif&lt;br /&gt;
+#ifdef CONFIG_MACPWR&lt;br /&gt;
+	macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);&lt;br /&gt;
+	gpio_request(macpwr_pin, &amp;quot;macpwr&amp;quot;);&lt;br /&gt;
+	gpio_direction_output(macpwr_pin, 1);&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_DM_I2C&lt;br /&gt;
+	/*&lt;br /&gt;
+	 * Temporary workaround for enabling I2C clocks until proper sunxi DM&lt;br /&gt;
+	 * clk, reset and pinctrl drivers land.&lt;br /&gt;
+	 */&lt;br /&gt;
+	i2c_init_board();&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_DM_MMC&lt;br /&gt;
+	/*&lt;br /&gt;
+	 * Temporary workaround for enabling MMC clocks until a sunxi DM&lt;br /&gt;
+	 * pinctrl driver lands.&lt;br /&gt;
+	 */&lt;br /&gt;
+	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);&lt;br /&gt;
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1&lt;br /&gt;
+	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT_EXTRA);&lt;br /&gt;
+#endif&lt;br /&gt;
+#endif	/* CONFIG_DM_MMC */&lt;br /&gt;
+&lt;br /&gt;
+	/* Uses dm gpio code so do this here and not in i2c_init_board() */&lt;br /&gt;
+	return soft_i2c_board_init();&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+/*&lt;br /&gt;
+ * On older SoCs the SPL is actually at address zero, so using NULL as&lt;br /&gt;
+ * an error value does not work.&lt;br /&gt;
+ */&lt;br /&gt;
+#define INVALID_SPL_HEADER ((void *)~0UL)&lt;br /&gt;
+&lt;br /&gt;
+static struct boot_file_head * get_spl_header(uint8_t req_version)&lt;br /&gt;
+{&lt;br /&gt;
+	struct boot_file_head *spl = (void *)(ulong)SPL_ADDR;&lt;br /&gt;
+	uint8_t spl_header_version = spl-&amp;gt;spl_signature[3];&lt;br /&gt;
+&lt;br /&gt;
+	/* Is there really the SPL header (still) there? */&lt;br /&gt;
+	if (memcmp(spl-&amp;gt;spl_signature, SPL_SIGNATURE, 3) != 0)&lt;br /&gt;
+		return INVALID_SPL_HEADER;&lt;br /&gt;
+&lt;br /&gt;
+	if (spl_header_version &amp;lt; req_version) {&lt;br /&gt;
+		printf(&amp;quot;sunxi SPL version mismatch: expected %u, got %u\n&amp;quot;,&lt;br /&gt;
+		       req_version, spl_header_version);&lt;br /&gt;
+		return INVALID_SPL_HEADER;&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	return spl;&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+static const char *get_spl_dt_name(void)&lt;br /&gt;
+{&lt;br /&gt;
+	struct boot_file_head *spl = get_spl_header(SPL_DT_HEADER_VERSION);&lt;br /&gt;
+&lt;br /&gt;
+	/* Check if there is a DT name stored in the SPL header. */&lt;br /&gt;
+	if (spl != INVALID_SPL_HEADER &amp;amp;&amp;amp; spl-&amp;gt;dt_name_offset)&lt;br /&gt;
+		return (char *)spl + spl-&amp;gt;dt_name_offset;&lt;br /&gt;
+&lt;br /&gt;
+	return NULL;&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+static void set_spl_dt_name(const char *name)&lt;br /&gt;
+{&lt;br /&gt;
+	struct boot_file_head *spl = get_spl_header(SPL_ENV_HEADER_VERSION);&lt;br /&gt;
+&lt;br /&gt;
+	if (spl == INVALID_SPL_HEADER)&lt;br /&gt;
+		return;&lt;br /&gt;
+&lt;br /&gt;
+	/* Promote the header version for U-Boot proper, if needed. */&lt;br /&gt;
+	if (spl-&amp;gt;spl_signature[3] &amp;lt; SPL_DT_HEADER_VERSION)&lt;br /&gt;
+		spl-&amp;gt;spl_signature[3] = SPL_DT_HEADER_VERSION;&lt;br /&gt;
+&lt;br /&gt;
+	strcpy((char *)&amp;amp;spl-&amp;gt;string_pool, name);&lt;br /&gt;
+	spl-&amp;gt;dt_name_offset = offsetof(struct boot_file_head, string_pool);&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+int dram_init(void)&lt;br /&gt;
+{&lt;br /&gt;
+	struct boot_file_head *spl = get_spl_header(SPL_DRAM_HEADER_VERSION);&lt;br /&gt;
+&lt;br /&gt;
+	if (spl == INVALID_SPL_HEADER)&lt;br /&gt;
+		gd-&amp;gt;ram_size = get_ram_size((long *)PHYS_SDRAM_0,&lt;br /&gt;
+					    PHYS_SDRAM_0_SIZE);&lt;br /&gt;
+	else&lt;br /&gt;
+		gd-&amp;gt;ram_size = (phys_addr_t)spl-&amp;gt;dram_size &amp;lt;&amp;lt; 20;&lt;br /&gt;
+&lt;br /&gt;
+	if (gd-&amp;gt;ram_size &amp;gt; CONFIG_SUNXI_DRAM_MAX_SIZE)&lt;br /&gt;
+		gd-&amp;gt;ram_size = CONFIG_SUNXI_DRAM_MAX_SIZE;&lt;br /&gt;
+&lt;br /&gt;
+	return 0;&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+#if defined(CONFIG_NAND_SUNXI)&lt;br /&gt;
+static void nand_pinmux_setup(void)&lt;br /&gt;
+{&lt;br /&gt;
+	unsigned int pin;&lt;br /&gt;
+&lt;br /&gt;
+	for (pin = SUNXI_GPC(0); pin &amp;lt;= SUNXI_GPC(19); pin++)&lt;br /&gt;
+		sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_NAND);&lt;br /&gt;
+&lt;br /&gt;
+#if defined CONFIG_MACH_SUN4I || defined CONFIG_MACH_SUN7I&lt;br /&gt;
+	for (pin = SUNXI_GPC(20); pin &amp;lt;= SUNXI_GPC(22); pin++)&lt;br /&gt;
+		sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_NAND);&lt;br /&gt;
+#endif&lt;br /&gt;
+	/* sun4i / sun7i do have a PC23, but it is not used for nand,&lt;br /&gt;
+	 * only sun7i has a PC24 */&lt;br /&gt;
+#ifdef CONFIG_MACH_SUN7I&lt;br /&gt;
+	sunxi_gpio_set_cfgpin(SUNXI_GPC(24), SUNXI_GPC_NAND);&lt;br /&gt;
+#endif&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+static void nand_clock_setup(void)&lt;br /&gt;
+{&lt;br /&gt;
+	struct sunxi_ccm_reg *const ccm =&lt;br /&gt;
+		(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;&lt;br /&gt;
+&lt;br /&gt;
+	setbits_le32(&amp;amp;ccm-&amp;gt;ahb_gate0, (CLK_GATE_OPEN &amp;lt;&amp;lt; AHB_GATE_OFFSET_NAND0));&lt;br /&gt;
+#if defined CONFIG_MACH_SUN6I || defined CONFIG_MACH_SUN8I || \&lt;br /&gt;
+    defined CONFIG_MACH_SUN9I || defined CONFIG_MACH_SUN50I&lt;br /&gt;
+	setbits_le32(&amp;amp;ccm-&amp;gt;ahb_reset0_cfg, (1 &amp;lt;&amp;lt; AHB_GATE_OFFSET_NAND0));&lt;br /&gt;
+#endif&lt;br /&gt;
+	setbits_le32(&amp;amp;ccm-&amp;gt;nand0_clk_cfg, CCM_NAND_CTRL_ENABLE | AHB_DIV_1);&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+void board_nand_init(void)&lt;br /&gt;
+{&lt;br /&gt;
+	nand_pinmux_setup();&lt;br /&gt;
+	nand_clock_setup();&lt;br /&gt;
+#ifndef CONFIG_SPL_BUILD&lt;br /&gt;
+	sunxi_nand_init();&lt;br /&gt;
+#endif&lt;br /&gt;
+}&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_MMC&lt;br /&gt;
+static void mmc_pinmux_setup(int sdc)&lt;br /&gt;
+{&lt;br /&gt;
+	unsigned int pin;&lt;br /&gt;
+	__maybe_unused int pins;&lt;br /&gt;
+&lt;br /&gt;
+	switch (sdc) {&lt;br /&gt;
+	case 0:&lt;br /&gt;
+		/* SDC0: PF0-PF5 */&lt;br /&gt;
+		for (pin = SUNXI_GPF(0); pin &amp;lt;= SUNXI_GPF(5); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUNXI_GPF_SDC0);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+		break;&lt;br /&gt;
+&lt;br /&gt;
+	case 1:&lt;br /&gt;
+		pins = sunxi_name_to_gpio_bank(CONFIG_MMC1_PINS);&lt;br /&gt;
+&lt;br /&gt;
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN8I_R40)&lt;br /&gt;
+		if (pins == SUNXI_GPIO_H) {&lt;br /&gt;
+			/* SDC1: PH22-PH-27 */&lt;br /&gt;
+			for (pin = SUNXI_GPH(22); pin &amp;lt;= SUNXI_GPH(27); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUN4I_GPH_SDC1);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+		} else {&lt;br /&gt;
+			/* SDC1: PG0-PG5 */&lt;br /&gt;
+			for (pin = SUNXI_GPG(0); pin &amp;lt;= SUNXI_GPG(5); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUN4I_GPG_SDC1);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN5I)&lt;br /&gt;
+		/* SDC1: PG3-PG8 */&lt;br /&gt;
+		for (pin = SUNXI_GPG(3); pin &amp;lt;= SUNXI_GPG(8); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUN5I_GPG_SDC1);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN6I)&lt;br /&gt;
+		/* SDC1: PG0-PG5 */&lt;br /&gt;
+		for (pin = SUNXI_GPG(0); pin &amp;lt;= SUNXI_GPG(5); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUN6I_GPG_SDC1);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN8I)&lt;br /&gt;
+		if (pins == SUNXI_GPIO_D) {&lt;br /&gt;
+			/* SDC1: PD2-PD7 */&lt;br /&gt;
+			for (pin = SUNXI_GPD(2); pin &amp;lt;= SUNXI_GPD(7); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUN8I_GPD_SDC1);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+		} else {&lt;br /&gt;
+			/* SDC1: PG0-PG5 */&lt;br /&gt;
+			for (pin = SUNXI_GPG(0); pin &amp;lt;= SUNXI_GPG(5); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUN8I_GPG_SDC1);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+		}&lt;br /&gt;
+#endif&lt;br /&gt;
+		break;&lt;br /&gt;
+&lt;br /&gt;
+	case 2:&lt;br /&gt;
+		pins = sunxi_name_to_gpio_bank(CONFIG_MMC2_PINS);&lt;br /&gt;
+&lt;br /&gt;
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I)&lt;br /&gt;
+		/* SDC2: PC6-PC11 */&lt;br /&gt;
+		for (pin = SUNXI_GPC(6); pin &amp;lt;= SUNXI_GPC(11); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN5I)&lt;br /&gt;
+		if (pins == SUNXI_GPIO_E) {&lt;br /&gt;
+			/* SDC2: PE4-PE9 */&lt;br /&gt;
+			for (pin = SUNXI_GPE(4); pin &amp;lt;= SUNXI_GPD(9); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUN5I_GPE_SDC2);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+		} else {&lt;br /&gt;
+			/* SDC2: PC6-PC15 */&lt;br /&gt;
+			for (pin = SUNXI_GPC(6); pin &amp;lt;= SUNXI_GPC(15); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN6I)&lt;br /&gt;
+		if (pins == SUNXI_GPIO_A) {&lt;br /&gt;
+			/* SDC2: PA9-PA14 */&lt;br /&gt;
+			for (pin = SUNXI_GPA(9); pin &amp;lt;= SUNXI_GPA(14); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_SDC2);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+		} else {&lt;br /&gt;
+			/* SDC2: PC6-PC15, PC24 */&lt;br /&gt;
+			for (pin = SUNXI_GPC(6); pin &amp;lt;= SUNXI_GPC(15); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(SUNXI_GPC(24), SUNXI_GPC_SDC2);&lt;br /&gt;
+			sunxi_gpio_set_pull(SUNXI_GPC(24), SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(SUNXI_GPC(24), 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN8I_R40)&lt;br /&gt;
+		/* SDC2: PC6-PC15, PC24 */&lt;br /&gt;
+		for (pin = SUNXI_GPC(6); pin &amp;lt;= SUNXI_GPC(15); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+&lt;br /&gt;
+		sunxi_gpio_set_cfgpin(SUNXI_GPC(24), SUNXI_GPC_SDC2);&lt;br /&gt;
+		sunxi_gpio_set_pull(SUNXI_GPC(24), SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+		sunxi_gpio_set_drv(SUNXI_GPC(24), 2);&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN8I) || defined(CONFIG_MACH_SUN50I)&lt;br /&gt;
+		/* SDC2: PC5-PC6, PC8-PC16 */&lt;br /&gt;
+		for (pin = SUNXI_GPC(5); pin &amp;lt;= SUNXI_GPC(6); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+&lt;br /&gt;
+		for (pin = SUNXI_GPC(8); pin &amp;lt;= SUNXI_GPC(16); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN50I_H6)&lt;br /&gt;
+		/* SDC2: PC4-PC14 */&lt;br /&gt;
+		for (pin = SUNXI_GPC(4); pin &amp;lt;= SUNXI_GPC(14); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN9I)&lt;br /&gt;
+		/* SDC2: PC6-PC16 */&lt;br /&gt;
+		for (pin = SUNXI_GPC(6); pin &amp;lt;= SUNXI_GPC(16); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SDC2);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#endif&lt;br /&gt;
+		break;&lt;br /&gt;
+&lt;br /&gt;
+	case 3:&lt;br /&gt;
+		pins = sunxi_name_to_gpio_bank(CONFIG_MMC3_PINS);&lt;br /&gt;
+&lt;br /&gt;
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I) || \&lt;br /&gt;
+    defined(CONFIG_MACH_SUN8I_R40)&lt;br /&gt;
+		/* SDC3: PI4-PI9 */&lt;br /&gt;
+		for (pin = SUNXI_GPI(4); pin &amp;lt;= SUNXI_GPI(9); pin++) {&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(pin, SUNXI_GPI_SDC3);&lt;br /&gt;
+			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#elif defined(CONFIG_MACH_SUN6I)&lt;br /&gt;
+		if (pins == SUNXI_GPIO_A) {&lt;br /&gt;
+			/* SDC3: PA9-PA14 */&lt;br /&gt;
+			for (pin = SUNXI_GPA(9); pin &amp;lt;= SUNXI_GPA(14); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_SDC3);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+		} else {&lt;br /&gt;
+			/* SDC3: PC6-PC15, PC24 */&lt;br /&gt;
+			for (pin = SUNXI_GPC(6); pin &amp;lt;= SUNXI_GPC(15); pin++) {&lt;br /&gt;
+				sunxi_gpio_set_cfgpin(pin, SUN6I_GPC_SDC3);&lt;br /&gt;
+				sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+				sunxi_gpio_set_drv(pin, 2);&lt;br /&gt;
+			}&lt;br /&gt;
+&lt;br /&gt;
+			sunxi_gpio_set_cfgpin(SUNXI_GPC(24), SUN6I_GPC_SDC3);&lt;br /&gt;
+			sunxi_gpio_set_pull(SUNXI_GPC(24), SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+			sunxi_gpio_set_drv(SUNXI_GPC(24), 2);&lt;br /&gt;
+		}&lt;br /&gt;
+#endif&lt;br /&gt;
+		break;&lt;br /&gt;
+&lt;br /&gt;
+	default:&lt;br /&gt;
+		printf(&amp;quot;sunxi: invalid MMC slot %d for pinmux setup\n&amp;quot;, sdc);&lt;br /&gt;
+		break;&lt;br /&gt;
+	}&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+int board_mmc_init(bd_t *bis)&lt;br /&gt;
+{&lt;br /&gt;
+	__maybe_unused struct mmc *mmc0, *mmc1;&lt;br /&gt;
+&lt;br /&gt;
+	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);&lt;br /&gt;
+	mmc0 = sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT);&lt;br /&gt;
+	if (!mmc0)&lt;br /&gt;
+		return -1;&lt;br /&gt;
+&lt;br /&gt;
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1&lt;br /&gt;
+	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT_EXTRA);&lt;br /&gt;
+	mmc1 = sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT_EXTRA);&lt;br /&gt;
+	if (!mmc1)&lt;br /&gt;
+		return -1;&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+	return 0;&lt;br /&gt;
+}&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_SPL_BUILD&lt;br /&gt;
+&lt;br /&gt;
+static void sunxi_spl_store_dram_size(phys_addr_t dram_size)&lt;br /&gt;
+{&lt;br /&gt;
+	struct boot_file_head *spl = get_spl_header(SPL_DT_HEADER_VERSION);&lt;br /&gt;
+&lt;br /&gt;
+	if (spl == INVALID_SPL_HEADER)&lt;br /&gt;
+		return;&lt;br /&gt;
+&lt;br /&gt;
+	/* Promote the header version for U-Boot proper, if needed. */&lt;br /&gt;
+	if (spl-&amp;gt;spl_signature[3] &amp;lt; SPL_DRAM_HEADER_VERSION)&lt;br /&gt;
+		spl-&amp;gt;spl_signature[3] = SPL_DRAM_HEADER_VERSION;&lt;br /&gt;
+&lt;br /&gt;
+	spl-&amp;gt;dram_size = dram_size &amp;gt;&amp;gt; 20;&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+void sunxi_board_init(void)&lt;br /&gt;
+{&lt;br /&gt;
+	int power_failed = 0;&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_SY8106A_POWER&lt;br /&gt;
+	power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \&lt;br /&gt;
+	defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \&lt;br /&gt;
+	defined CONFIG_AXP818_POWER&lt;br /&gt;
+	power_failed = axp_init();&lt;br /&gt;
+&lt;br /&gt;
+#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \&lt;br /&gt;
+	defined CONFIG_AXP818_POWER&lt;br /&gt;
+	power_failed |= axp_set_dcdc1(CONFIG_AXP_DCDC1_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+	power_failed |= axp_set_dcdc2(CONFIG_AXP_DCDC2_VOLT);&lt;br /&gt;
+	power_failed |= axp_set_dcdc3(CONFIG_AXP_DCDC3_VOLT);&lt;br /&gt;
+#if !defined(CONFIG_AXP209_POWER) &amp;amp;&amp;amp; !defined(CONFIG_AXP818_POWER)&lt;br /&gt;
+	power_failed |= axp_set_dcdc4(CONFIG_AXP_DCDC4_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \&lt;br /&gt;
+	defined CONFIG_AXP818_POWER&lt;br /&gt;
+	power_failed |= axp_set_dcdc5(CONFIG_AXP_DCDC5_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#if defined CONFIG_AXP221_POWER || defined CONFIG_AXP809_POWER || \&lt;br /&gt;
+	defined CONFIG_AXP818_POWER&lt;br /&gt;
+	power_failed |= axp_set_aldo1(CONFIG_AXP_ALDO1_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+	power_failed |= axp_set_aldo2(CONFIG_AXP_ALDO2_VOLT);&lt;br /&gt;
+#if !defined(CONFIG_AXP152_POWER)&lt;br /&gt;
+	power_failed |= axp_set_aldo3(CONFIG_AXP_ALDO3_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+#ifdef CONFIG_AXP209_POWER&lt;br /&gt;
+	power_failed |= axp_set_aldo4(CONFIG_AXP_ALDO4_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#if defined(CONFIG_AXP221_POWER) || defined(CONFIG_AXP809_POWER) || \&lt;br /&gt;
+	defined(CONFIG_AXP818_POWER)&lt;br /&gt;
+	power_failed |= axp_set_dldo(1, CONFIG_AXP_DLDO1_VOLT);&lt;br /&gt;
+	power_failed |= axp_set_dldo(2, CONFIG_AXP_DLDO2_VOLT);&lt;br /&gt;
+#if !defined CONFIG_AXP809_POWER&lt;br /&gt;
+	power_failed |= axp_set_dldo(3, CONFIG_AXP_DLDO3_VOLT);&lt;br /&gt;
+	power_failed |= axp_set_dldo(4, CONFIG_AXP_DLDO4_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+	power_failed |= axp_set_eldo(1, CONFIG_AXP_ELDO1_VOLT);&lt;br /&gt;
+	power_failed |= axp_set_eldo(2, CONFIG_AXP_ELDO2_VOLT);&lt;br /&gt;
+	power_failed |= axp_set_eldo(3, CONFIG_AXP_ELDO3_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_AXP818_POWER&lt;br /&gt;
+	power_failed |= axp_set_fldo(1, CONFIG_AXP_FLDO1_VOLT);&lt;br /&gt;
+	power_failed |= axp_set_fldo(2, CONFIG_AXP_FLDO2_VOLT);&lt;br /&gt;
+	power_failed |= axp_set_fldo(3, CONFIG_AXP_FLDO3_VOLT);&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#if defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER&lt;br /&gt;
+	power_failed |= axp_set_sw(IS_ENABLED(CONFIG_AXP_SW_ON));&lt;br /&gt;
+#endif&lt;br /&gt;
+#endif&lt;br /&gt;
+	printf(&amp;quot;DRAM:&amp;quot;);&lt;br /&gt;
+	gd-&amp;gt;ram_size = sunxi_dram_init();&lt;br /&gt;
+	printf(&amp;quot; %d MiB\n&amp;quot;, (int)(gd-&amp;gt;ram_size &amp;gt;&amp;gt; 20));&lt;br /&gt;
+	if (!gd-&amp;gt;ram_size)&lt;br /&gt;
+		hang();&lt;br /&gt;
+&lt;br /&gt;
+	sunxi_spl_store_dram_size(gd-&amp;gt;ram_size);&lt;br /&gt;
+&lt;br /&gt;
+	/*&lt;br /&gt;
+	 * Only clock up the CPU to full speed if we are reasonably&lt;br /&gt;
+	 * assured it's being powered with suitable core voltage&lt;br /&gt;
+	 */&lt;br /&gt;
+	if (!power_failed)&lt;br /&gt;
+		clock_set_pll1(CONFIG_SYS_CLK_FREQ);&lt;br /&gt;
+	else&lt;br /&gt;
+		printf(&amp;quot;Failed to set core voltage! Can't set CPU frequency\n&amp;quot;);&lt;br /&gt;
+}&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_USB_GADGET&lt;br /&gt;
+int g_dnl_board_usb_cable_connected(void)&lt;br /&gt;
+{&lt;br /&gt;
+	struct udevice *dev;&lt;br /&gt;
+	struct phy phy;&lt;br /&gt;
+	int ret;&lt;br /&gt;
+&lt;br /&gt;
+	ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, 0, &amp;amp;dev);&lt;br /&gt;
+	if (ret) {&lt;br /&gt;
+		pr_err(&amp;quot;%s: Cannot find USB device\n&amp;quot;, __func__);&lt;br /&gt;
+		return ret;&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	ret = generic_phy_get_by_name(dev, &amp;quot;usb&amp;quot;, &amp;amp;phy);&lt;br /&gt;
+	if (ret) {&lt;br /&gt;
+		pr_err(&amp;quot;failed to get %s USB PHY\n&amp;quot;, dev-&amp;gt;name);&lt;br /&gt;
+		return ret;&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	ret = generic_phy_init(&amp;amp;phy);&lt;br /&gt;
+	if (ret) {&lt;br /&gt;
+		pr_err(&amp;quot;failed to init %s USB PHY\n&amp;quot;, dev-&amp;gt;name);&lt;br /&gt;
+		return ret;&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	ret = sun4i_usb_phy_vbus_detect(&amp;amp;phy);&lt;br /&gt;
+	if (ret == 1) {&lt;br /&gt;
+		pr_err(&amp;quot;A charger is plugged into the OTG\n&amp;quot;);&lt;br /&gt;
+		return -ENODEV;&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	return ret;&lt;br /&gt;
+}&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_SERIAL_TAG&lt;br /&gt;
+void get_board_serial(struct tag_serialnr *serialnr)&lt;br /&gt;
+{&lt;br /&gt;
+	char *serial_string;&lt;br /&gt;
+	unsigned long long serial;&lt;br /&gt;
+&lt;br /&gt;
+	serial_string = env_get(&amp;quot;serial#&amp;quot;);&lt;br /&gt;
+&lt;br /&gt;
+	if (serial_string) {&lt;br /&gt;
+		serial = simple_strtoull(serial_string, NULL, 16);&lt;br /&gt;
+&lt;br /&gt;
+		serialnr-&amp;gt;high = (unsigned int) (serial &amp;gt;&amp;gt; 32);&lt;br /&gt;
+		serialnr-&amp;gt;low = (unsigned int) (serial &amp;amp; 0xffffffff);&lt;br /&gt;
+	} else {&lt;br /&gt;
+		serialnr-&amp;gt;high = 0;&lt;br /&gt;
+		serialnr-&amp;gt;low = 0;&lt;br /&gt;
+	}&lt;br /&gt;
+}&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+/*&lt;br /&gt;
+ * Check the SPL header for the &amp;quot;sunxi&amp;quot; variant. If found: parse values&lt;br /&gt;
+ * that might have been passed by the loader (&amp;quot;fel&amp;quot; utility), and update&lt;br /&gt;
+ * the environment accordingly.&lt;br /&gt;
+ */&lt;br /&gt;
+static void parse_spl_header(const uint32_t spl_addr)&lt;br /&gt;
+{&lt;br /&gt;
+	struct boot_file_head *spl = get_spl_header(SPL_ENV_HEADER_VERSION);&lt;br /&gt;
+&lt;br /&gt;
+	if (spl == INVALID_SPL_HEADER)&lt;br /&gt;
+		return;&lt;br /&gt;
+&lt;br /&gt;
+	if (!spl-&amp;gt;fel_script_address)&lt;br /&gt;
+		return;&lt;br /&gt;
+&lt;br /&gt;
+	if (spl-&amp;gt;fel_uEnv_length != 0) {&lt;br /&gt;
+		/*&lt;br /&gt;
+		 * data is expected in uEnv.txt compatible format, so &amp;quot;env&lt;br /&gt;
+		 * import -t&amp;quot; the string(s) at fel_script_address right away.&lt;br /&gt;
+		 */&lt;br /&gt;
+		himport_r(&amp;amp;env_htab, (char *)(uintptr_t)spl-&amp;gt;fel_script_address,&lt;br /&gt;
+			  spl-&amp;gt;fel_uEnv_length, '\n', H_NOCLEAR, 0, 0, NULL);&lt;br /&gt;
+		return;&lt;br /&gt;
+	}&lt;br /&gt;
+	/* otherwise assume .scr format (mkimage-type script) */&lt;br /&gt;
+	env_set_hex(&amp;quot;fel_scriptaddr&amp;quot;, spl-&amp;gt;fel_script_address);&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+/*&lt;br /&gt;
+ * Note this function gets called multiple times.&lt;br /&gt;
+ * It must not make any changes to env variables which already exist.&lt;br /&gt;
+ */&lt;br /&gt;
+static void setup_environment(const void *fdt)&lt;br /&gt;
+{&lt;br /&gt;
+	char serial_string[17] = { 0 };&lt;br /&gt;
+	unsigned int sid[4];&lt;br /&gt;
+	uint8_t mac_addr[6];&lt;br /&gt;
+	char ethaddr[16];&lt;br /&gt;
+	int i, ret;&lt;br /&gt;
+&lt;br /&gt;
+	ret = sunxi_get_sid(sid);&lt;br /&gt;
+	if (ret == 0 &amp;amp;&amp;amp; sid[0] != 0) {&lt;br /&gt;
+		/*&lt;br /&gt;
+		 * The single words 1 - 3 of the SID have quite a few bits&lt;br /&gt;
+		 * which are the same on many models, so we take a crc32&lt;br /&gt;
+		 * of all 3 words, to get a more unique value.&lt;br /&gt;
+		 *&lt;br /&gt;
+		 * Note we only do this on newer SoCs as we cannot change&lt;br /&gt;
+		 * the algorithm on older SoCs since those have been using&lt;br /&gt;
+		 * fixed mac-addresses based on only using word 3 for a&lt;br /&gt;
+		 * long time and changing a fixed mac-address with an&lt;br /&gt;
+		 * u-boot update is not good.&lt;br /&gt;
+		 */&lt;br /&gt;
+#if !defined(CONFIG_MACH_SUN4I) &amp;amp;&amp;amp; !defined(CONFIG_MACH_SUN5I) &amp;amp;&amp;amp; \&lt;br /&gt;
+    !defined(CONFIG_MACH_SUN6I) &amp;amp;&amp;amp; !defined(CONFIG_MACH_SUN7I) &amp;amp;&amp;amp; \&lt;br /&gt;
+    !defined(CONFIG_MACH_SUN8I_A23) &amp;amp;&amp;amp; !defined(CONFIG_MACH_SUN8I_A33)&lt;br /&gt;
+		sid[3] = crc32(0, (unsigned char *)&amp;amp;sid[1], 12);&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+		/* Ensure the NIC specific bytes of the mac are not all 0 */&lt;br /&gt;
+		if ((sid[3] &amp;amp; 0xffffff) == 0)&lt;br /&gt;
+			sid[3] |= 0x800000;&lt;br /&gt;
+&lt;br /&gt;
+		for (i = 0; i &amp;lt; 4; i++) {&lt;br /&gt;
+			sprintf(ethaddr, &amp;quot;ethernet%d&amp;quot;, i);&lt;br /&gt;
+			if (!fdt_get_alias(fdt, ethaddr))&lt;br /&gt;
+				continue;&lt;br /&gt;
+&lt;br /&gt;
+			if (i == 0)&lt;br /&gt;
+				strcpy(ethaddr, &amp;quot;ethaddr&amp;quot;);&lt;br /&gt;
+			else&lt;br /&gt;
+				sprintf(ethaddr, &amp;quot;eth%daddr&amp;quot;, i);&lt;br /&gt;
+&lt;br /&gt;
+			if (env_get(ethaddr))&lt;br /&gt;
+				continue;&lt;br /&gt;
+&lt;br /&gt;
+			/* Non OUI / registered MAC address */&lt;br /&gt;
+			mac_addr[0] = (i &amp;lt;&amp;lt; 4) | 0x02;&lt;br /&gt;
+			mac_addr[1] = (sid[0] &amp;gt;&amp;gt;  0) &amp;amp; 0xff;&lt;br /&gt;
+			mac_addr[2] = (sid[3] &amp;gt;&amp;gt; 24) &amp;amp; 0xff;&lt;br /&gt;
+			mac_addr[3] = (sid[3] &amp;gt;&amp;gt; 16) &amp;amp; 0xff;&lt;br /&gt;
+			mac_addr[4] = (sid[3] &amp;gt;&amp;gt;  8) &amp;amp; 0xff;&lt;br /&gt;
+			mac_addr[5] = (sid[3] &amp;gt;&amp;gt;  0) &amp;amp; 0xff;&lt;br /&gt;
+&lt;br /&gt;
+			eth_env_set_enetaddr(ethaddr, mac_addr);&lt;br /&gt;
+		}&lt;br /&gt;
+&lt;br /&gt;
+		if (!env_get(&amp;quot;serial#&amp;quot;)) {&lt;br /&gt;
+			snprintf(serial_string, sizeof(serial_string),&lt;br /&gt;
+				&amp;quot;%08x%08x&amp;quot;, sid[0], sid[3]);&lt;br /&gt;
+&lt;br /&gt;
+			env_set(&amp;quot;serial#&amp;quot;, serial_string);&lt;br /&gt;
+		}&lt;br /&gt;
+	}&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+int misc_init_r(void)&lt;br /&gt;
+{&lt;br /&gt;
+	const char *spl_dt_name;&lt;br /&gt;
+	uint boot;&lt;br /&gt;
+&lt;br /&gt;
+	env_set(&amp;quot;fel_booted&amp;quot;, NULL);&lt;br /&gt;
+	env_set(&amp;quot;fel_scriptaddr&amp;quot;, NULL);&lt;br /&gt;
+	env_set(&amp;quot;mmc_bootdev&amp;quot;, NULL);&lt;br /&gt;
+&lt;br /&gt;
+	boot = sunxi_get_boot_device();&lt;br /&gt;
+	/* determine if we are running in FEL mode */&lt;br /&gt;
+	if (boot == BOOT_DEVICE_BOARD) {&lt;br /&gt;
+		env_set(&amp;quot;fel_booted&amp;quot;, &amp;quot;1&amp;quot;);&lt;br /&gt;
+		parse_spl_header(SPL_ADDR);&lt;br /&gt;
+	/* or if we booted from MMC, and which one */&lt;br /&gt;
+	} else if (boot == BOOT_DEVICE_MMC1) {&lt;br /&gt;
+		env_set(&amp;quot;mmc_bootdev&amp;quot;, &amp;quot;0&amp;quot;);&lt;br /&gt;
+	} else if (boot == BOOT_DEVICE_MMC2) {&lt;br /&gt;
+		env_set(&amp;quot;mmc_bootdev&amp;quot;, &amp;quot;1&amp;quot;);&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	/* Set fdtfile to match the FIT configuration chosen in SPL. */&lt;br /&gt;
+	spl_dt_name = get_spl_dt_name();&lt;br /&gt;
+	if (spl_dt_name) {&lt;br /&gt;
+		char *prefix = IS_ENABLED(CONFIG_ARM64) ? &amp;quot;allwinner/&amp;quot; : &amp;quot;&amp;quot;;&lt;br /&gt;
+		char str[64];&lt;br /&gt;
+&lt;br /&gt;
+		snprintf(str, sizeof(str), &amp;quot;%s%s.dtb&amp;quot;, prefix, spl_dt_name);&lt;br /&gt;
+		env_set(&amp;quot;fdtfile&amp;quot;, str);&lt;br /&gt;
+	}&lt;br /&gt;
+&lt;br /&gt;
+	setup_environment(gd-&amp;gt;fdt_blob);&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_USB_ETHER&lt;br /&gt;
+	usb_ether_init();&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+	return 0;&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+int ft_board_setup(void *blob, bd_t *bd)&lt;br /&gt;
+{&lt;br /&gt;
+	int __maybe_unused r;&lt;br /&gt;
+&lt;br /&gt;
+	/*&lt;br /&gt;
+	 * Call setup_environment again in case the boot fdt has&lt;br /&gt;
+	 * ethernet aliases the u-boot copy does not have.&lt;br /&gt;
+	 */&lt;br /&gt;
+	setup_environment(blob);&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_VIDEO_DT_SIMPLEFB&lt;br /&gt;
+	r = sunxi_simplefb_setup(blob);&lt;br /&gt;
+	if (r)&lt;br /&gt;
+		return r;&lt;br /&gt;
+#endif&lt;br /&gt;
+	return 0;&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_SPL_LOAD_FIT&lt;br /&gt;
+int board_fit_config_name_match(const char *name)&lt;br /&gt;
+{&lt;br /&gt;
+	const char *best_dt_name = get_spl_dt_name();&lt;br /&gt;
+	int ret;&lt;br /&gt;
+&lt;br /&gt;
+#ifdef CONFIG_DEFAULT_DEVICE_TREE&lt;br /&gt;
+	if (best_dt_name == NULL)&lt;br /&gt;
+		best_dt_name = CONFIG_DEFAULT_DEVICE_TREE;&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+	if (best_dt_name == NULL) {&lt;br /&gt;
+		/* No DT name was provided, so accept the first config. */&lt;br /&gt;
+		return 0;&lt;br /&gt;
+	}&lt;br /&gt;
+#ifdef CONFIG_PINE64_DT_SELECTION&lt;br /&gt;
+	else if (strstr(best_dt_name, &amp;quot;-pine64-plus&amp;quot;)) {&lt;br /&gt;
+		/* Differentiate the Pine A64 boards by their DRAM size. */&lt;br /&gt;
+		if ((gd-&amp;gt;ram_size == 512 * 1024 * 1024))&lt;br /&gt;
+			best_dt_name = &amp;quot;sun50i-a64-pine64&amp;quot;;&lt;br /&gt;
+	}&lt;br /&gt;
+#endif&lt;br /&gt;
+#ifdef CONFIG_PINEPHONE_DT_SELECTION&lt;br /&gt;
+	else if (strstr(best_dt_name, &amp;quot;-pinephone&amp;quot;)) {&lt;br /&gt;
+		/* Differentiate the PinePhone revisions by GPIO inputs. */&lt;br /&gt;
+		prcm_apb0_enable(PRCM_APB0_GATE_PIO);&lt;br /&gt;
+		sunxi_gpio_set_pull(SUNXI_GPL(6), SUNXI_GPIO_PULL_UP);&lt;br /&gt;
+		sunxi_gpio_set_cfgpin(SUNXI_GPL(6), SUNXI_GPIO_INPUT);&lt;br /&gt;
+		udelay(100);&lt;br /&gt;
+&lt;br /&gt;
+		/* PL6 is pulled low by the modem on v1.2. */&lt;br /&gt;
+		if (gpio_get_value(SUNXI_GPL(6)) == 0)&lt;br /&gt;
+			best_dt_name = &amp;quot;sun50i-a64-pinephone-1.2&amp;quot;;&lt;br /&gt;
+		else&lt;br /&gt;
+			best_dt_name = &amp;quot;sun50i-a64-pinephone-1.1&amp;quot;;&lt;br /&gt;
+&lt;br /&gt;
+		sunxi_gpio_set_cfgpin(SUNXI_GPL(6), SUNXI_GPIO_DISABLE);&lt;br /&gt;
+		sunxi_gpio_set_pull(SUNXI_GPL(6), SUNXI_GPIO_PULL_DISABLE);&lt;br /&gt;
+		prcm_apb0_disable(PRCM_APB0_GATE_PIO);&lt;br /&gt;
+	}&lt;br /&gt;
+#endif&lt;br /&gt;
+&lt;br /&gt;
+	ret = strcmp(name, best_dt_name);&lt;br /&gt;
+&lt;br /&gt;
+	/*&lt;br /&gt;
+	 * If one of the FIT configurations matches the most accurate DT name,&lt;br /&gt;
+	 * update the SPL header to provide that DT name to U-Boot proper.&lt;br /&gt;
+	 */&lt;br /&gt;
+	if (ret == 0)&lt;br /&gt;
+		set_spl_dt_name(best_dt_name);&lt;br /&gt;
+&lt;br /&gt;
+	return ret;&lt;br /&gt;
+}&lt;br /&gt;
+#endif&lt;br /&gt;
diff -urN u-boot2/board/sunxi/board.c.rej u-boot/board/sunxi/board.c.rej&lt;br /&gt;
--- u-boot2/board/sunxi/board.c.rej	1970-01-01 00:00:00.000000000 +0000&lt;br /&gt;
+++ u-boot/board/sunxi/board.c.rej	2020-06-27 01:11:32.103472000 +0000&lt;br /&gt;
@@ -0,0 +1,15 @@&lt;br /&gt;
+--- board/sunxi/board.c&lt;br /&gt;
++++ board/sunxi/board.c&lt;br /&gt;
+@@ -623,6 +624,12 @@ void sunxi_board_init(void)&lt;br /&gt;
+ {&lt;br /&gt;
+ 	int power_failed = 0;&lt;br /&gt;
+ &lt;br /&gt;
++#ifdef CONFIG_MACH_SUN50I&lt;br /&gt;
++	// we init the lradc in SPL to get the ADC started early to have&lt;br /&gt;
++	// a valid sample when U-Boot main binary gets executed.&lt;br /&gt;
++	lradc_enable();&lt;br /&gt;
++#endif&lt;br /&gt;
++&lt;br /&gt;
+ #ifdef CONFIG_PINEPHONE_LEDS&lt;br /&gt;
+ 	/* PD18:G PD19:R PD20:B */&lt;br /&gt;
+ 	gpio_request(SUNXI_GPD(18), &amp;quot;led:green&amp;quot;);&lt;br /&gt;
diff -urN u-boot2/board/sunxi/lradc.c u-boot/board/sunxi/lradc.c&lt;br /&gt;
--- u-boot2/board/sunxi/lradc.c	1970-01-01 00:00:00.000000000 +0000&lt;br /&gt;
+++ u-boot/board/sunxi/lradc.c	2020-06-27 01:11:32.104472000 +0000&lt;br /&gt;
@@ -0,0 +1,81 @@&lt;br /&gt;
+#include &amp;lt;common.h&amp;gt;&lt;br /&gt;
+#include &amp;lt;asm/io.h&amp;gt;&lt;br /&gt;
+#include &amp;quot;lradc.h&amp;quot;&lt;br /&gt;
+&lt;br /&gt;
+#define LRADC_BASE		0x1c21800&lt;br /&gt;
+&lt;br /&gt;
+#define LRADC_CTRL		(LRADC_BASE + 0x00)&lt;br /&gt;
+#define LRADC_INTC		(LRADC_BASE + 0x04)&lt;br /&gt;
+#define LRADC_INTS		(LRADC_BASE + 0x08)&lt;br /&gt;
+#define LRADC_DATA0		(LRADC_BASE + 0x0c)&lt;br /&gt;
+#define LRADC_DATA1		(LRADC_BASE + 0x10)&lt;br /&gt;
+&lt;br /&gt;
+/* LRADC_CTRL bits */&lt;br /&gt;
+#define FIRST_CONVERT_DLY(x)	((x) &amp;lt;&amp;lt; 24) /* 8 bits */&lt;br /&gt;
+#define CHAN_SELECT(x)		((x) &amp;lt;&amp;lt; 22) /* 2 bits */&lt;br /&gt;
+#define CONTINUE_TIME_SEL(x)	((x) &amp;lt;&amp;lt; 16) /* 4 bits */&lt;br /&gt;
+#define KEY_MODE_SEL(x)		((x) &amp;lt;&amp;lt; 12) /* 2 bits */&lt;br /&gt;
+#define LEVELA_B_CNT(x)		((x) &amp;lt;&amp;lt; 8)  /* 4 bits */&lt;br /&gt;
+#define HOLD_KEY_EN(x)		((x) &amp;lt;&amp;lt; 7)&lt;br /&gt;
+#define HOLD_EN(x)		((x) &amp;lt;&amp;lt; 6)&lt;br /&gt;
+#define LEVELB_VOL(x)		((x) &amp;lt;&amp;lt; 4)  /* 2 bits */&lt;br /&gt;
+#define SAMPLE_RATE(x)		((x) &amp;lt;&amp;lt; 2)  /* 2 bits */&lt;br /&gt;
+#define ENABLE(x)		((x) &amp;lt;&amp;lt; 0)&lt;br /&gt;
+&lt;br /&gt;
+/* LRADC_INTC and LRADC_INTS bits */&lt;br /&gt;
+#define CHAN1_KEYUP_IRQ		BIT(12)&lt;br /&gt;
+#define CHAN1_ALRDY_HOLD_IRQ	BIT(11)&lt;br /&gt;
+#define CHAN1_HOLD_IRQ		BIT(10)&lt;br /&gt;
+#define	CHAN1_KEYDOWN_IRQ	BIT(9)&lt;br /&gt;
+#define CHAN1_DATA_IRQ		BIT(8)&lt;br /&gt;
+#define CHAN0_KEYUP_IRQ		BIT(4)&lt;br /&gt;
+#define CHAN0_ALRDY_HOLD_IRQ	BIT(3)&lt;br /&gt;
+#define CHAN0_HOLD_IRQ		BIT(2)&lt;br /&gt;
+#define	CHAN0_KEYDOWN_IRQ	BIT(1)&lt;br /&gt;
+#define CHAN0_DATA_IRQ		BIT(0)&lt;br /&gt;
+&lt;br /&gt;
+// this is for PinePhone only&lt;br /&gt;
+&lt;br /&gt;
+int lradc_get_pressed_key(void)&lt;br /&gt;
+{&lt;br /&gt;
+	uint32_t val;&lt;br /&gt;
+	uint32_t vref = 3000000 * 2 / 3;&lt;br /&gt;
+&lt;br /&gt;
+	val = readl(LRADC_DATA0) &amp;amp; 0x3f;&lt;br /&gt;
+	val = val * vref / 63;&lt;br /&gt;
+&lt;br /&gt;
+//	printf(&amp;quot;lradc=%u\n&amp;quot;, val);&lt;br /&gt;
+&lt;br /&gt;
+	if (val &amp;lt; 200000) // 158730&lt;br /&gt;
+		return KEY_VOLUMEUP;&lt;br /&gt;
+	else if (val &amp;lt; 400000) // 349206&lt;br /&gt;
+		return KEY_VOLUMEDOWN;&lt;br /&gt;
+&lt;br /&gt;
+	return 0;&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+void lradc_enable(void)&lt;br /&gt;
+{&lt;br /&gt;
+	// aldo3 is always on and defaults to 3V&lt;br /&gt;
+&lt;br /&gt;
+	writel(0xffffffff, LRADC_INTS);&lt;br /&gt;
+	writel(0, LRADC_INTC);&lt;br /&gt;
+&lt;br /&gt;
+	/*&lt;br /&gt;
+	 * Set sample time to 4 ms / 250 Hz. Wait 2 * 4 ms for key to&lt;br /&gt;
+	 * stabilize on press, wait (1 + 1) * 4 ms for key release&lt;br /&gt;
+	 */&lt;br /&gt;
+	writel(FIRST_CONVERT_DLY(0) | LEVELA_B_CNT(0) | HOLD_EN(0) |&lt;br /&gt;
+		SAMPLE_RATE(0) | ENABLE(1), LRADC_CTRL);&lt;br /&gt;
+&lt;br /&gt;
+}&lt;br /&gt;
+&lt;br /&gt;
+void lradc_disable(void)&lt;br /&gt;
+{&lt;br /&gt;
+	writel(0xffffffff, LRADC_INTS);&lt;br /&gt;
+	writel(0, LRADC_INTC);&lt;br /&gt;
+&lt;br /&gt;
+	/* Disable lradc, leave other settings unchanged */&lt;br /&gt;
+	writel(FIRST_CONVERT_DLY(2) | LEVELA_B_CNT(1) | HOLD_EN(1) |&lt;br /&gt;
+		SAMPLE_RATE(2), LRADC_CTRL);&lt;br /&gt;
+}&lt;br /&gt;
diff -urN u-boot2/board/sunxi/lradc.h u-boot/board/sunxi/lradc.h&lt;br /&gt;
--- u-boot2/board/sunxi/lradc.h	1970-01-01 00:00:00.000000000 +0000&lt;br /&gt;
+++ u-boot/board/sunxi/lradc.h	2020-06-27 01:11:32.104472000 +0000&lt;br /&gt;
@@ -0,0 +1,11 @@&lt;br /&gt;
+#pragma once&lt;br /&gt;
+&lt;br /&gt;
+enum {&lt;br /&gt;
+	KEY_NONE = 0,&lt;br /&gt;
+	KEY_VOLUMEDOWN = 1,&lt;br /&gt;
+	KEY_VOLUMEUP = 2,&lt;br /&gt;
+};&lt;br /&gt;
+&lt;br /&gt;
+int lradc_get_pressed_key(void);&lt;br /&gt;
+void lradc_enable(void);&lt;br /&gt;
+void lradc_disable(void);&lt;br /&gt;
diff -urN u-boot2/volumepatchfirst.patch u-boot/volumepatchfirst.patch&lt;br /&gt;
--- u-boot2/volumepatchfirst.patch	1970-01-01 00:00:00.000000000 +0000&lt;br /&gt;
+++ u-boot/volumepatchfirst.patch	2020-06-27 01:11:04.466880000 +0000&lt;br /&gt;
@@ -0,0 +1,177 @@&lt;br /&gt;
+From 0ab6225154c3d8b74f06fb3b181b52a9a64b4602 Mon Sep 17 00:00:00 2001&lt;br /&gt;
+From: Ondrej Jirman&lt;br /&gt;
+Date: Tue, 11 Feb 2020 14:10:05 +0100&lt;br /&gt;
+Subject: pinephone: Add volume_key environment variable&lt;br /&gt;
+&lt;br /&gt;
+When the user has a volume key pressed volume_key variable will&lt;br /&gt;
+contain either value 'down' or 'up', otherwise it will be empty.&lt;br /&gt;
+&lt;br /&gt;
+Signed-off-by: Ondrej Jirman &amp;lt;megous@megous.com&amp;gt;&lt;br /&gt;
+---&lt;br /&gt;
+ board/sunxi/Makefile |  1 +&lt;br /&gt;
+ board/sunxi/board.c  | 18 ++++++++++++&lt;br /&gt;
+ board/sunxi/lradc.c  | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
+ board/sunxi/lradc.h  | 11 +++++++&lt;br /&gt;
+ 4 files changed, 111 insertions(+)&lt;br /&gt;
+ create mode 100644 board/sunxi/lradc.c&lt;br /&gt;
+ create mode 100644 board/sunxi/lradc.h&lt;br /&gt;
+&lt;br /&gt;
+diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile&lt;br /&gt;
+index c4e13f8c38..6a8a2f5b42 100644&lt;br /&gt;
+--- a/board/sunxi/Makefile&lt;br /&gt;
++++ b/board/sunxi/Makefile&lt;br /&gt;
+@@ -11,3 +11,4 @@ obj-$(CONFIG_SUN7I_GMAC)	+= gmac.o&lt;br /&gt;
+ obj-$(CONFIG_MACH_SUN4I)	+= dram_sun4i_auto.o&lt;br /&gt;
+ obj-$(CONFIG_MACH_SUN5I)	+= dram_sun5i_auto.o&lt;br /&gt;
+ obj-$(CONFIG_MACH_SUN7I)	+= dram_sun5i_auto.o&lt;br /&gt;
++obj-$(CONFIG_MACH_SUN50I)	+= lradc.o&lt;br /&gt;
+diff --git a/board/sunxi/board.c b/board/sunxi/board.c&lt;br /&gt;
+index 6de4b53b11..2bedf7a16a 100644&lt;br /&gt;
+--- a/board/sunxi/board.c&lt;br /&gt;
++++ b/board/sunxi/board.c&lt;br /&gt;
+@@ -39,6 +39,7 @@&lt;br /&gt;
+ #include &amp;lt;spl.h&amp;gt;&lt;br /&gt;
+ #include &amp;lt;sy8106a.h&amp;gt;&lt;br /&gt;
+ #include &amp;lt;asm/setup.h&amp;gt;&lt;br /&gt;
++#include &amp;quot;lradc.h&amp;quot;&lt;br /&gt;
+ &lt;br /&gt;
+ #if defined CONFIG_VIDEO_LCD_PANEL_I2C &amp;amp;&amp;amp; !(defined CONFIG_SPL_BUILD)&lt;br /&gt;
+ /* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */&lt;br /&gt;
+@@ -622,6 +623,12 @@ void sunxi_board_init(void)&lt;br /&gt;
+ {&lt;br /&gt;
+ 	int power_failed = 0;&lt;br /&gt;
+ &lt;br /&gt;
++#ifdef CONFIG_MACH_SUN50I&lt;br /&gt;
++	// we init the lradc in SPL to get the ADC started early to have&lt;br /&gt;
++	// a valid sample when U-Boot main binary gets executed.&lt;br /&gt;
++	lradc_enable();&lt;br /&gt;
++#endif&lt;br /&gt;
++&lt;br /&gt;
+ #ifdef CONFIG_PINEPHONE_LEDS&lt;br /&gt;
+ 	/* PD18:G PD19:R PD20:B */&lt;br /&gt;
+ 	gpio_request(SUNXI_GPD(18), &amp;quot;led:green&amp;quot;);&lt;br /&gt;
+@@ -905,6 +912,17 @@ int misc_init_r(void)&lt;br /&gt;
+ 		env_set(&amp;quot;mmc_bootdev&amp;quot;, &amp;quot;1&amp;quot;);&lt;br /&gt;
+ 	}&lt;br /&gt;
+ &lt;br /&gt;
++#ifdef CONFIG_MACH_SUN50I&lt;br /&gt;
++	int key = lradc_get_pressed_key();&lt;br /&gt;
++	if (key == KEY_VOLUMEDOWN)&lt;br /&gt;
++		env_set(&amp;quot;volume_key&amp;quot;, &amp;quot;down&amp;quot;);&lt;br /&gt;
++	else if (key == KEY_VOLUMEUP)&lt;br /&gt;
++		env_set(&amp;quot;volume_key&amp;quot;, &amp;quot;up&amp;quot;);&lt;br /&gt;
++	&lt;br /&gt;
++	// no longer needed&lt;br /&gt;
++	lradc_disable();&lt;br /&gt;
++#endif&lt;br /&gt;
++&lt;br /&gt;
+ 	setup_environment(gd-&amp;gt;fdt_blob);&lt;br /&gt;
+ &lt;br /&gt;
+ #ifdef CONFIG_USB_ETHER&lt;br /&gt;
+diff --git a/board/sunxi/lradc.c b/board/sunxi/lradc.c&lt;br /&gt;
+new file mode 100644&lt;br /&gt;
+index 0000000000..693b198e25&lt;br /&gt;
+--- /dev/null&lt;br /&gt;
++++ b/board/sunxi/lradc.c&lt;br /&gt;
+@@ -0,0 +1,81 @@&lt;br /&gt;
++#include &amp;lt;common.h&amp;gt;&lt;br /&gt;
++#include &amp;lt;asm/io.h&amp;gt;&lt;br /&gt;
++#include &amp;quot;lradc.h&amp;quot;&lt;br /&gt;
++&lt;br /&gt;
++#define LRADC_BASE		0x1c21800&lt;br /&gt;
++&lt;br /&gt;
++#define LRADC_CTRL		(LRADC_BASE + 0x00)&lt;br /&gt;
++#define LRADC_INTC		(LRADC_BASE + 0x04)&lt;br /&gt;
++#define LRADC_INTS		(LRADC_BASE + 0x08)&lt;br /&gt;
++#define LRADC_DATA0		(LRADC_BASE + 0x0c)&lt;br /&gt;
++#define LRADC_DATA1		(LRADC_BASE + 0x10)&lt;br /&gt;
++&lt;br /&gt;
++/* LRADC_CTRL bits */&lt;br /&gt;
++#define FIRST_CONVERT_DLY(x)	((x) &amp;lt;&amp;lt; 24) /* 8 bits */&lt;br /&gt;
++#define CHAN_SELECT(x)		((x) &amp;lt;&amp;lt; 22) /* 2 bits */&lt;br /&gt;
++#define CONTINUE_TIME_SEL(x)	((x) &amp;lt;&amp;lt; 16) /* 4 bits */&lt;br /&gt;
++#define KEY_MODE_SEL(x)		((x) &amp;lt;&amp;lt; 12) /* 2 bits */&lt;br /&gt;
++#define LEVELA_B_CNT(x)		((x) &amp;lt;&amp;lt; 8)  /* 4 bits */&lt;br /&gt;
++#define HOLD_KEY_EN(x)		((x) &amp;lt;&amp;lt; 7)&lt;br /&gt;
++#define HOLD_EN(x)		((x) &amp;lt;&amp;lt; 6)&lt;br /&gt;
++#define LEVELB_VOL(x)		((x) &amp;lt;&amp;lt; 4)  /* 2 bits */&lt;br /&gt;
++#define SAMPLE_RATE(x)		((x) &amp;lt;&amp;lt; 2)  /* 2 bits */&lt;br /&gt;
++#define ENABLE(x)		((x) &amp;lt;&amp;lt; 0)&lt;br /&gt;
++&lt;br /&gt;
++/* LRADC_INTC and LRADC_INTS bits */&lt;br /&gt;
++#define CHAN1_KEYUP_IRQ		BIT(12)&lt;br /&gt;
++#define CHAN1_ALRDY_HOLD_IRQ	BIT(11)&lt;br /&gt;
++#define CHAN1_HOLD_IRQ		BIT(10)&lt;br /&gt;
++#define	CHAN1_KEYDOWN_IRQ	BIT(9)&lt;br /&gt;
++#define CHAN1_DATA_IRQ		BIT(8)&lt;br /&gt;
++#define CHAN0_KEYUP_IRQ		BIT(4)&lt;br /&gt;
++#define CHAN0_ALRDY_HOLD_IRQ	BIT(3)&lt;br /&gt;
++#define CHAN0_HOLD_IRQ		BIT(2)&lt;br /&gt;
++#define	CHAN0_KEYDOWN_IRQ	BIT(1)&lt;br /&gt;
++#define CHAN0_DATA_IRQ		BIT(0)&lt;br /&gt;
++&lt;br /&gt;
++// this is for PinePhone only&lt;br /&gt;
++&lt;br /&gt;
++int lradc_get_pressed_key(void)&lt;br /&gt;
++{&lt;br /&gt;
++	uint32_t val;&lt;br /&gt;
++	uint32_t vref = 3000000 * 2 / 3;&lt;br /&gt;
++&lt;br /&gt;
++	val = readl(LRADC_DATA0) &amp;amp; 0x3f;&lt;br /&gt;
++	val = val * vref / 63;&lt;br /&gt;
++&lt;br /&gt;
++//	printf(&amp;quot;lradc=%u\n&amp;quot;, val);&lt;br /&gt;
++&lt;br /&gt;
++	if (val &amp;lt; 200000) // 158730&lt;br /&gt;
++		return KEY_VOLUMEUP;&lt;br /&gt;
++	else if (val &amp;lt; 400000) // 349206&lt;br /&gt;
++		return KEY_VOLUMEDOWN;&lt;br /&gt;
++&lt;br /&gt;
++	return 0;&lt;br /&gt;
++}&lt;br /&gt;
++&lt;br /&gt;
++void lradc_enable(void)&lt;br /&gt;
++{&lt;br /&gt;
++	// aldo3 is always on and defaults to 3V&lt;br /&gt;
++&lt;br /&gt;
++	writel(0xffffffff, LRADC_INTS);&lt;br /&gt;
++	writel(0, LRADC_INTC);&lt;br /&gt;
++&lt;br /&gt;
++	/*&lt;br /&gt;
++	 * Set sample time to 4 ms / 250 Hz. Wait 2 * 4 ms for key to&lt;br /&gt;
++	 * stabilize on press, wait (1 + 1) * 4 ms for key release&lt;br /&gt;
++	 */&lt;br /&gt;
++	writel(FIRST_CONVERT_DLY(0) | LEVELA_B_CNT(0) | HOLD_EN(0) |&lt;br /&gt;
++		SAMPLE_RATE(0) | ENABLE(1), LRADC_CTRL);&lt;br /&gt;
++&lt;br /&gt;
++}&lt;br /&gt;
++&lt;br /&gt;
++void lradc_disable(void)&lt;br /&gt;
++{&lt;br /&gt;
++	writel(0xffffffff, LRADC_INTS);&lt;br /&gt;
++	writel(0, LRADC_INTC);&lt;br /&gt;
++&lt;br /&gt;
++	/* Disable lradc, leave other settings unchanged */&lt;br /&gt;
++	writel(FIRST_CONVERT_DLY(2) | LEVELA_B_CNT(1) | HOLD_EN(1) |&lt;br /&gt;
++		SAMPLE_RATE(2), LRADC_CTRL);&lt;br /&gt;
++}&lt;br /&gt;
+diff --git a/board/sunxi/lradc.h b/board/sunxi/lradc.h&lt;br /&gt;
+new file mode 100644&lt;br /&gt;
+index 0000000000..c908401b5b&lt;br /&gt;
+--- /dev/null&lt;br /&gt;
++++ b/board/sunxi/lradc.h&lt;br /&gt;
+@@ -0,0 +1,11 @@&lt;br /&gt;
++#pragma once&lt;br /&gt;
++&lt;br /&gt;
++enum {&lt;br /&gt;
++	KEY_NONE = 0,&lt;br /&gt;
++	KEY_VOLUMEDOWN = 1,&lt;br /&gt;
++	KEY_VOLUMEUP = 2,&lt;br /&gt;
++};&lt;br /&gt;
++&lt;br /&gt;
++int lradc_get_pressed_key(void);&lt;br /&gt;
++void lradc_enable(void);&lt;br /&gt;
++void lradc_disable(void);&lt;br /&gt;
+-- &lt;br /&gt;
+cgit v1.2.3&lt;br /&gt;
+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_1.1_VBUS_power_usage_Hardware_Fix&amp;diff=6826</id>
		<title>PinePhone 1.1 VBUS power usage Hardware Fix</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_1.1_VBUS_power_usage_Hardware_Fix&amp;diff=6826"/>
		<updated>2020-09-02T10:23:34Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page details a hardware fix for an issue that affects some early [[PinePhone#Hardware_revisions | PinePhone]] units, namely [[PinePhone v1.1 - Braveheart | v1.1 Braveheart]] units (fixed since [[PinePhone v1.2 | 1.2 community edition]] included).&lt;br /&gt;
&lt;br /&gt;
The issue was [[PinePhone_v1.1_-_Braveheart#Excess_power_usage_while_driving_VBUS | originally reported here]] by megi.&lt;br /&gt;
&lt;br /&gt;
TODO: Add more pictures and schematics, better reference the fix origin and tradeofs, remove TODOs/FIXMEs.&lt;br /&gt;
&lt;br /&gt;
== Affected Units ==&lt;br /&gt;
# [[PinePhone v1.1 - Braveheart]]&lt;br /&gt;
&lt;br /&gt;
FIXME: confirm [[Project Don't be evil|&amp;quot;Project Don't Be Evil&amp;quot; devkit]] and [[PinePhone v1.0 - Dev|PinePhone v1.0 - Developer batch]] are unaffected.&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
&lt;br /&gt;
Though easier to perform than the [[PinePhone 1.2 VCONN Hardware Fix]], this fix requires desoldering relatively small Surface Mount Technology (SMT) components, therefore some experience with soldering is recommended.&lt;br /&gt;
&lt;br /&gt;
== Issue description ==&lt;br /&gt;
TODO: pictures&lt;br /&gt;
&lt;br /&gt;
The AXP803 cannot detect when the USB port is powered by the battery. Therefore, the Power Management IC (PMIC) continues draining current from it. This is especially problematic since this USB port is powered from the battery with the USB OTG boost regulator. One of the symptoms is the battery discharging rather quickly even when the phone is powered off.&lt;br /&gt;
&lt;br /&gt;
== Workaround ==&lt;br /&gt;
&lt;br /&gt;
HW workaround is desoldering the U1301 regulator (TODO: describe its role) and shorting pads for R1309 on the PCB (this is a &amp;quot;0 ohm&amp;quot; resistor on the schematic, so it's completely fine).&lt;br /&gt;
&lt;br /&gt;
Shorting the pads is easy to do with some solder (while carefully avoiding to short it with nearby resistors).&lt;br /&gt;
&lt;br /&gt;
Desoldering the regulator is harder to do, since its large pads are designed to use the PCB as a heatsink and will happily cool down while you are trying to melt it. It should be possible to use properly sized pliers to cut the pins first, please edit if you attempt this.&lt;br /&gt;
&lt;br /&gt;
Please be careful not to overheat nearby components trough the PCB traces when applying heat to the regulator. It can be helpful to start the operation with melting some leaded solder tin together with the pads, and lifting the regulator while applying heat also helps. Start with the side that has only one pad: though it is bigger, it should be easier to lift up. It might be useful to apply a relatively large quantity of molten solder tin to each pin, in turn, while lifting the regulator, to reduce the PCB heatsink effectiveness.&lt;br /&gt;
&lt;br /&gt;
Feel free to add your experiences and tips here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tradeoffs ===&lt;br /&gt;
TODO: Unknown to the author&lt;br /&gt;
&lt;br /&gt;
== Proper fix ==&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Sources and tutorials ==&lt;br /&gt;
* [https://xnux.eu/devices/pp-pmic-fix.jpg Tutorial from megi]&lt;br /&gt;
* [https://xnux.eu/devices/feature/anx7688.html Description from megi] at the end of the page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_UBports_OS_Design_Discussion&amp;diff=6825</id>
		<title>PinePhone UBports OS Design Discussion</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_UBports_OS_Design_Discussion&amp;diff=6825"/>
		<updated>2020-09-02T10:23:33Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Why this page==&lt;br /&gt;
As I saw a lot of bad things said about the UBPorts OS shipped with their Community Edition, and a lot of people were ready to give up on it, I asked UniversalSuperBox and the rest of the UBPorts people to help the general PinePhone community out, providing answers to some misunderstandings people have about the reasoning behind the Operating System and the choices they made to make sure it is a robust system to provide to casual users that do not yet see the option to contribute as viable.&lt;br /&gt;
&lt;br /&gt;
I personally think the UBPorts team has made some very smart decisions to make Linux more secure in a device that is always vulnerable to physical attacks, as it is moving around in the world, as opposed to the traditional Linux machine in a protected serverroom. Linux is very robust, it just does not try to protect against all Threat Models. UBPorts already provides a lot of devices with their OS, so they have a lot of experience and thought put into the system already, and it would be good to leverage that for other projects as well, once they are ready to look into those. Maybe they will use a different reasoning, but it still is good to learn how the UBPorts community solved their issues.&lt;br /&gt;
&lt;br /&gt;
Specifically I asked for an answer to the reasoning behind the formatting scheme and creation of the UBPorts image, which is one of the things a lot of the people seem to struggle with. There are more issues that seemingly stop users from using their OS as a open system to experiment on, but these are for great reasons as weel, in my opinion. If we could understand those reasons better, all of our communities could improve.&lt;br /&gt;
&lt;br /&gt;
UniversalSuperBox was willing to provide us with some answers, and as always, presented them very well, and it was very interesting to read. Thank you for that!&lt;br /&gt;
&lt;br /&gt;
As I think it would be sad to leave such valuable info in the backlog of the chat, I would like to post it here as well, and try to make the most sense out of them. I hope many will add their conclusions, so we all learn. Later on, I hope we can look into other differences of the UBPorts system, and look into the specific solutions other OSs found for some common problems.&lt;br /&gt;
&lt;br /&gt;
==Chat log==&lt;br /&gt;
So first, UniversalSuperBox chat log:&lt;br /&gt;
&lt;br /&gt;
 UniversalSuperBox: abcde, there are 10 partitions on the device. Loader, scr, persist, boot_a, boot_b, recovery_a, recovery_b, cache, system, data.&lt;br /&gt;
 UniversalSuperBox: loader is the u-boot bootloader. It's not at sector 16 like on most OSes so that a full GPT table can be available at any time.&lt;br /&gt;
 UniversalSuperBox: scr stores the boot.scr script which allows the system to boot at all&lt;br /&gt;
 UniversalSuperBox: persist is a 5M-ish partition for storing things that need to persist between reboots. Right now that's exclusively the reboot-recovery file which tells the bootscript to boot to the recovery partition (later we'll probably put the selected boot slot there)&lt;br /&gt;
 UniversalSuperBox: boot stores the kernel, dtb, initramfs, and kernel modules. There is an A and B boot partition. This is for A/B slot booting someday.&lt;br /&gt;
 UniversalSuperBox: recovery stores the Jumpdrive-based recovery image which is used for updating the system and recovering when things go sideways.&lt;br /&gt;
 UniversalSuperBox: There is an A and B slot.&lt;br /&gt;
 UniversalSuperBox: https://github.com/ubports/jumpdrive&lt;br /&gt;
 UniversalSuperBox: cache and system are the same size. System is where the root filesystem is stored. It is mounted as / in a booted system.&lt;br /&gt;
 UniversalSuperBox: Cache stores update files which are applied to the system partition by recovery on an update.&lt;br /&gt;
 UniversalSuperBox: Cache and system are the same size so that cache can be system_a and system can be system_b someday&lt;br /&gt;
 UniversalSuperBox: Data stores all of the writable data on the system.&lt;br /&gt;
&lt;br /&gt;
Unaddressed part:&lt;br /&gt;
 UniversalSuperBox: The system is set up on boot by the initramfs at https://github.com/ubports/initramfs-tools-ubuntu-touch/tree/xenial_-_edge_-_pine.&lt;br /&gt;
 UniversalSuperBox: Specifically, look at the halium script in the scripts folder&lt;br /&gt;
 UniversalSuperBox: I know it's called halium. It is not exclusively for halium.&lt;br /&gt;
 UniversalSuperBox: The kernel, initramfs, and such are all pulled together by the scripts inside https://gitlab.com/ubports/community-ports/pinephone&lt;br /&gt;
 UniversalSuperBox: As well as u-boot and the rest&lt;br /&gt;
 UniversalSuperBox: They are all placed into a device image (.tar.xz) which is applied by the system-image upgrader after the ubports image is applied.&lt;br /&gt;
 UniversalSuperBox: All of that logic is inside a script in the jumpdrive repo&lt;br /&gt;
 UniversalSuperBox: But you can find the other constituent parts of a single image (or a delta) at https://system-image.ubports.com/16.04/arm64/mainline/devel/pinephone/index.json&lt;br /&gt;
 UniversalSuperBox: The system-image client is also https://github.com/ubports/system-image&lt;br /&gt;
 UniversalSuperBox: And the server files are built by https://github.com/ubports/system-image-server&lt;br /&gt;
 UniversalSuperBox: There are several problems that make me cautious to release a stable image right now. The most important one is https://bugreports.qt.io/browse/QTBUG-85802&lt;br /&gt;
 UniversalSuperBox: Which causes the browser to crash for seemingly no reason and it's really annoying. There are also issues with keeping time which are unacceptable and must be fixed.&lt;br /&gt;
 UniversalSuperBox: There is ongoing work to enable the camera and GPS is working at least somewhat some of the time now. All in devel.&lt;br /&gt;
&lt;br /&gt;
==Analysis==&lt;br /&gt;
So we can at first learn some basics, the existence of 10! partitions on the flashable image. This explains the need for the bmaptools use, as if you need to separate things so well, normally you actually have to -time consuming- write the whole image if using dd and then resize the rest to gain usable free space, and bmaptools can write partitions where they are needed, and just mark the empty parts as free. This is why bmaptools is so much faster, and it even uses some checks to secure the image and the flashing process. Dd only provides blind block copying, no regard for tests etc. My conclusion about finding out about bmaptools was that it might be a good idea to move away drom dd wherever we can. That is a lot of info in such a short line :)&lt;br /&gt;
&lt;br /&gt;
Then there is a list of all the partitions: &amp;quot;Loader, scr, persist, boot_a, boot_b, recovery_a, recovery_b, cache, system, data.&amp;quot; Each of the names provides an indication about its function, but lets try to make a nice list out of it here on the wiki:&lt;br /&gt;
===UBPorts Partition list===&lt;br /&gt;
#loader&lt;br /&gt;
#scr&lt;br /&gt;
#persist&lt;br /&gt;
#boot_a&lt;br /&gt;
#boot_b&lt;br /&gt;
#recovery_a&lt;br /&gt;
#recovery_b&lt;br /&gt;
#cache&lt;br /&gt;
#system&lt;br /&gt;
#data&lt;br /&gt;
&lt;br /&gt;
It is immediately clear that this is a well thought out system, protecting against a lot of possible mishaps. Some sound like they should clearly be usable to a lot of other distributions. But the next info clears up what each partition does, so lets try to add that to the list.&lt;br /&gt;
===UBPorts Partitions and their functions===&lt;br /&gt;
*loader: loader is the u-boot bootloader. It's not at sector 16 like on most OSes so that a full GPT table can be available at any time.&lt;br /&gt;
*scr: scr stores the boot.scr script which allows the system to boot at all&lt;br /&gt;
*persist: persist is a 5M-ish partition for storing things that need to persist between reboots. Right now that's exclusively the reboot-recovery file which tells the bootscript to boot to the recovery partition (later we'll probably put the selected boot slot there)&lt;br /&gt;
*boot_a: boot stores the kernel, dtb, initramfs, and kernel modules. There is an A and B boot partition. This is for A/B slot booting someday.&lt;br /&gt;
*boot_b:&lt;br /&gt;
*recovery_a: recovery stores the Jumpdrive-based recovery image which is used for updating the system and recovering when things go sideways. There is an A and B slot. https://github.com/ubports/jumpdrive&lt;br /&gt;
*recovery_b:&lt;br /&gt;
*cache: Cache stores update files which are applied to the system partition by recovery on an update. Cache and system are the same size so that cache can be system_a and system can be system_b someday&lt;br /&gt;
*system: System is where the root filesystem is stored. It is mounted as / in a booted system.&lt;br /&gt;
*data: Data stores all of the writable data on the system.&lt;br /&gt;
&lt;br /&gt;
We can see immediately that all the partitions have a distinct use case, and from their existence alone we can deduce a lot. there seems to be only one partition that is used for the user to store the data in. It is the last of them, called data, and is expanded after writing the image, to fill the rest of the available space. This is left alone during upgrades, so we can place our personal stuff in there, and backup just our that.&lt;br /&gt;
&lt;br /&gt;
Also there is a lot of talk about A and B partitions. They ensure that even if things go horribly wrong, there are ways to get back in a usable state. I will expand on that later...&lt;br /&gt;
&lt;br /&gt;
More will follow :) If you want to show off your reasoning in the OS you like, talk to me on IRC (irc.pine64.org) or any of the connected chat channels. I am abcde :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:Oogwaymaki/Kernel_Installation&amp;diff=6824</id>
		<title>User:Oogwaymaki/Kernel Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:Oogwaymaki/Kernel_Installation&amp;diff=6824"/>
		<updated>2020-09-02T10:23:29Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
===Why would you want to install a custom kernel?===&lt;br /&gt;
&lt;br /&gt;
The reasons why you'd want to instal a custom kernel is if there were fixes in the kernel&lt;br /&gt;
that allows the device to function better than it was before, or if you want to deviate with probably better functionality that the mass user base isn't configured for.&lt;br /&gt;
You can experiment with new features that are not yet documented or ready but could provide a great functionality when using your phone or device or operating system&lt;br /&gt;
&lt;br /&gt;
Other reason is that the newest rc kernel contains code that is closest to getting mainlined into the Linus' kernel tree, so giving it some testing helps with catching&lt;br /&gt;
issues prior to these issues potentially affecting more people than necessary. You'll be helping the development.&lt;br /&gt;
&lt;br /&gt;
===Things to look out for when installing a custom kernel and problems that can happen===&lt;br /&gt;
&lt;br /&gt;
Some things to look out for when installing a custom kernel are the following:&lt;br /&gt;
&lt;br /&gt;
* Does the kernel have all the modules you need installed for the system to boot liked&lt;br /&gt;
    * Drivers&lt;br /&gt;
    * Functionality&lt;br /&gt;
&lt;br /&gt;
If you don't have the proper drivers for your particular kernel such as if you use a particular file system or&lt;br /&gt;
feature it will not work if not compiled into the kernel.&lt;br /&gt;
&lt;br /&gt;
===What to do if the kernel does not have all your functionality but you want the patch it fixes or address?===&lt;br /&gt;
&lt;br /&gt;
You would want to compile the kernel from scratch, adding all the features and functionality you need, and using the patch utility and methods you need. This takes added time like 30 min to several hours.&lt;br /&gt;
&lt;br /&gt;
===Installing Megi's pre-compiled kernel===&lt;br /&gt;
&lt;br /&gt;
prereqs: &lt;br /&gt;
&lt;br /&gt;
You'll need a uart or a way to connect to your device to call &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
depmod -a&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install dependencies:&lt;br /&gt;
&lt;br /&gt;
* u-boot-tools allows you to make images&lt;br /&gt;
* rsync allows you to copy and backup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get update&lt;br /&gt;
# apt-get install rsync u-boot-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, download the the PinePhone CE (1.2) Kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# wget https://xff.cz/kernels/5.8/pp2.tar.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Extract the kernel:&lt;br /&gt;
&lt;br /&gt;
Create a separate folder for organization and separation:&lt;br /&gt;
Extract the a &amp;quot;tar&amp;quot; &amp;quot;gz&amp;quot; file using tar.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# tar -zxvf pp2.tar.gz &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A default Mobian Installation looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device     Boot  Start     End Sectors   Size Id Type&lt;br /&gt;
/dev/sda1  *      1953  250000  248048 121.1M 83 Linux&lt;br /&gt;
/dev/sda2       250001 7421874 7171874   3.4G 83 Linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the small size on the /boot partition.&lt;br /&gt;
&lt;br /&gt;
This means we probably will have to, either ignore the the first partition or resize both partitions so we can&lt;br /&gt;
keep existing structure.&lt;br /&gt;
&lt;br /&gt;
Easiest thing to do:&lt;br /&gt;
&lt;br /&gt;
Please all all the new files on the /dev/sda2 (they'll probably be more than 121 M)&lt;br /&gt;
&lt;br /&gt;
Next we need to update the initrd image, to have the new modules, (the initrd image is a RAM disk helping the system to boot and needs kernel drivers while booting):&lt;br /&gt;
&lt;br /&gt;
How to get and update initrd image:&lt;br /&gt;
&lt;br /&gt;
Mount Mobian boot image:&lt;br /&gt;
Make sure your the root user for this for ease of installation:&lt;br /&gt;
Delete the old kernel modules and put the new latest ones there &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir debianboot&lt;br /&gt;
# mount /dev/sda1 /media/debianboot&lt;br /&gt;
# cd /usr/src&lt;br /&gt;
# mkdir initrd&lt;br /&gt;
# cd /usr/src/initrd&lt;br /&gt;
# cp /media/debianboot/initrd.img-5.7-pinephone  .&lt;br /&gt;
# zcat initrd.img-5.7-pinephone | cpio -idmv &lt;br /&gt;
# rm initrd.img-5.7-pinephone &lt;br /&gt;
# cd /usr/src/initrd/lib/modules&lt;br /&gt;
# rm -rf /usr/src/initrd/lib/modules/5.7-pinephone&lt;br /&gt;
# rsync -avh pp2-5.8/modules/lib/modules/ initrd/lib/modules/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Repackage the Mobian Boot Image after new kernel modules installed and copy over to main mobian image now&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# find . | cpio -o -c | gzip -9 &amp;gt; initrd.img-5.8-pinephone&lt;br /&gt;
# mkdir /media/mobianroot&lt;br /&gt;
# mount /dev/sda2 /media/mobianroot&lt;br /&gt;
# cp initrd/initrd.img-5.8-pinephone /media/mobianroot/boot/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the pp 2.8 kernel and dab definition files to Mobian boot folder and update the boot.scr&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp pp2-5.8/board.dtb /media/mobianroot/boot/&lt;br /&gt;
# cp pp2-5.8/Image /media/mobianroot/boot/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the old boot.cmd to the new settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if test ${mmc_bootdev} -eq 0; then&lt;br /&gt;
	echo &amp;quot;Booting from SD&amp;quot;&lt;br /&gt;
	setenv linux_mmcdev 0&lt;br /&gt;
else&lt;br /&gt;
	echo &amp;quot;Booting from eMMC&amp;quot;&lt;br /&gt;
	setenv linux_mmcdev 2&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# If we have at least 2 partitions, then the 1st one is /boot, and / is #2&lt;br /&gt;
if fstype mmc ${mmc_bootdev}:2; then&lt;br /&gt;
	setenv rootpart 2&lt;br /&gt;
else&lt;br /&gt;
	setenv rootpart 1&lt;br /&gt;
	setenv bootdir &amp;quot;/boot&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
setenv bootargs console=ttyS0,115200 no_console_suspend panic=10 consoleblank=0 loglevel=7 root=/dev/mmcblk${linux_mmcdev}p${rootpart} rw splash plymouth.ignore-serial-consoles vt.global_cursor_default=0&lt;br /&gt;
&lt;br /&gt;
led 1 on&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Loading kernel...&amp;quot;&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} ${bootdir}/Image.gz&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Uncompressing kernel...&amp;quot;&lt;br /&gt;
unzip ${ramdisk_addr_r} ${kernel_addr_r}&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Loading initramfs...&amp;quot;&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} ${bootdir}/initrd.img&lt;br /&gt;
setenv ramdisk_size ${filesize}&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Loading dtb...&amp;quot;&lt;br /&gt;
load mmc ${mmc_bootdev}:1 ${fdt_addr_r} ${bootdir}/dtb/${fdtfile}&lt;br /&gt;
&lt;br /&gt;
led 2 on&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Booting...&amp;quot;&lt;br /&gt;
booti ${kernel_addr_r} ${ramdisk_addr_r}:0x${ramdisk_size} ${fdt_addr_r}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove the old boot.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# rm boot.cmd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to this, we removed the configuration of the first disk we won't be using it&lt;br /&gt;
we also pointed everything to second disk for kernel and boot images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if test ${mmc_bootdev} -eq 0; then&lt;br /&gt;
	echo &amp;quot;Booting from SD&amp;quot;&lt;br /&gt;
	setenv linux_mmcdev 0&lt;br /&gt;
else&lt;br /&gt;
	echo &amp;quot;Booting from eMMC&amp;quot;&lt;br /&gt;
	setenv linux_mmcdev 2&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# If we have at least 2 partitions, then the 1st one is /boot, and / is #2&lt;br /&gt;
if fstype mmc ${mmc_bootdev}:2; then&lt;br /&gt;
	setenv rootpart 2&lt;br /&gt;
	setenv bootdir &amp;quot;/boot&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
	setenv rootpart 2&lt;br /&gt;
	setenv bootdir &amp;quot;/boot&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
setenv bootargs console=ttyS0,115200 no_console_suspend panic=10 consoleblank=0 loglevel=7 root=/dev/mmcblk${linux_mmcdev}p${rootpart} rw splash plymouth.ignore-serial-consoles vt.global_cursor_default=0 initrd=/boot/initrd.img-5.8-pinephone&lt;br /&gt;
&lt;br /&gt;
led 1 on&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Loading kernel...&amp;quot;&lt;br /&gt;
load mmc ${mmc_bootdev}:2 ${kernel_addr_r} ${bootdir}/Image&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Loading dtb...&amp;quot;&lt;br /&gt;
load mmc ${mmc_bootdev}:2 ${fdt_addr_r} /boot/board.dtb&lt;br /&gt;
&lt;br /&gt;
led 2 on&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Booting...&amp;quot;&lt;br /&gt;
booti ${kernel_addr_r} - ${fdt_addr_r}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save new boot.cmd to /dev/sda1 root folder (where the old boot.cmd was)&lt;br /&gt;
&lt;br /&gt;
# cd /media/mobianboot&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#  mkimage -C none -A arm64 -T script -d boot.cmd boot.scr&lt;br /&gt;
root@wifirouter:/media/mobianboot#  mkimage -C none -A arm64 -T script -d boot.cmd boot.scr&lt;br /&gt;
Image Name:   &lt;br /&gt;
Created:      Mon Jun 29 19:13:19 2020&lt;br /&gt;
Image Type:   AArch64 Linux Script (uncompressed)&lt;br /&gt;
Data Size:    876 Bytes = 0.86 KiB = 0.00 MiB&lt;br /&gt;
Load Address: 00000000&lt;br /&gt;
Entry Point:  00000000&lt;br /&gt;
Contents:&lt;br /&gt;
   Image 0: 868 Bytes = 0.85 KiB = 0.00 MiB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# e2label /dev/sda2 ROOT&lt;br /&gt;
# make fstab look like this:&lt;br /&gt;
LABEL=ROOT	/	ext4	defaults	0	0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
boot up device.l&lt;br /&gt;
== References == &lt;br /&gt;
&lt;br /&gt;
* https://access.redhat.com/solutions/24029&lt;br /&gt;
* https://linux-sunxi.org/U-Boot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Carrier_Support&amp;diff=6823</id>
		<title>PinePhone Carrier Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Carrier_Support&amp;diff=6823"/>
		<updated>2020-09-02T10:18:21Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{warning|1=MMS doesn't currently work in any distro on the Pinephone by default! This means images and group chats will not work in text messages.}}&lt;br /&gt;
{{warning|1=Calls are regressed currently as there is a clock mismatch from the modem to the mainboard, this should be resolved soon.}}&lt;br /&gt;
{{hint|This page is incomplete, you're welcome to improve it.}}&lt;br /&gt;
&lt;br /&gt;
This page contains hints on setting up cellular network connectivity for specific carriers.&lt;br /&gt;
For more general information, see [[PinePhone#Modem_and_carrier_support|Modem and carrier support]]. For the APN settings see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
= Carriers= &lt;br /&gt;
&lt;br /&gt;
== T-Mobile ==&lt;br /&gt;
&lt;br /&gt;
According to [https://ltefix.com/wp-content/uploads/USA-Major-Carriers-Bands-Frequencies-CA.pdf this page],&lt;br /&gt;
T-Mobile's primary frequency band for the United States is 12 (700ac MHz).&lt;br /&gt;
&lt;br /&gt;
T-Mobile's bands and protocols are summarized on&lt;br /&gt;
[https://www.frequencycheck.com/carriers/t-mobile-united-states this page].&lt;br /&gt;
&lt;br /&gt;
While the Pinephone's modem does support all LTE bands that T-Mobile uses in the US (And is one of the best choices for band support with the Pinephone's modem in the US), VoLTE is still listed as &amp;quot;Under development&amp;quot; by the modem manufacturer. T-Mobile's system also does not list the Pinephone as a compatible device due to this lack of official VoLTE support. The modem is capable of working on T-Mobile with VoLTE support enabled &amp;quot;unofficially&amp;quot; however. (It's also very possible that the manufacturer of the modem will eventually add &amp;quot;official&amp;quot; support)&lt;br /&gt;
&lt;br /&gt;
== Cricket Wireless ==&lt;br /&gt;
&lt;br /&gt;
Cricket wireless is a MVNO that uses AT&amp;amp;T's network. VoLTE is fully supported and the pinephone is considered a compatible device in the US by the carrier.&lt;br /&gt;
&lt;br /&gt;
== Verizon ==&lt;br /&gt;
&lt;br /&gt;
According to [https://ltefix.com/wp-content/uploads/USA-Major-Carriers-Bands-Frequencies-CA.pdf this page],&lt;br /&gt;
Verizon's primary frequency band for the United States is 13 (700 MHz).&lt;br /&gt;
&lt;br /&gt;
Verizon's bands and protocols are summarized on&lt;br /&gt;
[https://www.frequencycheck.com/carriers/verizon-wireless-united-states this page].&lt;br /&gt;
However, it also says:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This carrier only accepts approved devices on its network.&lt;br /&gt;
Even if a device supports some or all of the required frequencies for this carrier,&lt;br /&gt;
it will not be able to connect unless the device is approved for this network.&lt;br /&gt;
Check with the network operator to confirm whether a device is approved or not.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{hint|Needs more info. If verizon works for you please edit this section with details on what does/doesn't work.}}&lt;br /&gt;
&lt;br /&gt;
= Issues =&lt;br /&gt;
&lt;br /&gt;
The [https://www.frequencycheck.com/models FrequencyCheck model page]&lt;br /&gt;
does not list either Pine64 or the PinePhone.&lt;br /&gt;
&lt;br /&gt;
Tmobile's system does not list the pinephone as a compatible device due to the lack of official VoLTE support from the manufacturer, despite the fact that it does work.&lt;br /&gt;
&lt;br /&gt;
MMS doesn't currently work in any distro on the pinephone by default. This means images and group chats will not work in text messages.&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
&lt;br /&gt;
* IMEI - [https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity International Mobile Equipment Identity]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Installation_Instructions&amp;diff=6822</id>
		<title>PinePhone Installation Instructions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Installation_Instructions&amp;diff=6822"/>
		<updated>2020-09-02T10:18:19Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section has generic installation instructions. Please see the [[PinePhone Software Releases]] section for specific installation instructions for each distribution.&lt;br /&gt;
&lt;br /&gt;
== Boot priority ==&lt;br /&gt;
&lt;br /&gt;
The default PinePhone boot priority is first the SD card and then the eMMC so inserting your own SD card with your preferred release will result in the phone booting your image.&lt;br /&gt;
&lt;br /&gt;
== Preparation of SD card ==&lt;br /&gt;
&lt;br /&gt;
# Download your chosen image from the options below&lt;br /&gt;
# Extract the compressed file&lt;br /&gt;
# Write the image to your SD card&lt;br /&gt;
# Plug SD card into phone&lt;br /&gt;
# Boot phone&lt;br /&gt;
&lt;br /&gt;
If you need step-by-step instructions for writing an image to an SD card, check [[NOOB#Step-by-Step_Instructions_to_Flashing_MicroSD_Cards|the NOOB guide]], then return to this page.&lt;br /&gt;
&lt;br /&gt;
=== bmaptool ===&lt;br /&gt;
Download the .img.xz and the .img.bmap files, then run &amp;lt;code&amp;gt;bmaptool copy --bmap image.bmap image.xz /dev/sdX&amp;lt;/code&amp;gt;. This takes 2.5mins to flash a 4Gb file.&lt;br /&gt;
&lt;br /&gt;
=== dd ===&lt;br /&gt;
Make sure to select the correct device using &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt;. Then run dd with the correct device:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo dd if=pine.img of=/dev/[DEVICE] bs=1M status=progress conv=fsync&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation to eMMC (Optional) ==&lt;br /&gt;
&lt;br /&gt;
=== Method Using Factory Installed Tools ===&lt;br /&gt;
&lt;br /&gt;
The initial OS you get with your phone has the option to flash an image on SD card to eMMC. &lt;br /&gt;
&lt;br /&gt;
# Copy (not flash) the image file to a formatted SD card.&lt;br /&gt;
# Insert SD card into powered-off phone.&lt;br /&gt;
# Turn on phone and select option to install to eMMC.&lt;br /&gt;
&lt;br /&gt;
=== Safe &amp;amp; Easy Method ===&lt;br /&gt;
&lt;br /&gt;
[https://forum.pine64.org/showthread.php?tid=9444 Jumpdrive thread]&lt;br /&gt;
&lt;br /&gt;
# download and extract [https://github.com/dreemurrs-embedded/Jumpdrive/releases the Jumpdrive image]&lt;br /&gt;
# flash the Jumpdrive image to a SD card&lt;br /&gt;
# boot from the SD card&lt;br /&gt;
# connect the PinePhone to your computer using USB-A -&amp;gt; USB-C cable.&lt;br /&gt;
# flash the exposed (mounted) PinePhone drive with a chosen OS image as you'd flash any SD card, and resize partitions (optional, see below)&lt;br /&gt;
# disconnect the PinePhone from your PC, power it down and remove the Jumpdrive SD card&lt;br /&gt;
# boot into your OS of choice on eMMC&lt;br /&gt;
&lt;br /&gt;
The Jumpdrive image is smaller than 50MB. You can keep an SD card specifically for using Jumpdrive, and there are 64MB micro SD cards sold cheaply that will suffice.&lt;br /&gt;
&lt;br /&gt;
=== Safe With No Extra Tools, But Slower ===&lt;br /&gt;
&lt;br /&gt;
# Prepare a formatted SD card, flash desired OS to the SD card, and (optionally) resize the partition (see below)&lt;br /&gt;
# Insert SD card and boot the phone&lt;br /&gt;
# Open terminal and &amp;lt;code&amp;gt;git clone [url]&amp;lt;/code&amp;gt; your desired project OR: Open web browser and download the desired OS image file. &lt;br /&gt;
# Build the OS (Optional)&lt;br /&gt;
# Flash the resulting image file you got by downloading or by building, to eMMC, using &amp;lt;code&amp;gt;dd if=new-pinephone-image.img of=/dev/mmcblkY bs=1M status=progress&amp;lt;/code&amp;gt; where X is the number label of the SD card, and Y is the number label of the eMMC. Use the command ''lsblk'' to check your devices: typically with the current kernel the SD card is /dev/mmcblk0 and the eMMC is /dev/mmcblk2 but as always with ''dd'' be extremely cautious to get the devices correct. Then, resize partition to fill up entire disk (see below).&lt;br /&gt;
# Turn off phone, remove SD card. Turn on phone.&lt;br /&gt;
&lt;br /&gt;
=== Risky Method ===&lt;br /&gt;
&lt;br /&gt;
Warning: This copies a mounted filesystem, which can lead to instability, erratic behavior, and data corruption. Do not use long term.&lt;br /&gt;
&lt;br /&gt;
# Prepare a new SD card, flash desired OS to the SD card&lt;br /&gt;
# Boot the phone with your new SD card image&lt;br /&gt;
# Within the booted OS, flash/clone the running OS to eMMC, e.g. using dd. It will take about 15 minutes (depending on the speed of your card), and in the end it may show an error about not enough space - just ignore it.&lt;br /&gt;
# Turn off phone, take out SD card, and try booting the phone which should load up the new OS from eMMC.&lt;br /&gt;
# Open terminal and resize partition to fill up entire disk (see below).&lt;br /&gt;
&lt;br /&gt;
== Resize partition to fit disk space ==&lt;br /&gt;
&lt;br /&gt;
Once you've flashed the OS to your SD card or eMMC storage, you may also need to expand the partition to fill all the available space.&lt;br /&gt;
&lt;br /&gt;
=== Resize SD card's partition using computer ===&lt;br /&gt;
&lt;br /&gt;
For SD cards, insert the SD card and resize the partitions through the computer. For eMMC, insert the phone cable and use Jumpdrive to access the eMMC directly, and resize the partition after flashing the image. To do the flashing you have two options:&lt;br /&gt;
&lt;br /&gt;
====Using Growpart: ====&lt;br /&gt;
&lt;br /&gt;
Locate growpart (&amp;lt;code&amp;gt;apt-cache search growpart&amp;lt;/code&amp;gt; and install the package in the search results) and run: &lt;br /&gt;
 growpart /dev/mmcblkX Y&lt;br /&gt;
 resize2fs /dev/mmcblkXpY&lt;br /&gt;
where X is the storage device and Y is the partition number (viewable from lsblk).&lt;br /&gt;
&lt;br /&gt;
If you get any errors about missing or unknown commands, use apt-cache search to find and install the needed software. Also don't forget to use sudo.&lt;br /&gt;
&lt;br /&gt;
====Using Parted: ====&lt;br /&gt;
&lt;br /&gt;
Parted's interactive mode and resize work well together. Do this before you put your SD card into the PinePhone for the first time for best results.&lt;br /&gt;
&lt;br /&gt;
 sudo parted /dev/&amp;lt;your_sd_card_device&amp;gt;&lt;br /&gt;
 (parted) resizepart 2 100%&lt;br /&gt;
 (parted) quit&lt;br /&gt;
 sudo resize /dev/&amp;lt;the_second_sd_card_PARTITION&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resize from within PinePhone: ===&lt;br /&gt;
&lt;br /&gt;
eMMC: you would need to resize the partition on eMMC (flashed with the operating system) by booting another image from the SD card: that way, the eMMC will be unmounted. It is '''not recommended''' to resize eMMC while booted from eMMC! Resizing a currently mounted partition can have weird results. If you booted from the SD card, you can follow the above guidelines on how to resize from a computer. &lt;br /&gt;
&lt;br /&gt;
SD card: It is generally not possible to boot from eMMC to partition the unmounted SD card, because of the boot order -- you would have to write the image to the empty SD card first, then resize partition, all without rebooting. It is also '''not recommended''' to resize the SD card while booted from SD card! Resizing a currently mounted partition can have weird results.&lt;br /&gt;
&lt;br /&gt;
== Reuse SD card for data storage on system booting from eMMC==&lt;br /&gt;
Once you have installed your release of choice to eMMC, you may wish to use an SD card for data storage. If you choose to re-use a card you have previously used to boot from, you will find your phone will not boot if you just reformat the card and insert it. This is because the Allwinner firmware in the PinePhone uses some (normally) unused space at the front of the SD card to store boot software, which you need to clear.&lt;br /&gt;
&lt;br /&gt;
This can be done as follows on any linux system:&lt;br /&gt;
 lsblk&lt;br /&gt;
to check the device of your SD card – as an example lets assume it is /dev/mmcblk0&lt;br /&gt;
then&lt;br /&gt;
 sudo dd if=/dev/zero of=/dev/mmcblk0 bs=8k seek=1 count=4&lt;br /&gt;
will clear the relevant sectors of your card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=6821</id>
		<title>PinePhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=6821"/>
		<updated>2020-09-02T10:18:14Z</updated>

		<summary type="html">&lt;p&gt;Jbit: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PinePhone is a smartphone created by Pine64, capable of running mainline Linux and supported by many partner projects. The BraveHeart Edition was the first publicly-available version of the phone, though it came without a fully functional OS (factory test image) and was geared specifically towards tinkerers and hackers. Its successor is the Community Edition, the first Community Edition started to ship in June 2020. The phone will be available for at least five years.&lt;br /&gt;
&lt;br /&gt;
== First time installation ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone-3.jpg|400px|thumb|right|PinePhone is capable of running a multitude of different Linux mobile OSes]]&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhoneSides.svg|400px|thumb|right|Backward and front of PinePhone UBPorts Edition]]&lt;br /&gt;
&lt;br /&gt;
From the factory the battery has a sticker on it that isolates the battery from the phone. The battery '''will not''' charge until this is removed.&lt;br /&gt;
&lt;br /&gt;
After unboxing remove the back panel using the notch in the corner of the back panel. Then remove the battery and peel off the clear plastic sticker below it that isolates the charging contact. Then replace the battery. See [[PinePhone#Battery|Battery]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
'''Dimensions:''' 160.5 x 76.6 x 9.2mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' Between 180-200 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''SIM Card:''' Micro-SIM &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 5.95 inches (151mm) diagonal&lt;br /&gt;
: '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
: '''Resolution:''' 1440x720, 18:9 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' [https://linux-sunxi.org/A64 Allwinner A64] &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 2GB or 3GB LPDDR3 SDRAM&amp;lt;br&amp;gt;&lt;br /&gt;
'''Internal Storage:''' 16GB or 32GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC &amp;lt;br&amp;gt;&lt;br /&gt;
'''Back Camera:''' Single 5MP, 1/4&amp;quot;, LED Flash &amp;lt;br&amp;gt;&lt;br /&gt;
'''Selfie Camera:''' Single 2MP, f/2.8, 1/5&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if killswitch 6 is deactivated) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Communication: G25-G'''&lt;br /&gt;
: '''LTE:''' B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28, B38, B39, B40, B41&lt;br /&gt;
: '''WCDMA:''' B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
: '''GSM:''' 850, 900, 1800, 1900 (MHz)&lt;br /&gt;
: '''WLAN:''' Wi-Fi 802.11 b/g/n, single-band, hotspot&lt;br /&gt;
: '''Bluetooth:''' 4.0, A2DP&lt;br /&gt;
: '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
'''Sensors:''' Accelerometer, gyro, proximity, ambient light, compass &amp;lt;br&amp;gt;&lt;br /&gt;
'''Killswitches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery) &amp;lt;br&amp;gt;&lt;br /&gt;
'''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| OmniVision OV5640&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| SGMICRO SGM3140&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| GalaxyCore GC2145&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Xingbangda XBD599&lt;br /&gt;
|-&lt;br /&gt;
| WiFi&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Bluetooth&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| Quectel EG25-G&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| Quectel EG25-G&lt;br /&gt;
|-&lt;br /&gt;
| Magnetometer&lt;br /&gt;
| ST LIS3MDL&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| SensorTek STK3335&lt;br /&gt;
|-&lt;br /&gt;
| Sixaxis&lt;br /&gt;
| InvenSense MPU-6050&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| Yes, unknown model&lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| X-Powers AXP803&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware revisions ==&lt;br /&gt;
&lt;br /&gt;
# [[Project Anakin]]&lt;br /&gt;
# [[Project Don't be evil|&amp;quot;Project Don't Be Evil&amp;quot; devkit]]&lt;br /&gt;
# [[PinePhone v1.0 - Dev|PinePhone v1.0 - Developer batch]]&lt;br /&gt;
# [[PinePhone v1.1 - Braveheart]]&lt;br /&gt;
# [[PinePhone v1.2‎]] - Community Edition&lt;br /&gt;
&lt;br /&gt;
== Hardware accessory ==&lt;br /&gt;
&lt;br /&gt;
=== PinePhone hardware accessory compatibility ===&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]] for a list of devices working with the PinePhone (depending on their OS support).&lt;br /&gt;
&lt;br /&gt;
=== USB-C connector ===&lt;br /&gt;
&lt;br /&gt;
The USB-C can be used to power the device, and offers USB2 host and OTG possibilities, and also can make use of the USB-C capability to integrate HDMI signals. Some USB-C hubs are available that offer power throughput, USB connection, HDMI port and Ethernet connection. The driver that would make this connection available is not supported at this time.&lt;br /&gt;
&lt;br /&gt;
=== Pogo pins ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone has 6 pogo pins on the back allowing for custom hardware extensions such as wireless charging, an IR blaster, a keyboard extension or extended battery case. The pogo pins provide access to an interrupt line, power input to charge the battery, power source and an I2C interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone pogo.png|none|400px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Interrupt&lt;br /&gt;
| SDA&lt;br /&gt;
| SCL&lt;br /&gt;
|-&lt;br /&gt;
| 5V / VBUS&lt;br /&gt;
| VBAT&lt;br /&gt;
| GND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The VBUS pin is powered by USB and is 5V. The second power pin is VBAT, which connects to the battery voltage. The I2C and interrupt lines have pull-ups on the phone side. The I2C lines are pulled up to 3V3 by the phone.&lt;br /&gt;
&lt;br /&gt;
For a breakout board see [https://github.com/SMR404/PinephonePogoBreakout here]. For an example project see Martijn's blog post [https://blog.brixit.nl/making-a-backcover-extension-for-the-pinephone/ &amp;lt;i&amp;gt;Making a backcover extension for the PinePhone&amp;lt;/i&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
=== Back cover ===&lt;br /&gt;
A step file for the back cover for creating custom cases is freely available [http://files.pine64.org/doc/PinePhone/PinePhone%20Back%20Cover%20ver%200.5.stp here].&lt;br /&gt;
&lt;br /&gt;
=== Serial console ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone has a serial port in the headphone connector, it's activated by the 6th contact on the dipswitch. If the switch is set to &amp;quot;on&amp;quot;, the headphone connector is in audio mode, if it is set to &amp;quot;off&amp;quot; it's in UART mode. The UART serial connection can also be used for communication with other devices from the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The UART is 115200n8.&lt;br /&gt;
&lt;br /&gt;
The pinout for the serial connector is:&lt;br /&gt;
&lt;br /&gt;
* Tip: RX&lt;br /&gt;
* Ring: TX&lt;br /&gt;
* Sleeve: GND&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone_Serial_Cable.png|none|400px]]&lt;br /&gt;
&lt;br /&gt;
You can buy a serial debug cable from the [https://store.pine64.org/product/pinebook-serial-console/ Pine64 Store]. The store cable uses a 4 ring plug, as seen in the [http://files.pine64.org/doc/pinebook/guide/Pinebook_Earphone_Serial_Console_Developer_Guide.pdf here], but a 3 ring plug works just as well. The cable uses a CH340 chipset based serial to USB converter, but any 3.3v serial connection can be used. Because it is a &amp;quot;host&amp;quot;/DTE it means that you need a ''cross modem cable'' ([https://en.wikipedia.org/wiki/Null_modem Null Modem]) with TX on Tip to be connected to RX. A cable like e.g. [https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm FTDI TTL-232R-3V3-AJ] which has TX on Tip and RX on Ring fits perfectly.&lt;br /&gt;
&lt;br /&gt;
== Killswitch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone switches.jpeg|400px|thumb|right|Photo of BraveHeart switches from OSAKANA TARO on Twitter]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640 &lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
{{Hint|The EG25 modem and RTL8723CS WiFi/bluetooth do not work without battery power, even if you are supplying enough power to the PinePhone with USB-C.}}&lt;br /&gt;
&lt;br /&gt;
The [https://wiki.pine64.org/images/0/04/PinePhone_Battery_model_QZ01-396172-2750.pdf supplied battery] is [https://forum.pine64.org/showthread.php?tid=8120&amp;amp;pid=53307#pid53307 meant to be] compatible with Samsung part number EB-BJ700BBC / BBE / CBE from the 2015 J7 phone. &lt;br /&gt;
* The extended life aftermarket BBU do fit, however, somewhat firmly.&lt;br /&gt;
* There is [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55053#pid55053 a report] that the EB-BJ700CBE isn't quite the same size, causing the back not to fit properly.&lt;br /&gt;
&lt;br /&gt;
The battery terminals, in order from nearest the edge to nearest the middle, are:&lt;br /&gt;
&lt;br /&gt;
# +ve&lt;br /&gt;
# thermistor&lt;br /&gt;
# -ve&lt;br /&gt;
# not connected&lt;br /&gt;
&lt;br /&gt;
The battery includes a protection circuit that isolates it in a number of fault conditions, including if it is discharged too far. The fully discharged battery [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55377#pid55377 can be recharged] by connecting the phone to a charger. Once it has charged sufficiently you will be able to boot the phone.&lt;br /&gt;
&lt;br /&gt;
If your battery is hard to remove from the phone, try loosening the screws around it. Possibly cutting up a piece of plastic and sliding it under the battery as a pull tab can work too.&lt;br /&gt;
&lt;br /&gt;
{{Note|The phone ships with a plastic sticker between the battery and the phone. You need to open the back cover (gently), then remove the battery and finally remove the sticker and check that the pins aren't bent. This is to protect the device from turning on during shipping.}}&lt;br /&gt;
&lt;br /&gt;
If using an aftermarket battery on the CE edition phones, removing the lower tabs is not necessary as there is space supplied in the compartment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;, heights=300px&amp;gt;&lt;br /&gt;
Image:PinePhone battery1.png|Photo of Brave Heart case from OSAKANA TARO on Twitter&lt;br /&gt;
Image:PinePhone battery3.jpeg|Photo of Brave Heart battery sticker from OSAKANA TARO on Twitter&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modem and carrier support ==&lt;br /&gt;
To check if the PinePhone is supported on your carrier:&lt;br /&gt;
&lt;br /&gt;
Search for your carrier on [https://www.frequencycheck.com/ frequencycheck.com] and compare the carrier's LTE/GSM/WCDMA frequencies to the PinePhone's supported frequencies (listed under the [[#Specifications|specifications]] section).&lt;br /&gt;
&lt;br /&gt;
It is likely that there will be a few frequencies that your carrier uses which are not supported by the PinePhone. Not all of the carrier's frequencies need to be supported by the PinePhone for it to work - as long as ''most'' of them are supported, you will still get good coverage.&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
Some phone operating systems may not have support for accessing your voicemail by holding down the 1 key. If you are in Canada and using rogers or a rogers associated carrier (such as ''Chatr''), you can access your voice mail by calling an external number, see: https://www.howardforums.com/showthread.php/913346-Rogers-GSM-Voicemail-Retrieval-Numbers&lt;br /&gt;
&lt;br /&gt;
In America, AT&amp;amp;T also has support for accessing your voicemail via an external phone number: https://www.att.com/support/article/wireless/KM1009101/&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
There is a document about using the modem from January 18th 2020 by user ''megi'' [https://megous.com/dl/tmp/modem.txt here]. The script at the end to disable the modem before power off is pretty essential to avoid corrupting your modem's flash memory.&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distribution (because the PinePhone uses the mainline kernel), there are a few that are designed specifically for mobile use on devices like the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Software Releases]] page has a complete list of currently supported phone-optimized Operating System images that work with the PinePhone as well as other related software information. As soon as more patches get mainlined and distributions ship with the updated kernel, they will also be able to run unmodified on the device.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or SD card see [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Flashing eMMC using Jumpdrive ===&lt;br /&gt;
&lt;br /&gt;
[[File:jumpdrive.jpg|400px|thumb|right|Jumpdrive running on the PinePhone]]&lt;br /&gt;
The internal eMMC flash storage can be flashed using the Jumpdrive utility by Danct12 and Martijn from postmarketOS.&lt;br /&gt;
This utility boots from micro SD and exposes the internal eMMC flash storage when the PinePhone is connected to a computer.&lt;br /&gt;
The process of flashing an OS to the exposed and mounted eMMC is identical to that of any other storage medium - e.g. a SD card. You can use the 'DD' command or a utility such as Etcher or Gnome Disks, etc.&lt;br /&gt;
&lt;br /&gt;
Latest Jumpdrive can be found [https://github.com/dreemurrs-embedded/Jumpdrive/releases/ here].&lt;br /&gt;
&lt;br /&gt;
==== Detailed usage instructions ====&lt;br /&gt;
&lt;br /&gt;
# Download the Jumpdrive image&lt;br /&gt;
# Flash the Jumpdrive image to a micro SD card&lt;br /&gt;
# Boot the PinePhone from the Jumpdrive micro SD card&lt;br /&gt;
# Connect the PinePhone to your computer using USB-A -&amp;gt; USB-C cable&lt;br /&gt;
# Flash the exposed PinePhone drive (e.g. /dev/mm..., check for the right device in dmesg, GNOME disks, or similar, and make sure it's unmounted) with your chosen OS image&lt;br /&gt;
# Once the flashing process is complete, disconnect the PinePhone from your PC, power it down and remove the Jumpdrive SD card&lt;br /&gt;
# The process is now finished, and you can boot from eMMC&lt;br /&gt;
&lt;br /&gt;
Jumpdrive also acts as a rescue image in case if you messed up your installation. To do so, you can telnet to '''172.16.42.1''', mount rootfs and fix it!&lt;br /&gt;
&lt;br /&gt;
==== Resize file system ====&lt;br /&gt;
&lt;br /&gt;
If you flash a 4GB image distribution (such as phosh+debian) to your eMMC, your eMMC will only have a 3.7GB partition on it. To use the entire 14.7GB on the eMMC, run the following commands:&lt;br /&gt;
&lt;br /&gt;
# sudo cfdisk /dev/sdX&lt;br /&gt;
# Change to [Resize] in the ncurses program, resize the 3.7GB partition to 14.7GB, and [Write]&lt;br /&gt;
# sudo resize2fs /dev/sdXY&lt;br /&gt;
&lt;br /&gt;
Replace X with your drive's name. Replace Y with the partition you resized in cfdisk.&lt;br /&gt;
&lt;br /&gt;
==== Feedback ====&lt;br /&gt;
&lt;br /&gt;
If you've found an issue or want to improve the tool consider these sites:&lt;br /&gt;
&lt;br /&gt;
* Issues: https://github.com/dreemurrs-embedded/Jumpdrive/issues&lt;br /&gt;
* Pull Requests: https://github.com/dreemurrs-embedded/Jumpdrive/pulls&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
For a list of frequently asked questions (including information regarding the shipping) see [[PinePhone FAQ]].&lt;br /&gt;
&lt;br /&gt;
== PinePhone board information, schematics and certifications ==&lt;br /&gt;
* PinePhone mainboard schematic:&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2a%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2a]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [[PinePhone_v1.2|PinePhone schematic ver 1.2 change list]]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20Schematic%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard Schematic ver 1.1]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20top%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component top placement drawing ver 1.1]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20bottom%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component bottom placement drawing ver 1.1]&lt;br /&gt;
* PinePhone USB-C small board schematic:&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20schematic%20v1.0%2020190730.pdf PinePhone USB-C small board Schematic ver 1.0]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20top%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component top placement drawing ver 1.0]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20bottom%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component bottom placement drawing ver 1.0]&lt;br /&gt;
* PinePhone certifications:&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20FCC%20SDOC%20Certificate-S19112602605001.pdf PinePhone FCC Certificate]&lt;br /&gt;
** [https://fcc.report/FCC-ID/2AWAG-PINEPHONE RF Exposure SAR Information from FCC ID site]&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20CE%20RED%20Certificate-S19112602602.pdf PinPhone CE RED Certificate]&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20ROHS%20Report.pdf PinePhone ROHS Report]&lt;br /&gt;
* [[PinePhone component list]]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/Kimtigo_fbga153_16_32_64_eMMC_datasheet_v1.3.pdf Kimtigo eMMC datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/QZ01-rear-2019-0717(HW)%20Model.pdf PinePhone 5M Pixel Real CMOS Image Sensor Module]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/QZ01-front-2019-0717(HW)%20Model.pdf PinePhone 2M Pixel Front CMOS Image Sensor Module]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20LCD-QZ01.pdf 5.99&amp;quot; 1440x720 LCD IPS Panel specification]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/ST7703_DS_v01_20160128.pdf ST7703 LCD Controller datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/GT917S-Datasheet.pdf GOODiX GT917S Capacitive Touch Controller datasheet]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20Specification.pdf PinePhone Lithium Battery specification]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20ZCV%20Curve%20Chart.xlsx PinePhone Lithium Battery ZCV curve chart]&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
* LTE module information:&lt;br /&gt;
** [https://www.quectel.com/UploadFile/Product/Quectel_EG25-G_LTE_Standard_Specification_V1.2.pdf Quectel EG25-G LTE Module specification]&lt;br /&gt;
** [[Media:Quectel EC25EC21 AT Commands Manual V1.2.pdf|EC25&amp;amp;EC21 AT Commands Manual]]&lt;br /&gt;
&lt;br /&gt;
* Sensors:&lt;br /&gt;
** [https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL 3-axis Magnetomater Datasheet]&lt;br /&gt;
** [https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/ InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS datasheet]&lt;br /&gt;
** [http://www.sensortek.com.tw/en/product/Proximity_Sensor_with_ALS.html SensorTek STK3335 Ambient Light Sensor and Proximity Sensor]&lt;br /&gt;
&lt;br /&gt;
* Digital video to USB-C bridge:&lt;br /&gt;
** [https://www.analogix.com/en/system/files/AA-002281-PB-6-ANX7688_Product_Brief.pdf ANX7688 product brief]&lt;br /&gt;
&lt;br /&gt;
* Case information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Exploded%20Diagram%20ver%201.0.pdf PinePhone case exploded diagram]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Back%20Cover.stp PinePhone back cover 3D file]&lt;br /&gt;
&lt;br /&gt;
== Developer works ==&lt;br /&gt;
=== Megous ===&lt;br /&gt;
&lt;br /&gt;
* [https://xnux.eu/howtos/pine64-pinephone-getting-started.html Getting start with PinePhone Hardware]&lt;br /&gt;
* [https://xnux.eu/devices/pine64-pinephone.html#toc-pine64-pinephone State of development progress]&lt;br /&gt;
* [https://xnux.eu/news.html PinePhone Technical News and Update, also applies to other Allwinner devices including PINE A64 SBC]&lt;br /&gt;
&lt;br /&gt;
== External links == &lt;br /&gt;
* [https://store.pine64.org/?post_type=product Pine64 shop]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_APN_Settings&amp;diff=6820</id>
		<title>PinePhone APN Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_APN_Settings&amp;diff=6820"/>
		<updated>2020-09-02T10:15:02Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Setting the APN =&lt;br /&gt;
&lt;br /&gt;
The location of the APN setting depend on the user interface the distribution is using.&lt;br /&gt;
&lt;br /&gt;
== Distributions with Phosh ==&lt;br /&gt;
&lt;br /&gt;
APN settings are either located in &amp;lt;code&amp;gt;Settings &amp;gt; Mobile &amp;gt; Access Point Names&amp;lt;/code&amp;gt; (Arch Linux ARM, PureOS, Debian + Phosh) or &amp;lt;code&amp;gt; Settings &amp;gt; Network &amp;gt; Network Dropdown &amp;gt; Add new connection&amp;lt;/code&amp;gt; (pmOS, Fedora).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--== Distributions with Plasma Mobile ==&lt;br /&gt;
&lt;br /&gt;
Todo--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= List of tested carriers =&lt;br /&gt;
&lt;br /&gt;
Disclaimer: Go to the websites of or speak to the customer support lines of those carriers which you want to use. No guarantees. This list is simply user-generated and serves to demonstrate examples of what worked for them. This list is not exhaustive, does not cover all possible carriers.&lt;br /&gt;
&lt;br /&gt;
== AT&amp;amp;T-based (USA) ==&lt;br /&gt;
&lt;br /&gt;
=== AT&amp;amp;T ===&lt;br /&gt;
APN: &amp;lt;code&amp;gt;phone&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;NXTGENPHONE&amp;lt;/code&amp;gt; if &amp;quot;phone&amp;quot; does not work (see https://www.att.com/support/article/wireless/KM1218306/).&lt;br /&gt;
&lt;br /&gt;
=== Cricket ===&lt;br /&gt;
APN: &amp;lt;code&amp;gt;phone&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ndo&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;NXTGENPHONE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bouygues Telecom (France) ==&lt;br /&gt;
 Name: Bouygues Telecom&lt;br /&gt;
 APN: mmsbouygtel.com&lt;br /&gt;
 Username: &amp;lt;empty&amp;gt;&lt;br /&gt;
 Password: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: https://www.assistance.bouyguestelecom.fr/s/article/parametrage-mobile-email-mms-internet&lt;br /&gt;
&lt;br /&gt;
== Free (France) ==&lt;br /&gt;
&lt;br /&gt;
 Name: Free&lt;br /&gt;
 APN: free&lt;br /&gt;
 Username: free&lt;br /&gt;
 Password: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: https://mobile.free.fr/assistance/46.html&lt;br /&gt;
&lt;br /&gt;
== Mineo (Japan) ==&lt;br /&gt;
&lt;br /&gt;
Tested with S plan (Softbank) and D plan (Docomo). AU plan requires VoLTE so will probably not work. Softbank plan also failed to have the SIM card detected by any of the OSes tested (pmOS, UBT, Sailfish).&lt;br /&gt;
&lt;br /&gt;
Mobile LTE data currently working only on Phosh-based OSes, because they use Network Manager and Modem Manager. UBT not working yet, see issue #58. https://gitlab.com/ubports/community-ports/pinephone/-/issues/58&lt;br /&gt;
&lt;br /&gt;
APNs are provided by Mineo&lt;br /&gt;
&lt;br /&gt;
 Name: Mineo&lt;br /&gt;
 APN: mineo-d.jp&lt;br /&gt;
 Username: mineo@k-opti.com&lt;br /&gt;
 Password: mineo&lt;br /&gt;
&lt;br /&gt;
Source: https://support.mineo.jp/manual/network_setup_d.html&lt;br /&gt;
&lt;br /&gt;
== Mint Mobile (USA) ==&lt;br /&gt;
&lt;br /&gt;
Call their customer service to activate using the number on their website, or activate on their [https://my.mintmobile.com/activation website]. You may also need to reboot your phone.&lt;br /&gt;
&lt;br /&gt;
Use the following APN settings:&lt;br /&gt;
&lt;br /&gt;
 Name: Ultra&lt;br /&gt;
 APN: Wholesale&lt;br /&gt;
&lt;br /&gt;
Source: https://www.mintmobile.com/setup-for-android/&lt;br /&gt;
&lt;br /&gt;
== Mobile Vikings (Belgium) ==&lt;br /&gt;
&lt;br /&gt;
 Name: Mobile Vikings&lt;br /&gt;
 APN: web.be&lt;br /&gt;
 Username: web&lt;br /&gt;
 Password: web&lt;br /&gt;
&lt;br /&gt;
Source: https://support.vikingco.com/hc/en-us/articles/202836041-I-don-t-have-any-mobile-internet-What-do-I-do-&lt;br /&gt;
&lt;br /&gt;
== Orange Telecom (France) ==&lt;br /&gt;
 Name: Orange Internet&lt;br /&gt;
 APN: orange&lt;br /&gt;
 Username: &amp;lt;empty&amp;gt;&lt;br /&gt;
 Password: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source:https://assistance.orange.fr/mobile-tablette/tous-les-mobiles-et-tablettes/depanner/probleme-avec-un-service-d-orange-internet-sms-mms-mails-cloud-tv/mms/configurer-un-apn-internet-et-mms_192948-738196&lt;br /&gt;
&lt;br /&gt;
== Penny Mobil (Germany) ==&lt;br /&gt;
&lt;br /&gt;
APN settings:&lt;br /&gt;
&lt;br /&gt;
 name: Penny Mobil&lt;br /&gt;
 APN: internet.t-mobile&lt;br /&gt;
 username: t-mobile&lt;br /&gt;
 password: tm&lt;br /&gt;
&lt;br /&gt;
== Public Mobile (Canada) ==&lt;br /&gt;
Internet only, mms not tested.&lt;br /&gt;
&lt;br /&gt;
 Name: Public Mobile&lt;br /&gt;
 APN: sp.mb.com&lt;br /&gt;
 Username: &amp;lt;empty&amp;gt;&lt;br /&gt;
 Password: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: https://productioncommunity.publicmobile.ca/t5/Phones-Hardware/How-do-I-set-up-data-APN-on-my-smartphone/td-p/3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Red Pocket (USA) ==&lt;br /&gt;
&lt;br /&gt;
You can choose AT&amp;amp;T, Verizon, T-Mobile or Sprint network. Known to work with the GSMA (ATT) SIM, calls and SMS work.&lt;br /&gt;
&lt;br /&gt;
APN settings:&lt;br /&gt;
&lt;br /&gt;
 name: Red Pocket&lt;br /&gt;
 APN: RESELLER&lt;br /&gt;
&lt;br /&gt;
== Simyo (Spain) ==&lt;br /&gt;
&lt;br /&gt;
APN settings:&lt;br /&gt;
  APN: orangeworld&lt;br /&gt;
&lt;br /&gt;
Source: https://blog.simyo.es/simyo-configuracion-internet-wap-mms/configura-tu-movil/&lt;br /&gt;
&lt;br /&gt;
== Telekom (Germany) ==&lt;br /&gt;
&lt;br /&gt;
APN settings:&lt;br /&gt;
&lt;br /&gt;
 Name: Telekom&lt;br /&gt;
 APN: internet.t-mobile&lt;br /&gt;
 Username: t-mobile&lt;br /&gt;
 Password: tm&lt;br /&gt;
&lt;br /&gt;
Source: https://www.telekom.de/hilfe/mobilfunk-mobiles-internet/mobiles-internet-e-mail/apn-mobilfunk/wie-lauten-die-apn-fuer-mobilfunk?samChecked=true&lt;br /&gt;
&lt;br /&gt;
== Tracfone (USA) == &lt;br /&gt;
&lt;br /&gt;
''BYOP SIM Card Kit'' works with T-Mobile and AT&amp;amp;T compatible SIM cards provided in BYOP kit.&lt;br /&gt;
&lt;br /&gt;
Calls, SMS and 3G/4G data known to work with Verizon &amp;amp; AT&amp;amp;T SIMs (most likely works for T-Mobile as well).&lt;br /&gt;
&lt;br /&gt;
Use the following APN settings:&lt;br /&gt;
&lt;br /&gt;
 Name: Tracfone&lt;br /&gt;
 APN: RESELLER&lt;br /&gt;
 Username: &amp;lt;empty&amp;gt;&lt;br /&gt;
 Password: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use Verizon's network:&lt;br /&gt;
&lt;br /&gt;
 Name: Tracfone&lt;br /&gt;
 APN: TRACFONE.VZWENTP&lt;br /&gt;
 Username: &amp;lt;empty&amp;gt;&lt;br /&gt;
 Password: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Virgin Mobile (Canada) ==&lt;br /&gt;
&lt;br /&gt;
Settings might work with Bell Canada too since it is the same network. Calls, SMS and 4G data appear to be working fine. Note that SIM may well be nano-sim but pinephone is micro-sim and may require an adapter.&lt;br /&gt;
&lt;br /&gt;
 Name: Mobile Fast Web&lt;br /&gt;
 APN: pda2.bell.ca&lt;br /&gt;
 Username:&lt;br /&gt;
 Password:&lt;br /&gt;
&lt;br /&gt;
== Vodafone (Czech republic) ==&lt;br /&gt;
 Name: internet&lt;br /&gt;
 APN: internet&lt;br /&gt;
 Username: &amp;lt;empty&amp;gt;&lt;br /&gt;
 Password: &amp;lt;empty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source: https://www.vodafone.cz/pece/osobni-a-firemni/otazky/zaciname-s-chytrym-telefonem/pripojeni-nastaveni-internetu-v-telefonu/&lt;br /&gt;
&lt;br /&gt;
= Carriers that do not work =&lt;br /&gt;
&lt;br /&gt;
== FreedomPop (USA) ==&lt;br /&gt;
VoIP-service. Customer service said they require Android 4.3+, and their free calling and texting works only with the Google Play app they make you use. So calls and texts don't work with non-smart phones and won't work with the PinePhone (even though it is a smart phone) because of software incompatibility. However, the data part still work if APN has been seen correctly set to '''fp.com.attz'''. You get 200MB free data per month. However, please watch out that you will get ding by $20 top up charge when over 200MB limit. &lt;br /&gt;
&lt;br /&gt;
APN: &amp;lt;code&amp;gt;fp.com.attz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sprint (USA) ==&lt;br /&gt;
&lt;br /&gt;
VoLTE service. Recently some distributions got VoLTE working using AT commands (see for example the [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#VoLTE postmarketOS wiki]), please update this paragraph when having tested Sprint successfully.&lt;br /&gt;
&lt;br /&gt;
APN: &amp;lt;code&amp;gt;cinet.spcs&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Verizon (USA) ==&lt;br /&gt;
&lt;br /&gt;
VoLTE service.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
Other VoLTE services.&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
&lt;br /&gt;
* See also https://forum.pine64.org/showthread.php?tid=9150&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Software_Releases&amp;diff=6819</id>
		<title>PinePhone Software Releases</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Software_Releases&amp;diff=6819"/>
		<updated>2020-09-02T10:15:00Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a list of all available releases for the PinePhone as well as links to further resources.&lt;br /&gt;
&lt;br /&gt;
See [[PinePhone Installation Instructions]] on how to install the operating systems.&lt;br /&gt;
&lt;br /&gt;
Note: Some releases may not have a good setup for the backlight at low brightness. If configured too low the backlight shuts down completely, but the screen is still displayed and usable in bright front-light.&lt;br /&gt;
&lt;br /&gt;
= Software Releases =&lt;br /&gt;
This is a list of OSes that specifically support the PinePhone, but as support is included in Mainline Linux, in principle any ARM Linux OS can be used, if possible required patches are included.&lt;br /&gt;
&lt;br /&gt;
== postmarketOS ==&lt;br /&gt;
[[File:PostmarketOS-logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
postmarketOS is a preconfigured version of [https://www.alpinelinux.org/ Alpine Linux] for mobile devices that offers a choice of several desktop environments including Plasma Mobile and Phosh. &lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
Rather than downloading a demo image, postmarketOS [https://wiki.postmarketos.org/wiki/Installation_guide recommends the use of their script], pmbootstrap, that can tailor build your SD card for you.&lt;br /&gt;
&lt;br /&gt;
Note: pmbootstrap offers an option [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#Installation to install to the eMMC].&lt;br /&gt;
&lt;br /&gt;
Demo images can be found [http://images.postmarketos.org/pinephone/ here].&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
demo/147147 (for demo images only - when building an image with pmbootstrap you set your own username and password (the Phosh lock screen requires your password, but only presents a numeric keyboard, so you should use only numbers in your password).&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
See [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone) postmarketOS dedicated PinePhone wiki page]&lt;br /&gt;
&lt;br /&gt;
If you install Firefox browser (or are using a demo image that already has it installed) then [https://wiki.postmarketos.org/wiki/Firefox these hints] in the pmOS wiki are recommended.&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
[https://gitlab.com/postmarketOS/postmarketos/issues/3 postmarketOS issue tracker] for PinePhone support. See [https://wiki.postmarketos.org/wiki/Contributing  postmarketOS wiki] for options to contribute.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu Touch by UBports ==&lt;br /&gt;
[[File:Ubports-logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
A Mobile Version of the Ubuntu Operating System made and maintained by the UBports Community.&lt;br /&gt;
&lt;br /&gt;
Ubuntu touch is a mobile version of Ubuntu developed by the UBports community. Installation instructions can be found on [https://gitlab.com/ubports/community-ports/pinephone#how-do-i-install-ubuntu-touch-on-my-pinephone the UBports PinePhone project]. There is also a [https://github.com/goddard/pinephone/ script] to download the latest image and flash to your PinePhone. In the future, Ubuntu Touch will be able to be installed onto the PinePhone with the [https://devices.ubuntu-touch.io/installer UBports installer] GUI tool.&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
[https://gitlab.com/ubports/community-ports/pinephone#how-do-i-install-ubuntu-touch-on-my-pinephone UBports PinePhone project]&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
Set up during boot&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
Scroll down to the bottom of [https://gitlab.com/ubports/community-ports/pinephone this page].&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
See [https://gitlab.com/ubports/community-ports/pinephone UBports gitlab page]. See [https://ubports.com/foundation/sponsors UBports website] for how to donate.&lt;br /&gt;
&lt;br /&gt;
== Mobian ==&lt;br /&gt;
[[File:Debian-logo.png]]&lt;br /&gt;
&lt;br /&gt;
An unofficial Debian build for ARM64 running with the Phosh user interface (developed by Purism, Phosh uses Wayland instead of Xorg). The base system is pure Debian, with only the GUI applications and a few others (ModemManager, WiFi chip firmware) being built from modified sources (as well as the kernel and u-boot). Current version is Debian Bullseye.  &lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
[http://images.mobian-project.org/ Mobian downloadable images]&lt;br /&gt;
&lt;br /&gt;
Don't forget to extract the image before installing: &lt;br /&gt;
$ gzip -d Downloads/mobian-pinephone-*.img.gz&lt;br /&gt;
&lt;br /&gt;
See the [https://wiki.mobian-project.org/doku.php?id=install project page] for specific installation instructions.&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
mobian/1234&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/mobian1/mobian-recipes/-/blob/master/README.md the project's README file] or [https://wiki.mobian-project.org/doku.php?id=pinephone the wiki]for most up to date status.&lt;br /&gt;
&lt;br /&gt;
Check [https://gitlab.com/a-wai/debos-pinephone/-/issues bug tracker] for known issues. Questions? Ask on our [https://forum.pine64.org/showthread.php?tid=9016 thread].&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
It is recommended that you log your bug reports in [https://gitlab.com/mobian1/issues the project's issue tracker]. As a general rule, issues with third-party apps (even the default ones) should be reported upstream. A Mobian issue would be related to getting the hardware to work on the PinePhone, but if unsure where the issue should be reported just open a ticket or ask. Feel free to pick an open issue to work on, or send a merge request on [https://gitlab.com/mobian1 Gitlab].&lt;br /&gt;
&lt;br /&gt;
* ''' Notes '''&lt;br /&gt;
See [[Mobian for PinePhone]] or [https://wiki.mobian-project.org/doku.php?id=start the wiki] for additional information regarding screen resolution, USB networking, WiFi hotspot, Chatty and the repository.&lt;br /&gt;
&lt;br /&gt;
== SailfishOS ==&lt;br /&gt;
&amp;lt;!--http://files.pine64.org/sw/pine64_installer/json/sailfishos.png--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sailfish OS is a Linux-based operating system based on open source projects such as Mer and including a closed source UI.&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
The SailfishOS image is built on Gitlab CI. The latest image can be installed using the [https://raw.githubusercontent.com/sailfish-on-dontbeevil/flash-it/master/flash-it.sh flashing script].&lt;br /&gt;
&lt;br /&gt;
The script downloads the image and bootloader from our CI, extracts everything and burns it onto the SD card. '''Note:''' The script will format and erase the SD card!&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
# Download the flashing script&lt;br /&gt;
# Insert a microSD card in your device&lt;br /&gt;
# Make the script executable: &amp;lt;code&amp;gt;chmod +x flash-it.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
# Verify that you have the &amp;lt;code&amp;gt;bsdtar&amp;lt;/code&amp;gt; package installed&lt;br /&gt;
# Execute it: &amp;lt;code&amp;gt;./flash-it.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
# Follow the instructions. Some commands in the script require root permissions (for example: mounting and flashing the SD card).&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
&lt;br /&gt;
Set PIN on initialization.&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
May 4th 2020: The SFOS image is now the latest 3.3.0.16 release. This has resolved many problems (for example MTP file transfer now works) but there are several glitches, the most serious being very intermittent wifi. Random hissing noise for about 10 seconds. This release of SF has Nextcloud integration.&lt;br /&gt;
&lt;br /&gt;
May 24th 2020: Voice calls now work but not available in public builds yet. If you have a Jolla registration a minor bug means you have to submit the request twice. WiFi still intermittent. The battery indicator previously only showed level at boot, now improved but far from reliable.&lt;br /&gt;
 &lt;br /&gt;
If you're not familiar with SFOS pay attention to the tutorial - the interface works great but isn't immediately obvious. If you are familiar with SF you can skip the tutorial by touching all 4 corners starting top left. There is a limited selection of apps available from the Jolla store, the vast majority are hosted on openrepos.net. The Storeman app for openrepos is now preinstalled, and also Webcat browser as the built in browser is not working at the moment.&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
&lt;br /&gt;
See the [https://sailfishos.org/wiki/Collaborative_Development#Reporting_issues SailfishOS wiki] for links to their forum as well as info required when reporting an issue. See the [https://sailfishos.org/wiki/SailfishOS SailfishOS wiki] for options to contribute&lt;br /&gt;
&lt;br /&gt;
* ''' Notes '''&lt;br /&gt;
OTA is supported: &amp;lt;code&amp;gt;zypper refresh &amp;amp;&amp;amp; zypper update&amp;lt;/code&amp;gt; as root (&amp;lt;code&amp;gt;devel-su&amp;lt;/code&amp;gt; to get root access). Things that need reflash are bootloader specific at the moment. If improvements like crust or changes of partition layout are added then you need to reflash.&lt;br /&gt;
&lt;br /&gt;
== PureOS ==&lt;br /&gt;
[[File:Pureos.png]]&lt;br /&gt;
&lt;br /&gt;
PureOS is a GNU/Linux distribution focusing on privacy and security, using the GNOME desktop environment. It is developed and maintained by Purism.&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
This is an unofficial/unsupported PinePhone port by ''mozzwald'' and maintained by clover that can be downloaded [https://www.ironrobin.net/pureos/droppy/#/Images here].&lt;br /&gt;
&lt;br /&gt;
* ''' source code '''&lt;br /&gt;
If you want to report a bug or look at what goes into the PinePhone build of PureOS, visit the Git [https://www.ironrobin.net/pureos/git/clover/pinephone/ repository].&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
purism/123456&lt;br /&gt;
&lt;br /&gt;
* ''' Build instructions '''&lt;br /&gt;
If you want to build it yourself you can follow the instructions posted [https://mozzwald.com/pp/pureos-pinephone-build-instructions.txt here].&lt;br /&gt;
&lt;br /&gt;
== Fedora ==&lt;br /&gt;
[[File:Fedora-logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
An (unofficial) vanilla Fedora rawhide build for aarch64 with megi's kernel and [https://copr.fedorainfracloud.org/coprs/njha/mobile/packages/ some additional packages] to tie it all together. It aims to eventually be an upstream part of the Fedora project, rather than a phone-specific distribution.&lt;br /&gt;
&lt;br /&gt;
See [https://forum.pine64.org/showthread.php?tid=9347 this thread in the forum].&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
[https://github.com/nikhiljha/pp-fedora-sdsetup/releases/ flashable images] or [https://github.com/nikhiljha/pp-fedora-sdsetup/tree/image build scripts]&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
pine/1111&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
WiFi, Bluetooth, SMS, Data, Calls all work! There are still a few bugs though, and [some features don't have driver support yet https://xnux.eu/devices/pine64-pinephone.html#toc-feature-driver-support-matrix] on any PinePhone distribution. &lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
Please send your bug reports at [https://github.com/nikhiljha/pp-fedora-sdsetup/issues the project's issue tracker]. Be sure to include logs if applicable! Send us merge requests on [https://github.com/nikhiljha/pp-fedora-sdsetup/ Github].&lt;br /&gt;
&lt;br /&gt;
== Arch Linux ARM ==&lt;br /&gt;
[[File:Archlinux-logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
(Unofficial) Arch Linux ARM with Phosh as the UI selection, it's usable on the PinePhone and currently being maintained by the DanctNIX community.&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
Get the latest image here: https://github.com/dreemurrs-embedded/Pine64-Arch/releases&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
alarm/123456&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
Most of the things now works, there are some minor issues with crust.&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects  '''&lt;br /&gt;
Feel free to send us merge requests and report issues on [https://github.com/dreemurrs-embedded/Pine64-Arch/pulls GitHub].&lt;br /&gt;
&lt;br /&gt;
== Manjaro ARM ==&lt;br /&gt;
[[File:Manjaro-logo.svg|100px]]&lt;br /&gt;
&lt;br /&gt;
Manjaro is a user-friendly Linux distribution based on the independently developed Arch operating system with the Plasma Mobile desktop environment.&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
&lt;br /&gt;
Phosh: [https://forum.manjaro.org/t/manjaro-arm-alpha2-with-phosh-pinephone/148 See Manjaro forum announcement of Alpha2 version]&lt;br /&gt;
&lt;br /&gt;
Plasma: [https://osdn.net/projects/manjaro-arm/storage/pinephone/plasma-mobile/alpha7/ Download link for the Alpha7 version of the Plasma Mobile release]&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
** manjazo/123456&lt;br /&gt;
** root/root&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
See Manjaro's [https://forum.manjaro.org/t/manjaro-arm-alpha5-for-pinephone-testing-branch/136614 announcement]. In particular, phone calls do not yet work from the Phone application.&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
&lt;br /&gt;
See the end of the [https://forum.manjaro.org/t/manjaro-arm-alpha5-for-pinephone-testing-branch/136614 announcement].&lt;br /&gt;
&lt;br /&gt;
== Maemo Leste ==&lt;br /&gt;
&amp;lt;!--http://files.pine64.org/sw/pine64_installer/json/maemo_leste.png--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Maemo Maemo] is a trimmed-down version of Debian for mobile devices, originally a collaboration between Nokia and many open source projects (the [http://maemo.org/intro/ Maemo community]) before Nokia abandoned it. The community now takes full responsibility in developing fully open source Maemo for a variety of mobile devices. &lt;br /&gt;
&lt;br /&gt;
The new version Maemo 7 &amp;quot;Leste&amp;quot; is an ARM64 port of [https://devuan.org/ Devuan] (Debian without systemd) and runs the mainline Linux kernel. The default user interface stack is [https://en.wikipedia.org/wiki/Hildon Hildon], [https://en.wikipedia.org/wiki/X.Org_Server Xorg], [https://en.wikipedia.org/wiki/Matchbox_(window_manager) Matchbox WM], and [https://en.wikipedia.org/wiki/GTK GTK]. The current version is Devuan Ascii (Debian Stretch) and they are working on an upgrade to Devuan Beowulf (Debian Buster) as well as simultaneous support for both Devuan and Debian. In addition to the main repository, they [https://maemo-leste.github.io/maemo-leste-repositories-and-community-packages.html announced] a [https://github.com/maemo-leste-extras/bugtracker community repository]. To keep updated they use automation in their package maintenance with [https://github.com/maemo-leste/jenkins-integration jenkins] (similar to [https://www.debian.org/devel/buildd/ debian's buildd]). Porting packages to Maemo Leste is basically a simple matter of porting to arm64 version of Debian/Devuan, which benefits both projects.&lt;br /&gt;
&lt;br /&gt;
More detailed information can be found on [https://leste.maemo.org/Main_Page the Maemo Leste wiki], or follow [https://maemo-leste.github.io/ announcements on their website], and check out [https://leste.maemo.org/Leste_FAQ Frequently Asked Questions]. &lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
[http://maedevu.maemo.org/images/pinephone/ Maemo Leste test builds]. There is also an [https://github.com/maemo-leste/image-builder image builder], see their wiki for instructions on how to [https://leste.maemo.org/Image_Builder build a custom image].&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
root/toor&lt;br /&gt;
&lt;br /&gt;
You may use &amp;quot;sudo&amp;quot; directly.&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
For current status and work arounds please read their [https://leste.maemo.org/PinePhone PinePhone wiki page], and update as necessary (make sure to notify them of new issues by leaving a report on their github, see below).&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
Most discussion occurs at #maemo-leste on freenode IRC. The Maemo website also has an [https://talk.maemo.org/showthread.php?p=1565822 ongoing forum thread] for feedback about Maemo Leste on the PinePhone BraveHeart edition.&lt;br /&gt;
&lt;br /&gt;
All other contact information is listed on the [https://leste.maemo.org/Main_Page main page] of the Maemo wiki. You should [https://github.com/maemo-leste/bugtracker/issues submit bug reports] on github. To track known issues, you may use these search terms: [https://github.com/maemo-leste/bugtracker/issues?utf8=%E2%9C%93&amp;amp;q=is%3Aissue+is%3Aopen+pinephone pinephone], [https://github.com/maemo-leste/bugtracker/issues?utf8=%E2%9C%93&amp;amp;q=is%3Aissue+is%3Aopen+pine64 pine64]. Learn about [https://leste.maemo.org/Development development], [https://leste.maemo.org/Development/Porting_Packages porting packages], [https://leste.maemo.org/Development/Building_Packages building packages], [https://leste.maemo.org/Development/Tasks todo list], and general info on [https://wiki.debian.org/HowToPackageForDebian how to package for Debian]. Some tasks have funding available.&lt;br /&gt;
&lt;br /&gt;
== Nemo Mobile ==&lt;br /&gt;
&amp;lt;!--http://files.pine64.org/sw/pine64_installer/json/nemo_mobile.png--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nemo Mobile is the open source build of Sailfish OS, see the new website nemomobile.net.&lt;br /&gt;
&lt;br /&gt;
You can install Nemo on any device that runs Sailfish, see the above website for details. Or you can flash the image to SD card/emmc on the PinePhone, download here https://yadi.sk/d/8oSZp-frGidscw (requires Yandex Disk account).&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
Download location is [https://github.com/neochapay/nemo-device-dont_be_evil/ here on GitHub]. The latest version is not an image file and therefore not for beginners!&lt;br /&gt;
&lt;br /&gt;
Alternative easy installation method: install Sailfish on your PP first (follow instructions on this page under Sailfish). Enable developer mode.&lt;br /&gt;
In the terminal run as root (devel-su):&lt;br /&gt;
&lt;br /&gt;
 ssu ar nemo-devel-ux http://repo.merproject.org/obs/home:/neochapay:/nemo-ux/sailfish_latest_armv7hl/&lt;br /&gt;
&lt;br /&gt;
then&lt;br /&gt;
 pkcon refresh&lt;br /&gt;
&lt;br /&gt;
then install the nemo-specific Glacier packages:&lt;br /&gt;
&lt;br /&gt;
 pkcon install lipstick-glacier-home-qt5&lt;br /&gt;
&lt;br /&gt;
If necessary, reboot.&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
Scroll down the page [https://github.com/neochapay/nemo-device-dont_be_evil/ here].&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
For more info please visit [https://github.com/neochapay/nemo-device-dont_be_evil neochapay's Github page]&lt;br /&gt;
&lt;br /&gt;
== KDE Neon ==&lt;br /&gt;
&amp;lt;!--http://files.pine64.org/sw/pine64_installer/json/plasma_mobile.png--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on KDE Neon for the desktop, comes with Plasma Mobile.&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
Plasma mobile images can be found [https://images.plasma-mobile.org/pinephone/ here].&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
phablet/1234&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
&lt;br /&gt;
== NixOS ==&lt;br /&gt;
&amp;lt;!--http://files.pine64.org/sw/pine64_installer/json/nixos.png--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''NixOS support is handled through the Mobile NixOS project.''&lt;br /&gt;
&lt;br /&gt;
* [https://mobile.nixos.org/ Project home page]&lt;br /&gt;
* [https://github.com/NixOS/mobile-nixos Source code repository]&lt;br /&gt;
&lt;br /&gt;
There is no pre-built complete image. For now users are expected to follow the instructions in the [https://mobile.nixos.org/getting-started.html Getting Started page], and on [https://mobile.nixos.org/devices/pine64-pinephone-braveheart.html the device's page].&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
&lt;br /&gt;
This information may change, but currently it boots, it's as compatible as the Android-based devices are with Mobile NixOS. It even supports a bit more since it can use Wi-Fi.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cite&amp;gt;&lt;br /&gt;
Support for all of the hardware will be coming, this project is a breadth-first work, where the work spans multiple devices in parallel.&lt;br /&gt;
&amp;lt;/cite&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
On [https://github.com/NixOS/mobile-nixos/issues the project's repository]. Please specify that you are using a PinePhone when reporting issues. Details about contributions and donations are on the [https://nixos.org/nixos/community.html NixOS website].&lt;br /&gt;
&lt;br /&gt;
== LuneOS ==&lt;br /&gt;
&amp;lt;!--http://files.pine64.org/sw/pine64_installer/json/luneos.jpg--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on WebOS by LG, comes with Luna Next desktop environment.&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
[http://build.webos-ports.org/luneos-testing/images/pinephone/ LuneOS test image for PinePhone]&lt;br /&gt;
Tofe recommends using bmaptool ; for example &amp;quot;bmaptool copy http://build.webos-ports.org/luneos-testing/images/pinephone/luneos-dev-image-pinephone-testing-0-15.rootfs.wic.gz /dev/mmcblk0&amp;quot;. Rename .wic file to .img for standard dd usage. &lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
&lt;br /&gt;
== Sxmo ==&lt;br /&gt;
&lt;br /&gt;
A collection of Suckless programs to create a mobile UI. Based on Postmarket OS&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
Sxmo images can be found [http://images.lrdu.org/pinephone/ here].&lt;br /&gt;
&lt;br /&gt;
* ''' username/password '''&lt;br /&gt;
mo/mo&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
&lt;br /&gt;
PinePhone's backlight turns off at 2/10 brightness.&lt;br /&gt;
&lt;br /&gt;
* ''' How to contribute and report defects '''&lt;br /&gt;
&lt;br /&gt;
All the contributing information is [https://git.sr.ht/~mil/sxmo-docs/tree/master/CONTRIBUTING.md here].&lt;br /&gt;
&lt;br /&gt;
== openSUSE ==&lt;br /&gt;
[[File:SLEM-OS-logo.png|100px]]&lt;br /&gt;
&lt;br /&gt;
openSUSE running on the PinePhone&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
openSUSE images can be found [http://images.alefnode.com/ here].&lt;br /&gt;
&lt;br /&gt;
Nightly images [http://images.alefnode.com/nightly/ here].&lt;br /&gt;
&lt;br /&gt;
CI/CD for nightly images [https://jenkins.alefnode.com/job/public/job/slemos-imagebuilder/ here].&lt;br /&gt;
&lt;br /&gt;
* ''' username/password'''&lt;br /&gt;
pine/1234&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
You can find all information about the progress of the project [https://gitlab.com/slem.os/slem.os/-/blob/master/CHANGELOG.md here].&lt;br /&gt;
&lt;br /&gt;
== AVMultiPhone ==&lt;br /&gt;
&lt;br /&gt;
AVMultimedia linux running on the PinePhone&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
&lt;br /&gt;
https://de.osdn.net/projects/avmultimedia/releases/&lt;br /&gt;
&lt;br /&gt;
* ''' username/password'''&lt;br /&gt;
archivista/1234&lt;br /&gt;
&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
&lt;br /&gt;
All linux applications (Firefox, LibreOffice, Gimp, Inkscape, Kodi etc.). Phone calls and SMS (text messages), primitiv acces to camera (1280x720).&lt;br /&gt;
&lt;br /&gt;
AVMultiPhone offers a classic Linux desktop (Mate) on the PinePhone. The basis is PostmarketOS. In contrast to other PinePhone distributions, AVMultiPhone offers real Linux feeling without sacrificing the functionality of a smartphone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GloDroid ==&lt;br /&gt;
&lt;br /&gt;
A fully open source port of Android to the PinePhone&lt;br /&gt;
&lt;br /&gt;
* ''' Download location '''&lt;br /&gt;
&lt;br /&gt;
https://github.com/GloDroid/glodroid_manifest/releases&lt;br /&gt;
&lt;br /&gt;
* ''' username/password'''&lt;br /&gt;
* ''' What works, what does not work '''&lt;br /&gt;
WiFi, screen dimming, touchscreen and charging all work. No Bluetooth support yet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Factory Test OS =&lt;br /&gt;
On the BraveHeart model there was a pmOS based basic factory test OS pre-installed on the eMMC. Martijn Braam from pmOS has improved the functionality of the image considerably.&lt;br /&gt;
&lt;br /&gt;
Since the 20200501 version it is able to test all the hardware.  It also includes functionality to install a new OS to the eMMC when using with an test image that includes that OS image. The downloadable image just does the hardware tests.&lt;br /&gt;
&lt;br /&gt;
Do not flash eMMC to test your device, just copy it to mSD and test from there. New versions are distributed as part of the pmOS distribution.&lt;br /&gt;
&lt;br /&gt;
Links:&lt;br /&gt;
* [https://images.postmarketos.org/pinephone/ Software Images] (download the latest one that is marked pine-pinephone-YYYYMMDD-factorytestX.img.xz)&lt;br /&gt;
* [https://gitlab.com/MartijnBraam/factorytest Git repo]&lt;br /&gt;
* [https://gitlab.com/MartijnBraam/factorytest/-/blob/master/README.rst Documentation]&lt;br /&gt;
&lt;br /&gt;
= Installing other ARM64 distributions =&lt;br /&gt;
'''Warning:''' Distributions not on this page may not even boot after you follow this section. In the best case, they will be barely usable. This is more for fun, or if you would like to port a new distribution to the PinePhone.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This section uses megi's kernel releases, and not the official ones from PINE64. While it is possible to use the official (and in the future, mainline) kernel, megi provides binary releases, which makes it very easy.&lt;br /&gt;
&lt;br /&gt;
If you would like to see specific commands for how to complete these steps, see https://github.com/nikhiljha/pp-fedora-sdsetup (an example for Fedora) or https://xnux.eu/howtos/install-arch-linux-arm.html (an example for Arch Linux).&lt;br /&gt;
&lt;br /&gt;
# Create a boot (from 4 MB to about 252 MB) and root (from 252 MB to the end of the card) filesystem on the SD card.&lt;br /&gt;
# Format the boot partition with vfat, and the root partition with f2fs.&lt;br /&gt;
# Extract the root filesystem from your distribution's ARM image into the root filesystem on the SD card. Do not copy the partition, copy the files (in archive mode: like rsync -ar).&lt;br /&gt;
# Edit /etc/fstab to match your partitions.&lt;br /&gt;
# Grab megi's kernel from https://xff.cz/kernels/ (you probably want 5.6 or later).&lt;br /&gt;
# Follow the README instructions, which involves copying the kernel modules into the SD card rootfs and writing u-boot and the bootloader.&lt;br /&gt;
&lt;br /&gt;
= Other Resources =&lt;br /&gt;
Community&lt;br /&gt;
* [[Main_Page#Community_and_Support|Links to the community services]]&lt;br /&gt;
&lt;br /&gt;
Hardware information&lt;br /&gt;
* [[PinePhone|General PinePhone hardware info]] in this Pine64 wiki.&lt;br /&gt;
* [[PinePhone_v1.1_-_Braveheart|PinePhone 1.1 BraveHeart hardware details]] (details specific to the BraveHeart Edition).&lt;br /&gt;
* [[PinePhone_v1.2|PinePhone 1.2 hardware details]] (details specific to the Community Edition).&lt;br /&gt;
* The postmarketOS wiki has a detailed page on the PinePhone hardware [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone) here,] and the preceding devkit [https://wiki.postmarketos.org/wiki/PINE64_Don%27t_be_evil_devkit_(pine64-dontbeevil) here].&lt;br /&gt;
&lt;br /&gt;
Other software information&lt;br /&gt;
* [https://linux-sunxi.org/Main_Page sunxi community wiki]&lt;br /&gt;
* [https://xnux.eu/devices/pine64-pinephone.html megi feature/driver support matrix]&lt;br /&gt;
* [https://megous.com/dl/tmp/README.bootui megi bootUI notes (for dualbooting/multibooting)] see demonstration [https://www.youtube.com/watch?v=ZL1GREqoqx8 on YouTube,]&lt;br /&gt;
* [https://github.com/ayufan-pine64/boot-tools ayufan boot tools]&lt;br /&gt;
&lt;br /&gt;
Other&lt;br /&gt;
* [https://store.pine64.org/?post_type=product Pine64 shop]&lt;br /&gt;
* [https://www.pine64.org/2020/01/24/setting-the-record-straight-pinephone-misconceptions/ Pine64 blog on blobs]&lt;br /&gt;
* [https://tuxphones.com/yet-another-librem-5-and-pinephone-linux-smartphone-comparison/ Martijn Braam Librem 5 comparison, especially covering openness/blobs]&lt;br /&gt;
* [https://fam-ribbers.com/2019/12/28/State-of-Linux-on-mobile-and-common-misconceptions.html Bart Ribbers blog on Linux distributions and desktop environments on mobile devices]&lt;br /&gt;
* [https://www.jeffgeerling.com/blog/2019/a2-class-microsd-cards-offer-no-better-performance-raspberry-pi Jeff Geerling on testing micro SD cards]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_v1.1_-_Braveheart&amp;diff=6818</id>
		<title>PinePhone v1.1 - Braveheart</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_v1.1_-_Braveheart&amp;diff=6818"/>
		<updated>2020-09-02T10:14:58Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PinePhone v1.1 &amp;quot;Braveheart&amp;quot; is a hardware revision of the PinePhone that shipped in January 2020.&lt;br /&gt;
&lt;br /&gt;
This page contains resources which are exclusive to the 1.1 revision of the PinePhone. For other revisions, or for resources related to all PinePhone revisions, see [[PinePhone]].&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
&lt;br /&gt;
[http://files.pine64.org/doc/PinePhone/PinePhone_Schematic_v1.1_20191031.pdf Hardware schematic]&lt;br /&gt;
&lt;br /&gt;
== Changes from 1.0 ==&lt;br /&gt;
&lt;br /&gt;
Braveheart is slightly different from the 1.0 revision of the Pinephone. These differences should not require creating different images.&lt;br /&gt;
&lt;br /&gt;
# Added CPU shielding and cover plate&lt;br /&gt;
# Swap PC3 to FLASH_EN and PD24 to FLASH_TRIGOUT, where previously they were reversed&lt;br /&gt;
# Add pulldown resistor on PD24 (FLASH_TRIGOUT) so the flash LED does not light on boot&lt;br /&gt;
# Connect WiFi enable to VD33&lt;br /&gt;
# Set the EG25G's PWRKEY on by default (see resistor R1526)&lt;br /&gt;
# Add R630 resistor location, populate with 0K by default. Allows adjusting to different battery thermistors in case this is not possible in software.&lt;br /&gt;
# Add voltage shift to Pogo pins I2C-CLK, I2C-DATA, and INT. The Pogo Pin specified voltage is 3.3v while the A64's I2C is 2.8V.&lt;br /&gt;
# A64 LINEOUTN is disconnected from the speaker amplifier, making the speaker output single-ended instead of differential&lt;br /&gt;
&lt;br /&gt;
== DIY Hardware fixes ==&lt;br /&gt;
Some of the known issues can be fixed with more or less involved hardware modifications:&lt;br /&gt;
* USB-C CC pins are pulled to GND: [[PinePhone_1.2_VCONN_Hardware_Fix| Removing small switches]] can make USB OTG work.A proper fix is to replace those with another component.&lt;br /&gt;
&lt;br /&gt;
== Known issues ==&lt;br /&gt;
&lt;br /&gt;
This section lists problems known on the 1.1 revision hardware, possibly because they carried over from the 1.0 revision. Most of these were fixed in the 1.2 revision mainboard.&lt;br /&gt;
&lt;br /&gt;
=== Need a way to distinguish v1.1 from v1.2 from U-Boot SPL ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by PL6 being connected directly to the modem, instead of through the level shifter, so it is pulled low at boot.''&lt;br /&gt;
&lt;br /&gt;
To load the correct device tree, there needs to be some hardware feature that can distinguish the two versions. This can be as simple as an I/O pin that is pulled differently by default between v1.1 and v1.2. Reading the pin in SPL will tell us which device tree to use.&lt;br /&gt;
&lt;br /&gt;
=== WiFi module cannot be disabled or reset in software ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by connecting PL2 to the WiFi module's WiFi reset pin.''&lt;br /&gt;
&lt;br /&gt;
Neither the &amp;lt;tt&amp;gt;WL-REG-ON&amp;lt;/tt&amp;gt; nor &amp;lt;tt&amp;gt;WL-PMU-EN&amp;lt;/tt&amp;gt; signal is connected to anything, and the WiFi module's &amp;lt;tt&amp;gt;CHIP_EN&amp;lt;/tt&amp;gt; pin is connected (through the killswitch) to a regulator that cannot be turned off (easily, if at all). So while the killswitch works, there's no way to disable the WiFi module in software. This will lead to excess power consumption when WiFi is turned off.&lt;br /&gt;
&lt;br /&gt;
=== Magnetometer's IRQ signal is routed to the wrong pin ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by connecting the magnetometer's &amp;lt;tt&amp;gt;DRDY&amp;lt;/tt&amp;gt; pin to PB1.''&lt;br /&gt;
&lt;br /&gt;
It needs to go to DRDY, not to INT. The kernel driver expects the trigger events to be fired when DRDY changes, and does not even configure the interrupts to be enabled on the INT pin.&lt;br /&gt;
&lt;br /&gt;
Software workaround is to disable magnetometer interrupt in the devicetree, and use a hrtimer  or some other software triggering mechanism for IIO devices.&lt;br /&gt;
&lt;br /&gt;
=== Speaker output could be differential ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by connecting &amp;lt;tt&amp;gt;LINEOUTP&amp;lt;/tt&amp;gt; to the speaker amplifier's &amp;lt;tt&amp;gt;INP&amp;lt;/tt&amp;gt; input.''&lt;br /&gt;
&lt;br /&gt;
Using a differential connection to the speaker amplifier would significantly lower the noise floor of the speaker, and would allow doubling the max volume.&lt;br /&gt;
&lt;br /&gt;
=== Modem AP_READY signal is not connected ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by connecting PH7 to &amp;lt;tt&amp;gt;AP_READY&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;WAKEUP_IN&amp;lt;/tt&amp;gt;.''&lt;br /&gt;
&lt;br /&gt;
The [https://www.quectel.com/UploadImage/Downlad/Quectel_EC2x&amp;amp;EG9x_Power_Management_Application_Note_V1.0.pdf modem's power management documentation] describes how to implement modem power saving. The modem can wake up the host using either the Ring Indicator pin (section 4.5) or USB remote wakeup (section 4.3). Either way, it suggests the &amp;lt;tt&amp;gt;AP_READY&amp;lt;/tt&amp;gt; signal needs to be connected. The modem needs that signal to know when the host is asleep (and the modem needs to queue its messages and wake it up), and when the host has finished waking up (and is ready to receive the queued messages).&lt;br /&gt;
&lt;br /&gt;
=== Modem RI signal routing prevents wakeup ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by connecting &amp;lt;tt&amp;gt;RI&amp;lt;/tt&amp;gt; to PL6.''&lt;br /&gt;
&lt;br /&gt;
The EG25G's Ring Indicator (RI) pin is currently routed to GPIO pin PB2. The A64 needs to receive interrupts via this pin while suspended, so the modem can wake up the A64 (for incoming calls and text messages). The only GPIO bank that can receive interrupts while the A64 is suspended is Port L (on &amp;lt;tt&amp;gt;R_PIO&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
'''Note''': Port L is powered by VCC-PL, and runs at 1v8, so it should ''not'' have a level shift to DCDC1/3v3 between the AP and the modem, like DTR currently has. The way DTR is currently connected is a bug.&lt;br /&gt;
&lt;br /&gt;
=== Excess power usage while driving VBUS ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by connecting PL9 and &amp;lt;tt&amp;gt;VBUS_CTRL&amp;lt;/tt&amp;gt; on the ANX7688 to &amp;lt;tt&amp;gt;N_VBUSEN&amp;lt;/tt&amp;gt; on the PMIC.''&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;N_VBUSEN/DRIVEVBUS&amp;lt;/tt&amp;gt; input on the  AXP803 PMIC, labeled &amp;lt;tt&amp;gt;USB-DRVVBUS&amp;lt;/tt&amp;gt; on the schematic, is not connected to the USB OTG boost regulator enable input, because R1300 is marked &amp;quot;NC&amp;quot;. This prevents the AXP803 from automatically detecting when the USB port is being powered from the battery. Thus, the PMIC continues to draw power from the USB port, and this doubles the drain on the battery (since the whole phone is being powered by the USB OTG boost regulator). This could be fixed by populating R1300.&lt;br /&gt;
&lt;br /&gt;
The ANX7688's VBUS_CTRL pin should also be connected to the DRVVBUS signal to perform role switching in hardware without needing OS interaction. In that case PD6 becomes an input. Otherwise, we would need to hook up the VBUS status change interrupt from the ANX7688 to control the USB PHY driver.&lt;br /&gt;
&lt;br /&gt;
=== ANX7688 power supply situation is problematic ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by powering always-on 3v3 from DCDC1, video-related 3v3 from DLDO1, 1v8 from GPIO-LDO1, and 1v0 controlled by PD11.''&lt;br /&gt;
&lt;br /&gt;
ANX7688 has four power inputs: 3v3, 1v8, 1v0, and HDMI_VT (which is also 3v3).&lt;br /&gt;
* The main 3v3 input, to AVDD33, should always be on according to the datasheet. For this reason, it should be connected to an always-on regulator, such as DCDC1, so DLDO1 can be turned off when the screen is off. It has extremely low power consumption.&lt;br /&gt;
* HDMI_VT is only needed during video transmission, and should remain connected to DLDO1.&lt;br /&gt;
* The only other 3v3 consumer is the VCONN_EN pull-ups. These could be pulled to GPIO1-LDO (1.8V) instead; the pins are open drain.&lt;br /&gt;
* The DVDD18 input should also always be on according to the datasheet. It has extremely low power consumption. I recommend connecting it and the PL11 pull-up to VCC-PL, so GPIO1-LDO can be turned off.&lt;br /&gt;
* The remaining 1v8 inputs only need to be enabled when a USB cable is connected (supply or OTG). They are connected to their own regulator (GPIO1-LDO), so that is fine. (Note that the next issue suggests removing the pull-ups for POWER_EN and RESET_N.)&lt;br /&gt;
* The 1v0 input is only needed when a USB cable is connected (supply or OTG). It is currently controlled by DLDO1, but I think controlling it with GPIO1-LDO would be an improvement. That way DLDO1 only needs to be enabled when transmitting video, not always when a cable is connected.&lt;br /&gt;
&lt;br /&gt;
=== Modem PWR_KEY signal resistor population ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by separating the modem &amp;lt;tt&amp;gt;PWRKEY&amp;lt;/tt&amp;gt; (PB3) and &amp;lt;tt&amp;gt;STATUS&amp;lt;/tt&amp;gt; (PH9) signals.''&lt;br /&gt;
&lt;br /&gt;
On the dev phone (1.0) this signal was connected to PB3. This allows for turning on/off the modem via GPIO from a kernel driver. If proper power down is to be implemented in the kernel for the modem, to allow safe shutdown of the modem before turning off the 4g-pwr-bat, kernel has to be able to signal to the modem to shut down and wait 30s. This is not possible on braveheart. Without this signal, kernel can't do anything to shut down the modem, and would have to rely on userspace to properly manage the modem power up/down sequence. Relying on userspace risks users shutting down the modem without proper wait time of 30s, risking modem damage (flash data corruption).&lt;br /&gt;
&lt;br /&gt;
It would be nice to also have access to the STATUS signal from the modem, so that the driver can detect whether the modem is on or off (userspace might have turned modem off already via AT commands). Given that PWR_KEY pulse will either turn the modem on or off, based on the current status, it's necessary to know the current status before sending the pulse.&lt;br /&gt;
&lt;br /&gt;
There's a STATUS signal routed to PWR_KEY on BraveHeart, that keeps the PWRKEY deasserted when the modem is on and it's not possible to pull it up from PB3, even if R1516 would be optionally mounted.&lt;br /&gt;
&lt;br /&gt;
So after powerup you can't change PWR_KEY signal anymore from PB3 even if R1516 is mounted, and it's not possible to turn off the modem via PB3.&lt;br /&gt;
&lt;br /&gt;
=== Modem has access to sensors on I2C1 ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in v1.2 by disconnecting the modem's I2C port.''&lt;br /&gt;
&lt;br /&gt;
The modem is a master on the I2C1 bus. A malicious firmware on the modem would be able to read the phone's gravity/light/proximity sensors and prevent the main Linux OS from reading them. The [https://www.quectel.com/UploadImage/Downlad/Quectel_WCDMA&amp;amp;LTE_Audio_Design_Note_V1.1.pdf modem's audio design note] describes the &amp;lt;tt&amp;gt;AT+QIIC&amp;lt;/tt&amp;gt; command which can be used to read and write registers on I2C devices.&lt;br /&gt;
&lt;br /&gt;
According to the modem documentation, its I2C interface is only used for direct connection to a standalone audio codec. On the PinePhone, since the modem's audio is routed through the A64 SoC, the modem's I2C interface has no legitimate use.&lt;br /&gt;
&lt;br /&gt;
The modem's I2C interface should be left floating. U1503 pins A1, A2, B1, and B2 can be disconnected, and R1527/R1528 can be removed.&lt;br /&gt;
&lt;br /&gt;
=== Allow access the modem debug UART ===&lt;br /&gt;
&lt;br /&gt;
''Not resolved in v1.2 -- would have required moving several other GPIOs.''&lt;br /&gt;
&lt;br /&gt;
Instead of the modem's I2C pins, which aren't very useful (see above), it would be great to have access to the modem's debug UART, for debugging/updating the modem. This could be on UART3 (PD0-PD1, no flow control), while the main modem UART is on UART4 (PD2-PD5, with flow control).&lt;br /&gt;
&lt;br /&gt;
=== Modem UART flow control is broken ===&lt;br /&gt;
&lt;br /&gt;
''Not resolved in v1.2 -- assumption is that USB will be used for high-bandwidth modem I/O.''&lt;br /&gt;
&lt;br /&gt;
BB-TX and BB-RX are connected to UART3 (PD0/PD1). BB-RTS and BB-CTS are connected to UART4 (PD4/PD5). To use hardware flow control, TX/RX would need to be connected to UART4, swapping PD0/PD1 with the motor control and rear camera reset GPIOs at PD2/PD3. This would need a device tree change.&lt;br /&gt;
&lt;br /&gt;
Hardware flow control can be disabled with the &amp;lt;tt&amp;gt;AT+IFC&amp;lt;/tt&amp;gt; command, and USB can also be used for commands instead of the UART. So the impact of this problem is unclear.&lt;br /&gt;
&lt;br /&gt;
=== ANX7688 power/reset control pulled the wrong way ===&lt;br /&gt;
&lt;br /&gt;
''Not resolved in v1.2 -- this has minimal impact.''&lt;br /&gt;
&lt;br /&gt;
Both &amp;lt;tt&amp;gt;ANX_POWER_EN&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ANX_RESET_N&amp;lt;/tt&amp;gt; have pull-ups when they should not. Both signals need to be pulled low by default. They only need to be brought high (turning the chip on) when a USB cable is attached; and they should only be brought high after the 1v8 and 1v0 regulators are turned on. &amp;lt;tt&amp;gt;ANX_POWER_EN&amp;lt;/tt&amp;gt; needs an external pull-down. &amp;lt;tt&amp;gt;ANX_RESET_N&amp;lt;/tt&amp;gt; has an internal pull-down.&lt;br /&gt;
&lt;br /&gt;
=== VCONN_EN signals are possibly inverted ===&lt;br /&gt;
&lt;br /&gt;
''Further investigation determined that the hardware is correct as-is in v1.1, so no change was made.''&lt;br /&gt;
&lt;br /&gt;
I don't have a datasheet for the AW3512 chips, but I assume the enable input is active-high. VCONN1_EN and VCONN2_EN are open-drain. When they are open, it appears that VCONN should be enabled. But right now, when they are open, VCONN is disabled, because the AW3512 EN pin will be pulled low by the FET.&lt;br /&gt;
&lt;br /&gt;
=== Cameras have the same default I2C address ===&lt;br /&gt;
&lt;br /&gt;
''Resolved in software by reprogramming the one of the cameras' I2C addresses at boot.''&lt;br /&gt;
&lt;br /&gt;
This makes it hard to keep both of them powered at the same time and switch quickly between them (on the per-frame basis) without having to re-initialize the sensors on each switch, which takes some time.&lt;br /&gt;
&lt;br /&gt;
=== USB-C CC pins are pulled to the GND by AW3512 (VCONN switches) when VCONN is off ===&lt;br /&gt;
&lt;br /&gt;
'''This issue is also present on the PinePhone 1.2 (CE) version.''' It was fixed with revision 1.2a. [[PinePhone_1.2_VCONN_Hardware_Fix|See the workaround]].&lt;br /&gt;
&lt;br /&gt;
This issue prevents cable plug/orientation detection and USB-PD communication. ANX always sees cable as plugged even if none is plugged. There's no SW workaround for automatic detection of cable plug or power role.&lt;br /&gt;
&lt;br /&gt;
In SW this can only be worked around by manual selection of PinePhone's data and power role by the user.&lt;br /&gt;
&lt;br /&gt;
HW workaround is desoldering U1305 and U1309 switches (BGA like packages). This will void the VCONN control, but it will release the CC pins for their proper connection detection and negotiation roles. I confirmed that desoldering fixes the issue. (Howto: https://megous.com/dl/tmp/pp-usbc-fix.jpg)&lt;br /&gt;
&lt;br /&gt;
HW fix is to replace AW3512 with a variant of the chip that preserves the EN signal polarity and that doesn't have the &amp;quot;quick discharge function&amp;quot; that ties the output to the GND via a 75 Ohm resistor when the switch is OFF. mozzwald used NCP334FCT2G as a replacement.&lt;br /&gt;
&lt;br /&gt;
=== Pogo Pins supply 5v0, not 3v3 ===&lt;br /&gt;
&lt;br /&gt;
''No hardware change suggested, to maintain accessory compatibility.''&lt;br /&gt;
&lt;br /&gt;
This is possibly just a documentation issue. [https://wiki.pine64.org/index.php/PinePhone#Pogo_Pins The wiki claims] they provide a &amp;quot;3.3v power source&amp;quot;, and on this page, &amp;quot;The Pogo Pin specified voltage is 3.3v&amp;quot;. But according to the schematic, they are connected to &amp;lt;tt&amp;gt;USB-5V&amp;lt;/tt&amp;gt;, the output of the 5V boost regulator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_v1.0_-_Dev&amp;diff=6817</id>
		<title>PinePhone v1.0 - Dev</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_v1.0_-_Dev&amp;diff=6817"/>
		<updated>2020-09-02T10:14:56Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PinePhone v1.0 is the developer hardware revision of the PinePhone.&lt;br /&gt;
&lt;br /&gt;
This page contains resources which are exclusive to the 1.0 revision of the PinePhone. For other revisions, or for resources related to all PinePhone revisions, see [[PinePhone]].&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
* [https://wiki.pine64.org/images/3/30/PinePhone_Schematic_v1.0_20190708.pdf PinePhone v1.0 Schematic 20190708]&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.pine64.org/images/4/41/PinePhone_mainboard_v1.0_component_placement_top.pdf Pinephone V1.0 Mainboard Top Layer Silkscreen]&lt;br /&gt;
* [https://wiki.pine64.org/images/0/09/PinePhone_mainboard_v1.0_component_placement_bottom.pdf Pinephone V1.0 Mainboard Bottom Layer Silkscreen]&lt;br /&gt;
* [https://wiki.pine64.org/images/d/df/PinePhone_daughterboard_v1.0_component_placement_top.pdf Pinephone V1.0 Daughterboard Top Layer Silkscreen]&lt;br /&gt;
* [https://wiki.pine64.org/images/9/9f/PinePhone_daughterboard_v1.0_component_placement_bottom.pdf Pinephone V1.0 Daughterboard Bottom Layer Silkscreen]&lt;br /&gt;
&lt;br /&gt;
== Changes from Don't Be Evil  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known issues ==&lt;br /&gt;
&lt;br /&gt;
See [[PinePhone_v1.1_-_Braveheart#Known_issues|the known issues with v1.1 (Braveheart)]], which are all carried forward from v1.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Press&amp;diff=6816</id>
		<title>PinePhone Press</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Press&amp;diff=6816"/>
		<updated>2020-09-02T10:11:33Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Vector images and photos you can freely use for projects and press inquiries. Attribute the author if attribution is required via the license (such as with CC BY).&lt;br /&gt;
&lt;br /&gt;
== Vector ==&lt;br /&gt;
[[File:PinePhoneSides.svg|none|thumb|Author: Jedi2light, License: CC BY 4.0]]&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone_Vector.svg|none|thumb|Author: Funeral, License: CC0]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Pinephone drawing1.svg|Author: Funeral, License: CC0&lt;br /&gt;
File:Pinephone drawing2.svg|Author: Funeral, License: CC0&lt;br /&gt;
File:Pinephone drawing3.svg|Author: Funeral, License: CC0&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Pinephone drawing1 manual.svg|Author: Funeral, License: CC0&lt;br /&gt;
File:Pinephone drawing2 manual.svg|Author: Funeral, License: CC0&lt;br /&gt;
File:Pinephone drawing3 manual.svg|Author: Funeral, License: CC0&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 3D models ==&lt;br /&gt;
* https://www.thingiverse.com/thing:4520124&lt;br /&gt;
&lt;br /&gt;
== Photos ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Accessibility&amp;diff=6815</id>
		<title>PinePhone Accessibility</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Accessibility&amp;diff=6815"/>
		<updated>2020-09-02T10:10:03Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although most accessibility support is implemented in software, the underlying hardware is still relevant.&lt;br /&gt;
This page discusses some issues and options.&lt;br /&gt;
For more general information, see the [[Accessibility]] page.&lt;br /&gt;
&lt;br /&gt;
= Input =&lt;br /&gt;
&lt;br /&gt;
== Braille ==&lt;br /&gt;
&lt;br /&gt;
Various portable devices, such as Apple's iPhone, support braille input.&lt;br /&gt;
This uses multi-touch capability on the device's capacitative touch screen.&lt;br /&gt;
The gating factors for this input mode are the dimensions of the screen&lt;br /&gt;
and the number of contact points that can be distinguished.&lt;br /&gt;
&lt;br /&gt;
The PinePhone screen has 1440 × 720 pixel resolution and measures 5.95&amp;quot; diagonally.&lt;br /&gt;
Assuming that the pixels are square, the screen dimensions should be about 2.68&amp;quot; by 5.37&amp;quot;.&lt;br /&gt;
This should provide plenty of room for four fingertips on each of the long sides.&lt;br /&gt;
Indeed, there is a bit of space left over for control functions, etc.&lt;br /&gt;
&lt;br /&gt;
== Keyboard ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone can support either Bluetooth or USB keyboards.&lt;br /&gt;
So, a device such as the&lt;br /&gt;
[https://www.jellycomb.com/Foldable-Bluetooth-Keyboard-B003-p798959.html Jelly Comb Foldable Bluetooth Keyboard B003]&lt;br /&gt;
might be a reasonable input device.&lt;br /&gt;
&lt;br /&gt;
== Speech ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone should be able to accept speech input using either Bluetooth or its built-in microphone.&lt;br /&gt;
According to&lt;br /&gt;
[https://www.seeedstudio.com/blog/2020/01/23/offline-speech-recognition-on-raspberry-pi-4-with-respeaker this page],&lt;br /&gt;
Mozilla's DeepSpeech ASR (automatic speech recognition) engine works pretty well on a Raspberry Pi 4,&lt;br /&gt;
using only a single core.&lt;br /&gt;
Assuming that the PinePhone's more limited (2 or 3 GB) RAM isn't a constraint,&lt;br /&gt;
the phone should be able to produce similar results.&lt;br /&gt;
&lt;br /&gt;
= Output =&lt;br /&gt;
&lt;br /&gt;
== Speech ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone's processor should have plenty of capacity to generate clear speech.&lt;br /&gt;
This can be output using either the 3.5 mm audio jack or a Bluetooth connection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Modding&amp;diff=6814</id>
		<title>PinePhone Modding</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Modding&amp;diff=6814"/>
		<updated>2020-09-02T10:09:00Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of options to hardware mod the PinePhone.&lt;br /&gt;
&lt;br /&gt;
Some are upgrades to fix issues that were not done optimally in the production of that version of the electronics, and some are to add options that were not part of the phone spec.&lt;br /&gt;
&lt;br /&gt;
== PRO TIP ==&lt;br /&gt;
Make pictures of the situation before and after your mods, so you can comare the change, and don't need to disassemble the device to get the right pics later.&lt;br /&gt;
&lt;br /&gt;
==Device Specific Mods ==&lt;br /&gt;
There are a nr of upgrades possible for the different versions of the PinePhone.&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Don't be evil&amp;quot; ===&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
=== BraveHeart ===&lt;br /&gt;
*PMIC mod - Stops the battery drain from a shutdown phone, draining the battery to 0V.&lt;br /&gt;
*VCONN mod - Unblocks the USB-C power negotiation rail, so convergence functions are unlocked.&lt;br /&gt;
&lt;br /&gt;
=== UBPorts Community edition ===&lt;br /&gt;
*VCONN mod - Unblocks the USB-C power negotiation rail, so convergence functions are unlocked.&lt;br /&gt;
&lt;br /&gt;
There are also a number of mods that can be done adding more functions by adding extra hardware to the pogo pins, and a number of options to change the screen protector.&lt;br /&gt;
&lt;br /&gt;
At this moment there are not many pogo addons, and most are just connector boards. Likely the makers will add links to these projects to this page. Pine is looking into adding a N900 style keyboard attached to these pins.&lt;br /&gt;
&lt;br /&gt;
== PMIC mod ==&lt;br /&gt;
[[PinePhone_1.1_VBUS_power_usage_Hardware_Fix]]&lt;br /&gt;
The original description of this fix is given on megi's pager here https://xnux.eu/devices/pp-pmic-fix.jpg&lt;br /&gt;
== VCONN mod ==&lt;br /&gt;
The original description of this fix is given on megi's pager here https://xnux.eu/devices/pp-usbc-fix.jpg&lt;br /&gt;
There is a discussion on the merits of the different ways to do the fix&lt;br /&gt;
&lt;br /&gt;
=== VCONN mod, Removal only ===&lt;br /&gt;
[[PinePhone_1.2_VCONN_Hardware_Fix]]&lt;br /&gt;
&lt;br /&gt;
There are now a few documented ways,&lt;br /&gt;
*Removal only, the tweezer &amp;quot;stupid&amp;quot; way: https://www.youtube.com/watch?v=j3jc7Mvn9Eo&lt;br /&gt;
*Removal only, the soldering iron &amp;quot;less stupid&amp;quot; way: https://www.youtube.com/watch?v=ZqOb45N2sMc&lt;br /&gt;
There are hopefully videos coming doing it the proper way, and so they can be linked here.&lt;br /&gt;
&lt;br /&gt;
After this the firmware for the power negotiation chip needs to be upgraded, this can be done by running the factory test image, version http://images.postmarketos.org/pinephone/pine64-pinephone-20200724-factorytest55.img.xz or higher. This will do the firmware flashing and respond with a message indicating the state. After this the phone is ready for its added functions.&lt;br /&gt;
ANX states:&lt;br /&gt;
*No CC Fix - Fix not applied&lt;br /&gt;
*No USB Cable - No USBC connection, cannot upgrade firmware&lt;br /&gt;
*OK - Firmware Applied, you are all set&lt;br /&gt;
&lt;br /&gt;
=== VCONN mod, Replacement ===&lt;br /&gt;
Using 2x NCP334FCT2G you could do the full fix, making VCONN powered devices able to negotiate power. IT needs the parts to be removed first without damaging the pads, and then replacing the parts.&lt;br /&gt;
&lt;br /&gt;
==Laser cut parts==&lt;br /&gt;
Mcyam2 has created some laser cut templates for the rear facing components here:&lt;br /&gt;
&lt;br /&gt;
https://imgur.com/a/LAUatOa&lt;br /&gt;
&lt;br /&gt;
https://anonfiles.com/L0BeK5L5oe/ppsvg-backplate-CUTOUT_svg&lt;br /&gt;
&lt;br /&gt;
Originally based on silver's work on a 3d printed rear frame&lt;br /&gt;
&lt;br /&gt;
==3D Printed parts==&lt;br /&gt;
&lt;br /&gt;
[[Silver 3d printed a folding keyboard mostly]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Silver has created a 3d printable rear frame for pinephone, and used it to create a folding keyboard design (work in progress).&lt;br /&gt;
&lt;br /&gt;
https://ibb.co/album/ScDttH&lt;br /&gt;
&lt;br /&gt;
https://www.youmagine.com/designs/pinephone-folding-keyboard-mockup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_v1.2&amp;diff=6813</id>
		<title>PinePhone v1.2</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_v1.2&amp;diff=6813"/>
		<updated>2020-09-02T10:08:09Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PinePhone v1.2 is a hardware revision of the PinePhone that shipped in 2020.&lt;br /&gt;
&lt;br /&gt;
This page contains information and resources which are specific to the v1.2 revision of the PinePhone. For other revisions or for resources related to all PinePhone revisions, see [[PinePhone]].&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
&lt;br /&gt;
* [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2%20Released%20Schematic.pdf  Hardware schematic v1.2] (2020-03-10, for Community Edition: UBports)&lt;br /&gt;
* [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2a%20Released%20Schematic.pdf  Hardware schematic v1.2a] (2020-06-08, for Community Edition: postmarketOS)&lt;br /&gt;
&lt;br /&gt;
== Changes from v1.1 ==&lt;br /&gt;
&lt;br /&gt;
The v1.2 mainboard revision changes the routing of several GPIOs to fix bugs and to improve power management. Therefore, it needs an updated device tree. The state of PL6 at boot can be used to distinguish between v1.1 (it can be pulled high) and v1.2 (it will remain low).&lt;br /&gt;
&lt;br /&gt;
# The WiFi module's &amp;lt;tt&amp;gt;CHIP_EN&amp;lt;/tt&amp;gt; input (connected to the kill switch) is now pulled down, so the WiFi will turn off reliably when the switch is off.&lt;br /&gt;
# PL2 is now connected to the WiFi module's reset pin, allowing the WiFi to be turned off or reset in software.&lt;br /&gt;
# The magnetometer's &amp;lt;tt&amp;gt;DRDY&amp;lt;/tt&amp;gt; pin is now connected to PB1, allowing interrupt-driven periodic sensor readings.&lt;br /&gt;
# &amp;lt;tt&amp;gt;LINEOUTP&amp;lt;/tt&amp;gt; is again connected to the speaker amplifier's INP input (like in v1.0), increasing the SNR of the rear speaker.&lt;br /&gt;
# PH7 is now connected to the modem's &amp;lt;tt&amp;gt;AP_READY&amp;lt;/tt&amp;gt; input (instead of &amp;lt;tt&amp;gt;WAKEUP_IN&amp;lt;/tt&amp;gt;), allowing the modem to buffer URCs (interrupts) while the phone is asleep.&lt;br /&gt;
# The modem's &amp;lt;tt&amp;gt;RI&amp;lt;/tt&amp;gt; output and &amp;lt;tt&amp;gt;DTR&amp;lt;/tt&amp;gt; input had their GPIOs swapped between PL6 and PB2, so the &amp;lt;tt&amp;gt;RI&amp;lt;/tt&amp;gt; signal can be detected without powering the main pin controller.&lt;br /&gt;
# Both PL9 and &amp;lt;tt&amp;gt;VBUS_CTRL&amp;lt;/tt&amp;gt; (from the ANX7688) are now connected to &amp;lt;tt&amp;gt;N_VBUSEN&amp;lt;/tt&amp;gt; on the PMIC. This causes the PMIC to automatically stop drawing power from the USB port when supplying power to a USB-OTG peripheral. It also allows the ANX7688 to automatically control the direction of current flowing through the USB port.&lt;br /&gt;
# As part of the previous change, the ANX7688's reset input was moved to PD6; this pin previously controlled the USB OTG power.&lt;br /&gt;
# Some of the regulators supplying the ANX7688 were rearranged, to reduce power consumption when the USB port is not connected and not being used to transmit video.&lt;br /&gt;
# As part of the previous change, PD11 now controls the ANX7688's 1v0 digital power domain.&lt;br /&gt;
# The modem's &amp;lt;tt&amp;gt;STATUS&amp;lt;/tt&amp;gt; output is now connected to PH9, allowing the modem on/off state to be visible in software (note: this only works while the modem is powered). Since it is no longer connected to PB3, reading &amp;lt;tt&amp;gt;STATUS&amp;lt;/tt&amp;gt; no longer turns the modem on.&lt;br /&gt;
# The modem no longer has access to the I2C bus containing the sensors.&lt;br /&gt;
# &amp;lt;tt&amp;gt;HBIAS&amp;lt;/tt&amp;gt; is now connected to the headphone jack.&lt;br /&gt;
&lt;br /&gt;
== Quirks ==&lt;br /&gt;
&lt;br /&gt;
=== Backlight ===&lt;br /&gt;
&lt;br /&gt;
Backlight LED current regulation depends on gpio0-ldo voltage stability due to feedback voltage from current sensing resistor being modified via SoC's PWM pin and pullup resistor to gpio0-ldo. gpio0-ldo also powers the CTP controller and light/proximity sensor, among other things. When backlight brightness is very low and the CTP controller actively communicates on the I2C bus the backlight blinks heavily. It's not a very good idea to tie boost converter's current regulating feedback circuit to the potential source of noise, especially since the noise will have much larger effect when the backlight LED current is low. It's possible this can be mitigated if C1110 can be raised to 22-47uF range, or by changing the resistor values in the feedback circuit.&lt;br /&gt;
&lt;br /&gt;
PWM duty cycle for the lowest brightness of the backlight is also not very predictable, varying from 7-20% (tested with a small sample size of 2 devices). Therefore it's not possible to come up with a single device tree brightness settings that will work for everyone, requiring per-device calibration.&lt;br /&gt;
&lt;br /&gt;
On PinePhone 1.0, this was not the case, PWM signal was directly fed to the CE pin of the regulator, and lowest brightness setting seems more stable. On the other hand, the lowest achievable brightness was brighter than on 1.1+.&lt;br /&gt;
&lt;br /&gt;
=== USB ===&lt;br /&gt;
&lt;br /&gt;
[[PinePhone_v1.1_-_Braveheart#USB-C_CC_pins_are_pulled_to_the_GND_by_AW3512_.28VCONN_switches.29_when_VCONN_is_off|USB-C CC pin issues from BraveHeart]] are still present in the original 1.2 revision boards, since they were discovered after production of 1.2. Revision 1.2a fixes these.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_FAQ&amp;diff=6811</id>
		<title>PinePhone FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_FAQ&amp;diff=6811"/>
		<updated>2020-09-02T10:03:01Z</updated>

		<summary type="html">&lt;p&gt;Jbit: Add to PinePhone category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A list of frequently asked question.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
=== Revisions ===&lt;br /&gt;
==== What are Community Editions? ====&lt;br /&gt;
Community Editions of the PinePhone are special versions which comes preinstalled with the operating system of the partner project and features the logo of this project on the back panel. The Community Edition is intended to help partner projects developing these systems: &amp;quot;Community editions are meant to bring exposure to partner-projects operating systems and communities, as well as help finance ongoing development.&amp;quot;, [https://www.pine64.org/2020/04/02/pinephone-ubports-community-edition-pre-orders-now-open/ source].&lt;br /&gt;
&lt;br /&gt;
==== Is the Community Edition the latest revision? ====&lt;br /&gt;
Yes, it is! The Community Edition is the latest version of the PinePhone, featuring the mainboard numbers 1.2 and 1.2a. It's predecessor was the BraveHeart Edition intended for tinkerers and developers, which had the version number 1.1. For more details about the topic see [[PinePhone#Hardware Revisions]].&lt;br /&gt;
&lt;br /&gt;
==== Will there be other Community Editions? ====&lt;br /&gt;
Three Community Editions have been announced: [https://www.pine64.org/2020/04/02/pinephone-ubports-community-edition-pre-orders-now-open/ UBports], [https://www.pine64.org/2020/06/15/june-update-postmarketos-ce-pinephone-shipping-pine64-cluster/ PostmarketOS] and [https://www.pine64.org/2020/08/31/pinephone-manjaro-community-edition/ Manjaro]. Other Community Editions might follow, this however depends on multiple factors, including if the software is ready to be released on the consumer market.&lt;br /&gt;
&lt;br /&gt;
==== In simple terms, what are the differences between BraveHeart and the new Community Edition? ====&lt;br /&gt;
The BraveHeart Edition was the revision intended for developers and tinkerers, while the Community Edition is the latest revision with an updated mainboard based on feedback for the BraveHeart Edition, see [[PinePhone#Hardware Revisions]].&lt;br /&gt;
&lt;br /&gt;
==== Will there be a newer revision after the Community Edition? ====&lt;br /&gt;
That's unlikely for the near future (unless major issues are found in the latest revision). The Community Edition got certificates such as CE, repeating the certification process due to changes in the hardware design is very expensive, so the Community Edition(s) are viewed as the final revision.&lt;br /&gt;
&lt;br /&gt;
The Community Edition (and parts for it) will be produced and sold for at least 5 years.&lt;br /&gt;
&lt;br /&gt;
There are plans for a newer revision with updated hardware, which is however multiple years away (3-5 years).&lt;br /&gt;
&lt;br /&gt;
==== Will there be hardware differences between the Community Editions? ====&lt;br /&gt;
Ideally, only the logo on the back panel will differ. However there are minor differences between the Community Edition:&lt;br /&gt;
* The UBPorts Community Edition has hardware [https://wiki.pine64.org/index.php?title=PinePhone_1.2_VCONN_Hardware_Fix USB-C issues] that are fixed in later editions.&lt;br /&gt;
* The PostmarketOS and Manjaro Community Editions have a 3GB/32GB version available in the Convergence Package.&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
=== Modem ===&lt;br /&gt;
&lt;br /&gt;
==== The modem isn't working ====&lt;br /&gt;
&lt;br /&gt;
In order to use the modem and WiFi/Bluetooth, you need to ensure the battery is inside the device and has a sufficient charge. Even when supplying the phone with enough power, the modem and WiFi chip will not work without a connected battery. Further, double check that you have no put the SD card into the sim card slot, or vice versa.&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
&lt;br /&gt;
==== The battery is stuck inside the phone ====&lt;br /&gt;
&lt;br /&gt;
The battery can be stuck in the phone if the screws of the frame are overtightened.&lt;br /&gt;
&lt;br /&gt;
If your battery is stuck inside the PinePhone, grab a screw driver and completely unscrew all the screws of the midframe. Then pull out the battery (you may have to fully take off the midframe in some cases to get it out). And then rescrew the midframe, but only tighten the screws to the point where they are just barely tight to hold. This should allow you to remove the battery easily.&lt;br /&gt;
&lt;br /&gt;
==== The battery is discharging while the phone is powered off (BraveHeart Edition) ====&lt;br /&gt;
&lt;br /&gt;
The issue is not present on the Community Edition. Due to a hardware bug, after poweroff, the phone still consumes 20–30mA which drains the battery in 3-4 days. A manual procedure to fix the hardware bug is described [https://xnux.eu/devices/pp-pmic-fix.jpg here].&lt;br /&gt;
&lt;br /&gt;
=== Kill Switches ===&lt;br /&gt;
==== What are the kill switches doing? ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640 &lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Memory ===&lt;br /&gt;
&lt;br /&gt;
==== What's the speed difference between the eMMC and SD cards? ====&lt;br /&gt;
Maximum transfer speed of the eMMC is around 85 MB/s, while SD cards are limited to approximately 23 MB/s (even with faster cards).&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
==== How can I install an operating system on the SD card / eMMC? ====&lt;br /&gt;
&lt;br /&gt;
See [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Updating ===&lt;br /&gt;
&lt;br /&gt;
Read the [[PinePhone Updating Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Booting ===&lt;br /&gt;
&lt;br /&gt;
==== What's the boot order for SD cards and eMMC? ====&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. If no (bootable) microSD is found, it will boot from eMMC.&lt;br /&gt;
&lt;br /&gt;
==== How can I select different OSes at boot? ====&lt;br /&gt;
&lt;br /&gt;
There is a project by Danct12 which allows the user to select different OSes at boot, the software is currently work-in-progress: https://github.com/dreemurrs-embedded/Pineloader.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu Touch ===&lt;br /&gt;
&lt;br /&gt;
==== Can I install a different OS on the Ubports Community Edition? ====&lt;br /&gt;
&lt;br /&gt;
Yes! While the Community Edition comes with an OS preinstalled, you are free to use any OS on the integrated storage (the eMMC) or the SD card, see [[PinePhone Installation Instructions]] and [[PinePhone Software Releases]] on how to install them.&lt;br /&gt;
&lt;br /&gt;
==== How can I enable SSH? ====&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;sudo start ssh&amp;quot; to get a one-time start or edit /etc/init/ssh.override and remove the manual line to make it auto-start.&lt;br /&gt;
&lt;br /&gt;
==== What works, what doesn't? ====&lt;br /&gt;
&lt;br /&gt;
See https://gitlab.com/ubports/community-ports/pinephone#what-works-what-doesnt.&lt;br /&gt;
&lt;br /&gt;
====  I did not install an update and I'm stuck on the Pine64 logo after rebooting. ====&lt;br /&gt;
&lt;br /&gt;
# Use a USB A-C cable to plug your phone into your PC&lt;br /&gt;
# Hold the PinePhone's power button for 4 seconds or more to power it off.&lt;br /&gt;
# Wait 5 seconds&lt;br /&gt;
# Hold the Volume Up and Power buttons on the PinePhone to boot into recovery. You should see the LED light red, then yellow, then green. The &amp;quot;Installing update&amp;quot; screen will appear, but a progress bar to indicate update progress will not. Ignore the &amp;quot;Installing update&amp;quot; part.&lt;br /&gt;
# Your PC may automatically mount the PinePhone's partitions. If it does, Safely Remove or Eject all of them.&lt;br /&gt;
# Open a terminal on your PC. Type &amp;lt;code&amp;gt;telnet 172.16.42.1&amp;lt;/code&amp;gt;&lt;br /&gt;
# You should receive the text 'Welcome to Rescue SD Shell!'&lt;br /&gt;
# In the new Rescue SD shell, type &amp;lt;code&amp;gt;umount /dev/mmcblk2p10; e2fsck -fy /dev/mmcblk2p10 &amp;amp;&amp;amp; sync&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once this command pipeline finishes, type &amp;lt;code&amp;gt;sync &amp;amp;&amp;amp; reboot -f&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your PinePhone should reboot into Ubuntu Touch. Now head to Settings -&amp;gt; Updates and install the new update! &lt;br /&gt;
&lt;br /&gt;
If these steps did not solve your issue, please create a new thread here on the Pine64 forums, note what the problem looks like, then say that you've tried these steps already.&lt;br /&gt;
&lt;br /&gt;
This is caused by corruption on the userdata partition. Normally this should be fixed by 'e2fsck' in the initramfs, however an error in image creation means that that version of e2fsck is unable to correct corruption. This has been fixed in all new PinePhone updates, so if you update from the factory image to any other image available to the PinePhone now, you will not experience this issue any longer.&lt;br /&gt;
&lt;br /&gt;
==== I turned on my PinePhone. The red LED is lit and it will not boot. ====&lt;br /&gt;
# Hold the power button until the light turns off&lt;br /&gt;
# Hold the power button until the light turns on&lt;br /&gt;
&lt;br /&gt;
You may need to repeat these steps more than once.&lt;br /&gt;
&lt;br /&gt;
This is caused by u-boot apparently trying to use the eMMC before it is ready. We are not entirely sure why this occurs yet.&lt;br /&gt;
&lt;br /&gt;
====  I can't connect to a 2.4Ghz Wi-Fi network. ====&lt;br /&gt;
&lt;br /&gt;
Reboot your device by holding the power button until the &amp;quot;Power&amp;quot; dialog appears, then pressing &amp;quot;Restart&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If that does not fix the issue, note that all the following conditions must be met to use WiFi on the PinePhone:&lt;br /&gt;
&lt;br /&gt;
# The plastic tab between the battery and the device's battery contacts has been removed&lt;br /&gt;
# The battery is installed&lt;br /&gt;
# The WiFi killswitch, #2, on the rear of the device is switched &amp;quot;ON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Wi-Fi in the PinePhone only seems stable after a warm reboot like this.&lt;br /&gt;
&lt;br /&gt;
====  I can't update or install packages through apt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;W: Problem unlinking the file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_xenial_InRelease - PrepareFiles (30: Read-only file system)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remount the root filesystem as read-write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; phablet@ubuntu-phablet:~$ sudo mount -o remount,rw / &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to run updates and install new packages&lt;br /&gt;
&lt;br /&gt;
=== Android ===&lt;br /&gt;
&lt;br /&gt;
==== What's the status of Android for the PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't any major push to get Android running well on the PinePhone. The developer Icenowy did get a Android image to run and partly work, it was however slow and buggy, with major functions not working. A solution for running some of your android apps may be found in Anbox as of now. Anbox is currently not included in Ubuntu Touch.&lt;br /&gt;
&lt;br /&gt;
==== Why are my apps loading slower than on my Android phone? ====&lt;br /&gt;
&lt;br /&gt;
Android has multiple techniques in place to speed up launching applications after the first launch, such as the &amp;quot;Dalvik cache&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Shipping ==&lt;br /&gt;
=== I did not receive an order confirmation ===&lt;br /&gt;
Check your &amp;quot;spam&amp;quot; folder. It was reported that some users did not receive an order confirmation. You will also still get a shipping notification when the device ships out, even if you didn't get a order confirmation email.&lt;br /&gt;
&lt;br /&gt;
=== When does the phone ship? ===&lt;br /&gt;
For up-to-date information when the phone's shipping date is estimated, see the edits in this forum post: https://forum.pine64.org/showthread.php?tid=9942.&lt;br /&gt;
&lt;br /&gt;
=== It is shipping day but I did not receive a shipping notification ===&lt;br /&gt;
For shipments with DHL the shipping notification is sent out as soon as the packet reached DHL's warehouse and scanned (it can take up to 24 hours after scanning after the shipment is added to DHL's database). For all other shipments (via Ascendia) the notification is sent out sometime after shipment.&lt;br /&gt;
&lt;br /&gt;
=== When does my phone ship if I order now? ===&lt;br /&gt;
Orders made after Friday, 22nd May 2020 are shipped after the first bulk of pre-orders has been shipped. The exact date is not known yet due to various reasons, it may be a few weeks after the first bulk shipped. [https://forum.pine64.org/showthread.php?tid=9942 The forum] will be edited with updated information and you will receive a shipping notification when the device was shipped.&lt;br /&gt;
&lt;br /&gt;
=== What about import taxes? ===&lt;br /&gt;
Import taxes have to be payed by the buyer depending on the jurisdiction of the country of the buyer. Please check with your local laws if there are import taxes to pay and if so how to do the tax filing.&lt;br /&gt;
&lt;br /&gt;
== Accessories ==&lt;br /&gt;
&lt;br /&gt;
=== Protection ===&lt;br /&gt;
==== Which screen protector should i use? ====&lt;br /&gt;
&lt;br /&gt;
Protecting your screen is important, especially for devices like the PinePhone that doesn't have access to the newest glass technology.&lt;br /&gt;
The Braveheart and Community Editions of the PinePhone comes with a plastic film screen protector installed, and Pine64 sells a tempered glass screen protector [https://store.pine64.org/product/pinephone-tempered-glass-screen-protector/ in their store].&lt;br /&gt;
&lt;br /&gt;
You can also buy a third party screen protector, as the screen protectors for the iPhone 11 Pro Max/XS Max fit the PinePhone pretty well based on [https://forum.pine64.org/showthread.php?tid=8458&amp;amp;pid=65409#pid65409 this] forum post.&lt;br /&gt;
&lt;br /&gt;
=== Batteries ===&lt;br /&gt;
==== I'm outside the US and want a replacement battery, which one should I buy? ====&lt;br /&gt;
&lt;br /&gt;
Currently the PinePhone battery is known to be compatible with replacement batteries for the Samsung J700, specifically models &amp;quot;EB-BJ700BBC&amp;quot;, &amp;quot;EB-BJ700BBE&amp;quot; and maybe &amp;quot;EB-BJ700CBE&amp;quot; are compatible. There is [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55053#pid55053 a report] that model &amp;quot;EB-BJ700CBE&amp;quot; might be incompatible so it's probably safer to go with either the BBC or BBE models.&lt;br /&gt;
&lt;br /&gt;
=== External hardware ===&lt;br /&gt;
&lt;br /&gt;
==== Will Pine64 sell other addons made for the PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
Yes, currently there is a [https://forum.pine64.org/showthread.php?tid=8537&amp;amp;pid=55396#pid55396 keyboard case], [https://www.pine64.org/2020/05/15/may-update-pinetab-pre-orders-pinephone-qi-charging-more/ Qi wireless charging] and a [https://www.pine64.org/2020/05/15/may-update-pinetab-pre-orders-pinephone-qi-charging-more/ 5000mAh battery case] planned, these are the products Pine64 will make and sell for sure. Pine is also exploring other possibilities like a keyboard case in the style of a Nokia N900, an external battery charger and a gamepad, but these aren't really decided on yet. &lt;br /&gt;
&lt;br /&gt;
==== Which 3rd party hardware can connect to my PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PinePhone]]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_FAQ&amp;diff=6810</id>
		<title>PinePhone FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_FAQ&amp;diff=6810"/>
		<updated>2020-09-02T07:17:19Z</updated>

		<summary type="html">&lt;p&gt;Jbit: /* Hardware */ Update FAQ to include information about the new community editions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A list of frequently asked question.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
=== Revisions ===&lt;br /&gt;
==== What are Community Editions? ====&lt;br /&gt;
Community Editions of the PinePhone are special versions which comes preinstalled with the operating system of the partner project and features the logo of this project on the back panel. The Community Edition is intended to help partner projects developing these systems: &amp;quot;Community editions are meant to bring exposure to partner-projects operating systems and communities, as well as help finance ongoing development.&amp;quot;, [https://www.pine64.org/2020/04/02/pinephone-ubports-community-edition-pre-orders-now-open/ source].&lt;br /&gt;
&lt;br /&gt;
==== Is the Community Edition the latest revision? ====&lt;br /&gt;
Yes, it is! The Community Edition is the latest version of the PinePhone, featuring the mainboard numbers 1.2 and 1.2a. It's predecessor was the BraveHeart Edition intended for tinkerers and developers, which had the version number 1.1. For more details about the topic see [[PinePhone#Hardware Revisions]].&lt;br /&gt;
&lt;br /&gt;
==== Will there be other Community Editions? ====&lt;br /&gt;
Three Community Editions have been announced: [https://www.pine64.org/2020/04/02/pinephone-ubports-community-edition-pre-orders-now-open/ UBports], [https://www.pine64.org/2020/06/15/june-update-postmarketos-ce-pinephone-shipping-pine64-cluster/ PostmarketOS] and [https://www.pine64.org/2020/08/31/pinephone-manjaro-community-edition/ Manjaro]. Other Community Editions might follow, this however depends on multiple factors, including if the software is ready to be released on the consumer market.&lt;br /&gt;
&lt;br /&gt;
==== In simple terms, what are the differences between BraveHeart and the new Community Edition? ====&lt;br /&gt;
The BraveHeart Edition was the revision intended for developers and tinkerers, while the Community Edition is the latest revision with an updated mainboard based on feedback for the BraveHeart Edition, see [[PinePhone#Hardware Revisions]].&lt;br /&gt;
&lt;br /&gt;
==== Will there be a newer revision after the Community Edition? ====&lt;br /&gt;
That's unlikely for the near future (unless major issues are found in the latest revision). The Community Edition got certificates such as CE, repeating the certification process due to changes in the hardware design is very expensive, so the Community Edition(s) are viewed as the final revision.&lt;br /&gt;
&lt;br /&gt;
The Community Edition (and parts for it) will be produced and sold for at least 5 years.&lt;br /&gt;
&lt;br /&gt;
There are plans for a newer revision with updated hardware, which is however multiple years away (3-5 years).&lt;br /&gt;
&lt;br /&gt;
==== Will there be hardware differences between the Community Editions? ====&lt;br /&gt;
Ideally, only the logo on the back panel will differ. However there are minor differences between the Community Edition:&lt;br /&gt;
* The UBPorts Community Edition has hardware [https://wiki.pine64.org/index.php?title=PinePhone_1.2_VCONN_Hardware_Fix USB-C issues] that are fixed in later editions.&lt;br /&gt;
* The PostmarketOS and Manjaro Community Editions have a 3GB/32GB version available in the Convergence Package.&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
=== Modem ===&lt;br /&gt;
&lt;br /&gt;
==== The modem isn't working ====&lt;br /&gt;
&lt;br /&gt;
In order to use the modem and WiFi/Bluetooth, you need to ensure the battery is inside the device and has a sufficient charge. Even when supplying the phone with enough power, the modem and WiFi chip will not work without a connected battery. Further, double check that you have no put the SD card into the sim card slot, or vice versa.&lt;br /&gt;
&lt;br /&gt;
=== Battery ===&lt;br /&gt;
&lt;br /&gt;
==== The battery is stuck inside the phone ====&lt;br /&gt;
&lt;br /&gt;
The battery can be stuck in the phone if the screws of the frame are overtightened.&lt;br /&gt;
&lt;br /&gt;
If your battery is stuck inside the PinePhone, grab a screw driver and completely unscrew all the screws of the midframe. Then pull out the battery (you may have to fully take off the midframe in some cases to get it out). And then rescrew the midframe, but only tighten the screws to the point where they are just barely tight to hold. This should allow you to remove the battery easily.&lt;br /&gt;
&lt;br /&gt;
==== The battery is discharging while the phone is powered off (BraveHeart Edition) ====&lt;br /&gt;
&lt;br /&gt;
The issue is not present on the Community Edition. Due to a hardware bug, after poweroff, the phone still consumes 20–30mA which drains the battery in 3-4 days. A manual procedure to fix the hardware bug is described [https://xnux.eu/devices/pp-pmic-fix.jpg here].&lt;br /&gt;
&lt;br /&gt;
=== Kill Switches ===&lt;br /&gt;
==== What are the kill switches doing? ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640 &lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Memory ===&lt;br /&gt;
&lt;br /&gt;
==== What's the speed difference between the eMMC and SD cards? ====&lt;br /&gt;
Maximum transfer speed of the eMMC is around 85 MB/s, while SD cards are limited to approximately 23 MB/s (even with faster cards).&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
==== How can I install an operating system on the SD card / eMMC? ====&lt;br /&gt;
&lt;br /&gt;
See [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Updating ===&lt;br /&gt;
&lt;br /&gt;
Read the [[PinePhone Updating Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Booting ===&lt;br /&gt;
&lt;br /&gt;
==== What's the boot order for SD cards and eMMC? ====&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. If no (bootable) microSD is found, it will boot from eMMC.&lt;br /&gt;
&lt;br /&gt;
==== How can I select different OSes at boot? ====&lt;br /&gt;
&lt;br /&gt;
There is a project by Danct12 which allows the user to select different OSes at boot, the software is currently work-in-progress: https://github.com/dreemurrs-embedded/Pineloader.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu Touch ===&lt;br /&gt;
&lt;br /&gt;
==== Can I install a different OS on the Ubports Community Edition? ====&lt;br /&gt;
&lt;br /&gt;
Yes! While the Community Edition comes with an OS preinstalled, you are free to use any OS on the integrated storage (the eMMC) or the SD card, see [[PinePhone Installation Instructions]] and [[PinePhone Software Releases]] on how to install them.&lt;br /&gt;
&lt;br /&gt;
==== How can I enable SSH? ====&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;sudo start ssh&amp;quot; to get a one-time start or edit /etc/init/ssh.override and remove the manual line to make it auto-start.&lt;br /&gt;
&lt;br /&gt;
==== What works, what doesn't? ====&lt;br /&gt;
&lt;br /&gt;
See https://gitlab.com/ubports/community-ports/pinephone#what-works-what-doesnt.&lt;br /&gt;
&lt;br /&gt;
====  I did not install an update and I'm stuck on the Pine64 logo after rebooting. ====&lt;br /&gt;
&lt;br /&gt;
# Use a USB A-C cable to plug your phone into your PC&lt;br /&gt;
# Hold the PinePhone's power button for 4 seconds or more to power it off.&lt;br /&gt;
# Wait 5 seconds&lt;br /&gt;
# Hold the Volume Up and Power buttons on the PinePhone to boot into recovery. You should see the LED light red, then yellow, then green. The &amp;quot;Installing update&amp;quot; screen will appear, but a progress bar to indicate update progress will not. Ignore the &amp;quot;Installing update&amp;quot; part.&lt;br /&gt;
# Your PC may automatically mount the PinePhone's partitions. If it does, Safely Remove or Eject all of them.&lt;br /&gt;
# Open a terminal on your PC. Type &amp;lt;code&amp;gt;telnet 172.16.42.1&amp;lt;/code&amp;gt;&lt;br /&gt;
# You should receive the text 'Welcome to Rescue SD Shell!'&lt;br /&gt;
# In the new Rescue SD shell, type &amp;lt;code&amp;gt;umount /dev/mmcblk2p10; e2fsck -fy /dev/mmcblk2p10 &amp;amp;&amp;amp; sync&amp;lt;/code&amp;gt;&lt;br /&gt;
# Once this command pipeline finishes, type &amp;lt;code&amp;gt;sync &amp;amp;&amp;amp; reboot -f&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your PinePhone should reboot into Ubuntu Touch. Now head to Settings -&amp;gt; Updates and install the new update! &lt;br /&gt;
&lt;br /&gt;
If these steps did not solve your issue, please create a new thread here on the Pine64 forums, note what the problem looks like, then say that you've tried these steps already.&lt;br /&gt;
&lt;br /&gt;
This is caused by corruption on the userdata partition. Normally this should be fixed by 'e2fsck' in the initramfs, however an error in image creation means that that version of e2fsck is unable to correct corruption. This has been fixed in all new PinePhone updates, so if you update from the factory image to any other image available to the PinePhone now, you will not experience this issue any longer.&lt;br /&gt;
&lt;br /&gt;
==== I turned on my PinePhone. The red LED is lit and it will not boot. ====&lt;br /&gt;
# Hold the power button until the light turns off&lt;br /&gt;
# Hold the power button until the light turns on&lt;br /&gt;
&lt;br /&gt;
You may need to repeat these steps more than once.&lt;br /&gt;
&lt;br /&gt;
This is caused by u-boot apparently trying to use the eMMC before it is ready. We are not entirely sure why this occurs yet.&lt;br /&gt;
&lt;br /&gt;
====  I can't connect to a 2.4Ghz Wi-Fi network. ====&lt;br /&gt;
&lt;br /&gt;
Reboot your device by holding the power button until the &amp;quot;Power&amp;quot; dialog appears, then pressing &amp;quot;Restart&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If that does not fix the issue, note that all the following conditions must be met to use WiFi on the PinePhone:&lt;br /&gt;
&lt;br /&gt;
# The plastic tab between the battery and the device's battery contacts has been removed&lt;br /&gt;
# The battery is installed&lt;br /&gt;
# The WiFi killswitch, #2, on the rear of the device is switched &amp;quot;ON&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Wi-Fi in the PinePhone only seems stable after a warm reboot like this.&lt;br /&gt;
&lt;br /&gt;
====  I can't update or install packages through apt ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;W: Problem unlinking the file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_xenial_InRelease - PrepareFiles (30: Read-only file system)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remount the root filesystem as read-write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; phablet@ubuntu-phablet:~$ sudo mount -o remount,rw / &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should be able to run updates and install new packages&lt;br /&gt;
&lt;br /&gt;
=== Android ===&lt;br /&gt;
&lt;br /&gt;
==== What's the status of Android for the PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
Currently, there isn't any major push to get Android running well on the PinePhone. The developer Icenowy did get a Android image to run and partly work, it was however slow and buggy, with major functions not working. A solution for running some of your android apps may be found in Anbox as of now. Anbox is currently not included in Ubuntu Touch.&lt;br /&gt;
&lt;br /&gt;
==== Why are my apps loading slower than on my Android phone? ====&lt;br /&gt;
&lt;br /&gt;
Android has multiple techniques in place to speed up launching applications after the first launch, such as the &amp;quot;Dalvik cache&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Shipping ==&lt;br /&gt;
=== I did not receive an order confirmation ===&lt;br /&gt;
Check your &amp;quot;spam&amp;quot; folder. It was reported that some users did not receive an order confirmation. You will also still get a shipping notification when the device ships out, even if you didn't get a order confirmation email.&lt;br /&gt;
&lt;br /&gt;
=== When does the phone ship? ===&lt;br /&gt;
For up-to-date information when the phone's shipping date is estimated, see the edits in this forum post: https://forum.pine64.org/showthread.php?tid=9942.&lt;br /&gt;
&lt;br /&gt;
=== It is shipping day but I did not receive a shipping notification ===&lt;br /&gt;
For shipments with DHL the shipping notification is sent out as soon as the packet reached DHL's warehouse and scanned (it can take up to 24 hours after scanning after the shipment is added to DHL's database). For all other shipments (via Ascendia) the notification is sent out sometime after shipment.&lt;br /&gt;
&lt;br /&gt;
=== When does my phone ship if I order now? ===&lt;br /&gt;
Orders made after Friday, 22nd May 2020 are shipped after the first bulk of pre-orders has been shipped. The exact date is not known yet due to various reasons, it may be a few weeks after the first bulk shipped. [https://forum.pine64.org/showthread.php?tid=9942 The forum] will be edited with updated information and you will receive a shipping notification when the device was shipped.&lt;br /&gt;
&lt;br /&gt;
=== What about import taxes? ===&lt;br /&gt;
Import taxes have to be payed by the buyer depending on the jurisdiction of the country of the buyer. Please check with your local laws if there are import taxes to pay and if so how to do the tax filing.&lt;br /&gt;
&lt;br /&gt;
== Accessories ==&lt;br /&gt;
&lt;br /&gt;
=== Protection ===&lt;br /&gt;
==== Which screen protector should i use? ====&lt;br /&gt;
&lt;br /&gt;
Protecting your screen is important, especially for devices like the PinePhone that doesn't have access to the newest glass technology.&lt;br /&gt;
The Braveheart and Community Editions of the PinePhone comes with a plastic film screen protector installed, and Pine64 sells a tempered glass screen protector [https://store.pine64.org/product/pinephone-tempered-glass-screen-protector/ in their store].&lt;br /&gt;
&lt;br /&gt;
You can also buy a third party screen protector, as the screen protectors for the iPhone 11 Pro Max/XS Max fit the PinePhone pretty well based on [https://forum.pine64.org/showthread.php?tid=8458&amp;amp;pid=65409#pid65409 this] forum post.&lt;br /&gt;
&lt;br /&gt;
=== Batteries ===&lt;br /&gt;
==== I'm outside the US and want a replacement battery, which one should I buy? ====&lt;br /&gt;
&lt;br /&gt;
Currently the PinePhone battery is known to be compatible with replacement batteries for the Samsung J700, specifically models &amp;quot;EB-BJ700BBC&amp;quot;, &amp;quot;EB-BJ700BBE&amp;quot; and maybe &amp;quot;EB-BJ700CBE&amp;quot; are compatible. There is [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55053#pid55053 a report] that model &amp;quot;EB-BJ700CBE&amp;quot; might be incompatible so it's probably safer to go with either the BBC or BBE models.&lt;br /&gt;
&lt;br /&gt;
=== External hardware ===&lt;br /&gt;
&lt;br /&gt;
==== Will Pine64 sell other addons made for the PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
Yes, currently there is a [https://forum.pine64.org/showthread.php?tid=8537&amp;amp;pid=55396#pid55396 keyboard case], [https://www.pine64.org/2020/05/15/may-update-pinetab-pre-orders-pinephone-qi-charging-more/ Qi wireless charging] and a [https://www.pine64.org/2020/05/15/may-update-pinetab-pre-orders-pinephone-qi-charging-more/ 5000mAh battery case] planned, these are the products Pine64 will make and sell for sure. Pine is also exploring other possibilities like a keyboard case in the style of a Nokia N900, an external battery charger and a gamepad, but these aren't really decided on yet. &lt;br /&gt;
&lt;br /&gt;
==== Which 3rd party hardware can connect to my PinePhone? ====&lt;br /&gt;
&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]].&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=6809</id>
		<title>PinePhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=6809"/>
		<updated>2020-09-02T06:53:44Z</updated>

		<summary type="html">&lt;p&gt;Jbit: /* Specifications */ Add convergence specs (3GB RAM + 32GB eMMC)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PinePhone is a smartphone created by Pine64, capable of running mainline Linux and supported by many partner projects. The BraveHeart Edition was the first publicly-available version of the phone, though it came without a fully functional OS (factory test image) and was geared specifically towards tinkerers and hackers. Its successor is the Community Edition, the first Community Edition started to ship in June 2020. The phone will be available for at least five years.&lt;br /&gt;
&lt;br /&gt;
== First time installation ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone-3.jpg|400px|thumb|right|PinePhone is capable of running a multitude of different Linux mobile OSes]]&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhoneSides.svg|400px|thumb|right|Backward and front of PinePhone UBPorts Edition]]&lt;br /&gt;
&lt;br /&gt;
From the factory the battery has a sticker on it that isolates the battery from the phone. The battery '''will not''' charge until this is removed.&lt;br /&gt;
&lt;br /&gt;
After unboxing remove the back panel using the notch in the corner of the back panel. Then remove the battery and peel off the clear plastic sticker below it that isolates the charging contact. Then replace the battery. See [[PinePhone#Battery|Battery]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
'''Dimensions:''' 160.5 x 76.6 x 9.2mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' Between 180-200 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''SIM Card:''' Micro-SIM &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 5.95 inches (151mm) diagonal&lt;br /&gt;
: '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
: '''Resolution:''' 1440x720, 18:9 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' [https://linux-sunxi.org/A64 Allwinner A64] &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 2GB or 3GB LPDDR3 SDRAM&amp;lt;br&amp;gt;&lt;br /&gt;
'''Internal Storage:''' 16GB or 32GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC &amp;lt;br&amp;gt;&lt;br /&gt;
'''Back Camera:''' Single 5MP, 1/4&amp;quot;, LED Flash &amp;lt;br&amp;gt;&lt;br /&gt;
'''Selfie Camera:''' Single 2MP, f/2.8, 1/5&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if killswitch 6 is deactivated) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Communication: G25-G'''&lt;br /&gt;
: '''LTE:''' B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28, B38, B39, B40, B41&lt;br /&gt;
: '''WCDMA:''' B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
: '''GSM:''' 850, 900, 1800, 1900 (MHz)&lt;br /&gt;
: '''WLAN:''' Wi-Fi 802.11 b/g/n, single-band, hotspot&lt;br /&gt;
: '''Bluetooth:''' 4.0, A2DP&lt;br /&gt;
: '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
'''Sensors:''' Accelerometer, gyro, proximity, ambient light, compass &amp;lt;br&amp;gt;&lt;br /&gt;
'''Killswitches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery) &amp;lt;br&amp;gt;&lt;br /&gt;
'''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| OmniVision OV5640&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| SGMICRO SGM3140&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| GalaxyCore GC2145&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Xingbangda XBD599&lt;br /&gt;
|-&lt;br /&gt;
| WiFi&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Bluetooth&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| Quectel EG25-G&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| Quectel EG25-G&lt;br /&gt;
|-&lt;br /&gt;
| Magnetometer&lt;br /&gt;
| ST LIS3MDL&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| SensorTek STK3335&lt;br /&gt;
|-&lt;br /&gt;
| Sixaxis&lt;br /&gt;
| InvenSense MPU-6050&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| Yes, unknown model&lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| X-Powers AXP803&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware revisions ==&lt;br /&gt;
&lt;br /&gt;
# [[Project Anakin]]&lt;br /&gt;
# [[Project Don't be evil|&amp;quot;Project Don't Be Evil&amp;quot; devkit]]&lt;br /&gt;
# [[PinePhone v1.0 - Dev|PinePhone v1.0 - Developer batch]]&lt;br /&gt;
# [[PinePhone v1.1 - Braveheart]]&lt;br /&gt;
# [[PinePhone v1.2‎]] - Community Edition&lt;br /&gt;
&lt;br /&gt;
== Hardware accessory ==&lt;br /&gt;
&lt;br /&gt;
=== PinePhone hardware accessory compatibility ===&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]] for a list of devices working with the PinePhone (depending on their OS support).&lt;br /&gt;
&lt;br /&gt;
=== USB-C connector ===&lt;br /&gt;
&lt;br /&gt;
The USB-C can be used to power the device, and offers USB2 host and OTG possibilities, and also can make use of the USB-C capability to integrate HDMI signals. Some USB-C hubs are available that offer power throughput, USB connection, HDMI port and Ethernet connection. The driver that would make this connection available is not supported at this time.&lt;br /&gt;
&lt;br /&gt;
=== Pogo pins ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone has 6 pogo pins on the back allowing for custom hardware extensions such as wireless charging, an IR blaster, a keyboard extension or extended battery case. The pogo pins provide access to an interrupt line, power input to charge the battery, power source and an I2C interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone pogo.png|none|400px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Interrupt&lt;br /&gt;
| SDA&lt;br /&gt;
| SCL&lt;br /&gt;
|-&lt;br /&gt;
| 5V / VBUS&lt;br /&gt;
| VBAT&lt;br /&gt;
| GND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The VBUS pin is powered by USB and is 5V. The second power pin is VBAT, which connects to the battery voltage. The I2C and interrupt lines have pull-ups on the phone side. The I2C lines are pulled up to 3V3 by the phone.&lt;br /&gt;
&lt;br /&gt;
For a breakout board see [https://github.com/SMR404/PinephonePogoBreakout here]. For an example project see Martijn's blog post [https://blog.brixit.nl/making-a-backcover-extension-for-the-pinephone/ &amp;lt;i&amp;gt;Making a backcover extension for the PinePhone&amp;lt;/i&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
=== Back cover ===&lt;br /&gt;
A step file for the back cover for creating custom cases is freely available [http://files.pine64.org/doc/PinePhone/PinePhone%20Back%20Cover%20ver%200.5.stp here].&lt;br /&gt;
&lt;br /&gt;
=== Serial console ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone has a serial port in the headphone connector, it's activated by the 6th contact on the dipswitch. If the switch is set to &amp;quot;on&amp;quot;, the headphone connector is in audio mode, if it is set to &amp;quot;off&amp;quot; it's in UART mode. The UART serial connection can also be used for communication with other devices from the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The UART is 115200n8.&lt;br /&gt;
&lt;br /&gt;
The pinout for the serial connector is:&lt;br /&gt;
&lt;br /&gt;
* Tip: RX&lt;br /&gt;
* Ring: TX&lt;br /&gt;
* Sleeve: GND&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone_Serial_Cable.png|none|400px]]&lt;br /&gt;
&lt;br /&gt;
You can buy a serial debug cable from the [https://store.pine64.org/product/pinebook-serial-console/ Pine64 Store]. The store cable uses a 4 ring plug, as seen in the [http://files.pine64.org/doc/pinebook/guide/Pinebook_Earphone_Serial_Console_Developer_Guide.pdf here], but a 3 ring plug works just as well. The cable uses a CH340 chipset based serial to USB converter, but any 3.3v serial connection can be used. Because it is a &amp;quot;host&amp;quot;/DTE it means that you need a ''cross modem cable'' ([https://en.wikipedia.org/wiki/Null_modem Null Modem]) with TX on Tip to be connected to RX. A cable like e.g. [https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm FTDI TTL-232R-3V3-AJ] which has TX on Tip and RX on Ring fits perfectly.&lt;br /&gt;
&lt;br /&gt;
== Killswitch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone switches.jpeg|400px|thumb|right|Photo of BraveHeart switches from OSAKANA TARO on Twitter]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640 &lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
{{Hint|The EG25 modem and RTL8723CS WiFi/bluetooth do not work without battery power, even if you are supplying enough power to the PinePhone with USB-C.}}&lt;br /&gt;
&lt;br /&gt;
The [https://wiki.pine64.org/images/0/04/PinePhone_Battery_model_QZ01-396172-2750.pdf supplied battery] is [https://forum.pine64.org/showthread.php?tid=8120&amp;amp;pid=53307#pid53307 meant to be] compatible with Samsung part number EB-BJ700BBC / BBE / CBE from the 2015 J7 phone. &lt;br /&gt;
* The extended life aftermarket BBU do fit, however, somewhat firmly.&lt;br /&gt;
* There is [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55053#pid55053 a report] that the EB-BJ700CBE isn't quite the same size, causing the back not to fit properly.&lt;br /&gt;
&lt;br /&gt;
The battery terminals, in order from nearest the edge to nearest the middle, are:&lt;br /&gt;
&lt;br /&gt;
# +ve&lt;br /&gt;
# thermistor&lt;br /&gt;
# -ve&lt;br /&gt;
# not connected&lt;br /&gt;
&lt;br /&gt;
The battery includes a protection circuit that isolates it in a number of fault conditions, including if it is discharged too far. The fully discharged battery [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55377#pid55377 can be recharged] by connecting the phone to a charger. Once it has charged sufficiently you will be able to boot the phone.&lt;br /&gt;
&lt;br /&gt;
If your battery is hard to remove from the phone, try loosening the screws around it. Possibly cutting up a piece of plastic and sliding it under the battery as a pull tab can work too.&lt;br /&gt;
&lt;br /&gt;
{{Note|The phone ships with a plastic sticker between the battery and the phone. You need to open the back cover (gently), then remove the battery and finally remove the sticker and check that the pins aren't bent. This is to protect the device from turning on during shipping.}}&lt;br /&gt;
&lt;br /&gt;
If using an aftermarket battery on the CE edition phones, removing the lower tabs is not necessary as there is space supplied in the compartment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;, heights=300px&amp;gt;&lt;br /&gt;
Image:PinePhone battery1.png|Photo of Brave Heart case from OSAKANA TARO on Twitter&lt;br /&gt;
Image:PinePhone battery3.jpeg|Photo of Brave Heart battery sticker from OSAKANA TARO on Twitter&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modem and carrier support ==&lt;br /&gt;
To check if the PinePhone is supported on your carrier:&lt;br /&gt;
&lt;br /&gt;
Search for your carrier on [https://www.frequencycheck.com/ frequencycheck.com] and compare the carrier's LTE/GSM/WCDMA frequencies to the PinePhone's supported frequencies (listed under the [[#Specifications|specifications]] section).&lt;br /&gt;
&lt;br /&gt;
It is likely that there will be a few frequencies that your carrier uses which are not supported by the PinePhone. Not all of the carrier's frequencies need to be supported by the PinePhone for it to work - as long as ''most'' of them are supported, you will still get good coverage.&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
Some phone operating systems may not have support for accessing your voicemail by holding down the 1 key. If you are in Canada and using rogers or a rogers associated carrier (such as ''Chatr''), you can access your voice mail by calling an external number, see: https://www.howardforums.com/showthread.php/913346-Rogers-GSM-Voicemail-Retrieval-Numbers&lt;br /&gt;
&lt;br /&gt;
In America, AT&amp;amp;T also has support for accessing your voicemail via an external phone number: https://www.att.com/support/article/wireless/KM1009101/&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
There is a document about using the modem from January 18th 2020 by user ''megi'' [https://megous.com/dl/tmp/modem.txt here]. The script at the end to disable the modem before power off is pretty essential to avoid corrupting your modem's flash memory.&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distribution (because the PinePhone uses the mainline kernel), there are a few that are designed specifically for mobile use on devices like the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Software Releases]] page has a complete list of currently supported phone-optimized Operating System images that work with the PinePhone as well as other related software information. As soon as more patches get mainlined and distributions ship with the updated kernel, they will also be able to run unmodified on the device.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or SD card see [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Flashing eMMC using Jumpdrive ===&lt;br /&gt;
&lt;br /&gt;
[[File:jumpdrive.jpg|400px|thumb|right|Jumpdrive running on the PinePhone]]&lt;br /&gt;
The internal eMMC flash storage can be flashed using the Jumpdrive utility by Danct12 and Martijn from postmarketOS.&lt;br /&gt;
This utility boots from micro SD and exposes the internal eMMC flash storage when the PinePhone is connected to a computer.&lt;br /&gt;
The process of flashing an OS to the exposed and mounted eMMC is identical to that of any other storage medium - e.g. a SD card. You can use the 'DD' command or a utility such as Etcher or Gnome Disks, etc.&lt;br /&gt;
&lt;br /&gt;
Latest Jumpdrive can be found [https://github.com/dreemurrs-embedded/Jumpdrive/releases/ here].&lt;br /&gt;
&lt;br /&gt;
==== Detailed usage instructions ====&lt;br /&gt;
&lt;br /&gt;
# Download the Jumpdrive image&lt;br /&gt;
# Flash the Jumpdrive image to a micro SD card&lt;br /&gt;
# Boot the PinePhone from the Jumpdrive micro SD card&lt;br /&gt;
# Connect the PinePhone to your computer using USB-A -&amp;gt; USB-C cable&lt;br /&gt;
# Flash the exposed PinePhone drive (e.g. /dev/mm..., check for the right device in dmesg, GNOME disks, or similar, and make sure it's unmounted) with your chosen OS image&lt;br /&gt;
# Once the flashing process is complete, disconnect the PinePhone from your PC, power it down and remove the Jumpdrive SD card&lt;br /&gt;
# The process is now finished, and you can boot from eMMC&lt;br /&gt;
&lt;br /&gt;
Jumpdrive also acts as a rescue image in case if you messed up your installation. To do so, you can telnet to '''172.16.42.1''', mount rootfs and fix it!&lt;br /&gt;
&lt;br /&gt;
==== Resize file system ====&lt;br /&gt;
&lt;br /&gt;
If you flash a 4GB image distribution (such as phosh+debian) to your eMMC, your eMMC will only have a 3.7GB partition on it. To use the entire 14.7GB on the eMMC, run the following commands:&lt;br /&gt;
&lt;br /&gt;
# sudo cfdisk /dev/sdX&lt;br /&gt;
# Change to [Resize] in the ncurses program, resize the 3.7GB partition to 14.7GB, and [Write]&lt;br /&gt;
# sudo resize2fs /dev/sdXY&lt;br /&gt;
&lt;br /&gt;
Replace X with your drive's name. Replace Y with the partition you resized in cfdisk.&lt;br /&gt;
&lt;br /&gt;
==== Feedback ====&lt;br /&gt;
&lt;br /&gt;
If you've found an issue or want to improve the tool consider these sites:&lt;br /&gt;
&lt;br /&gt;
* Issues: https://github.com/dreemurrs-embedded/Jumpdrive/issues&lt;br /&gt;
* Pull Requests: https://github.com/dreemurrs-embedded/Jumpdrive/pulls&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
For a list of frequently asked questions (including information regarding the shipping) see [[PinePhone FAQ]].&lt;br /&gt;
&lt;br /&gt;
== PinePhone board information, schematics and certifications ==&lt;br /&gt;
* PinePhone mainboard schematic:&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2a%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2a]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [[PinePhone_v1.2|PinePhone schematic ver 1.2 change list]]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20Schematic%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard Schematic ver 1.1]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20top%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component top placement drawing ver 1.1]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20bottom%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component bottom placement drawing ver 1.1]&lt;br /&gt;
* PinePhone USB-C small board schematic:&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20schematic%20v1.0%2020190730.pdf PinePhone USB-C small board Schematic ver 1.0]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20top%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component top placement drawing ver 1.0]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20bottom%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component bottom placement drawing ver 1.0]&lt;br /&gt;
* PinePhone certifications:&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20FCC%20SDOC%20Certificate-S19112602605001.pdf PinePhone FCC Certificate]&lt;br /&gt;
** [https://fcc.report/FCC-ID/2AWAG-PINEPHONE RF Exposure SAR Information from FCC ID site]&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20CE%20RED%20Certificate-S19112602602.pdf PinPhone CE RED Certificate]&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20ROHS%20Report.pdf PinePhone ROHS Report]&lt;br /&gt;
* [[PinePhone component list]]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/Kimtigo_fbga153_16_32_64_eMMC_datasheet_v1.3.pdf Kimtigo eMMC datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/QZ01-rear-2019-0717(HW)%20Model.pdf PinePhone 5M Pixel Real CMOS Image Sensor Module]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/QZ01-front-2019-0717(HW)%20Model.pdf PinePhone 2M Pixel Front CMOS Image Sensor Module]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20LCD-QZ01.pdf 5.99&amp;quot; 1440x720 LCD IPS Panel specification]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/ST7703_DS_v01_20160128.pdf ST7703 LCD Controller datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/GT917S-Datasheet.pdf GOODiX GT917S Capacitive Touch Controller datasheet]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20Specification.pdf PinePhone Lithium Battery specification]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20ZCV%20Curve%20Chart.xlsx PinePhone Lithium Battery ZCV curve chart]&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
* LTE module information:&lt;br /&gt;
** [https://www.quectel.com/UploadFile/Product/Quectel_EG25-G_LTE_Standard_Specification_V1.2.pdf Quectel EG25-G LTE Module specification]&lt;br /&gt;
** [[Media:Quectel EC25EC21 AT Commands Manual V1.2.pdf|EC25&amp;amp;EC21 AT Commands Manual]]&lt;br /&gt;
&lt;br /&gt;
* Sensors:&lt;br /&gt;
** [https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL 3-axis Magnetomater Datasheet]&lt;br /&gt;
** [https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/ InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS datasheet]&lt;br /&gt;
** [http://www.sensortek.com.tw/en/product/Proximity_Sensor_with_ALS.html SensorTek STK3335 Ambient Light Sensor and Proximity Sensor]&lt;br /&gt;
&lt;br /&gt;
* Digital video to USB-C bridge:&lt;br /&gt;
** [https://www.analogix.com/en/system/files/AA-002281-PB-6-ANX7688_Product_Brief.pdf ANX7688 product brief]&lt;br /&gt;
&lt;br /&gt;
* Case information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Exploded%20Diagram%20ver%201.0.pdf PinePhone case exploded diagram]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Back%20Cover.stp PinePhone back cover 3D file]&lt;br /&gt;
&lt;br /&gt;
== Developer works ==&lt;br /&gt;
=== Megous ===&lt;br /&gt;
&lt;br /&gt;
* [https://xnux.eu/howtos/pine64-pinephone-getting-started.html Getting start with PinePhone Hardware]&lt;br /&gt;
* [https://xnux.eu/devices/pine64-pinephone.html#toc-pine64-pinephone State of development progress]&lt;br /&gt;
* [https://xnux.eu/news.html PinePhone Technical News and Update, also applies to other Allwinner devices including PINE A64 SBC]&lt;br /&gt;
&lt;br /&gt;
== External links == &lt;br /&gt;
* [https://store.pine64.org/?post_type=product Pine64 shop]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=6808</id>
		<title>PinePhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=6808"/>
		<updated>2020-09-02T06:49:03Z</updated>

		<summary type="html">&lt;p&gt;Jbit: /* Components */ (Formatting fix, oops)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PinePhone is a smartphone created by Pine64, capable of running mainline Linux and supported by many partner projects. The BraveHeart Edition was the first publicly-available version of the phone, though it came without a fully functional OS (factory test image) and was geared specifically towards tinkerers and hackers. Its successor is the Community Edition, the first Community Edition started to ship in June 2020. The phone will be available for at least five years.&lt;br /&gt;
&lt;br /&gt;
== First time installation ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone-3.jpg|400px|thumb|right|PinePhone is capable of running a multitude of different Linux mobile OSes]]&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhoneSides.svg|400px|thumb|right|Backward and front of PinePhone UBPorts Edition]]&lt;br /&gt;
&lt;br /&gt;
From the factory the battery has a sticker on it that isolates the battery from the phone. The battery '''will not''' charge until this is removed.&lt;br /&gt;
&lt;br /&gt;
After unboxing remove the back panel using the notch in the corner of the back panel. Then remove the battery and peel off the clear plastic sticker below it that isolates the charging contact. Then replace the battery. See [[PinePhone#Battery|Battery]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
'''Dimensions:''' 160.5 x 76.6 x 9.2mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' Between 180-200 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''SIM Card:''' Micro-SIM &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 5.95 inches (151mm) diagonal&lt;br /&gt;
: '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
: '''Resolution:''' 1440x720, 18:9 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' [https://linux-sunxi.org/A64 Allwinner A64] &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 2GB LPDDR3 SDRAM &amp;lt;br&amp;gt;&lt;br /&gt;
'''Internal Storage:''' 16GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC &amp;lt;br&amp;gt;&lt;br /&gt;
'''Back Camera:''' Single 5MP, 1/4&amp;quot;, LED Flash &amp;lt;br&amp;gt;&lt;br /&gt;
'''Selfie Camera:''' Single 2MP, f/2.8, 1/5&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if killswitch 6 is deactivated) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Communication: G25-G'''&lt;br /&gt;
: '''LTE:''' B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28, B38, B39, B40, B41&lt;br /&gt;
: '''WCDMA:''' B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
: '''GSM:''' 850, 900, 1800, 1900 (MHz)&lt;br /&gt;
: '''WLAN:''' Wi-Fi 802.11 b/g/n, single-band, hotspot&lt;br /&gt;
: '''Bluetooth:''' 4.0, A2DP&lt;br /&gt;
: '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
'''Sensors:''' Accelerometer, gyro, proximity, ambient light, compass &amp;lt;br&amp;gt;&lt;br /&gt;
'''Killswitches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery) &amp;lt;br&amp;gt;&lt;br /&gt;
'''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| OmniVision OV5640&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| SGMICRO SGM3140&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| GalaxyCore GC2145&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Xingbangda XBD599&lt;br /&gt;
|-&lt;br /&gt;
| WiFi&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Bluetooth&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
| Quectel EG25-G&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| Quectel EG25-G&lt;br /&gt;
|-&lt;br /&gt;
| Magnetometer&lt;br /&gt;
| ST LIS3MDL&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| SensorTek STK3335&lt;br /&gt;
|-&lt;br /&gt;
| Sixaxis&lt;br /&gt;
| InvenSense MPU-6050&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| Yes, unknown model&lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| X-Powers AXP803&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware revisions ==&lt;br /&gt;
&lt;br /&gt;
# [[Project Anakin]]&lt;br /&gt;
# [[Project Don't be evil|&amp;quot;Project Don't Be Evil&amp;quot; devkit]]&lt;br /&gt;
# [[PinePhone v1.0 - Dev|PinePhone v1.0 - Developer batch]]&lt;br /&gt;
# [[PinePhone v1.1 - Braveheart]]&lt;br /&gt;
# [[PinePhone v1.2‎]] - Community Edition&lt;br /&gt;
&lt;br /&gt;
== Hardware accessory ==&lt;br /&gt;
&lt;br /&gt;
=== PinePhone hardware accessory compatibility ===&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]] for a list of devices working with the PinePhone (depending on their OS support).&lt;br /&gt;
&lt;br /&gt;
=== USB-C connector ===&lt;br /&gt;
&lt;br /&gt;
The USB-C can be used to power the device, and offers USB2 host and OTG possibilities, and also can make use of the USB-C capability to integrate HDMI signals. Some USB-C hubs are available that offer power throughput, USB connection, HDMI port and Ethernet connection. The driver that would make this connection available is not supported at this time.&lt;br /&gt;
&lt;br /&gt;
=== Pogo pins ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone has 6 pogo pins on the back allowing for custom hardware extensions such as wireless charging, an IR blaster, a keyboard extension or extended battery case. The pogo pins provide access to an interrupt line, power input to charge the battery, power source and an I2C interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone pogo.png|none|400px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Interrupt&lt;br /&gt;
| SDA&lt;br /&gt;
| SCL&lt;br /&gt;
|-&lt;br /&gt;
| 5V / VBUS&lt;br /&gt;
| VBAT&lt;br /&gt;
| GND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The VBUS pin is powered by USB and is 5V. The second power pin is VBAT, which connects to the battery voltage. The I2C and interrupt lines have pull-ups on the phone side. The I2C lines are pulled up to 3V3 by the phone.&lt;br /&gt;
&lt;br /&gt;
For a breakout board see [https://github.com/SMR404/PinephonePogoBreakout here]. For an example project see Martijn's blog post [https://blog.brixit.nl/making-a-backcover-extension-for-the-pinephone/ &amp;lt;i&amp;gt;Making a backcover extension for the PinePhone&amp;lt;/i&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
=== Back cover ===&lt;br /&gt;
A step file for the back cover for creating custom cases is freely available [http://files.pine64.org/doc/PinePhone/PinePhone%20Back%20Cover%20ver%200.5.stp here].&lt;br /&gt;
&lt;br /&gt;
=== Serial console ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone has a serial port in the headphone connector, it's activated by the 6th contact on the dipswitch. If the switch is set to &amp;quot;on&amp;quot;, the headphone connector is in audio mode, if it is set to &amp;quot;off&amp;quot; it's in UART mode. The UART serial connection can also be used for communication with other devices from the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The UART is 115200n8.&lt;br /&gt;
&lt;br /&gt;
The pinout for the serial connector is:&lt;br /&gt;
&lt;br /&gt;
* Tip: RX&lt;br /&gt;
* Ring: TX&lt;br /&gt;
* Sleeve: GND&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone_Serial_Cable.png|none|400px]]&lt;br /&gt;
&lt;br /&gt;
You can buy a serial debug cable from the [https://store.pine64.org/product/pinebook-serial-console/ Pine64 Store]. The store cable uses a 4 ring plug, as seen in the [http://files.pine64.org/doc/pinebook/guide/Pinebook_Earphone_Serial_Console_Developer_Guide.pdf here], but a 3 ring plug works just as well. The cable uses a CH340 chipset based serial to USB converter, but any 3.3v serial connection can be used. Because it is a &amp;quot;host&amp;quot;/DTE it means that you need a ''cross modem cable'' ([https://en.wikipedia.org/wiki/Null_modem Null Modem]) with TX on Tip to be connected to RX. A cable like e.g. [https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm FTDI TTL-232R-3V3-AJ] which has TX on Tip and RX on Ring fits perfectly.&lt;br /&gt;
&lt;br /&gt;
== Killswitch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone switches.jpeg|400px|thumb|right|Photo of BraveHeart switches from OSAKANA TARO on Twitter]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640 &lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
{{Hint|The EG25 modem and RTL8723CS WiFi/bluetooth do not work without battery power, even if you are supplying enough power to the PinePhone with USB-C.}}&lt;br /&gt;
&lt;br /&gt;
The [https://wiki.pine64.org/images/0/04/PinePhone_Battery_model_QZ01-396172-2750.pdf supplied battery] is [https://forum.pine64.org/showthread.php?tid=8120&amp;amp;pid=53307#pid53307 meant to be] compatible with Samsung part number EB-BJ700BBC / BBE / CBE from the 2015 J7 phone. &lt;br /&gt;
* The extended life aftermarket BBU do fit, however, somewhat firmly.&lt;br /&gt;
* There is [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55053#pid55053 a report] that the EB-BJ700CBE isn't quite the same size, causing the back not to fit properly.&lt;br /&gt;
&lt;br /&gt;
The battery terminals, in order from nearest the edge to nearest the middle, are:&lt;br /&gt;
&lt;br /&gt;
# +ve&lt;br /&gt;
# thermistor&lt;br /&gt;
# -ve&lt;br /&gt;
# not connected&lt;br /&gt;
&lt;br /&gt;
The battery includes a protection circuit that isolates it in a number of fault conditions, including if it is discharged too far. The fully discharged battery [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55377#pid55377 can be recharged] by connecting the phone to a charger. Once it has charged sufficiently you will be able to boot the phone.&lt;br /&gt;
&lt;br /&gt;
If your battery is hard to remove from the phone, try loosening the screws around it. Possibly cutting up a piece of plastic and sliding it under the battery as a pull tab can work too.&lt;br /&gt;
&lt;br /&gt;
{{Note|The phone ships with a plastic sticker between the battery and the phone. You need to open the back cover (gently), then remove the battery and finally remove the sticker and check that the pins aren't bent. This is to protect the device from turning on during shipping.}}&lt;br /&gt;
&lt;br /&gt;
If using an aftermarket battery on the CE edition phones, removing the lower tabs is not necessary as there is space supplied in the compartment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;, heights=300px&amp;gt;&lt;br /&gt;
Image:PinePhone battery1.png|Photo of Brave Heart case from OSAKANA TARO on Twitter&lt;br /&gt;
Image:PinePhone battery3.jpeg|Photo of Brave Heart battery sticker from OSAKANA TARO on Twitter&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modem and carrier support ==&lt;br /&gt;
To check if the PinePhone is supported on your carrier:&lt;br /&gt;
&lt;br /&gt;
Search for your carrier on [https://www.frequencycheck.com/ frequencycheck.com] and compare the carrier's LTE/GSM/WCDMA frequencies to the PinePhone's supported frequencies (listed under the [[#Specifications|specifications]] section).&lt;br /&gt;
&lt;br /&gt;
It is likely that there will be a few frequencies that your carrier uses which are not supported by the PinePhone. Not all of the carrier's frequencies need to be supported by the PinePhone for it to work - as long as ''most'' of them are supported, you will still get good coverage.&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
Some phone operating systems may not have support for accessing your voicemail by holding down the 1 key. If you are in Canada and using rogers or a rogers associated carrier (such as ''Chatr''), you can access your voice mail by calling an external number, see: https://www.howardforums.com/showthread.php/913346-Rogers-GSM-Voicemail-Retrieval-Numbers&lt;br /&gt;
&lt;br /&gt;
In America, AT&amp;amp;T also has support for accessing your voicemail via an external phone number: https://www.att.com/support/article/wireless/KM1009101/&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
There is a document about using the modem from January 18th 2020 by user ''megi'' [https://megous.com/dl/tmp/modem.txt here]. The script at the end to disable the modem before power off is pretty essential to avoid corrupting your modem's flash memory.&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distribution (because the PinePhone uses the mainline kernel), there are a few that are designed specifically for mobile use on devices like the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Software Releases]] page has a complete list of currently supported phone-optimized Operating System images that work with the PinePhone as well as other related software information. As soon as more patches get mainlined and distributions ship with the updated kernel, they will also be able to run unmodified on the device.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or SD card see [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Flashing eMMC using Jumpdrive ===&lt;br /&gt;
&lt;br /&gt;
[[File:jumpdrive.jpg|400px|thumb|right|Jumpdrive running on the PinePhone]]&lt;br /&gt;
The internal eMMC flash storage can be flashed using the Jumpdrive utility by Danct12 and Martijn from postmarketOS.&lt;br /&gt;
This utility boots from micro SD and exposes the internal eMMC flash storage when the PinePhone is connected to a computer.&lt;br /&gt;
The process of flashing an OS to the exposed and mounted eMMC is identical to that of any other storage medium - e.g. a SD card. You can use the 'DD' command or a utility such as Etcher or Gnome Disks, etc.&lt;br /&gt;
&lt;br /&gt;
Latest Jumpdrive can be found [https://github.com/dreemurrs-embedded/Jumpdrive/releases/ here].&lt;br /&gt;
&lt;br /&gt;
==== Detailed usage instructions ====&lt;br /&gt;
&lt;br /&gt;
# Download the Jumpdrive image&lt;br /&gt;
# Flash the Jumpdrive image to a micro SD card&lt;br /&gt;
# Boot the PinePhone from the Jumpdrive micro SD card&lt;br /&gt;
# Connect the PinePhone to your computer using USB-A -&amp;gt; USB-C cable&lt;br /&gt;
# Flash the exposed PinePhone drive (e.g. /dev/mm..., check for the right device in dmesg, GNOME disks, or similar, and make sure it's unmounted) with your chosen OS image&lt;br /&gt;
# Once the flashing process is complete, disconnect the PinePhone from your PC, power it down and remove the Jumpdrive SD card&lt;br /&gt;
# The process is now finished, and you can boot from eMMC&lt;br /&gt;
&lt;br /&gt;
Jumpdrive also acts as a rescue image in case if you messed up your installation. To do so, you can telnet to '''172.16.42.1''', mount rootfs and fix it!&lt;br /&gt;
&lt;br /&gt;
==== Resize file system ====&lt;br /&gt;
&lt;br /&gt;
If you flash a 4GB image distribution (such as phosh+debian) to your eMMC, your eMMC will only have a 3.7GB partition on it. To use the entire 14.7GB on the eMMC, run the following commands:&lt;br /&gt;
&lt;br /&gt;
# sudo cfdisk /dev/sdX&lt;br /&gt;
# Change to [Resize] in the ncurses program, resize the 3.7GB partition to 14.7GB, and [Write]&lt;br /&gt;
# sudo resize2fs /dev/sdXY&lt;br /&gt;
&lt;br /&gt;
Replace X with your drive's name. Replace Y with the partition you resized in cfdisk.&lt;br /&gt;
&lt;br /&gt;
==== Feedback ====&lt;br /&gt;
&lt;br /&gt;
If you've found an issue or want to improve the tool consider these sites:&lt;br /&gt;
&lt;br /&gt;
* Issues: https://github.com/dreemurrs-embedded/Jumpdrive/issues&lt;br /&gt;
* Pull Requests: https://github.com/dreemurrs-embedded/Jumpdrive/pulls&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
For a list of frequently asked questions (including information regarding the shipping) see [[PinePhone FAQ]].&lt;br /&gt;
&lt;br /&gt;
== PinePhone board information, schematics and certifications ==&lt;br /&gt;
* PinePhone mainboard schematic:&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2a%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2a]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [[PinePhone_v1.2|PinePhone schematic ver 1.2 change list]]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20Schematic%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard Schematic ver 1.1]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20top%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component top placement drawing ver 1.1]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20bottom%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component bottom placement drawing ver 1.1]&lt;br /&gt;
* PinePhone USB-C small board schematic:&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20schematic%20v1.0%2020190730.pdf PinePhone USB-C small board Schematic ver 1.0]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20top%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component top placement drawing ver 1.0]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20bottom%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component bottom placement drawing ver 1.0]&lt;br /&gt;
* PinePhone certifications:&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20FCC%20SDOC%20Certificate-S19112602605001.pdf PinePhone FCC Certificate]&lt;br /&gt;
** [https://fcc.report/FCC-ID/2AWAG-PINEPHONE RF Exposure SAR Information from FCC ID site]&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20CE%20RED%20Certificate-S19112602602.pdf PinPhone CE RED Certificate]&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20ROHS%20Report.pdf PinePhone ROHS Report]&lt;br /&gt;
* [[PinePhone component list]]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/Kimtigo_fbga153_16_32_64_eMMC_datasheet_v1.3.pdf Kimtigo eMMC datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/QZ01-rear-2019-0717(HW)%20Model.pdf PinePhone 5M Pixel Real CMOS Image Sensor Module]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/QZ01-front-2019-0717(HW)%20Model.pdf PinePhone 2M Pixel Front CMOS Image Sensor Module]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20LCD-QZ01.pdf 5.99&amp;quot; 1440x720 LCD IPS Panel specification]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/ST7703_DS_v01_20160128.pdf ST7703 LCD Controller datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/GT917S-Datasheet.pdf GOODiX GT917S Capacitive Touch Controller datasheet]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20Specification.pdf PinePhone Lithium Battery specification]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20ZCV%20Curve%20Chart.xlsx PinePhone Lithium Battery ZCV curve chart]&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
* LTE module information:&lt;br /&gt;
** [https://www.quectel.com/UploadFile/Product/Quectel_EG25-G_LTE_Standard_Specification_V1.2.pdf Quectel EG25-G LTE Module specification]&lt;br /&gt;
** [[Media:Quectel EC25EC21 AT Commands Manual V1.2.pdf|EC25&amp;amp;EC21 AT Commands Manual]]&lt;br /&gt;
&lt;br /&gt;
* Sensors:&lt;br /&gt;
** [https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL 3-axis Magnetomater Datasheet]&lt;br /&gt;
** [https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/ InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS datasheet]&lt;br /&gt;
** [http://www.sensortek.com.tw/en/product/Proximity_Sensor_with_ALS.html SensorTek STK3335 Ambient Light Sensor and Proximity Sensor]&lt;br /&gt;
&lt;br /&gt;
* Digital video to USB-C bridge:&lt;br /&gt;
** [https://www.analogix.com/en/system/files/AA-002281-PB-6-ANX7688_Product_Brief.pdf ANX7688 product brief]&lt;br /&gt;
&lt;br /&gt;
* Case information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Exploded%20Diagram%20ver%201.0.pdf PinePhone case exploded diagram]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Back%20Cover.stp PinePhone back cover 3D file]&lt;br /&gt;
&lt;br /&gt;
== Developer works ==&lt;br /&gt;
=== Megous ===&lt;br /&gt;
&lt;br /&gt;
* [https://xnux.eu/howtos/pine64-pinephone-getting-started.html Getting start with PinePhone Hardware]&lt;br /&gt;
* [https://xnux.eu/devices/pine64-pinephone.html#toc-pine64-pinephone State of development progress]&lt;br /&gt;
* [https://xnux.eu/news.html PinePhone Technical News and Update, also applies to other Allwinner devices including PINE A64 SBC]&lt;br /&gt;
&lt;br /&gt;
== External links == &lt;br /&gt;
* [https://store.pine64.org/?post_type=product Pine64 shop]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=6807</id>
		<title>PinePhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone&amp;diff=6807"/>
		<updated>2020-09-02T06:47:21Z</updated>

		<summary type="html">&lt;p&gt;Jbit: /* Components */ Change modem component from EC25 to EG25, since EC25 is a different part which isn't used.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PinePhone is a smartphone created by Pine64, capable of running mainline Linux and supported by many partner projects. The BraveHeart Edition was the first publicly-available version of the phone, though it came without a fully functional OS (factory test image) and was geared specifically towards tinkerers and hackers. Its successor is the Community Edition, the first Community Edition started to ship in June 2020. The phone will be available for at least five years.&lt;br /&gt;
&lt;br /&gt;
== First time installation ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone-3.jpg|400px|thumb|right|PinePhone is capable of running a multitude of different Linux mobile OSes]]&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhoneSides.svg|400px|thumb|right|Backward and front of PinePhone UBPorts Edition]]&lt;br /&gt;
&lt;br /&gt;
From the factory the battery has a sticker on it that isolates the battery from the phone. The battery '''will not''' charge until this is removed.&lt;br /&gt;
&lt;br /&gt;
After unboxing remove the back panel using the notch in the corner of the back panel. Then remove the battery and peel off the clear plastic sticker below it that isolates the charging contact. Then replace the battery. See [[PinePhone#Battery|Battery]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
&lt;br /&gt;
'''Dimensions:''' 160.5 x 76.6 x 9.2mm &amp;lt;br&amp;gt;&lt;br /&gt;
'''Weight:''' Between 180-200 grams &amp;lt;br&amp;gt;&lt;br /&gt;
'''SIM Card:''' Micro-SIM &amp;lt;br&amp;gt;&lt;br /&gt;
'''Display:'''&lt;br /&gt;
: '''Size:''' 5.95 inches (151mm) diagonal&lt;br /&gt;
: '''Type:''' HD IPS capacitive touchscreen, 16M colors&lt;br /&gt;
: '''Resolution:''' 1440x720, 18:9 ratio &amp;lt;br&amp;gt;&lt;br /&gt;
'''System on Chip:''' [https://linux-sunxi.org/A64 Allwinner A64] &amp;lt;br&amp;gt;&lt;br /&gt;
'''RAM:''' 2GB LPDDR3 SDRAM &amp;lt;br&amp;gt;&lt;br /&gt;
'''Internal Storage:''' 16GB eMMC, extendable up to 2TB via microSD, supports SDHC and SDXC &amp;lt;br&amp;gt;&lt;br /&gt;
'''Back Camera:''' Single 5MP, 1/4&amp;quot;, LED Flash &amp;lt;br&amp;gt;&lt;br /&gt;
'''Selfie Camera:''' Single 2MP, f/2.8, 1/5&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
'''Sound:''' Loudspeaker, 3.5mm jack &amp;amp; mic (jack doubles as hardware UART if killswitch 6 is deactivated) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Communication: G25-G'''&lt;br /&gt;
: '''LTE:''' B1, B2, B3, B4, B5, B7, B8, B12, B13, B18, B19, B20, B25, B26, B28, B38, B39, B40, B41&lt;br /&gt;
: '''WCDMA:''' B1, B2, B4, B5, B6, B8, B19&lt;br /&gt;
: '''GSM:''' 850, 900, 1800, 1900 (MHz)&lt;br /&gt;
: '''WLAN:''' Wi-Fi 802.11 b/g/n, single-band, hotspot&lt;br /&gt;
: '''Bluetooth:''' 4.0, A2DP&lt;br /&gt;
: '''GNSS:''' GPS/GLONASS/BeiDou/Galileo/QZSS, with A-GPS&lt;br /&gt;
'''Sensors:''' Accelerometer, gyro, proximity, ambient light, compass &amp;lt;br&amp;gt;&lt;br /&gt;
'''Killswitches:''' Modem, WiFi &amp;amp; Bluetooth, Microphone, Cameras &amp;lt;br&amp;gt;&lt;br /&gt;
'''Battery:''' Lithium-ion, rated capacity 2800mAh (10.64Wh), typical capacity 3000mAh (11.40Wh) (nominally replaceable with any Samsung J7 form-factor battery) &amp;lt;br&amp;gt;&lt;br /&gt;
'''I/O:''' USB Type-C, USB Host, DisplayPort Alternate Mode output, 15W 5V 3A Quick Charge, follows USB PD specification&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Model&lt;br /&gt;
|-&lt;br /&gt;
| Touchscreen&lt;br /&gt;
| Goodix GT917S&lt;br /&gt;
|-&lt;br /&gt;
| Rear camera&lt;br /&gt;
| OmniVision OV5640&lt;br /&gt;
|-&lt;br /&gt;
| Camera flash&lt;br /&gt;
| SGMICRO SGM3140&lt;br /&gt;
|-&lt;br /&gt;
| Front camera&lt;br /&gt;
| GalaxyCore GC2145&lt;br /&gt;
|-&lt;br /&gt;
| LCD&lt;br /&gt;
| Xingbangda XBD599&lt;br /&gt;
|-&lt;br /&gt;
| WiFi&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Bluetooth&lt;br /&gt;
| Realtek RTL8723CS&lt;br /&gt;
|-&lt;br /&gt;
| Modem&lt;br /&gt;
  Quectel EG25-G&lt;br /&gt;
|-&lt;br /&gt;
| GNSS/GPS&lt;br /&gt;
| Quectel EG25-G&lt;br /&gt;
|-&lt;br /&gt;
| Magnetometer&lt;br /&gt;
| ST LIS3MDL&lt;br /&gt;
|-&lt;br /&gt;
| Ambient light / Proximity&lt;br /&gt;
| SensorTek STK3335&lt;br /&gt;
|-&lt;br /&gt;
| Sixaxis&lt;br /&gt;
| InvenSense MPU-6050&lt;br /&gt;
|-&lt;br /&gt;
| Vibration motor&lt;br /&gt;
| Yes, unknown model&lt;br /&gt;
|-&lt;br /&gt;
| Notification LED&lt;br /&gt;
| LED0603RGB&lt;br /&gt;
|-&lt;br /&gt;
| Volume buttons&lt;br /&gt;
| Buttons connected to the KEYADC&lt;br /&gt;
|-&lt;br /&gt;
| Power button&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Battery fuel gauge&lt;br /&gt;
| X-Powers AXP803&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware revisions ==&lt;br /&gt;
&lt;br /&gt;
# [[Project Anakin]]&lt;br /&gt;
# [[Project Don't be evil|&amp;quot;Project Don't Be Evil&amp;quot; devkit]]&lt;br /&gt;
# [[PinePhone v1.0 - Dev|PinePhone v1.0 - Developer batch]]&lt;br /&gt;
# [[PinePhone v1.1 - Braveheart]]&lt;br /&gt;
# [[PinePhone v1.2‎]] - Community Edition&lt;br /&gt;
&lt;br /&gt;
== Hardware accessory ==&lt;br /&gt;
&lt;br /&gt;
=== PinePhone hardware accessory compatibility ===&lt;br /&gt;
See [[PinePhone Hardware Accessory Compatibility]] for a list of devices working with the PinePhone (depending on their OS support).&lt;br /&gt;
&lt;br /&gt;
=== USB-C connector ===&lt;br /&gt;
&lt;br /&gt;
The USB-C can be used to power the device, and offers USB2 host and OTG possibilities, and also can make use of the USB-C capability to integrate HDMI signals. Some USB-C hubs are available that offer power throughput, USB connection, HDMI port and Ethernet connection. The driver that would make this connection available is not supported at this time.&lt;br /&gt;
&lt;br /&gt;
=== Pogo pins ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone has 6 pogo pins on the back allowing for custom hardware extensions such as wireless charging, an IR blaster, a keyboard extension or extended battery case. The pogo pins provide access to an interrupt line, power input to charge the battery, power source and an I2C interface.&lt;br /&gt;
&lt;br /&gt;
[[File:Pinephone pogo.png|none|400px]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Interrupt&lt;br /&gt;
| SDA&lt;br /&gt;
| SCL&lt;br /&gt;
|-&lt;br /&gt;
| 5V / VBUS&lt;br /&gt;
| VBAT&lt;br /&gt;
| GND&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The VBUS pin is powered by USB and is 5V. The second power pin is VBAT, which connects to the battery voltage. The I2C and interrupt lines have pull-ups on the phone side. The I2C lines are pulled up to 3V3 by the phone.&lt;br /&gt;
&lt;br /&gt;
For a breakout board see [https://github.com/SMR404/PinephonePogoBreakout here]. For an example project see Martijn's blog post [https://blog.brixit.nl/making-a-backcover-extension-for-the-pinephone/ &amp;lt;i&amp;gt;Making a backcover extension for the PinePhone&amp;lt;/i&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
=== Back cover ===&lt;br /&gt;
A step file for the back cover for creating custom cases is freely available [http://files.pine64.org/doc/PinePhone/PinePhone%20Back%20Cover%20ver%200.5.stp here].&lt;br /&gt;
&lt;br /&gt;
=== Serial console ===&lt;br /&gt;
&lt;br /&gt;
The PinePhone has a serial port in the headphone connector, it's activated by the 6th contact on the dipswitch. If the switch is set to &amp;quot;on&amp;quot;, the headphone connector is in audio mode, if it is set to &amp;quot;off&amp;quot; it's in UART mode. The UART serial connection can also be used for communication with other devices from the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The UART is 115200n8.&lt;br /&gt;
&lt;br /&gt;
The pinout for the serial connector is:&lt;br /&gt;
&lt;br /&gt;
* Tip: RX&lt;br /&gt;
* Ring: TX&lt;br /&gt;
* Sleeve: GND&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone_Serial_Cable.png|none|400px]]&lt;br /&gt;
&lt;br /&gt;
You can buy a serial debug cable from the [https://store.pine64.org/product/pinebook-serial-console/ Pine64 Store]. The store cable uses a 4 ring plug, as seen in the [http://files.pine64.org/doc/pinebook/guide/Pinebook_Earphone_Serial_Console_Developer_Guide.pdf here], but a 3 ring plug works just as well. The cable uses a CH340 chipset based serial to USB converter, but any 3.3v serial connection can be used. Because it is a &amp;quot;host&amp;quot;/DTE it means that you need a ''cross modem cable'' ([https://en.wikipedia.org/wiki/Null_modem Null Modem]) with TX on Tip to be connected to RX. A cable like e.g. [https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm FTDI TTL-232R-3V3-AJ] which has TX on Tip and RX on Ring fits perfectly.&lt;br /&gt;
&lt;br /&gt;
== Killswitch configuration ==&lt;br /&gt;
&lt;br /&gt;
[[File:PinePhone switches.jpeg|400px|thumb|right|Photo of BraveHeart switches from OSAKANA TARO on Twitter]]&lt;br /&gt;
&lt;br /&gt;
The PinePhone features six switches that can be used to configure its hardware. They are numbered 1-6, with switch 1 located nearest to the modem. Their &amp;quot;on&amp;quot; position is toward the top of the phone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number&lt;br /&gt;
! Name&lt;br /&gt;
! Explanation&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Modem&lt;br /&gt;
| Pulls Q1501 gate up (FET killing modem power)&lt;br /&gt;
| &amp;quot;On&amp;quot; enables 2G/3G/4G communication and GNSS hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| WiFi / Bluetooth&lt;br /&gt;
| Pulls up CHIP_EN&lt;br /&gt;
| &amp;quot;On&amp;quot; enables WiFi and Bluetooth communication hardware, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Microphone&lt;br /&gt;
| Breaks microphone bias voltage from the SoC&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input from on-board microphones (not 3.5mm jack), &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Rear camera&lt;br /&gt;
| Pulls up PWDN on OV5640 &lt;br /&gt;
| &amp;quot;On&amp;quot; enables the rear camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Front camera&lt;br /&gt;
| Pulls up PWDN on GC2145&lt;br /&gt;
| &amp;quot;On&amp;quot; enables the front camera, &amp;quot;off&amp;quot; disables it.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Headphone&lt;br /&gt;
| Pulls up IN2 on analog switch BCT4717ETB&lt;br /&gt;
| &amp;quot;On&amp;quot; enables audio input and output via the 3.5mm audio jack, &amp;quot;off&amp;quot; switches the jack to hardware UART mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
{{Hint|The EG25 modem and RTL8723CS WiFi/bluetooth do not work without battery power, even if you are supplying enough power to the PinePhone with USB-C.}}&lt;br /&gt;
&lt;br /&gt;
The [https://wiki.pine64.org/images/0/04/PinePhone_Battery_model_QZ01-396172-2750.pdf supplied battery] is [https://forum.pine64.org/showthread.php?tid=8120&amp;amp;pid=53307#pid53307 meant to be] compatible with Samsung part number EB-BJ700BBC / BBE / CBE from the 2015 J7 phone. &lt;br /&gt;
* The extended life aftermarket BBU do fit, however, somewhat firmly.&lt;br /&gt;
* There is [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55053#pid55053 a report] that the EB-BJ700CBE isn't quite the same size, causing the back not to fit properly.&lt;br /&gt;
&lt;br /&gt;
The battery terminals, in order from nearest the edge to nearest the middle, are:&lt;br /&gt;
&lt;br /&gt;
# +ve&lt;br /&gt;
# thermistor&lt;br /&gt;
# -ve&lt;br /&gt;
# not connected&lt;br /&gt;
&lt;br /&gt;
The battery includes a protection circuit that isolates it in a number of fault conditions, including if it is discharged too far. The fully discharged battery [https://forum.pine64.org/showthread.php?tid=8563&amp;amp;pid=55377#pid55377 can be recharged] by connecting the phone to a charger. Once it has charged sufficiently you will be able to boot the phone.&lt;br /&gt;
&lt;br /&gt;
If your battery is hard to remove from the phone, try loosening the screws around it. Possibly cutting up a piece of plastic and sliding it under the battery as a pull tab can work too.&lt;br /&gt;
&lt;br /&gt;
{{Note|The phone ships with a plastic sticker between the battery and the phone. You need to open the back cover (gently), then remove the battery and finally remove the sticker and check that the pins aren't bent. This is to protect the device from turning on during shipping.}}&lt;br /&gt;
&lt;br /&gt;
If using an aftermarket battery on the CE edition phones, removing the lower tabs is not necessary as there is space supplied in the compartment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot;, heights=300px&amp;gt;&lt;br /&gt;
Image:PinePhone battery1.png|Photo of Brave Heart case from OSAKANA TARO on Twitter&lt;br /&gt;
Image:PinePhone battery3.jpeg|Photo of Brave Heart battery sticker from OSAKANA TARO on Twitter&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modem and carrier support ==&lt;br /&gt;
To check if the PinePhone is supported on your carrier:&lt;br /&gt;
&lt;br /&gt;
Search for your carrier on [https://www.frequencycheck.com/ frequencycheck.com] and compare the carrier's LTE/GSM/WCDMA frequencies to the PinePhone's supported frequencies (listed under the [[#Specifications|specifications]] section).&lt;br /&gt;
&lt;br /&gt;
It is likely that there will be a few frequencies that your carrier uses which are not supported by the PinePhone. Not all of the carrier's frequencies need to be supported by the PinePhone for it to work - as long as ''most'' of them are supported, you will still get good coverage.&lt;br /&gt;
&lt;br /&gt;
=== Voice mail ===&lt;br /&gt;
&lt;br /&gt;
Some phone operating systems may not have support for accessing your voicemail by holding down the 1 key. If you are in Canada and using rogers or a rogers associated carrier (such as ''Chatr''), you can access your voice mail by calling an external number, see: https://www.howardforums.com/showthread.php/913346-Rogers-GSM-Voicemail-Retrieval-Numbers&lt;br /&gt;
&lt;br /&gt;
In America, AT&amp;amp;T also has support for accessing your voicemail via an external phone number: https://www.att.com/support/article/wireless/KM1009101/&lt;br /&gt;
&lt;br /&gt;
=== APN settings ===&lt;br /&gt;
&lt;br /&gt;
For tested APN settings and how to apply them see [[PinePhone APN Settings]].&lt;br /&gt;
&lt;br /&gt;
=== Carrier support ===&lt;br /&gt;
The page [[PinePhone Carrier Support]] contains information about the frequency support of different carriers and hints on setting up cellular network connectivity.&lt;br /&gt;
&lt;br /&gt;
=== Documents ===&lt;br /&gt;
&lt;br /&gt;
There is a document about using the modem from January 18th 2020 by user ''megi'' [https://megous.com/dl/tmp/modem.txt here]. The script at the end to disable the modem before power off is pretty essential to avoid corrupting your modem's flash memory.&lt;br /&gt;
&lt;br /&gt;
== Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
The PinePhone will automatically boot from microSD if a bootable card is inserted. Although it is technically possible to use any ARM distribution (because the PinePhone uses the mainline kernel), there are a few that are designed specifically for mobile use on devices like the PinePhone.&lt;br /&gt;
&lt;br /&gt;
The [[PinePhone Software Releases]] page has a complete list of currently supported phone-optimized Operating System images that work with the PinePhone as well as other related software information. As soon as more patches get mainlined and distributions ship with the updated kernel, they will also be able to run unmodified on the device.&lt;br /&gt;
&lt;br /&gt;
=== Installation instructions ===&lt;br /&gt;
&lt;br /&gt;
For instructions on how to install the operating systems to the eMMC or SD card see [[PinePhone Installation Instructions]].&lt;br /&gt;
&lt;br /&gt;
=== Flashing eMMC using Jumpdrive ===&lt;br /&gt;
&lt;br /&gt;
[[File:jumpdrive.jpg|400px|thumb|right|Jumpdrive running on the PinePhone]]&lt;br /&gt;
The internal eMMC flash storage can be flashed using the Jumpdrive utility by Danct12 and Martijn from postmarketOS.&lt;br /&gt;
This utility boots from micro SD and exposes the internal eMMC flash storage when the PinePhone is connected to a computer.&lt;br /&gt;
The process of flashing an OS to the exposed and mounted eMMC is identical to that of any other storage medium - e.g. a SD card. You can use the 'DD' command or a utility such as Etcher or Gnome Disks, etc.&lt;br /&gt;
&lt;br /&gt;
Latest Jumpdrive can be found [https://github.com/dreemurrs-embedded/Jumpdrive/releases/ here].&lt;br /&gt;
&lt;br /&gt;
==== Detailed usage instructions ====&lt;br /&gt;
&lt;br /&gt;
# Download the Jumpdrive image&lt;br /&gt;
# Flash the Jumpdrive image to a micro SD card&lt;br /&gt;
# Boot the PinePhone from the Jumpdrive micro SD card&lt;br /&gt;
# Connect the PinePhone to your computer using USB-A -&amp;gt; USB-C cable&lt;br /&gt;
# Flash the exposed PinePhone drive (e.g. /dev/mm..., check for the right device in dmesg, GNOME disks, or similar, and make sure it's unmounted) with your chosen OS image&lt;br /&gt;
# Once the flashing process is complete, disconnect the PinePhone from your PC, power it down and remove the Jumpdrive SD card&lt;br /&gt;
# The process is now finished, and you can boot from eMMC&lt;br /&gt;
&lt;br /&gt;
Jumpdrive also acts as a rescue image in case if you messed up your installation. To do so, you can telnet to '''172.16.42.1''', mount rootfs and fix it!&lt;br /&gt;
&lt;br /&gt;
==== Resize file system ====&lt;br /&gt;
&lt;br /&gt;
If you flash a 4GB image distribution (such as phosh+debian) to your eMMC, your eMMC will only have a 3.7GB partition on it. To use the entire 14.7GB on the eMMC, run the following commands:&lt;br /&gt;
&lt;br /&gt;
# sudo cfdisk /dev/sdX&lt;br /&gt;
# Change to [Resize] in the ncurses program, resize the 3.7GB partition to 14.7GB, and [Write]&lt;br /&gt;
# sudo resize2fs /dev/sdXY&lt;br /&gt;
&lt;br /&gt;
Replace X with your drive's name. Replace Y with the partition you resized in cfdisk.&lt;br /&gt;
&lt;br /&gt;
==== Feedback ====&lt;br /&gt;
&lt;br /&gt;
If you've found an issue or want to improve the tool consider these sites:&lt;br /&gt;
&lt;br /&gt;
* Issues: https://github.com/dreemurrs-embedded/Jumpdrive/issues&lt;br /&gt;
* Pull Requests: https://github.com/dreemurrs-embedded/Jumpdrive/pulls&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
&lt;br /&gt;
For a list of frequently asked questions (including information regarding the shipping) see [[PinePhone FAQ]].&lt;br /&gt;
&lt;br /&gt;
== PinePhone board information, schematics and certifications ==&lt;br /&gt;
* PinePhone mainboard schematic:&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2a%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2a]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20v1.2%20Released%20Schematic.pdf PinePhone mainboard Released Schematic ver 1.2]&lt;br /&gt;
** [[PinePhone_v1.2|PinePhone schematic ver 1.2 change list]]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20Schematic%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard Schematic ver 1.1]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20top%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component top placement drawing ver 1.1]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20mainboard%20bottom%20placement%20v1.1%2020191031.pdf &amp;quot;Braveheart&amp;quot; PinePhone mainboard component bottom placement drawing ver 1.1]&lt;br /&gt;
* PinePhone USB-C small board schematic:&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20schematic%20v1.0%2020190730.pdf PinePhone USB-C small board Schematic ver 1.0]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20top%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component top placement drawing ver 1.0]&lt;br /&gt;
** [http://files.pine64.org/doc/PinePhone/PinePhone%20USB-C%20small%20board%20bottom%20placement%20v1.0%2020190730.pdf PinePhone USB-C small board component bottom placement drawing ver 1.0]&lt;br /&gt;
* PinePhone certifications:&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20FCC%20SDOC%20Certificate-S19112602605001.pdf PinePhone FCC Certificate]&lt;br /&gt;
** [https://fcc.report/FCC-ID/2AWAG-PINEPHONE RF Exposure SAR Information from FCC ID site]&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20CE%20RED%20Certificate-S19112602602.pdf PinPhone CE RED Certificate]&lt;br /&gt;
** [http://files.pine64.org/doc/cert/PinePhone%20ROHS%20Report.pdf PinePhone ROHS Report]&lt;br /&gt;
* [[PinePhone component list]]&lt;br /&gt;
&lt;br /&gt;
== Datasheets for components and peripherals ==&lt;br /&gt;
&lt;br /&gt;
* Allwinner A64 SoC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/A64%20brief%20v1.0%2020150323.pdf Allwinner A64 SoC brief introduction]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/A64_Datasheet_V1.1.pdf Allwinner A64 SoC Data Sheet V1.1 (Official Released Version)]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/Allwinner_A64_User_Manual_V1.0.pdf Allwinner A64 SoC User Manual V1.0 (Official Release Version)]&lt;br /&gt;
&lt;br /&gt;
* X-Powers AXP803 PMU (Power Management Unit) information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf AXP803 PMIC datasheet]&lt;br /&gt;
&lt;br /&gt;
* LPDDR3 (178 Balls) SDRAM:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/ATL3A1632H12A_mobile_lpddr3_11x11.5_v1.0_1600.pdf Artmem LPDDR3 datasheet]&lt;br /&gt;
&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/Kimtigo_fbga153_16_32_64_eMMC_datasheet_v1.3.pdf Kimtigo eMMC datasheet]&lt;br /&gt;
&lt;br /&gt;
* CMOS camera module information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/QZ01-rear-2019-0717(HW)%20Model.pdf PinePhone 5M Pixel Real CMOS Image Sensor Module]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/OV5640_datasheet.pdf OV5640 5MP CMOS Image Sensor SoC for Rear Module datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/QZ01-front-2019-0717(HW)%20Model.pdf PinePhone 2M Pixel Front CMOS Image Sensor Module]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/GC2145%20CSP%20DataSheet%20release%20V1.0_20131201.pdf GC2145 2MP CMOS Image Sensor SoC for Front Module datasheet]&lt;br /&gt;
&lt;br /&gt;
* LCD touch screen panel information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20LCD-QZ01.pdf 5.99&amp;quot; 1440x720 LCD IPS Panel specification]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/ST7703_DS_v01_20160128.pdf ST7703 LCD Controller datasheet]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/GT917S-Datasheet.pdf GOODiX GT917S Capacitive Touch Controller datasheet]&lt;br /&gt;
&lt;br /&gt;
* Lithium battery information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20Specification.pdf PinePhone Lithium Battery specification]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20QZ01%20Battery%20ZCV%20Curve%20Chart.xlsx PinePhone Lithium Battery ZCV curve chart]&lt;br /&gt;
&lt;br /&gt;
* WiFi/BT module information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pine64/RTL8723BS.pdf RTL8723BS/RTL8723CS specification]&lt;br /&gt;
&lt;br /&gt;
* LTE module information:&lt;br /&gt;
** [https://www.quectel.com/UploadFile/Product/Quectel_EG25-G_LTE_Standard_Specification_V1.2.pdf Quectel EG25-G LTE Module specification]&lt;br /&gt;
** [[Media:Quectel EC25EC21 AT Commands Manual V1.2.pdf|EC25&amp;amp;EC21 AT Commands Manual]]&lt;br /&gt;
&lt;br /&gt;
* Sensors:&lt;br /&gt;
** [https://www.st.com/en/mems-and-sensors/lis3mdl.html ST LIS3MDL 3-axis Magnetomater Datasheet]&lt;br /&gt;
** [https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/ InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS datasheet]&lt;br /&gt;
** [http://www.sensortek.com.tw/en/product/Proximity_Sensor_with_ALS.html SensorTek STK3335 Ambient Light Sensor and Proximity Sensor]&lt;br /&gt;
&lt;br /&gt;
* Digital video to USB-C bridge:&lt;br /&gt;
** [https://www.analogix.com/en/system/files/AA-002281-PB-6-ANX7688_Product_Brief.pdf ANX7688 product brief]&lt;br /&gt;
&lt;br /&gt;
* Case information:&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Exploded%20Diagram%20ver%201.0.pdf PinePhone case exploded diagram]&lt;br /&gt;
** [http://files.pine64.org/doc/datasheet/pinephone/PinePhone%20Back%20Cover.stp PinePhone back cover 3D file]&lt;br /&gt;
&lt;br /&gt;
== Developer works ==&lt;br /&gt;
=== Megous ===&lt;br /&gt;
&lt;br /&gt;
* [https://xnux.eu/howtos/pine64-pinephone-getting-started.html Getting start with PinePhone Hardware]&lt;br /&gt;
* [https://xnux.eu/devices/pine64-pinephone.html#toc-pine64-pinephone State of development progress]&lt;br /&gt;
* [https://xnux.eu/news.html PinePhone Technical News and Update, also applies to other Allwinner devices including PINE A64 SBC]&lt;br /&gt;
&lt;br /&gt;
== External links == &lt;br /&gt;
* [https://store.pine64.org/?post_type=product Pine64 shop]&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Hardware_Accessory_Compatibility&amp;diff=6213</id>
		<title>PinePhone Hardware Accessory Compatibility</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Hardware_Accessory_Compatibility&amp;diff=6213"/>
		<updated>2020-07-16T06:01:35Z</updated>

		<summary type="html">&lt;p&gt;Jbit: /* Screen protector */ Make the link prettier&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of devices that have been tried on the PinePhone, and the results.&lt;br /&gt;
&lt;br /&gt;
== Peripheral equipment ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Type || Make/Model || Connected&amp;lt;br&amp;gt; via || Hardware IDs || Result || Tested OS || Notes&lt;br /&gt;
|-&lt;br /&gt;
|5-1 USB-C hub || [https://www.aliexpress.com/item/32954358411.html from aliexpress] || USBC ||  05e3:0626 hub || PD not working,&amp;lt;br&amp;gt;rest not working yet  ||UBPorts/pmOS || HDMI, GBit eth, 2xUSB-3, USB-C PD &amp;lt;br&amp;gt; [http://www.sympato.ch/~dryak/files/usbc-dock.jpg image]&lt;br /&gt;
|-&lt;br /&gt;
|Generic Bluetooth keyboard || generic || BT ||  -- || No pairing via ui, but functional via terminal || pmOS || [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#Bluetooth Instructions]&lt;br /&gt;
|-&lt;br /&gt;
|UMAX U-Connect Type-C Multiport H7 || [https://www.tsbohemia.cz/umax-u-connect-type-c-multiport-h7_d350000.html ts-bohemia] || USBC ||  - || USB-A ports, PD, HDMI works, SD card reader not enumerating on PP with removed VCONN switches (may need VCONN)  || Arch Linux || HDMI, 3xUSB-3, USB-C PD, SD reader&lt;br /&gt;
|-&lt;br /&gt;
|Google Pixel USB-C to 3.5mm adapter || [https://store.google.com/?srp=/product/usb_c_headphone_adapter google] || USBC ||  18d1:5029 || Works, recognized as usb soundcard, but only if a cable is plugged in  || pmOS || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Protection ==&lt;br /&gt;
&lt;br /&gt;
=== Screen protector ===&lt;br /&gt;
&lt;br /&gt;
Official: [https://store.pine64.org/product/pinephone-tempered-glass-screen-protector/ PinePhone Tempered Glass Screen Protector]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most screen protectors for the iPhone 11 Pro Max and the iPhone XS Max fit the PinePhone (if the top notch is not obscured by a black foil or similar).&lt;br /&gt;
&lt;br /&gt;
=== Case ===&lt;br /&gt;
&lt;br /&gt;
The Pine store got official cases:&lt;br /&gt;
&lt;br /&gt;
* [https://store.pine64.org/?product=pinephone-hard-protective-case PinePhone Hard Protective Case]&lt;br /&gt;
* [https://store.pine64.org/?product=pinephone-soft-tpu-protective-case-reduce-digital-gap-donation-program PinePhone Soft TPU Protective Case - &amp;quot;Reduce Digital Gap&amp;quot; Donation Program]&lt;br /&gt;
&lt;br /&gt;
Tight-fit cases of other phones can't be alienated for the PinePhone due as most times the proportions and/or camera notch won't fit. The phone can however also be used with &amp;quot;phone sleeves&amp;quot;, such as those from fitBAG.&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=PinePhone_Hardware_Accessory_Compatibility&amp;diff=6212</id>
		<title>PinePhone Hardware Accessory Compatibility</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=PinePhone_Hardware_Accessory_Compatibility&amp;diff=6212"/>
		<updated>2020-07-16T05:59:49Z</updated>

		<summary type="html">&lt;p&gt;Jbit: /* Screen protector */ Add link to official screen protector&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of devices that have been tried on the PinePhone, and the results.&lt;br /&gt;
&lt;br /&gt;
== Peripheral equipment ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!Type || Make/Model || Connected&amp;lt;br&amp;gt; via || Hardware IDs || Result || Tested OS || Notes&lt;br /&gt;
|-&lt;br /&gt;
|5-1 USB-C hub || [https://www.aliexpress.com/item/32954358411.html from aliexpress] || USBC ||  05e3:0626 hub || PD not working,&amp;lt;br&amp;gt;rest not working yet  ||UBPorts/pmOS || HDMI, GBit eth, 2xUSB-3, USB-C PD &amp;lt;br&amp;gt; [http://www.sympato.ch/~dryak/files/usbc-dock.jpg image]&lt;br /&gt;
|-&lt;br /&gt;
|Generic Bluetooth keyboard || generic || BT ||  -- || No pairing via ui, but functional via terminal || pmOS || [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)#Bluetooth Instructions]&lt;br /&gt;
|-&lt;br /&gt;
|UMAX U-Connect Type-C Multiport H7 || [https://www.tsbohemia.cz/umax-u-connect-type-c-multiport-h7_d350000.html ts-bohemia] || USBC ||  - || USB-A ports, PD, HDMI works, SD card reader not enumerating on PP with removed VCONN switches (may need VCONN)  || Arch Linux || HDMI, 3xUSB-3, USB-C PD, SD reader&lt;br /&gt;
|-&lt;br /&gt;
|Google Pixel USB-C to 3.5mm adapter || [https://store.google.com/?srp=/product/usb_c_headphone_adapter google] || USBC ||  18d1:5029 || Works, recognized as usb soundcard, but only if a cable is plugged in  || pmOS || &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Protection ==&lt;br /&gt;
&lt;br /&gt;
=== Screen protector ===&lt;br /&gt;
&lt;br /&gt;
Official tempered glass screen protector: https://store.pine64.org/product/pinephone-tempered-glass-screen-protector/&lt;br /&gt;
&lt;br /&gt;
Most screen protectors for the iPhone 11 Pro Max and the iPhone XS Max fit the PinePhone (if the top notch is not obscured by a black foil or similar).&lt;br /&gt;
&lt;br /&gt;
=== Case ===&lt;br /&gt;
&lt;br /&gt;
The Pine store got official cases:&lt;br /&gt;
&lt;br /&gt;
* [https://store.pine64.org/?product=pinephone-hard-protective-case PinePhone Hard Protective Case]&lt;br /&gt;
* [https://store.pine64.org/?product=pinephone-soft-tpu-protective-case-reduce-digital-gap-donation-program PinePhone Soft TPU Protective Case - &amp;quot;Reduce Digital Gap&amp;quot; Donation Program]&lt;br /&gt;
&lt;br /&gt;
Tight-fit cases of other phones can't be alienated for the PinePhone due as most times the proportions and/or camera notch won't fit. The phone can however also be used with &amp;quot;phone sleeves&amp;quot;, such as those from fitBAG.&lt;/div&gt;</summary>
		<author><name>Jbit</name></author>
	</entry>
</feed>