Problem with Mainline Kernel 4.6.0-rc3 for Olimex A20 Micro!

Started by mandar.khire, April 14, 2016, 09:25:15 AM

Previous topic - Next topic

mandar.khire

Hi,
I am trying to use RTC DS1307 which I externally connected to I2C pins & trying to use as it should work at time of kernel expansion or within kernel.
So for that I tried various ways.
Now I download Mainline kernel 4.6.0-rc3.
I follows http://linux-sunxi.org/Mainline_Kernel_Howto
I also follows http://linux-sunxi.org/Mainline_U-boot
I use RFS from working pre-compiled SD card image.

I got log as follows:-

switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
343 bytes read in 34 ms (9.8 KiB/s)
## Executing script at 43100000
reading sun7i-a20-olinuxino-micro.dtb
30655 bytes read in 38 ms (787.1 KiB/s)
reading zImage
3408336 bytes read in 196 ms (16.6 MiB/s)
Kernel image @ 0x42000000 [ 0x000000 - 0x3401d0 ]
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
EHCI failed to shut down host controller.
   Loading Device Tree to 49ff5000, end 49fff7be ... OK


I use boot arguments as follows:-

baudrate=115200
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc0 mmc1 scsi0 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_scsi0=setenv devnum 0; run scsi_boot
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
bootm_size=0xa000000
console=ttyS0,115200
dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;ramdisk ram 0x43300000 0x4000000
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
ethaddr=02:83:0a:c2:0e:0a
fdt_addr_r=0x43000000
fdtcontroladdr=7af35ec0
fdtfile=sun7i-a20-olinuxino-micro.dtb
kernel_addr_r=0x42000000
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
preboot=usb start
pxefile_addr_r=0x43200000
ramdisk_addr_r=0x43300000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlie
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpae
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}exi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then ece
scriptaddr=0x43100000
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
serial#=165166830ac20e0a
stderr=serial,vga
stdin=serial,usbkbd
stdout=serial,vga
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi

Environment size: 2813/131068 bytes


Before stop booting process I got few lines as log:-

CPU:   Allwinner A20 (SUN7I)
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment

Setting up a 1024x768 vga console (overscan 0x0)
In:    serial
Out:   vga
Err:   vga
SCSI:  SUNXI SCSI INIT
SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net:   eth0: ethernet@01c50000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 0.00
USB3:   USB OHCI 0.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0
=>


I tried Mainline kernel's 3.16.0-rc6 version then it runs properly but newer version not running.

Need help!

mhaas

What exactly are you trying to achieve there? What are your expected results and what are your actual results?

Are you sure you are running a mainline u-boot? edit: not sure if that actually matters, but since you said you were trying to run mainline u-boot, I figured I'd ask..

edit2: unrelated to your kernel problems, but what pins are you trying to use for i2c? Some are not enabled by default, at least on the a20-olinuxino-lime2.

edit3: For I2C trouble, see https://www.olimex.com/forum/index.php?topic=5248.0

Lurch

Last, but not least .. DS1307 is a 5V part. You will need 5V / 3.3V conversion on I2C to work with DS1307.

martinayotte

You can also switch the DS1307 with a PCF8563, it is pin compatible and can run from 1.8V.