Re: usb, davinci: usb 2.0 problem on an am1808 based board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 11.11.2011 11:19, Felipe Balbi wrote:

I try to bring up usb 2.0 support on an am1808 based
board and Linux version 3.1.0-rc10 and I am facing
some issues:

- in arch/arm/mach-davinci/usb.c in
   static struct musb_hdrc_platform_data usb_data
   ".mode" var get only initialized if some of the
   CONFIG_USB_MUSB_* config options are set, but your

   commit 622859634a663c5e55d0e2a2cdbb55ac058d97b3
     Author: Felipe Balbi<balbi@xxxxxx>
     Date:   Wed Jun 22 17:28:09 2011 +0300

         usb: musb: drop a gigantic amount of ifdeferry

   dropped a lot of ifdefs, also the USB_MUSB_HOST,
   USB_MUSB_PERIPHERAL and USB_MUSB_OTG defines, which
   are used in arch/arm/mach-davinci/usb.c!

   So I think, this ".mode" var is used uninitialized,
   or miss I something?

In that case it's initialized to 0 by default (as this is a static variable) -- which corresponds to MUSB_UNDEFINED. That's not a good value indeed.

   I made a patch, which sets this var to MUSB_OTG
   which should be the right value ... should I post
   it? (BTW: in arch/arm/mach-davinci/board-da830-evm.c
   is also an CONFIG_USB_MUSB_HOST define, which
   should be cleaned up)
sure, that needs to be applied.

   No, that's not a correct patch, I'm afraid...


- If I set ".mode = MUSB_OTG" and set in the syscfg2
   soc register ~CFGCHIP2_OTGMODE a memstick is not
   detected.

Have you loaded the gadget driver? You have to in the OTG mode -- else the USB host won't initialize.

  But if I add in drivers/usb/musb/da8xx.c
   da8xx_musb_interrupt() a 10ms delay befor the
   "if (status&  (DA8XX_INTR_DRVVBUS<<  DA8XX_INTR_USB_SHIFT)) {"
   line usb works fine!
   It also works without this timeout if I change the
   "dev_dbg(musb->controller, "USB IRQ %08x\n", status);"
   to
   "printk(musb->controller, "USB IRQ %08x\n", status);"

   ->  some timing issue, but I have no idea why!
      (Maybe you have an idea?)
unfortunately I don't know any details about DaVinci.

   AM1808 is not exactly DaVinci, to be precise...

Sergei, are you able to help on this question ?

   Maybe. :-)


- We use on the board host only mode, so i tried the
   following:

   set syscfg2 |= CFGCHIP2_FORCE_HOST in board code,
   and in arch/arm/mach-davinci/usb.c

static struct musb_hdrc_platform_data usb_data = {
-       .mode           = MUSB_OTG,
+       .mode           = MUSB_HOST,

    ->  USB works (without the above timeout) fine!

   Well, I'm not surprised...

Do you have any idea?

I think, the issue with the CONFIG_USB_MUSB_* and
the not setup var ".mode" in musb_hdrc_platform_data
must be fixed ... and I think MUSB_OTG should be the right
value ... or?
yes, the MUSB IP is always OTG-capable and if that's not working on
DaVinci, the root cause needs to be found and fixed.

IIRC, DaVinci DM644x EVM board has OTG incapable host only connector, hence that code.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux