Pine Pinebook

= Identification =

On the back of the device, the following is printed:
 * Prototypes
 * Prototypes do not seem to have external markings besides Pine64 stickers...

The PCB has the following silkscreened on it:
 * Prototypes
 * Mainboard (bottom): A114-A64_V1.1 2016-08-23
 * Daughterboard (top): A114-A64_USB_V1.1 2016-09-23

In android, under Settings->About Tablet, you will find:
 * Model Number: 
 * Build Number: 

Different models
So far there are two different models based on the same PCB


 * 14inch LCD
 * 11inch LCD

= Sunxi support =

Manual build
You can build things for yourself by following our Manual build howto and by choosing from the configurations available below.

Sunxi/Legacy U-Boot
Use the  build target.

Mainline U-Boot
Use the  build target.

Sunxi/Legacy Kernel
Use the  file.

Mainline kernel
Use the  device-tree binary.

= Tips, Tricks, Caveats =

FEL mode
The FEL mode can be entered either via pulling the FEL tespad to GND while turning on the system (see below for Testpad location) or via a specially crafted boot0 on a microSD card.
 * Prototypes

The FEL mode can be entered either by using the FEL button on the PCB while turning on the unit or via a specially crafted boot0 on a microSD card.
 * Production Units

Power Management
The Pinebook is powered by a 3.5mm/1.35mm barrel plug, sleeve is GND, inner contact +5V. The maximum input current is 3A. The PCB contains an implementation of the standard AXP803 PMIC with a 10Ah LiPo battery attached. There is a secondary power path via the OTG-USB port... TODO: add more info, add current requirements for LCD/backlight and other components

Audio Paths
The Pinebook utilizes the internal codec of the A64 with some extra hardware in the audio paths:


 * LINEOUT via amplifiers (1W/8R) (with GPIO controlled mute, PA-SHDN = PH7) to the internal speakers
 * HP-OUT is connected to the 4-pin 3.5mm headset jack
 * MIC1 & MIC2 are used in a multiplexed scheme for either headset jack or internal microphones (TODO/check new schematics)
 * MIC1 is connected to one of the internal microphones
 * MIC2 is multiplexed between the second internal microphone (MIC2-EN=L) or the headphone jack (MIC2-EN=H)
 * GPIO to control MIC2 multiplexer: MIC2-EN = PL11

Video Paths

 * HDMI ...
 * RGB-LCD --> ANX6345 eDP bridge --> LCD ...
 * LCD/backlight is controlled via GPIOs (LCD-EN=PH6, LCD-BL-EN=PD23, LCD-RST=PD24, LCD-HPD=PL7 ) and a PWM output (LCD-PWM=PD22/PWM0)
 * LCD open/close status is detected via a hall effect sensor connected to GPIO PH10 (sensor located between the uSD card slot and headphone jack)

TODO: add more info

Wifi/BT
The RTL8723cs SDIO module is similar to the RTL8723bs used for the Pine64 Wifi/BT module... TODO: wifi mainline driver source and BT firmware loader description...


 * GPIOs
 * WL-PMU-EN = PL2
 * WL-WAKE-AP = PL3
 * BT-RST-N = PL4
 * BT-WAKE-AP = PL5
 * AP-WAKE-BT = PL6

Extra internal headers, sensors

 * Keyboard controller is a SH68F83 low speed USB microcontroller with 8051 core
 * Touchpad is connected via i2c to keyboard controller

Prototype

 * Capacitive touchpanel header (provides access to I2C/TWI0, GPIOs PH4&PH8)
 * Bosch BMA223 acceleration sensor (via I2C/TWI1, default address=0x18 and GPIO-IRQ PH5)
 * Free USB port on the internal hub? (seems routed to the sdcard daughterboard, production units may have testpads, TODO: confirm)

Production

 * Free USB port on the internal hub is routed to daughterboard connector pins 7(DP) and 8(DM)

TODO: add more info

...
= Adding a serial port =

Production Pinebook
Production Pinebooks have the serial port multiplexed with the audio jack output. See here for the pinout: (Beware, for me it seems RX/TX are swapped, and the TIP is actually RX on my Pinebook!)
 * Pinebook Headphone Jack UART Connector Pinout

For activating the serial/UART on the audio jack on the production pinebook there seem to be two variants:
 * 1) Variant with a software controller GPIO, which can be activated using the  "sudo pinebook_enable_uart.sh" command (and "sudo pinebook_enable_headphone.sh" to restore back to headphones output)
 * 2) Variant with a hardware switch that needs to be toggled, and requires opening the back cover of the pinebook. Once opened, flip the switch located here:

Once the audio jack is configured for outputting serial/uart data, you'll be able to see boot0, uboot, linux kernel logs, ... up until you'll eventually get a login prompt. Serial settings:

115200, 8N1, no flow control

In case of a software controlled GPIO, you might have to disable the service restoring audio output, if you want the UART to remain active: $> sudo systemctl disable pinebook-headphones

Prototype Pinebook
The prototype Pinebook PCBs do not have a UART0 header, only testpads on the bottom side which requires removing the PCB and soldering some wires / breakout board to it. The production units are planned to have UART0 multiplexed on the headphone jack (TODO: describe trigger condition)

Opening the Pinebook
Opening the Pinebook is easy:
 * Remove all the screws on the bottom. Make sure to note which screws go where since they have different lengths!
 * To pull off the cover, slide a plastic/metal lid/spudger in between the cover and the laptop body, to unclip it in several locations. Start at an easy spot and work your way around the whole cover.

Locating the UART
The UART and FEL testpad locations for the prototype PCBs can bee seen in the picture, colors are as following: Green-TXD, Orange-RXD, Yellow-FEL, Black-GND. The A64 uses 3,3V CMOS signal levels, so make sure your UART adapter does not use 5V, see UART howto for more information.

= Pictures =

Accessories and pre-production units
= See also =


 * Ayufan's GitHub with BSP based builds of Android and u-boot, Linux kernel for Pine64, Pinebook
 * wiki.pine64.org Further info on the hardware and firmware.
 * forum.pine64.org Discussion on pine64

Datasheets

 * Pinebook Logicboard Schematic V1.0 (prototypes)
 * Pinebook Logicboard Schematic V3.0 (Production)
 * Pinebook Daughterboard Schematic V1.0
 * Pinebook Headphone Jack UART Connector Pinout

Manufacturer images
Pine A64 Android release and Linux BSP