Xunlong Orange Pi One & Lite

Orange Pi One is a H3 based development board produced by Xunlong.

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

= Sunxi support =

Current status
The H3 and Orange Pi One support is progressing nicely. It is possible to find a usable mainline 4.x kernel (plus some patches) and a legacy 3.4 kernel in various work-in-progress git branches. See the Manual build section for more details.

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

Mainline U-Boot
Use the orangepi_pc build target (supported since v2016.01-rc2) unless an orangepi_one target is available.

It can boot from the SD card or via FEL. Only the initial basic functionality is implemented and there are still no USB host and Ethernet drivers for H3 in U-Boot v2016.01 (it affects only u-boot functionality, device would work in linux as long kernel supports it).

Sunxi/Legacy Kernel
The 3.4 kernel from the official Allwinner's git repository does not support H3 yet. But it is possible to use one of the kernel forks, based on the lichee H3 SDK tarball:
 * Siarhei Siamashka's branch '20151207-embedded-lima-memtester-h3' at https://github.com/ssvb/linux-sunxi/tree/20151207-embedded-lima-memtester-h3

Configure this kernel using sun8i_h3_defconfig, the rest is explained in the kernel compilation guide.

Use the xunlong_orange_pi_pc.fex file for generating script.bin as long as none for the One with fixes regarding DRAM and voltage regulator is available.

When booting the legacy 3.4 kernel with the mainline U-Boot, add the following line to boot.cmd:

setenv machid 1029

Mainline kernel
Initial H3 patches have been submitted to the mainline kernel, but have not landed yet. Currently you can find these patches in the arm-linux mailing list, or alternatively in one of the work-in-progress kernel forks:
 * Maxime Ripard's branch 'sunxi/for-next' at https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/log/?h=sunxi/for-next (very basic H3 support, without USB)
 * Hans de Goede's branch 'sunxi-wip' at https://github.com/jwrdegoede/linux-sunxi/tree/sunxi-wip (many work-in-progress patches, including H3 and USB support for it)
 * Siarhei Siamashka's branch '20151223-h3-mainline-smp-hack' at https://github.com/ssvb/linux-sunxi/tree/20151223-h3-mainline-smp-hack (minimal set of H3 patches, with USB and SMP)

Use the sun8i-h3-orangepi-pc.dtb device-tree binary unless a sun8i-h3-orangepi-one.dtb is available.

= Tips, Tricks, Caveats =

FEL mode
The Orange Pi One will fail over to FEL mode if it doesn't detect a card present in the µSD slot. There is no dedicated FEL button.

Compatibility
Since Xunlong doesn't provide new OS images users of Orange Pi One try to use images/settings for Orange Pi PC. While this seems to work and Ethernet and USB are functional the logs get flooded with "ARISC ERROR" messages due to a different voltage regulator (full log):

[ARISC ERROR] :message process error [ARISC ERROR] :message addr  : f004b840 [ARISC ERROR] :message state : 5 [ARISC ERROR] :message attr  : 2 [ARISC ERROR] :message type  : 30 [ARISC ERROR] :message result : ff [ARISC WARING] :callback not install [cpu_freq] ERR:set cpu frequency to 1008MHz failed!

On the Orange Pi PC the SY8106A is accessible through I2C and the H3's AR100 OpenRISC core tries to adjust the CPU core voltage (VDD_CPUX) this way. On the One a different voltage regulator is used: SY8113b adjustable through GPIO but this requires software changes also. Unless this is resolved you should set pmuic_type = 0 in the fex file

CPU clock speed limit
Xunlong advertises the "Orange Pi One" as being only capable of running at 'up to 1.2GHz'. It's also said that the SY8113b voltage regulator can only be switched between 1.1V and 1.3V which would prevent clocking the SoC higher than 1200MHz according to the common comments in the FEX files from various H3 SDK variants:
 * dvfs voltage-frequency table configuration
 * pmuic_type:0:none, 1:gpio, 2:i2c
 * pmu_gpio0: gpio config.
 * pmu_levelx: 0~9999: voltage(mV), 10000~90000:gpio0 state. voltage form high to low.
 * extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk
 * 1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator
 * max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz
 * min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz
 * LV_count: count of LV_freq/LV_volt, must be < 16
 * LV1: core vdd is 1.50v if cpu frequency is (1296Mhz, 1536Mhz]
 * LV2: core vdd is 1.34v if cpu frequency is (1200Mhz, 1296Mhz]
 * LV3: core vdd is 1.32v if cpu frequency is (1008Mhz, 1200Mhz]
 * LV4: core vdd is 1.20v if cpu frequency is (816Mhz,  1008Mhz]
 * LV5: core vdd is 1.10v if cpu frequency is (648Mhz,   816Mhz]
 * LV6: core vdd is 1.04v if cpu frequency is (0Mhz,     648Mhz]
 * LV7: core vdd is 1.04v if cpu frequency is (0Mhz,     648Mhz]
 * LV8: core vdd is 1.04v if cpu frequency is (0Mhz,     648Mhz]
 * LV5: core vdd is 1.10v if cpu frequency is (648Mhz,   816Mhz]
 * LV6: core vdd is 1.04v if cpu frequency is (0Mhz,     648Mhz]
 * LV7: core vdd is 1.04v if cpu frequency is (0Mhz,     648Mhz]
 * LV8: core vdd is 1.04v if cpu frequency is (0Mhz,     648Mhz]

DRAM clock speed limit
DRAM is clocked at 672 MHz by the hardware vendor. But the reliability still needs to be verified. One of the ways of doing reliability tests may be https://github.com/ssvb/lima-memtester/releases/tag/20151207-orange-pi-pc-fel-test (developed for Orange Pi PC first it checks the DRAM setup in the current mainline U-Boot v2016.01-rc2 + a bugfix).

LEDs
The board has two LEDs next to the 40 pin GPIO header:
 * A red LED, connected to the PA15 pin.
 * A green LED, connected to the PL10 pin.

When using kernel 3.4 with Xunlong's or loboris' settings then the LEDs can only be switched on/off. By changing the definition in the fex file (see patch or fex with applied fix) both LEDs can be used the usual way (using different triggers and so on)

Locating the UART
The UART pins are located next to the Ethernet jack. They are marked as TX, RX and GND on the PCB. Just attach some leads according to our UART Howto.

= Pictures =

= Also known as =

= See also =


 * Xunlong Orange Pi site
 * Official Github Repository.
 * Official Orange Pi Form.
 * H3_Manual_build_howto

Manufacturer images
At the moment there is no dedicated OS image available for the Orange Pi One. Choosing those made for Orange Pi PC works somehow but due to different voltage regulators on both boards cpufreq/dvfs stuff isn't working correctly and needs software fixes.

= References =