[Arm-netbook] Allwinner F20 (sun3i) SD/MMC boot minimal 'blinking led' app

sysfwlab sysfwlab at gmail.com
Wed May 16 16:13:37 BST 2012


Hello everyboody,

I'm new on this mailing, i'm french, sorry for my english language...

A small device with allwinner F20 (sun3i) came populare in France, it's 
a very interesting cheap device.
http://www.sysfwlab.com/?p=29
I play with it and found a serial port and other things...
http://www.sysfwlab.com/?p=144
but i do a mistake and i crash a part of my nanda fat16 (overflow)
http://www.sysfwlab.com/?p=210
The bootloader's (boot1) name app_demo.axf is not broken, so when i push 
power, i can see logs and message "No OS to boot" and I can acces to 
"fe" too.

My goal now is to build a bootable sd/mmc like for the A10.
I try to use the "native" allwinner-u-boot  and mksunxiboot to create a mmc.
I dont got anything on the serial port, but the device dont run the 
app_demo.axf (Boot1) so i think it try to boot the mmc and probably 
crash but It seem to be a good thing ?

I found a kernel patch with mach-sun3i and mach-sun4i separated, and i 
need probably confirm that sun3i got the same map registers of sun4i, 
etc...i see mmc driver différence (SUN4I,SUN5I but no SUN3I...), etc... 
but can someone already do this and got a working sun3i mmc u-boot ?

I want to build a small "blinking led" peace of code to confirm the mmc 
boot procedure because uart init is quiet difficulte a this step, u-boot 
is complex and i see TX/RX can be use to be a standard GPIO. This can 
probably avoid a lot of "unknowns" (clock, watchdog, etc...)

Here is my plan (based on allwinner-uboot and sun3i/sun4i linux patch), 
can you correct me if need :

1/ I can probably use the lowlevel_init.S skeleton with the good 
CONFIG_SPL_TEXT_BASE
2/ I can probably use simplified s_init() function in board.c.
   2.1/ Does the watchdog can be reset on sun3i like on sun4i ?
   2.2/ Can i set the GPIOon sun3i  like on sun4i ? (i confirm on F20 
datasheet UART pin seem to be the same ex: PF2=UART0_TX too, etc...)
   2.3/ Clock init is hard to understand without a real datasheet so do 
you think i can use the clock_init() function for sun3i ?
Do i need to setup clock and watchdog for a minimal application does put 
a level i want on a GPIO ?
3/ I put high or down the GPIO (like gpio.c way)
4/ I compile with a arm-none-eabi-gcc (codesourcery), let the -Text=0x0 
and keep got .text
5/ Using mksunxiboot to ading AllWinner header
6/ Pushing to mmc at 8K on FAT16 fs
7/ Try to boot and see level with voltmeter,oscilloscop...

More generally :

- Does anyone at AllWinner technology or not can confirm me i can boot 
F20 from MMC ?

- For a minimal application which put a level on GPIO do i need to 
init_clock() and clear the watch dog ?
(Can i directly set the register to init the GPIO ?)

- Do you confirm CONFIG_SPL_TEXT_BASE is 0x0, or say differently, did 
you confirm my code will be run at 0x0 after being loaded from SD/MMC ?

- All information about F20 is well come....

Hope someone help/drive me...
thanks a lot in advance...

Bin (sysfwlab)




More information about the arm-netbook mailing list