|
2010-01-03
, 15:51
|
Posts: 82 |
Thanked: 214 times |
Joined on Jan 2010
@ Cape town
|
#542
|
echo M > /proc/driver/musb_hdrc
The Following 10 Users Say Thank You to cb22 For This Useful Post: | ||
|
2010-01-03
, 16:02
|
Posts: 2,102 |
Thanked: 1,309 times |
Joined on Sep 2006
|
#543
|
|
2010-01-03
, 16:08
|
Posts: 82 |
Thanked: 214 times |
Joined on Jan 2010
@ Cape town
|
#544
|
The Following 3 Users Say Thank You to cb22 For This Useful Post: | ||
|
2010-01-03
, 16:50
|
Posts: 119 |
Thanked: 110 times |
Joined on Sep 2009
@ Prague
|
#545
|
The Following 4 Users Say Thank You to andree For This Useful Post: | ||
|
2010-01-03
, 17:23
|
Posts: 82 |
Thanked: 214 times |
Joined on Jan 2010
@ Cape town
|
#546
|
The Following 7 Users Say Thank You to cb22 For This Useful Post: | ||
|
2010-01-03
, 20:29
|
Posts: 119 |
Thanked: 110 times |
Joined on Sep 2009
@ Prague
|
#547
|
The Following 2 Users Say Thank You to andree For This Useful Post: | ||
|
2010-01-05
, 04:54
|
Posts: 243 |
Thanked: 172 times |
Joined on Sep 2007
@ silicon valley
|
#548
|
|
2010-01-06
, 10:39
|
Posts: 6 |
Thanked: 11 times |
Joined on Jan 2010
|
#549
|
oh well, I guess we will need beagleboard or something - to debug what exactly is happening with the usb bus, when connected... crap.. ;-(
wouldn't be bad to have some nokia developer to tell us, how's it connected internally - and spare us some time...
The Following 4 Users Say Thank You to EugeneS For This Useful Post: | ||
|
2010-01-06
, 13:30
|
Posts: 258 |
Thanked: 138 times |
Joined on Oct 2009
@ St. Louis, MO, USA
|
#550
|
Tags |
awesomeness in the works, boulevard of broken deals, host, i am the dealbreaker, inspector gadget lies, mobidapter is a scam, nokia fanbois, otg, over 9000, usb, usbcontrol |
|
The usb part of twl4030/omap3430 is handled using musb_hrdc module. Aaccording to omap3 reference manual, omap3430 is a implementation of the musb_hrdc "standard", thus the universal driver is used - and we can assume from that, that nokia didn't probably do any special tricks to the omap3 platform...
Unfortunately, the proposed host-setting solution, using
echo host > /sys/devices/platform/musb_hdrc/mode
won't work here, because of the ID pin not being attached to usb port of n900 (this disables autodetection usb mode) - and maybe because of other stuff too..
From what I've found, I think that forcing the usb controller into hostmode isn't possible with current kernel either.
HOWEVER:
The musb_hdrc module registers a file /proc/driver/musb_hdrc , that contains some debug info. By echoing misc. stuff into that file, one can change some settings of the controller.
For example
echo H > /proc/driver/musb_hdrc
stands for "request host mode". And
echo h > /proc/driver/musb_hdrc
for "cancel host mode" request...
The code for this can be found in kernel source code:
kernel-source/drivers/usb/musb/musb_procfs.c (lines 590-699)
Didn't try, whether this works - and it probably won't.
HOWEVER2
The current implementation of musb_hrdc doesn't use the TESTMODE register bit MUSB_TEST_FORCE_HOST .... This should put the controller into hostmode, no matter how the ID pin is connected (text from omap3430 documentation):
The Force Host test mode enables the user to instruct the core to operate in Host mode, regardless of
whether it is actually connected to any peripheral i.e. the state of the CID input and the LINESTATE and
HOSTDISCON signals are ignored. (While in this mode, the state of the HOSTDISCON signal can be read
from bit 7 of the DevCtl register.)
This mode, which is selected by setting bit 7 within the Testmode register, allows implementation of the
USB TEST_FORCE_ENABLE (7.1.20). It can also be used for debugging PHY problems in hardware.
While the FORCE_HOST bit remains set, the core will enter Host mode when the Session bit is set and
remain in Host mode until the Session bit is cleared even if a connected device is disconnected during the
session. The operating speed while in this mode is determined for the setting of the FORCE_HS and
FORCE_FS bits of the Testmode register in Section 23.1.4.11.
I didn't find any useful sysfile to control the TESTMODE register from current kernel, so I suppose a kernel recompile is required (as musb_hrdc isn't compiled as a module), with the following added to the musb_proc_write function switch:
and after that
echo M > /proc/driver/musb_hdrc
should force controller to work in host mode... Didn't test it, don't now whether it'll work (e.g. with the proposed powered-hub workaround).. Hope someone will test this (and the previous H/h parameter) - I myself currently don't have enough time to play with it, and no custom usb cable...