maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   N900 will not allow USB OTG! (https://talk.maemo.org/showthread.php?t=31921)

MohammadAG 2010-05-09 19:21

Re: N900 will not allow USB OTG!
 
I don't have the slightest idea how this works, but Mer (based on Ubuntu 8.04) *should* have the drivers right? (correct me if I'm wrong).
Wouldn't switching to Mer allow the USB device to work (as in file transfers/mouse movement etc...)? (Just as a proof of concept)


Edit: scratch that, <Stskeeps> no, same kernel

javispedro 2010-05-09 21:57

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by egoshin (Post 650145)
I looked briefly in code - yes, there is no support for that kind of devices. But it should be supported via device class - hub at least for sure. So, some software debug print is needed to find out the whole info from device... tomorrow.

Hub device class driver is there for sure (root hub). A simple lsusb -v should print both the root hub and your external hub descriptors.

blue_led 2010-05-10 20:49

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by egoshin (Post 650145)
OK, some success (at least I think so).

I used a wall-powered hub with USB memory stick and external USB hard drive. I applied 3.5V from TWL4030 to VBUS and set Host mode of operations in ARM CPU USB.

The result - in both cases a lot of communications (TX interrupts but no RX - ?) and finally the message -

Nokia-N900-42-11 kernel: [...] usb 1-1: device v04b4 p6560 is not supported <---- this is for USB Hub with USB memory stick

Nokia-N900-42-11 kernel: [...] usb 1-1: device v0bc2 p3000 is not supported <---- this is for USB hard disk.

EDIT: verified via SuSE notebook - Hard Disk is 0bc2:3000 Seagate RSS LLC, and HUB - 04b4:6560 Cypress Semiconductor Corp. CY7C65640 USB-2.0 "TetraHub"

Taking into account the different Vendor (v*) and Product (p*) values and the very remarkable Product value for HDisk - p3000, I assume that it is values read from devices.


I looked briefly in code - yes, there is no support for that kind of devices. But it should be supported via device class - hub at least for sure. So, some software debug print is needed to find out the whole info from device... tomorrow.

your hub is well known usb.id
http://mxr.maemo.org/fremantle/sourc...ls/usb.ids#951
but hdd is not
AFIK usb devices attached to an otg or embedded host controller should be in a list named "Targeted Peripheral List"
http://mxr.maemo.org/fremantle/sourc...b/otg/otg.c#75

did you recognize this ?

164 /* OTG MESSAGE: report errors here, customize to match your product */
165 dev_err(&dev->dev, "device v%04x p%04x is not supported\n",
166 le16_to_cpu(dev->descriptor.idVendor),
167 le16_to_cpu(dev->descriptor.idProduct));
168
169 return 0;


you touch otg state machine :)

egoshin 2010-05-10 21:08

Re: N900 will not allow USB OTG!
 
Yes, I know this. But whitelist has this too:

83 /* hubs are optional in OTG, but very handy ... */
84 { USB_DEVICE_INFO(USB_CLASS_HUB, 0, 0), },
85 { USB_DEVICE_INFO(USB_CLASS_HUB, 0, 1), },

And hub should have USB HUB class in it's descriptor. Looks like something goes wrong in reading descriptor from device (it is worst case and it is strange - why does it read one descriptor but not other) but most probably - it is not debugged well in driver. It can be because HW still works as B-device but in HOST mode and driver knows this fact.

If so, I would like to use FORCE_HOST mode to switch in A-device state but who knows - it may be impossible without grounded ID pin and we should fix a driver.

gryedouge 2010-05-10 21:11

Re: N900 will not allow USB OTG!
 
At the risk of being on the wrong page,

doesnt this thread have any solutions?

http://talk.maemo.org/showthread.php?t=52227

joerg_rw 2010-05-10 22:46

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by egoshin (Post 652400)
It can be because HW still works as B-device but in HOST mode and driver knows this fact.

If so, I would like to use FORCE_HOST mode to switch in A-device state but who knows - it may be impossible without grounded ID pin and we should fix a driver.

No. The PHY chip and the musb in SoC obviously can talk to the hub, otherwise the vendor/product ids were not visible. I *honestly* doubt musb-hw on SoC has a problem like "I decide to cripple parts of data from device in HARDWARE because I'm in the wrong mode". In expression this is a SOFTWARE problem, not a hardware configuration issue.

And seriously - I thought we're thru with ID pin once and for all.

The above details show that driver is NOT in hostmode, but it still operates as a OTG device. We need to fix that - rather than any ID pin detection.

Marshall Banana 2010-05-10 22:47

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by gryedouge (Post 652405)
At the risk of being on the wrong page,

doesnt this thread have any solutions?

http://talk.maemo.org/showthread.php?t=52227

Actually the thread you linked is a synopsis of the results of this thread.

I think the thread "USB HOST MODE! (Coming soon)" was created to announce that usb host mode is (hopefully) comming soon for the n900. It's a place where the less tech-savvy people can inform themselves and discuss about usb host mode for the n900.

So talk about the BME, VBUS power, the TWL4030 and kernel patches goes here and talk about various devices to plug into the n900 and why nokia disabled it goes there.

javispedro 2010-05-10 22:57

Re: N900 will not allow USB OTG!
 
Ehm...

rx51_defconfig contains

CONFIG_USB_OTG_WHITELIST=y
CONFIG_USB_OTG_BLACKLIST_HUB=y

So why not disable them both?

blue_led 2010-05-10 23:19

Re: N900 will not allow USB OTG!
 
i just landed on this too

i think we need whitelist but

1144 #ifdef CONFIG_USB_OTG_BLACKLIST_HUB
1145 if (hdev->parent) {
1146 dev_warn(&intf->dev, "ignoring external hub\n");
1147 return -ENODEV;
1148 }

and rx51_defconfig
1436 # CONFIG_USB_MUSB_HOST is not set
1437 # CONFIG_USB_MUSB_PERIPHERAL is not set
1438 CONFIG_USB_MUSB_OTG=y

so we have OTG only !!
memory behavior is provided by g_nokia and other modules ?

joerg_rw 2010-05-11 00:33

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by blue_led (Post 652516)
i just landed on this too

i think we need whitelist but

1144 #ifdef CONFIG_USB_OTG_BLACKLIST_HUB
1145 if (hdev->parent) {
1146 dev_warn(&intf->dev, "ignoring external hub\n");
1147 return -ENODEV;
1148 }

and rx51_defconfig
1436 # CONFIG_USB_MUSB_HOST is not set
1437 # CONFIG_USB_MUSB_PERIPHERAL is not set
1438 CONFIG_USB_MUSB_OTG=y

so we have OTG only !!
memory behavior is provided by g_nokia and other modules ?

well, we shouldn't need whitelist as it's a OTG thing. What we need though is a working hostmode triggered by 'echo host >mode'
printks from that whitelist thing indicate this hasn't been issued or it failed to take effect

so I absolutely agree on the CONFIG-*-* stuff needing further investigation. See one of my previous posts about suspicious/interesting things I stumbled over in rx51-defconfig

/jOERG


All times are GMT. The time now is 07:30.

vBulletin® Version 3.8.8