[Letux-kernel] GTA04 USB and charging issues

H. Nikolaus Schaller hns at goldelico.com
Thu Jul 7 17:21:09 CEST 2016


> Am 06.07.2016 um 09:57 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> Hi Marek,
> I finally copied your SD card image to a fresh 32GB card (my 8GB card was a
> little too small and fsck complained about superblock size mismatch).
> 
> It booted. Almost.
> 
> Here some first findings (boot w/o USB plugged in):
> 
> 1. kernel (user-space) did hang (or wait) after 14 seconds until I pressed ctrl-C (probably the fstab automounter hangs)
> 
>> [   14.335998] usb 2-2: new high-speed USB device number 2 using ehci-omap
>> [   14.508148] usb 2-2: New USB device found, idVendor=0af0, idProduct=8800
>> [   14.515228] usb 2-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
>> [   14.534820] [drm] Initialized drm 1.1.0 20060810
>> [   14.540954] usb 2-2: Product: Globetrotter HSUPA Modem
>> [   14.547058] usb 2-2: Manufacturer: Option N.V.
>> [   14.709197] hso: drivers/net/usb/hso.c: Option Wireless
>> [   14.714752] driver_register 'hso'
>> [   14.771087] usbcore: registered new interface driver hso
>> 
>> ^C[....] Warning: fstab entry for /dev/shm; should probably be for /run/shm unless working around a bug in the Oracle database ...^[[c (warning).
>> [....] Activating swap...done.
>>   38.209320] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
>> [....] Checking root file system...fsck from util-linux 2.25.2
>> rootfs: clean, 43496/474208 files, 723959/1894634 blocks
>> done.
>>   38.741027] EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro
>> [....] Activating lvm and md swap...done.
>> ....] Checking file systems...fsck from util-linux 2.25.2
>> done.
>> ....] Cleaning up temporary files... /tmp. ok 
>>   41.008697] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
>> [   41.034057] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 1460
>> [   41.073242] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "gta04-rootfs"
>> [   41.081695] UBIFS (ubi0:0): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
>> [   41.092163] UBIFS (ubi0:0): FS size: 244758528 bytes (233 MiB, 1897 LEBs), journal size 12257280 bytes (11 MiB, 95 LEBs)
>> [   41.103576] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
>> [   41.110565] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 42EA579D-0514-48A4-AD99-7BF469652F98, small LPT model
>> [....] Mounting local filesystems...mount: special device /dev/mmcblk1p1 does not exist
>> failed.
>> [....] Activating swapfile swap...done.
>> [....] Warning: fstab entry for /dev/shm; should probably be for /run/shm unless working around a bug in the Oracle database ... (warning).
>> ^[[c^[[c....] Cleaning up temporary files.... ok 
>> ....] Setting kernel variables ...done.
>> ....] Configuri
> 
> Maybe I have an entry that is no longer supported by more recent kernels.
> 
> 2. there was some elf-error related to networking
> 
>> ....] Configuring network interfaces...depmod: ../libkmod/libkmod-elf.c:207: elf_get_mem: Assertion `offset < elf->size' failed.
>> Aborted
>> Failed to bring up eth0.
>> depmod: ../libkmod/libkmod-elf.c:207: elf_get_mem: Assertion `offset < elf->size' failed.
>> Aborted
>> Failed to bring up eth1.
>> depmod: ../libkmod/libkmod-elf.c:207: elf_get_mem: Assertion `offset < elf->size' failed.
>> Aborted
>> Failed to bring up usb0.
>> done.
>> 
> 
> 
> 3. X11 did not start
> 
> 4. after plugging in USB:
> 
>> [  422.447967] musb-hdrc musb-hdrc.0.auto: power state already 0
>> 
> 
> 
> but no charging or ethernet over usb :(
> 
> 
> After a reboot only problem #1 was gone.
> 
> Swapping the SD card to 4.3.0-kernel did boot fine and charging + usb works perfectly.
> 
> Swapping back to your SD image - and problems are back :(
> 
> Plugging in/out the USB cable just makes these messages:
> 
>> [  111.918243] musb-hdrc musb-hdrc.0.auto: power state already 0
>> [  114.161010] musb-hdrc musb-hdrc.0.auto: power state already 0
> 
> Then I tried my 4.7-rc6 system and I also have this hanging. X11 is working (maybe
> a different config) and the libkmod-elf.c message isn't there. But no charging and no musb
> messages at all.
> 
> 
> So what do we make out of this result?
> 
> Assuming that there was no file corruption during copy of your SD image to my card,
> it looks like a subtle hardware difference (maybe even a defect in the hardware) between
> my and your GTA04 under test.
> 
> Or some patch introduced between 4.3 and 4.7 to the twl4030 and musb subsystems.
> Or we did loose an important private patch (by Neil) which made it work reliable until 4.3.
> 
> So I am still puzzled by this issue where we don't see a clear reason or hint what is
> going wrong.
> 
> BR,
> Nikolaus

Here is another observation from a different board:

with Openmoko charger it works.

when connecting to a powered hub it depends on the cable I choose.

I also see lots of

[  260.654296] twl4030_bci 48070000.i2c:twl at 48:bci: battery temperature out of range

messages which means than something is wrong in twl4030 setup. Either the madc
(some are automatically scheduled together/alternating with the bci) or the power supply
for such measurements (e.g. some Vadcref or current source for the temperature
sensor = NTC).

If that messaging stops, I get charging and ethernet gadget.
It also looks as if they are always coming in pairs.
And spuriously every 30-300 seconds (at least with one cable).

@Marek: if you have a little time, please can you check what has been patched in all twl4030
subsystems since 4.3.0? And twl4030 related in device tree(s).

BR and thanks,
Nikolaus



More information about the Letux-kernel mailing list