User Tools

Site Tools


doc:hardware:soc:soc.allwinner.sunxi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:hardware:soc:soc.allwinner.sunxi [2014/02/21 18:13]
patapovich
doc:hardware:soc:soc.allwinner.sunxi [2016/04/06 01:18] (current)
tmomas ↷ Links adapted because of a move operation
Line 1: Line 1:
 +====== Allwinner Sun4i/​5i/​6i/​7i/​9i (sunxi) ======
  
 +Various vendors are offering development boards / [[wp>​single-board computer]] based on the [[wp>​Allwinner Technology|Allwinner]] SoCs. These are running various flavors of the A1x, A20, A31, and soon H3 SoCs, with different buildouts. The mach is called "​sunxi"​.
 +
 +For some specs rather see [[wp>​Allwinner_Technology#​A-Series]].
 +
 +===== Supported Versions =====
 +^ Model Version ​  ^ Launch Date   ^ OpenWrt Version Supported ​  ^ Model Specific Notes                 ^
 +| A10             | -             ​| ​         CC/​trunk ​          | Single Cortex-A8 ​                    |
 +| A10s            | -             ​| ​         CC/​trunk ​          | Single Cortex-A8 ​                    |
 +| A13             | -             ​| ​         CC/​trunk ​          | Single Cortex-A8 ​                    |
 +| A20             | -             ​| ​         CC/​trunk ​          | Dual Cortex-A7 ​                      |
 +| A23             | -             ​| ​            ​na ​             | Dual Cortex-A7 ​                      |
 +| A31             | -             ​| ​           trunk            | Quad Cortex-A7 ​                      |
 +| A33             | -             ​| ​            ​na ​             | Quad Cortex-A7 ​                      |
 +| A80             | -             ​| ​            ​na ​             | 8-core big.LITTLE (4x A15 + 4x A7)   |
 +| H3              | -             ​| ​           trunk            | Quad-core Cortex-A7 ​                 |
 +| H8              | -             ​| ​            ​na ​             | 8-core Cortex-A7 ​                    |
 +
 +===== Hardware Highlights =====
 +^ Model ^ SoC ^ RAM ^ [[doc/​techref/​flash.layout|Storage]] ^ Network ^ USB ^ [[doc/​hardware/​port.serial|Serial]] ^ [[doc/​hardware/​port.jtag|JTAG]] ^ [[wp>​UEXT]] ^ Other ^ linux-sunxi page ^
 +| [[toh/​lemaker/​bananapi|BananaPi]] | A20 | 1024MiB | μSD | Gigabit Ethernet | 2x USB2 | yes | n/a | n/a | HDMI, SATA, audio, IR, RCA video out, CSI | [[http://​linux-sunxi.org/​LeMaker_Banana_Pi|Page]] |
 +| [[toh/​lemaker/​bananapro|BananaPro]] | A20 | 1024MiB | μSD | Gigabit Ethernet, AP6181 BT+WLAN | 2x USB2 | yes | n/a | n/a | HDMI, SATA, audio, IR, RCA video out, CSI | [[http://​linux-sunxi.org/​LeMaker_Banana_Pro|Page]] |
 +| [[toh/​cubietech/​cubieboard|Cubieboard]] | A10 | 1024MiB | μSD, 4GB NAND | Fast Ethernet | 2x USB2 | yes | n/a | yes | HDMI, SATA, audio | [[http://​linux-sunxi.org/​Cubieboard|Page]] |
 +| [[toh/​cubietech/​cubieboard2|Cubieboard2]] | A20 | 1024MiB | μSD, 4GB NAND | Fast Ethernet | 2x USB2 | yes | n/a | yes | HDMI, SATA, audio | [[http://​linux-sunxi.org/​Cubieboard2|Page]] |
 +| [[toh/​merrii/​hummingbird/​Hummingbird]] | A31 | 1024/​2048MiB | μSD, 8/16GB NAND | BCM WiFi, Gigabit Ethernet | 2x USB2 | yes | n/a | n/a | HDMI, audio, IR | [[http://​linux-sunxi.org/​Merrii_Hummingbird_A31|Page]] |
 +| [[toh/​cubietech/​cubietruck|Cubietruck]] | A20 | 2048MiB | μSD, 8GB NAND | BCM WiFi, Gigabit Ethernet | 2x USB2 | yes | n/a | n/a | HDMI, VGA, SATA, audio, IR, TOSlink | [[http://​linux-sunxi.org/​Cubietruck|Page]] |
 +| [[toh:​lamobo:​bananapi_r1|Lamobo R1]] | A20 | 1024MiB | μSD | RTL8192CU 802.11bgn 2T2R WiFi \\ BCM53125 Gigabit Ethernet switch with 5 ports | 1x USB2 Host, 1x USB2 OTG | yes | n/a | n/a | HDMI, SATA, audio, IR, CSI | [[http://​linux-sunxi.org/​Lamobo_R1|Page]] |
 +| [[toh/​olimex/​a10-olinuxino|Olimex A10-OLinuXino-LIME]] | A10 | 512MiB | μSD | Fast Ethernet | 2x USB2 | yes | n/a | yes | HDMI, SATA | [[http://​linux-sunxi.org/​A10-OLinuXino-LIME|Page]] |
 +| [[toh/​olimex/​a13-olinuxino|Olimex A13-OLinuXino-WIFI]] | A13 | 512MiB | μSD | RTL WiFi | 3x USB2 | yes | n/a | yes | VGA | [[http://​linux-sunxi.org/​A13-OLinuXino|Page]] |
 +| [[toh/​olimex/​a13-olinuxino-som|Olimex A13-SOM]] | A13 | 256/512MiB | μSD, 4GB NAND | RTL WiFi | n/a | yes | n/a | n/a | n/a | |
 +| [[toh/​olimex/​a20-olinuxino|Olimex A20-OLinuXino-MICRO]] | A20 | 1024MiB | SD, μSD, 4GB NAND | Fast Ethernet | 2x USB2 | yes | n/a | yes | HDMI, SATA, audio | [[http://​linux-sunxi.org/​A20-olinuxino-micro|Page]] |
 +| [[toh//​xunlong/​orangepiplus|Orange Pi Plus]] | H3 | 1024MiB | μSD | Gigabit Ethernet | 4x USB2 | yes | n/a | n/a | n/a | [[http://​linux-sunxi.org/​Xunlong_Orange_Pi_Plus|Page]] |
 +| [[toh/​pcduino/​pcduino|pcDuino/​pcDuinoV2]] | A10 | 1024MiB | μSD, 2GB NAND | Fast Ethernet | 2x USB2 | yes | n/a | n/a | HDMI / Arduino headers| [[http://​linux-sunxi.org/​LinkSprite_pcDuino_V2|Page]] |
 +| [[toh/​pcduino/​pcduino3|pcDuino3]] | A20 | 1024MiB | μSD, 4GB NAND | Fast Ethernet, RTL8188EU WiFi | 1x USB2 | yes | n/a | n/a | HDMI / Arduino headers, SATA, IR | [[http://​linux-sunxi.org/​LinkSprite_pcDuino_V3|Page]] |
 +
 +[[wp>​UEXT]] is an open standard port to provide serial, I²C and SPI expansion ports.
 +
 +
 +===== Status =====
 +
 +Patches have been back-ported from the [[http://​linux-sunxi.org/​]] community, including device trees, clocks, timers, PIO, ethernet, USB, and, MMC.
 +These patches are being mainlined as they come online by the community. ​
 +
 +  * SPL: done
 +  * u-boot: done
 +  * kernel: done
 +  * rootfs: done
 +
 +You have the option to boot the board from initramfs, SD card (recommended),​ USB storage, or NFS. 
 +
 +==== Working ====
 +
 +  * SD/MMC
 +  * USB EHCI/OHCI
 +  * EMAC (A10 10/100 Mbps)
 +  * GMAC (A20 and above, 10/100/1000 Mbps) 
 +  * SATA
 +  * Clocks
 +  * Timers
 +  * SMP with HYP patches for A20
 +  * Various devices, GPIO, IR
 +
 +==== Being worked on ====
 +
 +  * NAND (have some snippets already)
 +  * Audio
 +  * SPI (need integration)
 +
 +
 +===== Installing OpenWrt =====
 +This section details what is required to install and upgrade OpenWrt. The generic procedure is described here: [[doc:​howto:​generic.flashing]];​ this devices don't have a flash chip soldered to the PCB but an SD-Card slot.
 +
 +==== Trunk - Pre-built SD card images ====
 +
 +You can build an SD card image directly from buildroot for your device.
 +
 +  * Check out trunk - https://​dev.openwrt.org/​wiki/​GetSource
 +  * Run make menuconfig
 +  * Select device profile - f.e. BananaPi
 +  * Start the build
 +  * The built SD card images will be in bin/sunxi
 +  * dd if=bin/​sunxi/​openwrt-sunxi-Bananapi-sdcard-vfat-ext4.img of=/dev/sdc
 +
 +
 +==== Chaos Calmer - Assembling the SD card image yourself ====
 +
 +OpenWrt trunk images are located in [[http://​downloads.openwrt.org/​snapshots/​trunk/​sunxi/​|snapshots/​trunk/​sunxi/​]] folder. ​
 +
 +For example if you have Cubieboard3/​Cubietruck then download these files from the server:
 +  * [[http://​downloads.openwrt.org/​snapshots/​trunk/​sunxi/​generic/​uboot-sunxi-Cubietruck/​openwrt-sunxi-Cubietruck-u-boot-with-spl.bin|openwrt-sunxi-Cubietruck-u-boot-with-spl.bin]]
 +  * [[http://​downloads.openwrt.org/​snapshots/​trunk/​sunxi/​generic/​uboot-sunxi-Cubietruck/​openwrt-sunxi-Cubietruck-uEnv.txt|openwrt-sunxi-Cubietruck-uEnv.txt]]
 +  * [[http://​downloads.openwrt.org/​snapshots/​trunk/​sunxi/​generic/​sun7i-a20-cubietruck.dtb|sun7i-a20-cubietruck.dtb]]
 +  * [[http://​downloads.openwrt.org/​snapshots/​trunk/​sunxi/​generic/​openwrt-sunxi-uImage|openwrt-sunxi-uImage]]
 +  * [[http://​downloads.openwrt.org/​snapshots/​trunk/​sunxi/​generic/​openwrt-sunxi-root.ext4|openwrt-sunxi-root.ext4]]
 +
 +==== SD layout ====
 +
 +SD layout with 512 byte blocks: ​
 +^ NAME                  ^ start block     ^ size      ^
 +| MBR                   | 0               | 1 block   |
 +| u-boot-with-spl.bin ​  | 16 (8 KB)       | ~250 KB   |
 +| FAT                   | 2048 (1 MB)     | 15 MB     |
 +| EXT4                  | 32768 (16 MB)   | rest      |
 +
 +==== SD preparation ====
 +
 +We assume **/​dev/​mmcblk0** is the SD card and **Cubietruck** is the board.
 +
 +  * Partition the SD card. Two partitions are created. The first is the boot partition, **/​dev/​mmcblk0p1**. The second is the root partition, **/​dev/​mmcblk0p2**.\\ <​code>​
 +# fdisk /​dev/​mmcblk0
 +
 +Command (m for help): n
 +Partition type:
 +   ​p ​  ​primary (0 primary, 0 extended, 4 free)
 +   ​e ​  ​extended
 +Select (default p): p
 +Partition number (1-4, default 1): 1
 +First sector (2048-15523839,​ default 2048): 2048
 +Last sector, +sectors or +size{K,​M,​G} (2048-15523839,​ default 15523839): +15M 
 +
 +Command (m for help): n
 +Partition type:
 +   ​p ​  ​primary (1 primary, 0 extended, 3 free)
 +   ​e ​  ​extended
 +Select (default p): p    ​
 +Partition number (1-4, default 2): 2
 +First sector (32768-15523839,​ default 32768): 32768
 +Last sector, +sectors or +size{K,​M,​G} (32768-15523839,​ default 15523839): +240M
 +
 +Command (m for help): p
 +
 +Disk /​dev/​mmcblk0:​ 7948 MB, 7948206080 bytes
 +4 heads, 16 sectors/​track,​ 242560 cylinders, total 15523840 sectors
 +Units = sectors of 1 * 512 = 512 bytes
 +Sector size (logical/​physical):​ 512 bytes / 512 bytes
 +I/O size (minimum/​optimal):​ 512 bytes / 512 bytes
 +Disk identifier: 0x17002d14
 +
 +        Device Boot      Start         ​End ​     Blocks ​  ​Id ​ System
 +/​dev/​mmcblk0p1 ​           2048       ​32767 ​      ​15360 ​  ​83 ​ Linux
 +/​dev/​mmcblk0p2 ​          ​32768 ​     524287 ​     245760 ​  ​83 ​ Linux
 +
 +Command (m for help): w
 +The partition table has been altered!
 +
 +Calling ioctl() to re-read partition table.
 +</​code>​
 +
 +  * Re-read the new partition table layout (e.g. by removing and re-inserting the SD card).
 +  * Copy the SPL + U-boot image to the card\\ <​code>​
 +# dd if=bin/​sunxi/​uboot-sunxi-Cubietruck/​openwrt-sunxi-Cubietruck-u-boot-with-spl.bin of=/​dev/​mmcblk0 bs=1024 seek=8
 +</​code>​
 +  * Create a boot (FAT32) partition.\\ <​code>​
 +# mkfs.vfat /​dev/​mmcblk0p1
 +</​code>​
 +  * Mount the boot partition.\\ <​code>​
 +# mount -t vfat /​dev/​mmcblk0p1 /mnt
 +</​code>​
 +  * Copy the U-Boot environment file uEnv.txt to the boot partition.\\ <​code>​
 +# cp bin/​sunxi/​uboot-sunxi-Cubietruck/​openwrt-sunxi-Cubietruck-uEnv.txt /​mnt/​uEnv.txt
 +</​code>​
 +
 +  * Copy the boot.scr containing needed uboot commands for loading, setting kernel parameters and booting to the boot partition.\\ <​code>​
 +# cp bin/​sunxi/​sun7i-a20-cubietruck.scr /​mnt/​boot.scr
 +</​code>​
 +
 +  * Copy the device tree data to the boot partition.\\ <​code>​
 +# cp bin/​sunxi/​sun7i-a20-cubietruck.dtb /mnt/dtb
 +</​code>​
 +
 +  * Copy the kernel image to the boot partition.\\ <​code>​
 +# cp bin/​sunxi/​openwrt-sunxi-uImage /mnt/uImage
 +</​code>​
 +
 +  * Resize the root filesystem image to match the partition size.\\ <​code>​
 +# resize2fs bin/​sunxi/​openwrt-sunxi-root.ext4 240M
 +</​code>​
 +
 +  * Create the root filesystem.\\ <​code>​
 +# dd if=bin/​sunxi/​openwrt-sunxi-root.ext4 of=/​dev/​mmcblk0p2 bs=128k
 +</​code>​
 +
 +  * Wrap up (flush buffers and unmount boot partition).\\ <​code>​
 +# sync
 +# umount /mnt
 +</​code>​
 +
 +===== Upgrading OpenWrt =====
 +->​[[doc:​howto:​generic.sysupgrade]]
 +
 +*WiP*
 +
 +If you have already installed OpenWrt and like to reflash for e.g. upgrading to a new OpenWrt version you can upgrade using the mtd command line tool. It is important that you put the firmware image into the ramdisk (/tmp) before you start flashing.
 +
 +
 +===== Links =====
 +
 +For further information about the SoCs, go to [[http://​linux-sunxi.org/​Main_Page]]
 +
 +===== How can you help =====
 +
 +  * We're looking for any A31 / A80 / H3 hardware at the moment
 +  * Hardware donations - https://​dev.openwrt.org/​wiki/​WantedHardware
 +  * Test GPIOs and peripherals on A13/A20 and provide feedback
 +
 +===== Tags =====
 +[[meta:​tags|How to add tags]]
 +{{tag>​FastEthernet no_switch 0NIC 1NIC 0WNIC 1WNIC Serial ARM devboard Cortex-A7 Cortex-A8 ARMv7 sunxi}}