https://linux-sunxi.org/api.php?action=feedcontributions&user=Mishaor&feedformat=atomlinux-sunxi.org - User contributions [en]2024-03-29T05:15:32ZUser contributionsMediaWiki 1.35.8https://linux-sunxi.org/index.php?title=Xunlong_Orange_Pi_PC&diff=20435Xunlong Orange Pi PC2017-09-24T18:40:13Z<p>Mishaor: /* Fixed Photo */</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:OPi_PC_Rev_1.3_small.jpg|250px]]<br />
| manufacturer = [http://www.orangepi.org/ OrangePi]<br />
| dimensions = 85''mm'' x 55''mm''<br />
| release_date = August 2015<br />
| website = [http://www.orangepi.org/orangepipc/ Orange Pi PC Product Page]<br />
| soc = [[H3]] @ 1.3 GHz<br />
| dram = 1GiB DDR3L (v1.2&nbsp;[[DDR3#K4B4G1646Q-HYK0|K4B4G1646Q-HYK0]], v1.3&nbsp;[[DDR3#K4B4G1646E-BYK0|K4B4G1646E-BYK0]])<br />
| power = DC 5V @ 2A (4.0mm/1.7mm barrel plug - centre positive)<br>or via GPIO header pins<br />
| video = HDMI (HDCP, CEC), CVBS<br />
| audio = 3.5 mm Jack, HDMI, Microphone<br />
| network = 10/100 Ethernet<br />
| storage = µSD, 8GB eMMC on PC Plus<br />
| usb = 3 USB 2.0 Host, 1 USB 2.0 OTG<br />
| other = [[CIR]]<br />
| headers = 3 pin UART, CSI, 40 pin GPIO <br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
Orange Pi PC is [[H3]] based development board produced by [[Xunlong]]. <br />
<br />
= Identification =<br />
The ''PC'' PCB has the following silkscreened on it:<br />
<pre>Orange Pi PC V1.2</pre><br />
<br />
Since 2016 (maybe earlier?), an updated version with a bit thinner memory chips (see the spec sheets for differences between the memory types) is available with the following silkscreened on it:<br />
<pre>Orange Pi PC V1.3</pre><br />
<br />
The ''PC Plus'' PCB shows the following:<br />
<pre>Orange Pi PC Plus V1.1</pre><br />
<br />
{{H3_Support_status|board=Orange Pi PC|uboot_defconfig='''orangepi_pc''' (supported since v2016.01)|kernel_dtb='''sun8i-h3-orangepi-pc.dtb'''|legacy_instructions=The .fex file is available from [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/h3/xunlong_orange_pi_pc.fex xunlong_orange_pi_pc.fex].}}<br />
<br />
= Expansion Port =<br />
<br />
The Orange Pi PC has a Raspberry Pi model B+ compatible 40-pin, 0.1" connector with several low-speed interfaces.<br />
<br />
{| class="wikitable" style="width:700px;"<br />
! colspan=4 | 2x20 Header<br />
|-<br />
| 1 || ''3.3V''<br />
| 2 || ''5V'' <br />
|-<br />
| 3 || PA12 <small>(TWI0_SDA/DI_RX/PA_EINT12)</small><br />
| 4 || ''5V'' <br />
|-<br />
| 5 || PA11 <small>(TWI0_SCK/DI_TX/PA_EINT11)</small><br />
| 6 || ''GND''<br />
|-<br />
| 7 || PA6 <small>(SIM_PWREN/PWM1/PA_EINT6)</small><br />
| 8 || PA13 <small>(SPI1_CS/UART3_TX/PA_EINT13)</small><br />
|-<br />
| 9 || ''GND''<br />
| 10 || PA14 <small>(SPI1_CLK/UART3_RX/PA_EINT14)</small><br />
|-<br />
| 11 || PA1 <small>(UART2_RX/JTAG_CK/PA_EINT1)</small><br />
| 12 || PD14<br />
|-<br />
| 13 || PA0 <small>(UART2_TX/JTAG_MS/PA_EINT0)</small><br />
| 14 || ''GND''<br />
|-<br />
| 15 || PA3 <small>(UART2_CTS/JTAG_DI/PA_EINT3)</small><br />
| 16 || PC4<br />
|-<br />
| 17 || ''3.3V''<br />
| 18 || PC7<br />
|-<br />
| 19 || PC0 <small>(SPI0_MOSI)</small><br />
| 20 || ''GND''<br />
|-<br />
| 21 || PC1 <small>(SPI0_MISO)</small><br />
| 22 || PA2 <small>(UART2_RTS/JTAG_DO/PA_EINT2)</small><br />
|-<br />
| 23 || PC2 <small>(SPI0_CLK)</small><br />
| 24 || PC3 <small>(SPI0_CS)</small><br />
|-<br />
| 25 || ''GND''<br />
| 26 || PA21 <small>(PCM0_DIN/SIM_VPPPP/PA_EINT21)</small><br />
|-<br />
| 27 || PA19 <small>(PCM0_CLK/TWI1_SDA/PA_EINT19)</small><br />
| 28 || PA18 <small>(PCM0_SYNC/TWI1_SCK/PA_EINT18)</small><br />
|-<br />
| 29 || PA7 <small>(SIM_CLK/PA_EINT7)</small><br />
| 30 || ''GND''<br />
|-<br />
| 31 || PA8 <small>(SIM_DATA/PA_EINT8)</small><br />
| 32 || PG8 <small>(UART1_RTS/PG_EINT8)</small><br />
|-<br />
| 33 || PA9 <small>(SIM_RST/PA_EINT9)</small><br />
| 34 || ''GND''<br />
|-<br />
| 35 || PA10 <small>(SIM_DET/PA_EINT10)</small><br />
| 36 || PG9 <small>(UART1_CTS/PG_EINT9)</small><br />
|-<br />
| 37 || PA20 <small>(PCM0_DOUT/SIM_VPPEN/PA_EINT20)</small><br />
| 38 || PG6 <small>(UART1_TX/PG_EINT6)</small><br />
|-<br />
| 39 || ''GND''<br />
| 40 || PG7 <small>(UART1_RX/PG_EINT7)</small><br />
|}<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
* Heat issues when using common OS images for the OPi PC. Without a heatsink the Orange Pi PC overheats easily and will drop cores to thwart further temperature increase and unfortunately the heatsink provided by the manufacturer does little to help. The [http://www.cnx-software.com/2015/08/26/orange-pi-pc-allwinner-h3-board-is-now-available-for-15/ low cost $15 variant] does not have any heatsink included at all. This is the result of 'factory settings' overclocking/overvolting the H3 way too much. With adjusted dvfs entries and an upper limit of 1.2 GHz SoC temperature stays below 75°C without heatsink when running cpuburn-a7 on all 4 cores. Using a quality heatsink, some airflow and reasonable cpufreq settings the H3 [http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=743&page=3 remains below 60°C even under full load at an ambient temperature of 22°C].<br />
<br />
* It is also possible to power the device via GPIO pin header: connect +5V to either pin 2 or 4 (both are connected to DCIN test point) and GND to pin 6.<br />
<br />
== FEL mode ==<br />
<br />
There is no dedicated FEL button. The Orange Pi ''PC'' will fail over to FEL mode if it doesn't detect a card present in the µSD slot. On the ''PC Plus'' it gets somewhat tricky to use FEL mode in case the eMMC is already populated with an OS (or at least a working boot loader). In this case it helps to grab the ''fel-sdboot.sunxi'' image from [https://github.com/linux-sunxi/sunxi-tools/tree/master/bin/ sunxi-tools github repo] and write it to an SD card of any size as follows:<br />
<pre>sudo dd if=fel-sdboot.sunxi of=/dev/sdX bs=1024 seek=8</pre><br />
Then boot afterwards with this SD card inserted and H3 will be in FEL mode afterwards.<br />
<br />
'''Not tested yet'''<br />
[[File:H3 UBOOT FAKEBUTTON.jpg|Fake FEL Button|120px|thumbnail|left]]<br />
You can use "FAKE FEL BUTTON". See photo "H3_FAKE_BUTTON". According to the board's schematic UBOOT pin is connected to R124 (bottom leed, because top leed is connected to R38 which is connected to VCC). You can connect it to GND. The right R108 leed is the nearest GND pin (I've checked it). It is very close so it is not too hard. I draw it as yellow line. Enjoy!<br />
<br />
== LEDs ==<br />
<br />
[[File:Xunlong Orange Pi PC LEDs.jpg|thumb|150px|Two LEDs]]<br />
<br />
The board has two LEDs:<br />
* A red LED, connected to the PA15 pin.<br />
* A green LED, connected to the PL10 pin.<br />
<br />
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 [https://groups.google.com/forum/#!msg/linux-sunxi/20Ir4It3GsA/2KDRe_8IAQAJ patch] or [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/h3/xunlong_orange_pi_pc.fex fex with applied fix]) both LEDs can be used the usual way (using different triggers and so on)<br />
<br />
== CPU clock speed limit ==<br />
<br />
The Allwinner H3 manual does not provide the CPU clock speed information. But the following is a common comment in the FEX files from various H3 SDK variants:<br />
<pre><br />
; dvfs voltage-frequency table configuration<br />
;<br />
; pmuic_type:0:none, 1:gpio, 2:i2c<br />
; pmu_gpio0: gpio config.<br />
; pmu_levelx: 0~9999: voltage(mV), 10000~90000:gpio0 state. voltage form high to low.<br />
;<br />
; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk<br />
; 1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator<br />
; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz<br />
; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz<br />
;<br />
; LV_count: count of LV_freq/LV_volt, must be < 16<br />
;<br />
; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz, 1536Mhz]<br />
; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz, 1296Mhz]<br />
; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz, 1200Mhz]<br />
; LV4: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz]<br />
; LV5: core vdd is 1.10v if cpu frequency is (648Mhz, 816Mhz]<br />
; LV6: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz]<br />
; LV7: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz]<br />
; LV8: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz]<br />
</pre><br />
It means that this comment likely originates from Allwinner, rather than something added by Xunlong or any other H3 device manufacturer.<br />
<br />
The Orange Pi PC board uses the [[SY8106A]] voltage regulator for providing the CPU core voltage (VDD_CPUX). The default CPU voltage is 1.2V 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 1008MHz. The H3 datasheet specifies 1.5V as the absolute maximum for the VDD_CPUX voltage and 1.4V as the recommended maximum.<br />
<br />
== DRAM clock speed limit ==<br />
<br />
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 (it checks the Orange Pi PC DRAM setup in the current mainline U-Boot v2016.01-rc2 + [https://www.mail-archive.com/linux-sunxi@googlegroups.com/msg14969.html a bugfix]).<br />
<br />
{| class="wikitable"<br />
! Hardware<br />
! Diagnostic software<br />
! lima-memtester passes (survives until the red LED)<br />
! lima-memtester fails<br />
! Notes<br />
|-<br />
| [[User:Ssvb]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''No heatsink'''. 696 MHz fails after running for just a few seconds, so not much confidence in 672 MHz either<br />
|-<br />
| [[User:Tkaiser]]'s 1st Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Small heatsink'''. 696 MHz fails after running for 2-3 minutes<br />
|-<br />
| Orange Pi PC v1.2 ([[User:Plaes|plaes]])|| fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || '''672 MHz''' || '''No heatsink'''. Multiple reproducible failures.<br> SoC markings: <tt>F7004BA 68D3</tt>, Memory: Samsung <tt>K4B4G1646Q-HYK0</tt><br />
|-<br />
| [[User:Tkaiser]]'s 2nd Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''No heatsink'''. 696 MHz fails after running for ~10 minutes<br />
|-<br />
| [[User:Peko]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 720 MHz || 744 MHz || '''Heatsink'''. 744 MHz fails after running for ~1-2 minutes<br />
|-<br />
| [[User:Patapovich]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''No heatsink'''. 672 MHz was running for ~16 hours without problems<br />
|-<br />
| [[User:Runnerway]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Small heatsink'''.<br />
|-<br />
| [[User:Camh]]'s Orange Pi PC 1 || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 744 MHz || 768 MHz || '''Heatsink (35mmx25mm) covering SoC and RAM'''. 768MHz failed < 1 min.<br />
|-<br />
| [[User:Camh]]'s Orange Pi PC 2 || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 696 MHz || 720 MHz || '''Heatsink (35mmx25mm) covering SoC and RAM'''. 720MHz failed after 5 mins.<br />
|-<br />
| [[User:Camh]]'s Orange Pi PC 3 || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 696 MHz || 720 MHz || '''Heatsink (35mmx25mm) covering SoC and RAM'''. 720MHz failed after ~30 mins.<br />
|-<br />
| [[User:Camh]]'s Orange Pi PC 4 || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Heatsink (35mmx25mm) covering SoC and RAM'''. 696MHz failed in < 30s.<br />
|-<br />
| [http://www.orangepi.org/orangepibbsen/forum.php?mod=redirect&goto=findpost&ptid=847&pid=8002 lymon's Orange Pi PC] || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || fails/hangs after approx. 10 minutes<br />
|-<br />
| [[User:Michal]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 696 MHz || 720 MHz || '''No heatsink'''. At 720 MHz test failed in about 5 minutes.<br />
|-<br />
| [[User:Jvdwaa]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 720 MHz || 744 MHz || '''No heatsink'''.<br />
|-<br />
| [[User:dusthillguy]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Only one 14mm*14mm*5mm heatsink, fitted on the H3 chip.''' Stable at 672 for over 12 hours without a fan, the green led was still flashing when I powered the system off. Fails within 30 to 60 minutes at 696 without a fan. At 696 with a fan, it survives for a few hours, but even with the fan it does eventually fail (the LEDs go off).<br />
<br />
By the way, the fan I used is 70mm, taken from an old intel heatsink, and powered by USB, so it rotates at a low speed. Just in case this is useful to know.<br />
|-<br />
| [[User:kc|kc]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || 672 MHz || '''No heatsink'''. stable for ~35minutes of testing at 648 (to the red led), failing within 1-2 minutes at 672.<br />
<br />
board label: 112169, SOC markings: F7008BA 68E3, ram markings: K4B4G1646Q-HYKO / EKG384K8C<br />
|-<br />
| [[User:fjen]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 720 MHz || 744 MHz || '''14mm*14mm*8mm Heatsink on H3'''. 744 MHz fails after 1 minute<br />
|-<br />
| [[User:dvl36]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 720 MHz || 744 MHz || '''Heatsink (35x35x25mm) covering SoC and RAM'''. 744 MHz fails after ~2 minutes.<br />
|-<br />
| [[User:cosm]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || 672 MHz || '''22mm*22mm*10mm heatsink on the SoC only'''. 672 MHz worked until the red LED lit, but failed after about two hours. 648 MHz was still working after 10 hours.<br />
|-<br />
| [[User:hp197]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 696 MHz || 720 MHz || '''Heatsink (13x14x6.5mm) covering only SoC ([http://www.ebay.com/itm/121799610035 Ebay Link])'''. 720Mhz Failed quick after start (at the bit flip test, 1st pass).<br />
|-<br />
| [[User:emsi88]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''With big heatsink '''. 696 Mhz Failed afrer few minutes, 672 MHz worked stable for over 9 hours.<br />
|-<br />
| [[User:lampra]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || 672 MHz || '''No heatsink'''. 672 Mhz Failed afrer few minutes.<br />
|-<br />
| [[User:Tkaiser]]'s Orange Pi PC ''Plus'' || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Cheap heatsink'''. 696 MHz fails after running for 90 seconds<br />
|-<br />
| [[User:Euros]]'s Orange Pi PC ''Plus'' || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || 672 MHz || '''No heatsink'''. 672 MHz failed after 50 minutes, 648 MHz was still working after 20 hours.<br />
|}<br />
<br />
<span style="color:red">'''We need still more test results in the table above in order to have more accurate statistics and finally pick a safe default DRAM clock speed for U-Boot. Preferably there should be at least 10 entries in the table (more is always better). And there are no "good" or "bad" test results. Even if your result looks very similar to the already reported results from the other people, please still add yours to the table! Because if people don't feel like reporting their "boring" results, then "interesting" outliers will unfortunately skew the statistics. Thanks!'''</span><br />
<br />
== DRAM clock speed limit (automated statistical analysis) ==<br />
<br />
Below is an intermediate analysis of the currently reported results, using the [https://github.com/ssvb/lima-memtester/blob/master/lima-memtester-genchart lima-memtester-genchart] script (run the script using this page URL as the command line argument). Assuming that the [https://en.wikipedia.org/wiki/Normal_distribution Gaussian distribution] is a good approximation, try to predict what percentage of boards is expected to pass the lima-memetser test at different DRAM clock frequencies. The [[lima-memtester#Results_analysis|lima-memtester]] page provides more information.<br />
<br />
Updating the analysis report:<pre><br />
wget https://raw.githubusercontent.com/ssvb/lima-memtester/master/lima-memtester-genchart<br />
ruby lima-memtester-genchart https://linux-sunxi.org/Xunlong_Orange_Pi_PC<br />
# copy/paste the script output into the linux-sunxi wiki<br />
</pre><br />
<br />
{| class="wikitable"<br />
! rowspan=2 | DRAM clock speed<br />
! colspan=2 | Percentage of boards failing the lima-memtester test<br />
! rowspan=2 | Theoretical pessimistic upper bound of the failure percentage using Chebyshev's inequality for lower semivariance <ref name="chebyshev"><br />
If nothing is known about the distribution of samples, then at least<br />
[https://en.wikipedia.org/wiki/Chebyshev's_inequality Chebyshev's inequality]<br />
can be used to get a rough idea about the probabilities of encountering reliability<br />
problems at different DRAM clock speeds. But this method is <u>very conservative</u><br />
and substantially overestimates probabilities (being too generic has its price).<br />
</ref><br />
! rowspan=2 | Histogram<br />
|-<br />
! Experimental results<br />
! Theoretical prediction (assuming Gaussian distribution) <ref name="gaussian"><br />
We can assume that the [https://en.wikipedia.org/wiki/Normal_distribution Gaussian distribution]<br />
is a good approximation for our experimental data, calculate theoretical probabilities and do an<br />
[http://www.biostathandbook.com/exactgof.html exact test of goodness-of-fit]<br />
to see if the experimental data does not contradict with the theory.<br />
There is a nice [https://cran.r-project.org/web/packages/XNomial/vignettes/XNomial.html XNomial]<br />
library for R, which can do the job:<pre><br />
P value (LLR) = 0.5844<br />
P value (Prob) = 0.6122<br />
P value (Chisq) = 0.6687<br />
</pre><br />
If the [https://en.wikipedia.org/wiki/P-value p-values] listed above happen to be too low<br />
(less than 0.05) and reject our [https://en.wikipedia.org/wiki/Null_hypothesis null hypothesis]<br />
about having the Gaussian distribution, then Chebyshev's inequality estimates still can be used.<br />
</ref><br />
|- <br />
| 528 MHz || 0.00 % (0/24) || 0.00 % || 1.07 % || <br />
|- <br />
| 552 MHz || 0.00 % (0/24) || 0.00 % || 1.46 % || <br />
|- <br />
| 576 MHz || 0.00 % (0/24) || 0.00 % || 2.12 % || <br />
|- <br />
| 600 MHz || 0.00 % (0/24) || 0.03 % || 3.34 % || <br />
|- style="color: orange;"<br />
| 624 MHz || 0.00 % (0/24) || 0.52 % || 6.02 % || <br />
|- style="color: orange;"<br />
| 648 MHz || 0.00 % (0/24) || 4.62 % || 13.93 % || <br />
|- style="color: red;"<br />
| 672 MHz || 20.83 % (5/24) || 21.04 % || 60.91 % || *****<br />
|- style="color: red;"<br />
| 696 MHz || 62.50 % (15/24) || 52.92 % || 100.00 % || **********<br />
|- style="color: red;"<br />
| 720 MHz || 79.17 % (19/24) || 82.93 % || 100.00 % || ****<br />
|- style="color: red;"<br />
| 744 MHz || 95.83 % (23/24) || 96.63 % || 100.00 % || ****<br />
|- style="color: red;"<br />
| 768 MHz || 100.00 % (24/24) || 99.66 % || 100.00 % || *<br />
|}<br />
<references/><br />
<br />
== OpenRISC core ==<br />
<br />
Also named as [[AR100]], CPUS and "arisc" in various Allwinner materials, which may cause a bit of confusion. According to the Orange Pi PC schematics, VDD_CPUS is connected to VDD_RTC. It means that the voltage powering the OpenRISC core is programmable via the hardware register VDD_RTC_REG (at 0x1F00190) and can be configured between 0.7V and 1.4V. The H3 datasheet says that 1.4V is the absolute maximum for VDD_CPUS and 1.1V-1.3V is the recommended range. The reset default for VDD_RTC voltage is 1.1V.<br />
<br />
Below is a quick evaluation of the potential clock speed limit of the OpenRISC core on just a single board ([[User:Ssvb|ssvb]]'s) by running a naive recursive fibonacci function:<br />
<br />
{| class="wikitable"<br />
! rowspan=2 | VDD_RTC voltage<br />
! colspan=2 | OpenRISC core deadlocks at<br />
! colspan=2 | OpenRISC core does not obviously fail at<br />
! rowspan=2 | OpenRISC core is reliable at<br />
|-<br />
! Without I-Cache !! With I-Cache !! Without I-Cache !! With I-Cache<br />
|-<br />
| 1.1V || 552 MHz || 456 MHz || 528 MHz || 432 MHz || ?<br />
|-<br />
| 1.2V || 624 MHz || 504 MHz || 600 MHz || 480 MHz || ?<br />
|-<br />
| 1.3V || 624 MHz || 504 MHz || 600 MHz || 480 MHz || ?<br />
|-<br />
|}<br />
<br />
Without I-Cache, fetching each instruction from SRAM takes 3 cycles instead of just 1.<br />
<br />
Please note that the intended use of the OpenRISC core in Allwinner devices is keeping a watch while the main Cortex-A7 CPU and the rest of the SoC peripherals are powered off in deep power save modes. In this usage scenario it is likely clocked at just the minimum possible clock frequency 32 KHz.<br />
<br />
== USB ==<br />
<br />
It should be noted that unlike some of the more expensive Orange Pi models the 'PC' does not use an internal USB hub therefore the 4 available USB ports don't have to share bandwidth. First tests with kernel 4.4.0-rc4, a fast SSD and an enclosure capable of [[USB/UAS|USB Attached SCSI]] show excellent sequential performance with mainline kernel: 39 MB/s write and 41.5 MB/s read (tests done with iozone using 4 GB test size and averaging the values of 4K/1M record size)<br />
<br />
== Camera module ==<br />
<br />
Xunlong sells also a cheap 2MP camera (an attempt to fix the driver's limited resolutions can be found [http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=443&fromuid=29411 here]). Unlike Orange Pi Plus/2 that can directly connect to the camera module for the PC an 'expansion board' is needed (see gallery below). If you order from Xunlong simply say that you need the camera for Orange Pi PC and they ship camera together with the small board.<br />
<br />
== 1-Wire support ==<br />
<br />
After applying a [https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sun8i-default/02-0013-w1_h3.patch] to the lichee kernel sources 1-wire can be used with H3 based Orange Pi's. After loading the approriate modules (w1-sunxi, w1-gpio and w1-therm) connected 1-wire slave devices should appear below ''/sys/bus/w1/devices/''. To let 1-wire work the GPIO pin to be used has to be defined in fex/script.bin. All OS images that applied the 1-wire patch (all from loboris after applying his latest fixes, Armbian or the community's OpenELEC build) use "gpio = 20" in the fex file. Attention: This is a logical mapping that correlates with physical GPIO pin 37 (see the gallery image below). Please keep this in mind when following 1-wire tutorials for Raspberry Pi where GPIO pin 7 is normally used. On H3 devices the pin to connect the data line to is on the other end of the GPIO header.<br />
<br />
== CVBS pinout ==<br />
According to schematics v1.2 plug config is: (tip) Right-Left-Video-Gnd (cable).<br />
<br />
== Locating the UART ==<br />
[[File:Orange Pi PC UART.PNG|thumbnail]]<br />
The UART pins are located between HDMI and power jack of the board. On some boards they are marked as ''TX'', ''RX'' and ''GND'' on the PCB (simplified layout: ..DC-IN.. [GND][RX][TX] ..HDMI..). Just attach some leads according to our [[UART|UART Howto]].<br />
<br />
= Pictures =<br />
<br />
== Orange Pi PC ==<br />
<gallery><br />
File:Xunlong_Orange_Pi_PC_front.PNG<br />
File:Xunlong_Orange_Pi_PC_back.PNG<br />
File:Xunlong Orange Pi_PC_bottom.PNG<br />
File:Xunlong Orange Pi_PC_top.PNG<br />
File:Xunlong_Orange_Pi_PC_left.PNG<br />
File:Xunlong_Orange_Pi_PC_right.PNG<br />
File:Orange_Pi_PC_v1.3_front.jpg<br />
File:Orange_Pi_PC_v1.3_back.jpg<br />
File:Orange_Pi_PC_v1.3_connectors.jpg<br />
File:Orange_Pi_PC_with_Cameraboard_and_Camera.jpg<br />
File:Xunlong_OrangePi_expansion_header_pinout.png<br />
H3 UBOOT FAKEBUTTON.jpg<br />
</gallery><br />
<br />
== Orange Pi PC Plus ==<br />
<gallery><br />
File:Orange_Pi_PC_Plus_top.jpg<br />
File:Orange_Pi_PC_Plus_bottom.jpg<br />
</gallery><br />
<br />
= Variants =<br />
<br />
* The '''Orange Pi PC Plus''' adds 8GB eMMC and Realtek RTL8189FTV SDIO-based WiFi directly on the board (as opposed to a soldered-on module). The physical dimensions and position of connectors are exactly the same as the '''Orange Pi PC'''. The same type of DRAM is used but tracing is different since one DRAM module moved to the bottom side of the PCB. Since a FEL button is missing on this board it's not that easy to verify DRAM reliability the usual way (through FEL boot) so we should stay with the failsafe value of 624 MHz DRAM clock. Regarding software support we can base on fex file and device tree for the ''PC'' and simply add the necessary WiFi chip mappings.<br />
<br />
= Also known as =<br />
<br />
= See also =<br />
<br />
*[http://www.orangepi.org Xunlong Orange Pi site]<br />
*[https://github.com/orangepi-xunlong Official Github Repository].<br />
*[http://www.orangepi.org/orangepibbsen Official Orange Pi Forums].<br />
*[[H3_Manual_build_howto]]<br />
*[https://drive.google.com/open?id=0BwQT0FP7IkTbRFJQamNwWTAzWms Orange Pi PC Schematics 1.2]<br />
<br />
== Manufacturer images ==<br />
A various amount of [http://www.orangepi.org/downloaded/download.html prebuilt images] is provided via OrangePi's Website most of them not containing latest fixes.<br />
Many people are also running images generated by forum user [http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=342 loboris] ([http://filez.zoobab.com/allwinner/orangepi/mega/ mirror available). It should be noted that when using loboris' images it's always useful to execute his [http://filez.zoobab.com/allwinner/orangepi/mega/update_kernel.sh update_kernel.sh] to get latest kernel fixes and settings for the board in question (various script.bin variants for different Orange Pis and display settings). To adjust script.bin settings (overclocked/overvolted) to linux-sunxi defaults there's informations and a script available in [http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=785 this thread].<br />
<br />
= References =<br />
<references /><br />
<br />
[[Category:Devices]]<br />
[[Category:H3 Boards]]<br />
[[Category:Xunlong]]<br />
[[Category:Devices with Ethernet port]]<br />
[[Category:Devices with HDMI port]]<br />
<br />
[[Category:Mainline_U-Boot]]<br />
[[Category:Mainline_Kernel]]<br />
[[Category:NDH_TODO]]</div>Mishaorhttps://linux-sunxi.org/index.php?title=Xunlong_Orange_Pi_PC&diff=20434Xunlong Orange Pi PC2017-09-24T18:39:45Z<p>Mishaor: /* Picture added for more conviniece */</p>
<hr />
<div>{{Infobox Board<br />
| image = [[File:OPi_PC_Rev_1.3_small.jpg|250px]]<br />
| manufacturer = [http://www.orangepi.org/ OrangePi]<br />
| dimensions = 85''mm'' x 55''mm''<br />
| release_date = August 2015<br />
| website = [http://www.orangepi.org/orangepipc/ Orange Pi PC Product Page]<br />
| soc = [[H3]] @ 1.3 GHz<br />
| dram = 1GiB DDR3L (v1.2&nbsp;[[DDR3#K4B4G1646Q-HYK0|K4B4G1646Q-HYK0]], v1.3&nbsp;[[DDR3#K4B4G1646E-BYK0|K4B4G1646E-BYK0]])<br />
| power = DC 5V @ 2A (4.0mm/1.7mm barrel plug - centre positive)<br>or via GPIO header pins<br />
| video = HDMI (HDCP, CEC), CVBS<br />
| audio = 3.5 mm Jack, HDMI, Microphone<br />
| network = 10/100 Ethernet<br />
| storage = µSD, 8GB eMMC on PC Plus<br />
| usb = 3 USB 2.0 Host, 1 USB 2.0 OTG<br />
| other = [[CIR]]<br />
| headers = 3 pin UART, CSI, 40 pin GPIO <br />
}}<br />
<br />
{{Remove_only_when_finished|This page needs to be properly filled according to the [[New_Device_howto |New Device Howto]] and the [[New_Device_page|New Device Page guide]].}}<br />
<br />
Orange Pi PC is [[H3]] based development board produced by [[Xunlong]]. <br />
<br />
= Identification =<br />
The ''PC'' PCB has the following silkscreened on it:<br />
<pre>Orange Pi PC V1.2</pre><br />
<br />
Since 2016 (maybe earlier?), an updated version with a bit thinner memory chips (see the spec sheets for differences between the memory types) is available with the following silkscreened on it:<br />
<pre>Orange Pi PC V1.3</pre><br />
<br />
The ''PC Plus'' PCB shows the following:<br />
<pre>Orange Pi PC Plus V1.1</pre><br />
<br />
{{H3_Support_status|board=Orange Pi PC|uboot_defconfig='''orangepi_pc''' (supported since v2016.01)|kernel_dtb='''sun8i-h3-orangepi-pc.dtb'''|legacy_instructions=The .fex file is available from [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/h3/xunlong_orange_pi_pc.fex xunlong_orange_pi_pc.fex].}}<br />
<br />
= Expansion Port =<br />
<br />
The Orange Pi PC has a Raspberry Pi model B+ compatible 40-pin, 0.1" connector with several low-speed interfaces.<br />
<br />
{| class="wikitable" style="width:700px;"<br />
! colspan=4 | 2x20 Header<br />
|-<br />
| 1 || ''3.3V''<br />
| 2 || ''5V'' <br />
|-<br />
| 3 || PA12 <small>(TWI0_SDA/DI_RX/PA_EINT12)</small><br />
| 4 || ''5V'' <br />
|-<br />
| 5 || PA11 <small>(TWI0_SCK/DI_TX/PA_EINT11)</small><br />
| 6 || ''GND''<br />
|-<br />
| 7 || PA6 <small>(SIM_PWREN/PWM1/PA_EINT6)</small><br />
| 8 || PA13 <small>(SPI1_CS/UART3_TX/PA_EINT13)</small><br />
|-<br />
| 9 || ''GND''<br />
| 10 || PA14 <small>(SPI1_CLK/UART3_RX/PA_EINT14)</small><br />
|-<br />
| 11 || PA1 <small>(UART2_RX/JTAG_CK/PA_EINT1)</small><br />
| 12 || PD14<br />
|-<br />
| 13 || PA0 <small>(UART2_TX/JTAG_MS/PA_EINT0)</small><br />
| 14 || ''GND''<br />
|-<br />
| 15 || PA3 <small>(UART2_CTS/JTAG_DI/PA_EINT3)</small><br />
| 16 || PC4<br />
|-<br />
| 17 || ''3.3V''<br />
| 18 || PC7<br />
|-<br />
| 19 || PC0 <small>(SPI0_MOSI)</small><br />
| 20 || ''GND''<br />
|-<br />
| 21 || PC1 <small>(SPI0_MISO)</small><br />
| 22 || PA2 <small>(UART2_RTS/JTAG_DO/PA_EINT2)</small><br />
|-<br />
| 23 || PC2 <small>(SPI0_CLK)</small><br />
| 24 || PC3 <small>(SPI0_CS)</small><br />
|-<br />
| 25 || ''GND''<br />
| 26 || PA21 <small>(PCM0_DIN/SIM_VPPPP/PA_EINT21)</small><br />
|-<br />
| 27 || PA19 <small>(PCM0_CLK/TWI1_SDA/PA_EINT19)</small><br />
| 28 || PA18 <small>(PCM0_SYNC/TWI1_SCK/PA_EINT18)</small><br />
|-<br />
| 29 || PA7 <small>(SIM_CLK/PA_EINT7)</small><br />
| 30 || ''GND''<br />
|-<br />
| 31 || PA8 <small>(SIM_DATA/PA_EINT8)</small><br />
| 32 || PG8 <small>(UART1_RTS/PG_EINT8)</small><br />
|-<br />
| 33 || PA9 <small>(SIM_RST/PA_EINT9)</small><br />
| 34 || ''GND''<br />
|-<br />
| 35 || PA10 <small>(SIM_DET/PA_EINT10)</small><br />
| 36 || PG9 <small>(UART1_CTS/PG_EINT9)</small><br />
|-<br />
| 37 || PA20 <small>(PCM0_DOUT/SIM_VPPEN/PA_EINT20)</small><br />
| 38 || PG6 <small>(UART1_TX/PG_EINT6)</small><br />
|-<br />
| 39 || ''GND''<br />
| 40 || PG7 <small>(UART1_RX/PG_EINT7)</small><br />
|}<br />
<br />
= Tips, Tricks, Caveats =<br />
<br />
* Heat issues when using common OS images for the OPi PC. Without a heatsink the Orange Pi PC overheats easily and will drop cores to thwart further temperature increase and unfortunately the heatsink provided by the manufacturer does little to help. The [http://www.cnx-software.com/2015/08/26/orange-pi-pc-allwinner-h3-board-is-now-available-for-15/ low cost $15 variant] does not have any heatsink included at all. This is the result of 'factory settings' overclocking/overvolting the H3 way too much. With adjusted dvfs entries and an upper limit of 1.2 GHz SoC temperature stays below 75°C without heatsink when running cpuburn-a7 on all 4 cores. Using a quality heatsink, some airflow and reasonable cpufreq settings the H3 [http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=743&page=3 remains below 60°C even under full load at an ambient temperature of 22°C].<br />
<br />
* It is also possible to power the device via GPIO pin header: connect +5V to either pin 2 or 4 (both are connected to DCIN test point) and GND to pin 6.<br />
<br />
== FEL mode ==<br />
<br />
There is no dedicated FEL button. The Orange Pi ''PC'' will fail over to FEL mode if it doesn't detect a card present in the µSD slot. On the ''PC Plus'' it gets somewhat tricky to use FEL mode in case the eMMC is already populated with an OS (or at least a working boot loader). In this case it helps to grab the ''fel-sdboot.sunxi'' image from [https://github.com/linux-sunxi/sunxi-tools/tree/master/bin/ sunxi-tools github repo] and write it to an SD card of any size as follows:<br />
<pre>sudo dd if=fel-sdboot.sunxi of=/dev/sdX bs=1024 seek=8</pre><br />
Then boot afterwards with this SD card inserted and H3 will be in FEL mode afterwards.<br />
<br />
'''Not tested yet'''<br />
[[File:H3 UBOOT FAKEBUTTON.jpg|Fake FEL Button|240px|thumbnail|left]]<br />
You can use "FAKE FEL BUTTON". See photo "H3_FAKE_BUTTON". According to the board's schematic UBOOT pin is connected to R124 (bottom leed, because top leed is connected to R38 which is connected to VCC). You can connect it to GND. The right R108 leed is the nearest GND pin (I've checked it). It is very close so it is not too hard. I draw it as yellow line. Enjoy!<br />
<br />
== LEDs ==<br />
<br />
[[File:Xunlong Orange Pi PC LEDs.jpg|thumb|150px|Two LEDs]]<br />
<br />
The board has two LEDs:<br />
* A red LED, connected to the PA15 pin.<br />
* A green LED, connected to the PL10 pin.<br />
<br />
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 [https://groups.google.com/forum/#!msg/linux-sunxi/20Ir4It3GsA/2KDRe_8IAQAJ patch] or [https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/h3/xunlong_orange_pi_pc.fex fex with applied fix]) both LEDs can be used the usual way (using different triggers and so on)<br />
<br />
== CPU clock speed limit ==<br />
<br />
The Allwinner H3 manual does not provide the CPU clock speed information. But the following is a common comment in the FEX files from various H3 SDK variants:<br />
<pre><br />
; dvfs voltage-frequency table configuration<br />
;<br />
; pmuic_type:0:none, 1:gpio, 2:i2c<br />
; pmu_gpio0: gpio config.<br />
; pmu_levelx: 0~9999: voltage(mV), 10000~90000:gpio0 state. voltage form high to low.<br />
;<br />
; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk<br />
; 1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator<br />
; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz<br />
; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz<br />
;<br />
; LV_count: count of LV_freq/LV_volt, must be < 16<br />
;<br />
; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz, 1536Mhz]<br />
; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz, 1296Mhz]<br />
; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz, 1200Mhz]<br />
; LV4: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz]<br />
; LV5: core vdd is 1.10v if cpu frequency is (648Mhz, 816Mhz]<br />
; LV6: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz]<br />
; LV7: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz]<br />
; LV8: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz]<br />
</pre><br />
It means that this comment likely originates from Allwinner, rather than something added by Xunlong or any other H3 device manufacturer.<br />
<br />
The Orange Pi PC board uses the [[SY8106A]] voltage regulator for providing the CPU core voltage (VDD_CPUX). The default CPU voltage is 1.2V 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 1008MHz. The H3 datasheet specifies 1.5V as the absolute maximum for the VDD_CPUX voltage and 1.4V as the recommended maximum.<br />
<br />
== DRAM clock speed limit ==<br />
<br />
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 (it checks the Orange Pi PC DRAM setup in the current mainline U-Boot v2016.01-rc2 + [https://www.mail-archive.com/linux-sunxi@googlegroups.com/msg14969.html a bugfix]).<br />
<br />
{| class="wikitable"<br />
! Hardware<br />
! Diagnostic software<br />
! lima-memtester passes (survives until the red LED)<br />
! lima-memtester fails<br />
! Notes<br />
|-<br />
| [[User:Ssvb]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''No heatsink'''. 696 MHz fails after running for just a few seconds, so not much confidence in 672 MHz either<br />
|-<br />
| [[User:Tkaiser]]'s 1st Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Small heatsink'''. 696 MHz fails after running for 2-3 minutes<br />
|-<br />
| Orange Pi PC v1.2 ([[User:Plaes|plaes]])|| fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || '''672 MHz''' || '''No heatsink'''. Multiple reproducible failures.<br> SoC markings: <tt>F7004BA 68D3</tt>, Memory: Samsung <tt>K4B4G1646Q-HYK0</tt><br />
|-<br />
| [[User:Tkaiser]]'s 2nd Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''No heatsink'''. 696 MHz fails after running for ~10 minutes<br />
|-<br />
| [[User:Peko]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 720 MHz || 744 MHz || '''Heatsink'''. 744 MHz fails after running for ~1-2 minutes<br />
|-<br />
| [[User:Patapovich]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''No heatsink'''. 672 MHz was running for ~16 hours without problems<br />
|-<br />
| [[User:Runnerway]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Small heatsink'''.<br />
|-<br />
| [[User:Camh]]'s Orange Pi PC 1 || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 744 MHz || 768 MHz || '''Heatsink (35mmx25mm) covering SoC and RAM'''. 768MHz failed < 1 min.<br />
|-<br />
| [[User:Camh]]'s Orange Pi PC 2 || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 696 MHz || 720 MHz || '''Heatsink (35mmx25mm) covering SoC and RAM'''. 720MHz failed after 5 mins.<br />
|-<br />
| [[User:Camh]]'s Orange Pi PC 3 || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 696 MHz || 720 MHz || '''Heatsink (35mmx25mm) covering SoC and RAM'''. 720MHz failed after ~30 mins.<br />
|-<br />
| [[User:Camh]]'s Orange Pi PC 4 || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Heatsink (35mmx25mm) covering SoC and RAM'''. 696MHz failed in < 30s.<br />
|-<br />
| [http://www.orangepi.org/orangepibbsen/forum.php?mod=redirect&goto=findpost&ptid=847&pid=8002 lymon's Orange Pi PC] || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || fails/hangs after approx. 10 minutes<br />
|-<br />
| [[User:Michal]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 696 MHz || 720 MHz || '''No heatsink'''. At 720 MHz test failed in about 5 minutes.<br />
|-<br />
| [[User:Jvdwaa]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 720 MHz || 744 MHz || '''No heatsink'''.<br />
|-<br />
| [[User:dusthillguy]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Only one 14mm*14mm*5mm heatsink, fitted on the H3 chip.''' Stable at 672 for over 12 hours without a fan, the green led was still flashing when I powered the system off. Fails within 30 to 60 minutes at 696 without a fan. At 696 with a fan, it survives for a few hours, but even with the fan it does eventually fail (the LEDs go off).<br />
<br />
By the way, the fan I used is 70mm, taken from an old intel heatsink, and powered by USB, so it rotates at a low speed. Just in case this is useful to know.<br />
|-<br />
| [[User:kc|kc]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || 672 MHz || '''No heatsink'''. stable for ~35minutes of testing at 648 (to the red led), failing within 1-2 minutes at 672.<br />
<br />
board label: 112169, SOC markings: F7008BA 68E3, ram markings: K4B4G1646Q-HYKO / EKG384K8C<br />
|-<br />
| [[User:fjen]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 720 MHz || 744 MHz || '''14mm*14mm*8mm Heatsink on H3'''. 744 MHz fails after 1 minute<br />
|-<br />
| [[User:dvl36]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 720 MHz || 744 MHz || '''Heatsink (35x35x25mm) covering SoC and RAM'''. 744 MHz fails after ~2 minutes.<br />
|-<br />
| [[User:cosm]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || 672 MHz || '''22mm*22mm*10mm heatsink on the SoC only'''. 672 MHz worked until the red LED lit, but failed after about two hours. 648 MHz was still working after 10 hours.<br />
|-<br />
| [[User:hp197]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 696 MHz || 720 MHz || '''Heatsink (13x14x6.5mm) covering only SoC ([http://www.ebay.com/itm/121799610035 Ebay Link])'''. 720Mhz Failed quick after start (at the bit flip test, 1st pass).<br />
|-<br />
| [[User:emsi88]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''With big heatsink '''. 696 Mhz Failed afrer few minutes, 672 MHz worked stable for over 9 hours.<br />
|-<br />
| [[User:lampra]]'s Orange Pi PC || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || 672 MHz || '''No heatsink'''. 672 Mhz Failed afrer few minutes.<br />
|-<br />
| [[User:Tkaiser]]'s Orange Pi PC ''Plus'' || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 672 MHz || 696 MHz || '''Cheap heatsink'''. 696 MHz fails after running for 90 seconds<br />
|-<br />
| [[User:Euros]]'s Orange Pi PC ''Plus'' || fel-boot-lima-memtester-on-orange-pi-pc-v3.tar.gz || 648 MHz || 672 MHz || '''No heatsink'''. 672 MHz failed after 50 minutes, 648 MHz was still working after 20 hours.<br />
|}<br />
<br />
<span style="color:red">'''We need still more test results in the table above in order to have more accurate statistics and finally pick a safe default DRAM clock speed for U-Boot. Preferably there should be at least 10 entries in the table (more is always better). And there are no "good" or "bad" test results. Even if your result looks very similar to the already reported results from the other people, please still add yours to the table! Because if people don't feel like reporting their "boring" results, then "interesting" outliers will unfortunately skew the statistics. Thanks!'''</span><br />
<br />
== DRAM clock speed limit (automated statistical analysis) ==<br />
<br />
Below is an intermediate analysis of the currently reported results, using the [https://github.com/ssvb/lima-memtester/blob/master/lima-memtester-genchart lima-memtester-genchart] script (run the script using this page URL as the command line argument). Assuming that the [https://en.wikipedia.org/wiki/Normal_distribution Gaussian distribution] is a good approximation, try to predict what percentage of boards is expected to pass the lima-memetser test at different DRAM clock frequencies. The [[lima-memtester#Results_analysis|lima-memtester]] page provides more information.<br />
<br />
Updating the analysis report:<pre><br />
wget https://raw.githubusercontent.com/ssvb/lima-memtester/master/lima-memtester-genchart<br />
ruby lima-memtester-genchart https://linux-sunxi.org/Xunlong_Orange_Pi_PC<br />
# copy/paste the script output into the linux-sunxi wiki<br />
</pre><br />
<br />
{| class="wikitable"<br />
! rowspan=2 | DRAM clock speed<br />
! colspan=2 | Percentage of boards failing the lima-memtester test<br />
! rowspan=2 | Theoretical pessimistic upper bound of the failure percentage using Chebyshev's inequality for lower semivariance <ref name="chebyshev"><br />
If nothing is known about the distribution of samples, then at least<br />
[https://en.wikipedia.org/wiki/Chebyshev's_inequality Chebyshev's inequality]<br />
can be used to get a rough idea about the probabilities of encountering reliability<br />
problems at different DRAM clock speeds. But this method is <u>very conservative</u><br />
and substantially overestimates probabilities (being too generic has its price).<br />
</ref><br />
! rowspan=2 | Histogram<br />
|-<br />
! Experimental results<br />
! Theoretical prediction (assuming Gaussian distribution) <ref name="gaussian"><br />
We can assume that the [https://en.wikipedia.org/wiki/Normal_distribution Gaussian distribution]<br />
is a good approximation for our experimental data, calculate theoretical probabilities and do an<br />
[http://www.biostathandbook.com/exactgof.html exact test of goodness-of-fit]<br />
to see if the experimental data does not contradict with the theory.<br />
There is a nice [https://cran.r-project.org/web/packages/XNomial/vignettes/XNomial.html XNomial]<br />
library for R, which can do the job:<pre><br />
P value (LLR) = 0.5844<br />
P value (Prob) = 0.6122<br />
P value (Chisq) = 0.6687<br />
</pre><br />
If the [https://en.wikipedia.org/wiki/P-value p-values] listed above happen to be too low<br />
(less than 0.05) and reject our [https://en.wikipedia.org/wiki/Null_hypothesis null hypothesis]<br />
about having the Gaussian distribution, then Chebyshev's inequality estimates still can be used.<br />
</ref><br />
|- <br />
| 528 MHz || 0.00 % (0/24) || 0.00 % || 1.07 % || <br />
|- <br />
| 552 MHz || 0.00 % (0/24) || 0.00 % || 1.46 % || <br />
|- <br />
| 576 MHz || 0.00 % (0/24) || 0.00 % || 2.12 % || <br />
|- <br />
| 600 MHz || 0.00 % (0/24) || 0.03 % || 3.34 % || <br />
|- style="color: orange;"<br />
| 624 MHz || 0.00 % (0/24) || 0.52 % || 6.02 % || <br />
|- style="color: orange;"<br />
| 648 MHz || 0.00 % (0/24) || 4.62 % || 13.93 % || <br />
|- style="color: red;"<br />
| 672 MHz || 20.83 % (5/24) || 21.04 % || 60.91 % || *****<br />
|- style="color: red;"<br />
| 696 MHz || 62.50 % (15/24) || 52.92 % || 100.00 % || **********<br />
|- style="color: red;"<br />
| 720 MHz || 79.17 % (19/24) || 82.93 % || 100.00 % || ****<br />
|- style="color: red;"<br />
| 744 MHz || 95.83 % (23/24) || 96.63 % || 100.00 % || ****<br />
|- style="color: red;"<br />
| 768 MHz || 100.00 % (24/24) || 99.66 % || 100.00 % || *<br />
|}<br />
<references/><br />
<br />
== OpenRISC core ==<br />
<br />
Also named as [[AR100]], CPUS and "arisc" in various Allwinner materials, which may cause a bit of confusion. According to the Orange Pi PC schematics, VDD_CPUS is connected to VDD_RTC. It means that the voltage powering the OpenRISC core is programmable via the hardware register VDD_RTC_REG (at 0x1F00190) and can be configured between 0.7V and 1.4V. The H3 datasheet says that 1.4V is the absolute maximum for VDD_CPUS and 1.1V-1.3V is the recommended range. The reset default for VDD_RTC voltage is 1.1V.<br />
<br />
Below is a quick evaluation of the potential clock speed limit of the OpenRISC core on just a single board ([[User:Ssvb|ssvb]]'s) by running a naive recursive fibonacci function:<br />
<br />
{| class="wikitable"<br />
! rowspan=2 | VDD_RTC voltage<br />
! colspan=2 | OpenRISC core deadlocks at<br />
! colspan=2 | OpenRISC core does not obviously fail at<br />
! rowspan=2 | OpenRISC core is reliable at<br />
|-<br />
! Without I-Cache !! With I-Cache !! Without I-Cache !! With I-Cache<br />
|-<br />
| 1.1V || 552 MHz || 456 MHz || 528 MHz || 432 MHz || ?<br />
|-<br />
| 1.2V || 624 MHz || 504 MHz || 600 MHz || 480 MHz || ?<br />
|-<br />
| 1.3V || 624 MHz || 504 MHz || 600 MHz || 480 MHz || ?<br />
|-<br />
|}<br />
<br />
Without I-Cache, fetching each instruction from SRAM takes 3 cycles instead of just 1.<br />
<br />
Please note that the intended use of the OpenRISC core in Allwinner devices is keeping a watch while the main Cortex-A7 CPU and the rest of the SoC peripherals are powered off in deep power save modes. In this usage scenario it is likely clocked at just the minimum possible clock frequency 32 KHz.<br />
<br />
== USB ==<br />
<br />
It should be noted that unlike some of the more expensive Orange Pi models the 'PC' does not use an internal USB hub therefore the 4 available USB ports don't have to share bandwidth. First tests with kernel 4.4.0-rc4, a fast SSD and an enclosure capable of [[USB/UAS|USB Attached SCSI]] show excellent sequential performance with mainline kernel: 39 MB/s write and 41.5 MB/s read (tests done with iozone using 4 GB test size and averaging the values of 4K/1M record size)<br />
<br />
== Camera module ==<br />
<br />
Xunlong sells also a cheap 2MP camera (an attempt to fix the driver's limited resolutions can be found [http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=443&fromuid=29411 here]). Unlike Orange Pi Plus/2 that can directly connect to the camera module for the PC an 'expansion board' is needed (see gallery below). If you order from Xunlong simply say that you need the camera for Orange Pi PC and they ship camera together with the small board.<br />
<br />
== 1-Wire support ==<br />
<br />
After applying a [https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sun8i-default/02-0013-w1_h3.patch] to the lichee kernel sources 1-wire can be used with H3 based Orange Pi's. After loading the approriate modules (w1-sunxi, w1-gpio and w1-therm) connected 1-wire slave devices should appear below ''/sys/bus/w1/devices/''. To let 1-wire work the GPIO pin to be used has to be defined in fex/script.bin. All OS images that applied the 1-wire patch (all from loboris after applying his latest fixes, Armbian or the community's OpenELEC build) use "gpio = 20" in the fex file. Attention: This is a logical mapping that correlates with physical GPIO pin 37 (see the gallery image below). Please keep this in mind when following 1-wire tutorials for Raspberry Pi where GPIO pin 7 is normally used. On H3 devices the pin to connect the data line to is on the other end of the GPIO header.<br />
<br />
== CVBS pinout ==<br />
According to schematics v1.2 plug config is: (tip) Right-Left-Video-Gnd (cable).<br />
<br />
== Locating the UART ==<br />
[[File:Orange Pi PC UART.PNG|thumbnail]]<br />
The UART pins are located between HDMI and power jack of the board. On some boards they are marked as ''TX'', ''RX'' and ''GND'' on the PCB (simplified layout: ..DC-IN.. [GND][RX][TX] ..HDMI..). Just attach some leads according to our [[UART|UART Howto]].<br />
<br />
= Pictures =<br />
<br />
== Orange Pi PC ==<br />
<gallery><br />
File:Xunlong_Orange_Pi_PC_front.PNG<br />
File:Xunlong_Orange_Pi_PC_back.PNG<br />
File:Xunlong Orange Pi_PC_bottom.PNG<br />
File:Xunlong Orange Pi_PC_top.PNG<br />
File:Xunlong_Orange_Pi_PC_left.PNG<br />
File:Xunlong_Orange_Pi_PC_right.PNG<br />
File:Orange_Pi_PC_v1.3_front.jpg<br />
File:Orange_Pi_PC_v1.3_back.jpg<br />
File:Orange_Pi_PC_v1.3_connectors.jpg<br />
File:Orange_Pi_PC_with_Cameraboard_and_Camera.jpg<br />
File:Xunlong_OrangePi_expansion_header_pinout.png<br />
H3 UBOOT FAKEBUTTON.jpg<br />
</gallery><br />
<br />
== Orange Pi PC Plus ==<br />
<gallery><br />
File:Orange_Pi_PC_Plus_top.jpg<br />
File:Orange_Pi_PC_Plus_bottom.jpg<br />
</gallery><br />
<br />
= Variants =<br />
<br />
* The '''Orange Pi PC Plus''' adds 8GB eMMC and Realtek RTL8189FTV SDIO-based WiFi directly on the board (as opposed to a soldered-on module). The physical dimensions and position of connectors are exactly the same as the '''Orange Pi PC'''. The same type of DRAM is used but tracing is different since one DRAM module moved to the bottom side of the PCB. Since a FEL button is missing on this board it's not that easy to verify DRAM reliability the usual way (through FEL boot) so we should stay with the failsafe value of 624 MHz DRAM clock. Regarding software support we can base on fex file and device tree for the ''PC'' and simply add the necessary WiFi chip mappings.<br />
<br />
= Also known as =<br />
<br />
= See also =<br />
<br />
*[http://www.orangepi.org Xunlong Orange Pi site]<br />
*[https://github.com/orangepi-xunlong Official Github Repository].<br />
*[http://www.orangepi.org/orangepibbsen Official Orange Pi Forums].<br />
*[[H3_Manual_build_howto]]<br />
*[https://drive.google.com/open?id=0BwQT0FP7IkTbRFJQamNwWTAzWms Orange Pi PC Schematics 1.2]<br />
<br />
== Manufacturer images ==<br />
A various amount of [http://www.orangepi.org/downloaded/download.html prebuilt images] is provided via OrangePi's Website most of them not containing latest fixes.<br />
Many people are also running images generated by forum user [http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=342 loboris] ([http://filez.zoobab.com/allwinner/orangepi/mega/ mirror available). It should be noted that when using loboris' images it's always useful to execute his [http://filez.zoobab.com/allwinner/orangepi/mega/update_kernel.sh update_kernel.sh] to get latest kernel fixes and settings for the board in question (various script.bin variants for different Orange Pis and display settings). To adjust script.bin settings (overclocked/overvolted) to linux-sunxi defaults there's informations and a script available in [http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=785 this thread].<br />
<br />
= References =<br />
<references /><br />
<br />
[[Category:Devices]]<br />
[[Category:H3 Boards]]<br />
[[Category:Xunlong]]<br />
[[Category:Devices with Ethernet port]]<br />
[[Category:Devices with HDMI port]]<br />
<br />
[[Category:Mainline_U-Boot]]<br />
[[Category:Mainline_Kernel]]<br />
[[Category:NDH_TODO]]</div>Mishaor