FAQ: [#6897] Fail to switch from usb host mode to gadget mode in usb otg test in 2011r1 branch in bf527(2011)

Document created by Aaronwu Employee on Sep 12, 2013
Version 1Show Document
  • View in full screen mode

[#6897] Fail to switch from usb host mode to gadget mode in usb otg test in 2011r1 branch in bf527

Submitted By: Vivi Li

Open Date

2011-11-23 05:35:33    


Medium High     Assignee:

Bob Liu


Open     Fixed In Release:


Found In Release:

2011R1     Release:


N/A     Board:



BF527     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Not reproducible

Uboot version or rev.:

    Toolchain version or rev.:


App binary format:


Summary: Fail to switch from usb host mode to gadget mode in usb otg test in 2011r1 branch in bf527



In bf527-ezkit, fail to switch from usb host mode to gadget mode in usb otg test. bf548-ezkit is OK.

This should happen in both 2011 branch and trunk.


Bellow is the log on bf527-ezkit:


Linux version 3.0.8-ADI-2011R1-svn10227 (test@uclinux63-527-usbdev) (gcc version 4.3.5 (ADI-2011R1-RC2) ) #102 Tue Nov 15 18:09:1

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart1] enabled

early printk enabled on early_BFuart1

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x0016eaa8

  rodata    = 0x0016eaa8-0x001eb53c

  bss       = 0x001ec000-0x001fc9d0

  data      = 0x001fc9d0-0x00214000

    stack   = 0x00212000-0x00214000

  init      = 0x00214000-0x009d9000

  available = 0x009d9000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace active and enabled

Boot Mode: 1

Reset caused by Software reset

Blackfin support (C) 2004-2010 Analog Devices, Inc.

Compiled for ADSP-BF527 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 525 MHz core clock and 131 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

Data Cache Enabled for CPU0

  External memory: cacheable (write-back) in data cache

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 16002

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF1,57600 if

PID hash table entries: 256 (order: -2, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 53820k/65536k RAM, (7956k init code, 1462k kernel code, 662k data, 1024k dma, 612k reserved)


Configuring Blackfin Priority Driven Interrupts

console [ttyBF1] enabled, bootconsole disabled

console [ttyBF1] enabled, bootconsole disabled

Calibrating delay loop... 1044.48 BogoMIPS (lpj=2088960)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (16 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (41 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc00500, dma channel@7

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

Advanced Linux Sound Architecture Driver Version 1.0.24.

musb-hdrc: version 6.0, musb-dma, otg (peripheral+host)

musb-hdrc: kernel must blacklist external hubs

musb-hdrc musb-hdrc: USB OTG mode controller at ffc03800 using DMA, IRQ 59

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

debug-mmrs: setting up Blackfin MMR debugfs

msgmni has been set to 105

io scheduler noop registered (default)

dma_alloc_init: dma_page @ 0x028a5000 - 256 pages at 0x03f00000

bfin-lq035q1 bfin-lq035q1: 320x240 16-bit RGB FrameBuffer initialized

bfin-uart: Blackfin serial driver

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

bfin-otp: initialized

brd: module loaded

adp5520 0-0032: failed writing 0x80 to 0x00

adp5520 0-0032: failed to write

adp5520: probe of 0-0032 failed with error -1

m25p80 spi0.1: m25p16 (2048 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x000000000000-0x000000040000 : "bootloader(spi)"

0x000000040000-0x000000200000 : "linux kernel(spi)"

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=25)@sclk=131MHz)

bfin_mac bfin_mac.0: eth0: Blackfin on-chip Ethernet MAC driver, Version 1.1

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

ad7879 0-002c: Failed to write AD7879 Touchscreen

ad7879: probe of 0-002c failed with error -1

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

ALSA device list:

  No soundcards found.

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 1970-01-01 09:19:13 UTC (33553)

IP-Config: Complete:

     device=eth0, addr=, mask=, gw=,

     host=bf527-ezkit, domain=, nis-domain=(none),

     bootserver=, rootserver=, rootpath=

Freeing unused kernel memory: 7956k freed


        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin


Have a lot of fun...



BusyBox v1.18.4 (2011-11-15 04:13:16 CST) hush - the humble shell


root:/> PHY: 0:01 - Link is Up - 100/Full


root:/> modprobe g_zero autoresume=5

zero gadget: Gadget Zero, version: Cinco de Mayo 2008

zero gadget: zero ready

musb-hdrc musb-hdrc: MUSB HDRC host driver

musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

root:/> zero gadget: high speed config #3: source/sink



root:/> zero gadget: zero_autoresume --> -22

usb 1-1: new high speed USB device number 2 using musb-hdrc

usb 1-1: device v0781 p5530 is not supported

scsi0 : usb-storage 1-1:1.0

scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer           8.02 PQ: 0 ANSI: 0 CCS

sd 0:0:0:0: [sda] 3907583 512-byte logical blocks: (2.00 GB/1.86 GiB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] No Caching mode page present

sd 0:0:0:0: [sda] Assuming drive cache: write through

sd 0:0:0:0: [sda] No Caching mode page present

sd 0:0:0:0: [sda] Assuming drive cache: write through

sda: sda1

sd 0:0:0:0: [sda] No Caching mode page present

sd 0:0:0:0: [sda] Assuming drive cache: write through

sd 0:0:0:0: [sda] Attached SCSI removable disk




root:/> usb 1-1: USB disconnect, device number 2







--- Vivi Li                                                  2011-11-23 06:08:11

This test used to be done in bf527-ezkit 1.4 board, now we don't have such board

and test is done in 2.0 board.

Also bug 6777 still exists in bf527-ezkit and I'm not sure if they are related.


--- Bob Liu                                                  2011-11-29 01:56:29

Can't reproduce, but my host machine is 2.6.31 instead of 2.6.25.


zero gadget: zero_autoresume --> -22

is just an info message, if using "modprobe g_zero" without

autoresume=5, there is no such print.


--- Vivi Li                                                  2011-12-05 04:53:57

I try to test with bf527-ezkit board version 2.2 instead of 2.0, and also I

don't switch too fast, it works better.












File Name     File Type     File Size     Posted By

config.linux.usbotg    application/octet-stream    48685    Vivi Li

config.config.usbotg    application/octet-stream    51858    Vivi Li