This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3357: USB VBUS issue

Part Number: AM3357

Tool/software: Linux

Hello Sir,

Our custom board based on AM335x evaluation board has OTG on USB0 and RF module on USB1. USB1 is working fine.

we have issue with USB0. we have supplied 5v through power switch.

we followed this schematic we are able to see 5v at input of the power switch but we are not able to see at the USB0_VBUS.

when i do,

root@am335x-evm:~# lsusb                                                        
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation                               
Bus 002 Device 002: ID 1e2d:0061                                                
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation

root@am335x-evm:/# cat /proc/interrupts                                         
           CPU0                                                                 
 16:      19172      INTC  68 Level     gp_timer                                
 19:          1      INTC  78 Level     wkup_m3_txev                            
 20:        487      INTC  12 Level     49000000.edma_ccint                     
 22:          0      INTC  14 Level     49000000.edma_ccerrint                  
 26:          0      INTC  96 Level     44e07000.gpio                           
 33:          0  44e07000.gpio   6 Edge      48060000.mmc cd                    
 59:          0      INTC  98 Level     4804c000.gpio                           
 92:          0      INTC  32 Level     481ac000.gpio                           
125:          0      INTC  62 Level     481ae000.gpio                           
158:        566      INTC  72 Level     44e09000.serial                         
160:        824      INTC  70 Level     44e0b000.i2c                            
161:          0      INTC  71 Level     4802a000.i2c                            
162:         11      INTC  64 Level     mmc1                                    
163:         13      INTC  29 Level     mmc0                                    
165:          0      INTC  77 Level     wkup_m3                                 
171:          0      INTC  75 Level     rtc0                                    
172:          0      INTC  76 Level     rtc0                                    
174:          0      INTC  41 Level     4a100000.ethernet                       
175:          0      INTC  42 Level     4a100000.ethernet                       
177:          0      INTC   4 Level     48080000.elm                            
179:          0      INTC  16 Level     TI-am335x-tsc, TI-am335x-adc            
180:          0      INTC 100 Level     gpmc                                    
181:         12      INTC 109 Level     53100000.sham                           
183:          0      INTC 111 Level     48310000.rng                            
188:          0      INTC  18 Level     musb-hdrc.0.auto                        
189:        125      INTC  19 Level     musb-hdrc.1.auto                        
190:          2      INTC  17 Level     47400000.dma-controller                 
Err:          0      

root@am335x-evm:/# cat /proc/driver/

here i am not getting musb-hdrc.0 and  musb-hdrc.1

Sir, please suggest is there anything that i have to do from software or we need to change anything in hardware.

