Xunlong Orange Pi PC 2

Orange Pi PC 2 is H5 based development board produced by Xunlong. It is the first single board computer from Xunlong to feature Allwinner H5 SoC. Currently available for 19.98$ from aliexpress.

= Identification = The PCB has the following silkscreened on it: Orange Pi PC 2 V1.1

= Sunxi support =

Current status
Unsupported

Mainline U-Boot
Use the orangepi_pc2 build target (supported since U-Boot v2017.05).

apritzel is working on mainline support. branch bootlog <- outdated?

Mainline kernel
See the H5 SoC support page. A preliminary .dts file for the board can be found here.

= Expansion Port =

The Orange Pi PC 2 has a Raspberry Pi model B+ compatible 40-pin, 0.1" connector with several low-speed interfaces.

= Tips, Tricks, Caveats =

FEL mode activation
FEL is a low-level subroutine contained in the BootROM on Allwinner devices. It is used for initial programming and recovery of devices using USB.

UBOOT Switch
There is no accessible UBOOT switch or connector. However, UBOOT is pulled up by a 47Kohm resistor (R124) which is located between microUSB connector (CN1) and H5 SoC (U1) near the two status LEDs; you'll need to solder a switch from the GND test point near pin 5 of the GPIO connector (CON3) to the side of R124 not connected to the RTC test point (3.3V), which is next to the Vacc test point. So it's possible to solder in a switch to pull UBOOT low to reboot your board into FEL mode:
 * 0: U_Boot
 * 1: Normal Boot

Reset Switch
The board has a momentary action reset switch (SW4) located on the lower left corner near the 5V DC IN power jack (J1).

LEDs
The board has two LEDs mid-way between the Micro USB jack (CN1) and the H5 SoC (U1):
 * A red PWR LED, D7, connected to the PA20 pin.
 * A green STATUS LED, D8, connected to the PL10 pin.

Universal Serial Bus

 * Universal Serial Bus On The Go: USB0 port on H5 SoC is accessed via the microUSB connector (CN1) on the left hand edge of the board. The USB OTG is a Dual-Role Device controller, which supports both device and host functions which can also be configured as a Host-only or Device-only controller, fully compliant with the USB 2.0 Specification. It can support high-speed (HS, 480-Mbps), full-speed (FS, 12-Mbps), and low-speed (LS, 1.5-Mbps) transfers in Host mode. It can support high-speed (HS, 480-Mbps), and full-speed (FS, 12-Mbps) in Device mode.


 * USB Host Controller 1: USB1 and USB3 ports on H5 SoC is accessed via the dual USB A stacked connector (USB1) on the bottom right hand side of the PC2. It is fully compliant with the USB 2.0 specification, Enhanced Host Controller Interface (EHCI) Specification, Revision 1.0, and the Open Host Controller Interface (OHCI) Specification Release 1.0a. The controller supports high-speed, 480-Mbps transfers (40 times faster than USB 1.1 full-speed mode) using an EHCI Host Controller, as well as full and low speeds through one or more integrated OHCI Host Controllers.


 * USB Host Controller 2: USB2 port on H5 SoC is accessed via the vertical USB A connector (P1) on the right hand side of the PC2. It is fully compliant with the USB 2.0 specification, Enhanced Host Controller Interface (EHCI) Specification, Revision 1.0, and the Open Host Controller Interface (OHCI) Specification Release 1.0a. The controller supports high-speed, 480-Mbps transfers (40 times faster than USB 1.1 full-speed mode) using an EHCI Host Controller, as well as full and low speeds through one or more integrated OHCI Host Controllers.

USB Host Register base addresses are: USB_HCI1 at 0x01C1B000; USB_HCI2 at 0x01C1C000; and USB_HCI3 at 0x01C1D000

