USB and eMMC not working with current Armbian images

Started by rinni, December 18, 2019, 08:51:00 pm

Previous topic - Next topic

rinni

December 18, 2019, 08:51:00 pm Last Edit: April 22, 2020, 01:59:44 pm by rinni Reason: Clearify what's working with Olimex' images
Hi,

I recently purchased an A64-OLinuXino-2Ge8G-IND. When using the current Armbian buster image form https://www.armbian.com/olimex-lime-a64/ USB and eMMC are not working.

They [actually only eMMC, not USB] do work with the image provided by Olimex here: ftp://staging.olimex.com/Allwinner_Images/a64-olinuxino/linux/1.latest_images/buster/images/.


It seems that the Armbian image is getting the USB wrong:

U-Boot SPL 2019.04-armbian (Nov 18 2019 - 20:32:55 +0100)
DRAM: 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.2(debug):5d71d3f-dirty
NOTICE:  BL31: Built : 19:39:11, Oct 31 2019
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x408c040, model: Olimex A64-Olinuxino
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
NOTICE:  BL31: PMIC: Detected AXP803 on RSB.
INFO:    PMIC: AXP803: Enabling DRIVEVBUS
INFO:    PMIC: AXP803: dcdc1 voltage: 3.300V
INFO:    PMIC: AXP803: dcdc5 voltage: 1.360V
INFO:    PMIC: AXP803: dcdc6 voltage: 1.100V
INFO:    PMIC: AXP803: dldo1 voltage: 3.300V
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 843419 was applied
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9


U-Boot 2019.04-armbian (Nov 18 2019 - 20:32:55 +0100) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Olimex A64-Olinuxino
DRAM:  2 GiB
MMC:   Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from EXT4... ** File not found /boot/boot.env **