i am using tisdk 03.03.00.04

  • Hello Sir,

    yes, our design compiles with that.
  • Hello Sir,

    yea, our schematic compiles with this.
  • Sachin T C M2 said:

    we are able to see 5v at input of the power switch but we are not able to see at the USB0_VBUS.

    Please post your schematics for the sub0 port.

    Did you load a usb gadget driver for usb0 port? What device you connected to the usb0 port?

    Sachin T C M2 said:

    root@am335x-evm:/# cat /proc/driver/

    here i am not getting musb-hdrc.0 and  musb-hdrc.1

    Those nodes only existed in the old v3.2 kernel, not in the newer kernels, such as the one in the tisdk 03.03.00.04.

  • Hello Sir,

    Thank you for your reply.

    Here is our schematic for usb0,

    On USB0 we have usb micro port , we have connected storage device through OTG cable.

    I havent load any usb gadget driver for usb0 port, can you just brief me about this.

    This is what i get when I did dmesg connecting storage device through OTG cable

    root@am335x-evm:~# dmesg | grep usb
    [   10.590850] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [   10.590888] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   10.590911] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   10.590926] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   10.590939] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   10.590955] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
    [   10.590970] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [   10.590982] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   10.590996] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   10.591009] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   10.591021] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   10.591035] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
    [   10.591129] 47401300.usb-phy supply vcc not found, using dummy regulator
    [   10.713483] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer reset
    [   10.713522] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [   10.713543] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   10.713558] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   10.713572] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [   10.713587] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO reset failed
    [   10.713602] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer vbus-detect
    [   10.713614] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [   10.713628] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   10.713641] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   10.713654] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [   10.713667] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO vbus-detect failed
    [   10.713758] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [   19.470784] usbcore: registered new interface driver usbfs
    [   19.476441] usbcore: registered new interface driver hub
    [   19.610612] usbcore: registered new device driver usb
    [   19.845402] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [   19.845437] musb-hdrc: MHDRC RTL version 2.0
    [   19.845449] musb-hdrc: setup fifo_mode 4
    [   19.845475] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [   19.845671] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    [   19.889467] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    [   20.018126] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [   20.018159] musb-hdrc: MHDRC RTL version 2.0
    [   20.018172] musb-hdrc: setup fifo_mode 4
    [   20.018194] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [   20.018356] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [   20.081780] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
    [   21.319388] usb 2-1: new high-speed USB device number 2 using musb-hdrc
    [   21.939934] cdc_ether 2-1:1.10 usb0: register 'cdc_ether' at usb-musb-hdrc.1.auto-1, CDC Ethernet Device, de:ad:be:ef:00:00
    [   22.010210] cdc_ether 2-1:1.12 usb1: register 'cdc_ether' at usb-musb-hdrc.1.auto-1, CDC Ethernet Device, de:ad:be:ef:00:01
    [   22.022924] usbcore: registered new interface driver cdc_acm
    [   22.072319] usbcore: registered new interface driver cdc_ether
    [   22.500018] cdc_ether 2-1:1.12 usb1: CDC: unexpected notification 01!
    [   22.650006] cdc_ether 2-1:1.10 usb0: CDC: unexpected notification 01!

    Thank you.

  • Sachin T C M2 said:

    I havent load any usb gadget driver for usb0 port, can you just brief me about this.

    Since this is a otg port, you must want to use it as a USB gadget as some point, so you have to load a USB gadget driver to use the usb0 port for peripheral mode. The gadget driver is also required for the otg port to work in the host mode. So now if you want the usb0 port to enumerate the thumb drive, you still have to load a gadget driver first.

  • Hello Sir

    I have tried inserting the module but i am getting this

    root@am335x-evm:~# insmod g_mass_storage.ko                                     
    insmod: ERROR: could not load module g_mass_storage.ko: No such file or directoy

    After this i read the following link,


    I understood that by default one gadget will be inbuilt another we have insert, since it is the default configuration i didn't make any changes, but still I am getting there is no g_mass_storage.ko.

    here is my  dmesg log,

    root@am335x-evm:~# dmesg | grep usb
    [   10.611625] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [   10.611661] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   10.611684] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/us'
    [   10.611699] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb'
    [   10.611712] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   10.611728] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
    [   10.611743] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [   10.611756] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   10.611770] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/'
    [   10.611784] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/o'
    [   10.611797] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   10.611811] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
    [   10.611903] 47401300.usb-phy supply vcc not found, using dummy regulator
    [   10.697308] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer reset
    [   10.697346] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [   10.697370] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/us'
    [   10.697385] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb'
    [   10.697399] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [   10.697415] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO reset failed
    [   10.697430] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer vbus-detect
    [   10.697442] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [   10.697456] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/'
    [   10.697470] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/o'
    [   10.697483] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [   10.697496] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO vbus-detect failed
    [   10.697588] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [   19.291387] usbcore: registered new interface driver usbfs
    [   19.297033] usbcore: registered new interface driver hub
    [   19.427373] usbcore: registered new device driver usb
    [   19.619100] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-I)
    [   19.619136] musb-hdrc: MHDRC RTL version 2.0
    [   19.619149] musb-hdrc: setup fifo_mode 4
    [   19.619174] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [   19.649554] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    [   19.655388] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    [   19.778371] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-I)
    [   19.778404] musb-hdrc: MHDRC RTL version 2.0
    [   19.778417] musb-hdrc: setup fifo_mode 4
    [   19.778440] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [   19.778608] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [   19.821381] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
    [   21.069409] usb 2-1: new high-speed USB device number 2 using musb-hdrc
    [   21.697439] cdc_ether 2-1:1.10 usb0: register 'cdc_ether' at usb-musb-hdrc.1.auto-1, CDC 0
    [   21.767165] cdc_ether 2-1:1.12 usb1: register 'cdc_ether' at usb-musb-hdrc.1.auto-1, CDC 1
    [   21.831802] usbcore: registered new interface driver cdc_ether
    [   21.853647] usbcore: registered new interface driver cdc_acm
    [   22.292707] cdc_ether 2-1:1.10 usb0: CDC: unexpected notification 01!
    [   22.409946] cdc_ether 2-1:1.12 usb1: CDC: unexpected notification 01!
    [   22.423822] cdc_ether 2-1:1.12 usb1: kevent 12 may have been dropped

  • Hello Bin,

    I have tried to insert the module
    root@am335x-evm:/lib/modules/4.4.41-gf9f6f0db2d/kernel/drivers/usb/gadget/legacy# insmod g_mass_storage.ko
    [ 2148.928847] g_mass_storage: Unknown symbol fsg_common_set_ops (err 0)
    [ 2148.935773] g_mass_storage: Unknown symbol fsg_common_set_sysfs (err 0)
    [ 2148.948474] g_mass_storage: Unknown symbol usb_get_function_instance (err 0)
    [ 2148.963262] g_mass_storage: Unknown symbol usb_string_ids_tab (err 0)
    [ 2148.970099] g_mass_storage: Unknown symbol usb_get_function (err 0)
    [ 2148.976474] g_mass_storage: Unknown symbol usb_composite_unregister (err 0)
    [ 2148.989610] g_mass_storage: Unknown symbol usb_put_function (err 0)
    [ 2148.996017] g_mass_storage: Unknown symbol fsg_common_create_luns (err 0)
    [ 2149.016801] g_mass_storage: Unknown symbol usb_add_function (err 0)
    [ 2149.023444] g_mass_storage: Unknown symbol usb_composite_probe (err 0)
    [ 2149.035408] g_mass_storage: Unknown symbol usb_composite_overwrite_options (err 0)
    [ 2149.051540] g_mass_storage: Unknown symbol usb_otg_descriptor_alloc (err 0)
    [ 2149.058642] g_mass_storage: Unknown symbol usb_put_function_instance (err 0)
    [ 2149.071545] g_mass_storage: Unknown symbol fsg_common_set_cdev (err 0)
    [ 2149.078226] g_mass_storage: Unknown symbol fsg_common_free_buffers (err 0)
    [ 2149.096238] g_mass_storage: Unknown symbol usb_otg_descriptor_init (err 0)
    [ 2149.103516] g_mass_storage: Unknown symbol fsg_common_remove_luns (err 0)
    [ 2149.115645] g_mass_storage: Unknown symbol usb_add_config (err 0)
    [ 2149.129000] g_mass_storage: Unknown symbol fsg_common_set_inquiry_string (err 0)
    [ 2149.141198] g_mass_storage: Unknown symbol fsg_common_set_num_buffers (err 0)
    [ 2149.148467] g_mass_storage: Unknown symbol fsg_config_from_params (err 0)
    insmod: ERROR: could not insert module g_mass_storage.ko: Unknown symbol in module

    can you just tell me what is missing here.
  • Sachin T C M2 said:

    I have tried to insert the module
    root@am335x-evm:/lib/modules/4.4.41-gf9f6f0db2d/kernel/drivers/usb/gadget/legacy# insmod g_mass_storage.ko
    [ 2148.928847] g_mass_storage: Unknown symbol fsg_common_set_ops (err 0)
    ......

    can you just tell me what is missing here.

    A USB gadget driver depends on other kernel modules which might not be loaded, it will cause this type of missing symbol error. Please use 'modprobe g_mass_storage file=<backend-storage>' command instead, it will load all the dependent modules. Please also note that you need to pass in the 'file=...' parameter while loading g_mass_storage gadget driver.