Audio/Video Output
The PC2 board has a 3.5mm Audio-Video (AV) jack (J4), located to the right of the HDMI connector and the two stacked USB ports. The AV jack outputs both Left and Right audio channels and a Color, Video, Blanking and Sync (CVBS) composite TV (up to 480p/576p NTSC/PAL signal from the H5 SoC TCON1 module.

Camera Serial Interface
The PC2 has a Camera Serial Interface (CSI) interface connector (CON1) located between the microUSB connector (CN1) and the Reset switch (SW4) on the laft hand side of the board. The CSI supports 8-bit yuv422 CMOS sensor interface and CCIR656 protocol for NTSC and PAL with maximum still capture resolution to 5M pixels and maximum video capture resolution to 1080 at 30fps. The CSI camera connector (CON1) is a 24-pin FPC connector which can connect directly with an external camera module.

Consumer Infrared Receiver
The PC2 board has a Consumer Infrared Receiver (CIR) module located to the right of GPIO connector (CON3) to receive data from a received infrared (IR) signal to port PL11 on H5 Soc. The CIR module is implemented in hardware and provides full physical layer implementation, supports IR for remote control, has 64x8 bits FIFO for data buffer and programmable FIFO thresholds. The CIR registers are at base address: 0x01F02000.

Microphone
The PC2 board has a built in microphone located just to the right of the HDMI connector with frequency range specification of ~20-16000Hz. It is connected to analog input port MICIn1 on H5 SoC and analog control registers: 0x05, Linein and Gain Control Register (Default Value: 0x30), 0x06 MIC1 Gain Control Register (Default Value: 0x33), and 0x0B MIC1 Boost and MICBIAS Control Register (Default Value: 0x04). MICIn2 input is not connected.

CPU clock speed limit
The Allwinner H5 manual does not provide the CPU clock speed information. The following comment is found in the SDK provided by Xunlong. [dvfs_table] max_freq = 1008000000 min_freq = 480000000
 * dvfs voltage-frequency table configuration
 * max_freq: cpu maximum frequency, based on Hz
 * min_freq: cpu minimum frequency, based on Hz
 * lv_count: count of lv_freq/lv_volt, must be < 16
 * lv1: core vdd is 1.30v if cpu frequency is (1104Mhz, 1152Mhz]
 * lv2: core vdd is 1.26v if cpu frequency is (1008Mhz, 1104Mhz]
 * lv3: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz]
 * lv4: core vdd is 1.10v if cpu frequency is (648Mhz,  816Mhz]
 * lv5: core vdd is 1.04v if cpu frequency is (480Mhz,  648Mhz]
 * lv6: core vdd is 1.04v if cpu frequency is (480Mhz,  648Mhz]
 * lv7: core vdd is 1.04v if cpu frequency is (480Mhz,  648Mhz]
 * lv8: core vdd is 1.04v if cpu frequency is (480Mhz,  648Mhz]
 * lv5: core vdd is 1.04v if cpu frequency is (480Mhz,  648Mhz]
 * lv6: core vdd is 1.04v if cpu frequency is (480Mhz,  648Mhz]
 * lv7: core vdd is 1.04v if cpu frequency is (480Mhz,  648Mhz]
 * lv8: core vdd is 1.04v if cpu frequency is (480Mhz,  648Mhz]
 * extremity_freq = 1344000000

The Orange Pi PC 2 board uses the SY8106A voltage regulator for providing the CPU core voltage (VDD_CPUX). The default CPU voltage is 1.1V after power-on (selected by the resistors on the PCB) and can be changed at runtime by software via I2C interface. According to the table above, this default voltage should be safe for using with the CPU clock frequencies up to 816MHz. The H5 user manual specifies 1.5V as the absolute maximum for the VDD_CPUX voltage and 1.4V as the recommended maximum.

The stability of the Orange Pi PC2 was tested using HPL 2.1. Per frequency the voltage was lowered until HPL found data corruption during the tests. The results of this test show the Orange Pi PC 2 is able to run at 1368 MHz with a minimum core voltage of 1.38V. The tests fail while running at 1392 MHz with a core voltage of 1.4V.

This test was only done on one single board. Accuracy of this data must be confirmed. The results of the test: http://pastebin.com/0z3FhfkU

Locating the UART
Debug UART pins are located between the 5V power input jack (J1) and the HDMI connector (CON2). The three-pin single-in-line header pins are marked as GND, RX and TX on the PCB. Just attach some leads according to our UART Howto.

= Pictures =

= Variants =

= Also known as =

= See also =


 * Xunlong Orange Pi site
 * Official Github Repository
 * Unofficial Github Repository more worth a look
 * Official Orange Pi Forums.
 * Orange Pi PC 2 Schematics 1.2

Manufacturer images

 * http://www.orangepi.org/downloadresources/
 * https://mega.nz/#F!m40jgBYQ!-uNiWmKhGoQUAqnWQvlr-w

= References =