User:Wens

A31 DRAM related clocks
root@fiber-3g:/ # busybox devmem 0x01c20020 0x90000C10

PLL5 = 13 * 2 * 24 = 624

root@fiber-3g:/ # busybox devmem 0x01c20028 0x90041811

PLL6 = 24 * 25 * 2 / 2 = 600

root@fiber-3g:/ # busybox devmem 0x01c200f0 0x81000002

(ON) MDFS = PLL6 / 1 / 3 = 200

root@fiber-3g:/ # busybox devmem 0x01c200f4 0x80000100

de-assert sdrclk cfg 0 = PLL5 / 2 sdrclk cfg 1 = PLL5 / 1

root@fiber-3g:/ # busybox devmem 0x01c2015c 0x81000001

(ON) mbus0 = PLL6 / 1 / 2 = 300

root@fiber-3g:/ # busybox devmem 0x01c20160 0x81000001

(ON) mbus1 = PLL6 / 1 / 2 = 300

Hardware I have

 * A10
 * Cubietech Cubieboard


 * A13
 * HSG H702 (I broke my UART rx pad/pin)


 * A20
 * Cubietech Cubieboard2
 * Cubietech Cubietruck


 * A23
 * Ippo q8h


 * A31
 * Merrii Hummingbird A31


 * A80
 * Merrii A80 Optimus Board

Wishlist

 * A31s
 * Sinlinx SinA31s SDK (out of stock)

A80 Optimus
The A80 Optimus Board currently refuses to boot from mmc0. Sometimes boot0 is stuck at initializing mmc0, and sometimes the BROM fails to detect the card in mmc0 altogether.

HELLO! BOOT0 is starting! boot0 version : 3.1.0 rtc 1 value 0x00010000 rtc 2 value 0x00020000 rtc 3 value 0x00030000 INFO: dram code V2.2 dram clk=672 dram_zq = 0x0x003f3fdd!! DDR3 used!! dram channle 2 0x0x00100001 0x0x00100001 pmu id=0x00000062 VTC Disabled!! Channel 0 OK! VTC Disabled!! Channel 1 OK! dram size=2048MBytes! dram size =2048 card boot number = 0 card no is 0 sdcard 0 line count 0 [mmc]: mmc driver ver 2014-06-05 14:18 [mmc]: ***Try SD card 0*** [mmc]: mmc 0 cmd 8 timeout, err 0x00000002 [mmc]: mmc 0 cmd 8 err 0x00000002 [mmc]: mmc 0 send if cond failed [mmc]: mmc 0 cmd 55 timeout, err 0x00000002 [mmc]: mmc 0 cmd 55 err 0x00000002 [mmc]: mmc 0 send app cmd failed [mmc]: ***Try MMC card 0*** [mmc]: mmc 0 cmd 1 timeout, err 0x00000002 [mmc]: mmc 0 cmd 1 err 0x00000002 [mmc]: mmc 0 send op cond failed [mmc]: mmc 0 Card did not respond to voltage select! [mmc]: ***SD/MMC 0 init error!!!*** [mmc]: mmc 0 register failed Fail in Init sdmmc. Ready to disable icache. Jump to Fel.

FEL mode
A80 FEL requires the bulk receive endpoint to be changed from 0x82 to 0x81. Patches for this have been merged into sunxi-tools. Please make sure you have the latest version.

To use FEL mode, make sure you have the patched FEL mode boot0 (fes1.fex) and u-boot (u-boot.fex) binaries. You can find them here

How to boot from fel using Allwinner's boot0 and u-boot: cat zImage sun9i-a80-optimus.dtb > zImage-dtb

mkimage -A arm -O linux -C none -T kernel -a 0x20008000 -e 0x20008000 -n Linux -d zImage-dtb uImage

FEL=../sunxi-tools/fel

${FEL} write 0x12000 fes1.fex ${FEL} exe 0x12000 ${FEL} write 0x2a000000 u-boot.fex ${FEL} write 0x24000000 uImage ${FEL} write 0x2c000000 rootfs.img ${FEL} exe 0x2a000500
 * 1) Load boot0
 * 1) Run boot0
 * 1) Load u-boot
 * 1) Load kernel
 * 1) Load ramdisk
 * 1) Run u-boot (Allwinner's u-boot has a header in the front)

u-boot commands setenv bootargs console=ttyS0,115200n8 earlyprintk debug loglevel=8 bootm 0x24000000 0x2c000000