** Unable to read "/boot/boot.env" from mmc0:1 **
In:    serial
Out:   serial
Err:   serial
Net:   phy interface7
eth0: ethernet@1c30000
230454 bytes read in 12 ms (18.3 MiB/s)
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3042 bytes read in 1 ms (2.9 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
153 bytes read in 1 ms (149.4 KiB/s)
36650 bytes read in 5 ms (7 MiB/s)
3801 bytes read in 3 ms (1.2 MiB/s)
Applying kernel provided DT fixup script (sun50i-a64-fixup.scr)
## Executing script at 44000000
7612959 bytes read in 379 ms (19.2 MiB/s)
15421448 bytes read in 760 ms (19.4 MiB/s)
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    7612895 Bytes = 7.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
EHCI failed to shut down host controller.
   Loading Ramdisk to 498bd000, end 49fff9df ... OK
   Loading Device Tree to 000000004984b000, end 00000000498bcfff ... OK

Starting kernel ...


Mind the four USB buses found and the "EHCI failed to shut down host controller."



The Olimex image as a reference:

U-Boot SPL 2019.04-armbian (Aug 02 2019 - 16:17:54 +0300)
DRAM: 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.1(release):3ee48f4-dirty
NOTICE:  BL31: Built : 16:17:48, Aug  2 2019
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x409ad28, model: Olimex A64-Olinuxino-2Ge8G-IND
NOTICE:  BL31: PMIC: Detected AXP803 on RSB.
NOTICE:  PMIC: AXP803: Setting charge current to 400mA.


U-Boot 2019.04-armbian (Aug 02 2019 - 16:17:54 +0300) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: A64-OLinuXino-2Ge8G-IND
DRAM:  2 GiB
MMC:   mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **
In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Net:   
Warning: ethernet@1c30000 (eth0) using random MAC address - ae:5f:96:3b:8d:83
eth0: ethernet@1c30000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3042 bytes read in 3 ms (990.2 KiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
119 bytes read in 1 ms (116.2 KiB/s)
35872 bytes read in 6 ms (5.7 MiB/s)
8243842 bytes read in 539 ms (14.6 MiB/s)
14821384 bytes read in 965 ms (14.6 MiB/s)
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    8243778 Bytes = 7.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 49823000, end 49fffa42 ... OK
   Loading Device Tree to 00000000497b1000, end 0000000049822fff ... OK

Starting kernel ...


Any ideas how to fix that? I need to run a real-time kernel and thus need to build my custom image.

martinayotte

December 18, 2019, 08:58:26 pm #1 Last Edit: December 18, 2019, 11:52:00 pm by martinayotte
Quote from: rinni on December 18, 2019, 08:51:00 pmUSB and eMMC are not working.
My A64-OLinuXino is running well on eMMC and USB working as well, I'm using Armbian custom built image compiled 3 week ago with 5.4.0-rc8-sunxi64. (I will do new build with 5.4.2 soon)

EDIT: New 5.4.2 image build done and also working !

rinni

Thanks for the confirmation.

Actually I think it's more a u-boot problem.


Not working:
U-Boot SPL 2019.04-armbian (Nov 18 2019 - 20:32:55 +0100)
DRAM: 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.2(debug):5d71d3f-dirty
NOTICE:  BL31: Built : 19:39:11, Oct 31 2019
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x408c040, model: Olimex A64-Olinuxino

...

USB0:  USB EHCI 1.00
USB1:  USB OHCI 1.0
USB2:  USB EHCI 1.00
USB3:  USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
      scanning usb for storage devices... 0 Storage Device(s) found

...

## Flattened Device Tree blob at 4fa00000
  Booting using the fdt blob at 0x4fa00000
EHCI failed to shut down host controller.
  Loading Ramdisk to 498bd000, end 49fff9df ... OK
  Loading Device Tree to 000000004984b000, end 00000000498bcfff ... OK


Working:

U-Boot SPL 2019.04-armbian (Aug 02 2019 - 16:17:54 +0300)
DRAM: 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.1(release):3ee48f4-dirty
NOTICE:  BL31: Built : 16:17:48, Aug  2 2019
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x409ad28, model: Olimex A64-Olinuxino-2Ge8G-IND

...

starting USB...
USB0:  USB EHCI 1.00
USB1:  USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
      scanning usb for storage devices... 0 Storage Device(s) found

...

## Flattened Device Tree blob at 4fa00000
  Booting using the fdt blob at 0x4fa00000
  Loading Ramdisk to 49823000, end 49fffa42 ... OK
  Loading Device Tree to 00000000497b1000, end 0000000049822fff ... OK



So it seems the 2Ge8G-IND version needs some special treatment here.

martinayotte

If you build yourself an Armbian DEV image, you will get a v2019.10 U-Boot with USB working :

U-Boot 2019.10-armbian (Dec 18 2019 - 14:00:32 -0500) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Olimex A64-Olinuxino
DRAM:  1 GiB
MMC:   Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from EXT4... MMC: no card present
In:    serial
Out:   serial
Err:   serial
Net:   phy interface7
eth0: ethernet@1c30000
MMC: no card present
MMC: no card present
starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
Bus usb@1c1b000: USB EHCI 1.00
Bus usb@1c1b400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning bus usb@1c1b000 for devices... 2 USB Device(s) found
scanning bus usb@1c1b400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
=>               
=> ls usb 0
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 bin
<DIR>       4096 boot
<DIR>       4096 dev
<DIR>       4096 etc
<DIR>       4096 home
<DIR>       4096 lib
<DIR>       4096 lost+found
<DIR>       4096 media
<DIR>       4096 mnt
<DIR>       4096 opt
<DIR>       4096 proc
<DIR>       4096 root
<DIR>       4096 run
<DIR>       4096 sbin
<DIR>       4096 selinux
<DIR>       4096 srv
<DIR>       4096 sys
<DIR>       4096 tmp
<DIR>       4096 usr
<DIR>       4096 var
=>

fivuf

Hello,

I'm getting the same problem, no usb and no emmc working.

I'm using the latest armbian dev build.
Armbian_20.05.0-trunk_Lime-a64_buster_dev_5.5.15
No change to the config of kernel, choosing lime-a64 and no desktop when asked to by ./compile.sh

The only difference i see with martinayotte is that we're using the A64-OLinuXino-2Ge8G-IND while martinayotte is using the 1GB-W version.

Edit:
When compiling, the only choice for lime-a64 has the description: A64 quad core 1GB RAM SoC GBE eMMC Wi-Fi/BT.
That doesn't correspond to the A64-OLinuXino-2Ge8G-IND.

JohnS

You've reported this on the Armbian site/ML?  (Maybe also linux-sunxi?)

(I'm guessing they won't fix it unless they know it's broken.)

John

fivuf

Quote from: JohnS on April 06, 2020, 11:00:43 pmYou've reported this on the Armbian site/ML?  (Maybe also linux-sunxi?)


ok I posted here https://forum.armbian.com/topic/13639-olimex-lime-a64-no-usb-and-no-emmc-detected/

I had time to compile the olimex build and i have also the problem.
The result of the build is 
Armbian_5.92_Olinuxino-a64_Debian_buster_next_4.19.63.img
instead of the image provided
Armbian_5.92.1_Olinuxino-a64_Debian_buster_next_5.2.5.img

JohnS

If you correctly followed the Olimex instructions using only the files they provide, it's very odd indeed - broken hardware?

Oh, you may have said their image works, in which case something's wrong with their instructions or you didn't use the right files or some such.  You can to some extent check things out (use Olimex u-boot / yours, their kernel / yours, their files / yours, etc) and may stumble on the answer.

John

fivuf

I followed this instructions:
for armbian build
https://github.com/armbian/build

for olimex fork build
ftp://staging.olimex.com/Allwinner_Images/a64-olinuxino/linux/README.txt

I built dev and master branch,none of the image built detect usb. I didn't verify emmc for all images.

The only image at this point that is working is the one provided by olimex but i can't reproduce this one by compiling. When using the instruction from olimex, i get  Armbian_5.92_Olinuxino-a64_Debian_buster_next_4.19.63.img

how to compile to get this image Armbian_5.92.1_Olinuxino-a64_Debian_buster_next_5.2.5.img ?

rinni

April 18, 2020, 04:09:57 pm #9 Last Edit: April 22, 2020, 02:01:52 pm by rinni Reason: Add kernel bur report
For the u-boot part of the problem I wrote a bug report to the u-boot mailing list:

https://lists.denx.de/pipermail/u-boot/2020-April/407331.html


For the kernel part I send this bug report to the linux-arm-kernel list and the linux-sunxi list:

https://lists.infradead.org/pipermail/linux-arm-kernel/2020-April/725342.html

https://groups.google.com/forum/#!topic/linux-sunxi/xw4d2S_Xe7M

eMMC is working for me on a A64-Olinuxino-1Ge4GW Rev. D when building the a64-olinuxino-emmc_defconfig (added in v2020.01)

rinni

April 22, 2020, 01:50:15 pm #10 Last Edit: April 22, 2020, 02:41:53 pm by rinni Reason: Add dmesg output
I tired the Debian Buster minimal image from https://olimex.wordpress.com/2020/04/21/olimage-mainline-linux-images-building-script-for-all-of-our-olinuxino-and-som-boards/ - specifically this one: http://images.olimex.com/release/a64/A64-OLinuXino-buster-minimal-20200417-104553.img.7z

But without success - eMMC is working, USB is _not_ working:



U-Boot SPL 2020.01+olimex-1-20200414.120156 (Jan 30 2020 - 11:10:18 +0000)
DRAM: 1024 MiB
MMC Device 1 not found
Trying to boot from MMC1
NOTICE:  BL31: v2.2(debug):v2.2-6-g9a04ccc-dirty
NOTICE:  BL31: Built : 19:42:23, Mar 20 2020
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x40ab2b8, model: Olimex A64-Olinuxino
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
NOTICE:  BL31: PMIC: Detected AXP803 on RSB.
INFO:    PMIC: AXP803: Enabling DRIVEVBUS
INFO:    PMIC: AXP803: dcdc1 voltage: 3.300V
INFO:    PMIC: AXP803: dcdc5 voltage: 1.360V
INFO:    PMIC: AXP803: dcdc6 voltage: 1.100V
INFO:    PMIC: AXP803: dldo1 voltage: 3.300V
INFO:    PMIC: AXP803: dldo4 voltage: 3.300V
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 843419 was applied
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9


U-Boot 2020.01+olimex-1-20200414.120156 (Jan 30 2020 - 11:10:18 +0000) Allwinner Technology

CPU:  Allwinner A64 (SUN50I)
Model: Olimex A64-Olinuxino
DRAM:  1 GiB
MMC:  mmc@1c0f000: 0
Loading Environment from EXT4... OK
In:    serial
Out:  serial
Err:  serial
Allwinner mUSB OTG (Peripheral)
Net:  phy interface7
eth0: ethernet@1c30000
Warning: usb_ether using MAC address from ROM
, eth1: usb_ether
starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
Bus usb@1c1b000: USB EHCI 1.00
Bus usb@1c1b400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning bus usb@1c1b000 for devices... 1 USB Device(s) found
scanning bus usb@1c1b400 for devices... ERROR:  USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)

      USB device not accepting new address (error=20)
1 USB Device(s) found
      scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
1933 bytes read in 3 ms (628.9 KiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
Checking for /uEnv.txt...
Checking for /boot/uEnv.txt...
400 bytes read in 2 ms (195.3 KiB/s)
Loaded environment from /boot/uEnv.txt
Loading FIT image...
29212195 bytes read in 1255 ms (22.2 MiB/s)
## Loading kernel from FIT Image at 58000000 ...
  Using 'config-9849' configuration
  Trying 'kernel-1' kernel subimage
    Description:  Linux kernel 5.5.9-olimex
    Type:        Kernel Image
    Compression:  uncompressed
    Data Start:  0x580000d0
    Data Size:    22065160 Bytes = 21 MiB
    Architecture: AArch64
    OS:          Linux
    Load Address: 0x40080000
    Entry Point:  0x40080000
    Hash algo:    crc32
    Hash value:  c4dc34da
    Hash algo:    sha1
    Hash value:  e56b99e698d3a9a4915e79a4919e555d325c856d
  Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading ramdisk from FIT Image at 58000000 ...
  Using 'config-9849' configuration
  Trying 'ramdisk-1' ramdisk subimage
    Description:  Ramdisk for kernel 5.5.9-olimex
    Type:        RAMDisk Image
    Compression:  Unknown Compression
    Data Start:  0x5950b20c
    Data Size:    7067778 Bytes = 6.7 MiB
    Architecture: AArch64
    OS:          Linux
    Load Address: 0x4fe00000
    Entry Point:  0x4fe00000
    Hash algo:    crc32
    Hash value:  c455c3e0
    Hash algo:    sha1
    Hash value:  4ad31e34485bf3a6c2dee4d3646ed0be4c357acb
  Verifying Hash Integrity ... crc32+ sha1+ OK
  Loading ramdisk from 0x5950b20c to 0x4fe00000
WARNING: 'compression' nodes for ramdisks are deprecated, please fix your .its file!
## Loading fdt from FIT Image at 58000000 ...
  Using 'config-9849' configuration
  Trying 'fdt-1' fdt subimage
    Description:  unavailable
    Type:        Flat Device Tree
    Compression:  uncompressed
    Data Start:  0x59bc8b80
    Data Size:    37736 Bytes = 36.9 KiB
    Architecture: AArch64
    Load Address: 0x4fa00000
    Hash algo:    crc32
    Hash value:  f767d757
    Hash algo:    sha1
    Hash value:  5d7185d871c8513d1db09bd636b81c3454759688
  Verifying Hash Integrity ... crc32+ sha1+ OK
  Loading fdt from 0x59bc8b80 to 0x4fa00000
  Booting using the fdt blob at 0x4fa00000
  Loading Kernel Image
  Loading Ramdisk to 49942000, end 49fff882 ... OK
  Loading Device Tree to 0000000049935000, end 0000000049941367 ... OK

Starting kernel ...


dmesg: https://paste.debian.net/1142094/


When attaching a USB flash drive (I tried many, many!) I get:

[  205.320718] usb 4-1: device descriptor read/64, error -62
[  205.624738] usb 4-1: device descriptor read/64, error -62
[  206.116719] usb 4-1: device descriptor read/64, error -62
[  206.420737] usb 4-1: device descriptor read/64, error -62
[  207.452719] usb 4-1: device not accepting address 12, error -62
[  208.060737] usb 4-1: device not accepting address 13, error -62
[  208.066716] usb usb4-port1: unable to enumerate USB device


So, is it a hardware issue?

olimex

what is "USB key"?
Flash disk? or some USB device without drivers?

rinni

Yes, that's what I meant, USB flash drives. I'll update my post to make that clear

hacker63

I'm so old that I still play cs 1.6 =/

olimex

from the boot log your USB device is not recognized
this may means damaged USB host
we test here the images and everything works with USB