Go to previous topic
Go to next topic
Last Post 18 Mar 2014 05:52 AM by  Zile
USB device swapped to the USB Host
 3 Replies
Author Messages
Zile
New Member
New Member
Posts:45


--
15 Nov 2013 11:17 AM

    Hello,

    This question is similar to the my previous post http://support.logicpd.co...t/1661/Default.aspx, but other consequences (effects) happens.

    I configure Linux image to load USB Mass storage gadget, so my board will be seen as USB device. This works and I am able to transfer files over MMC card and USB, but again after some time there are some warnings from kernel

    Jan  1 00:19:05 Mynd user.info kernel: [ 1147.432952] Setting A idle...
    Jan  1 00:19:05 Mynd user.warn kernel: [ 1147.436523] omap_device: musb-omap2430.-1: new worst case activate latency 0: 152587
    Jan  1 00:19:05 Mynd user.warn kernel: [ 1147.445343] omap_device: omap_i2c.1: new worst case activate latency 0: 213623
    Jan  1 00:19:05 Mynd user.warn kernel: [ 1147.739379] omap_device: omap_i2c.1: new worst case deactivate latency 0: 183105
    Jan  1 00:19:05 Mynd user.warn kernel: [ 1147.929504] omap_device: omap_i2c.1: new worst case activate latency 0: 244140
    Jan  1 00:19:05 Mynd user.warn kernel: [ 1147.952331] omap_device: musb-omap2430.-1: new worst case activate latency 0: 183105

    , and it seems like USB is reconfigured to the Host mode, and processor give 5V on the VUSB net(pin).

    It is very strange and dangerous for my system, because I have also battery charger connected to the VUSB pin. 

    Also it seems like it happens on several devices, not at all devices.

    Regards,

    Dragan

    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    21 Nov 2013 09:09 AM
    Zile,

    The message originates from the following function. This has to do with wakeup latency.

    /**
    * _omap_device_activate - increase device readiness
    * @od: struct omap_device *
    * @ignore_lat: increase to latency target (0) or full readiness (1)?
    *
    * Increase readiness of omap_device @od (thus decreasing device
    * wakeup latency, but consuming more power). If @ignore_lat is
    * IGNORE_WAKEUP_LAT, make the omap_device fully active. Otherwise,
    * if @ignore_lat is USE_WAKEUP_LAT, and the device's maximum wakeup
    * latency is greater than the requested maximum wakeup latency, step
    * backwards in the omap_device_pm_latency table to ensure the
    * device's maximum wakeup latency is less than or equal to the
    * requested maximum wakeup latency. Returns 0.
    */
    static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)

    Which CPU governor are you using? (i.e. cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)

    Try setting this to performance and see if these messages go away.
    Zile
    New Member
    New Member
    Posts:45


    --
    18 Mar 2014 05:50 AM

    Hello,

    The problem was with ID pin. ID pin floating and sometimes it became 0. So although I have set USB to USB device only, not OTG, in kernel settings, it changes from device to host mode when ID is 0. So I commented out USB ID pin functionality in the rpm/build/linux_3.0/drivers/usb/otg/twl4030.c file and now works fine.

    Regards,

    Zile

    Zile
    New Member
    New Member
    Posts:45


    --
    18 Mar 2014 05:52 AM
    BTW, I am using userspace governor and I am setting CPU to the lowest frequency 300MHz, because of power consumption. Setting the governor to the performance value, increase consumption, but i2c active/deactive messages still exists.


    ---