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-20 01:03

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by egoshin (Post 666857)
It is a CPU frequency boost on any event from your WD HD.

/class/input/input4, HID, that means it was attached (or a part of it) as an input device.
CPU frequency doesn't change, and HID devices shouldn't alter frequency.
It's most probably the LEDs as SpeedEvil said.
It's also a plain HDD, nothing that should cause 'boost' events.

javispedro 2010-05-20 01:33

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by MohammadAG (Post 666802)
The echo host > ... part is redundant and doesn't do anything, so it can be left out.

If you're providing your own vbus with an Y-cable, then it surely is, as the only it does now is toggle the twl4030 vbus pump (this is exactly what I was talking about when I said "play your cards well" in my previous post ;P ).

egoshin 2010-05-20 04:25

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by MohammadAG (Post 666877)
/class/input/input4, HID, that means it was attached (or a part of it) as an input device.
CPU frequency doesn't change, and HID devices shouldn't alter frequency.
It's most probably the LEDs as SpeedEvil said.
It's also a plain HDD, nothing that should cause 'boost' events.

The 'input' driver is used by ondemand cpufreq scaling governor to boost CPU frequency immediately after some input event happens - you press unlock, keyboard, touchpad or power button. Attachment of dynamic USB device pursues the same goal.

EDIT: without it the scaling governor boosts frequency only after 75millisec.

eryx 2010-05-20 07:02

Re: N900 will not allow USB OTG!
 
Can we use WiMax usb modem with this host mode? madwifi drivers theoretically can be easy compiled for N900.

hcm 2010-05-20 07:48

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by blue_led (Post 666756)
those messages are obtained with high power charger attached , right ?
so nothing special , bme reset 32 s timer 4 times per minute . too often i think but in charge mode any battery savings is nonsense.
bme don't destroy vbus , simply bme have no idea ( and code ) about vbus and host mode status.
code is written only for charging mode not charge or boost vbus

no, there was nothing attached to the USB port. This is also confirmed by the value 0x00 read from the status register (no charge in progress, no charge done).

MohammadAG 2010-05-20 08:32

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by javispedro (Post 666891)
If you're providing your own vbus with an Y-cable, then it surely is, as the only it does now is toggle the twl4030 vbus pump (this is exactly what I was talking about when I said "play your cards well" in my previous post ;P ).

http://i50.tinypic.com/wjtff8.jpg

No Y cable here :)
(The cable was for the HDD, which I tried after testing if echo host is necessary or not)

MohammadAG 2010-05-20 09:50

Re: N900 will not allow USB OTG!
 
http://i48.tinypic.com/2uyr9u1.jpg

Bad quality (10MP cameras these days...), but you get the idea (E: yellow light was solid when the drive was connected)

Code:

[38724.031738] usb 1-1: new high speed USB device using musb_hdrc and address 2
[38724.181701] usb 1-1: configuration #1 chosen from 1 choice
[38724.866882] Initializing USB Mass Storage driver...
[38724.884979] scsi0 : SCSI emulation for USB Mass Storage devices
[38724.892120] usbcore: registered new interface driver usb-storage
[38724.892150] USB Mass Storage support registered.
[38724.916107] usb-storage: device found at 2
[38724.916107] usb-storage: waiting for device to settle before scanning
[38729.997253] usb-storage: device scan complete
[38730.003479] scsi 0:0:0:0: CD-ROM            TSSTcorp CDDVDW SE-T084M  TS01 PQ: 0 ANSI: 0

The drive spun up using the N900's power alone (then it went back to a slow quiet spin), but it was detected using the N900's port solely.
Connected it to the PS3 to get more power (which kicked it back into speed - still though, nothing in /dev)
However it didn't show up as a node in /dev, so I couldn't mount it.

E: Also tried a Wireless-N Wi-Fi USB adapter, it didn't power up but I have two guesses:
1. It's using too much power
2. It causes a kernel panic on my PC, so it might be borked :)

E2: Connecting the AC charger and running the pcsuite-enable.sh script causes the "Connected to USB device" dialog to pop up.

E3: requested...
http://i50.tinypic.com/2s8o8jn.jpg

Code:

[45571.000640] usb 1-1: new full speed USB device using musb_hdrc and address 29
[45571.150421] usb 1-1: configuration #1 chosen from 1 choice
[45571.238159] scsi4 : SCSI emulation for USB Mass Storage devices
[45571.273651] usb-storage: device found at 29
[45571.273681] usb-storage: waiting for device to settle before scanning
[45576.301910] usb-storage: device scan complete
[45576.303314] scsi 4:0:0:0: Direct-Access    Nokia    S60              1.0  PQ: 0 ANSI: 0
[45576.329681] sd 4:0:0:0: [sda] 3964928 512-byte hardware sectors: (2.03 GB/1.89 GiB)
[45576.330291] sd 4:0:0:0: [sda] Write Protect is off
[45576.330291] sd 4:0:0:0: [sda] Mode Sense: 03 00 00 00
[45576.330322] sd 4:0:0:0: [sda] Assuming drive cache: write through
[45576.334014] sd 4:0:0:0: [sda] 3964928 512-byte hardware sectors: (2.03 GB/1.89 GiB)
[45576.334594] sd 4:0:0:0: [sda] Write Protect is off
[45576.334594] sd 4:0:0:0: [sda] Mode Sense: 03 00 00 00
[45576.334625] sd 4:0:0:0: [sda] Assuming drive cache: write through
[45576.334625]  sda:
[45576.712646] sd 4:0:0:0: [sda] Attached SCSI removable disk

http://i48.tinypic.com/2s6lhdy.jpg

E4: requested:
Code:

[48481.302795] input: Microsoft Microsoft� 2.4GHz Transceiver v4.0 as /class/input/input4
[48481.383453] generic-usb 0003:045E:0745.0001: input: USB HID v1.11 Keyboard [Microsoft Microsoft� 2.4GHz Transceiver v4.0] on usb-musb_hdrc-1/input0
[48481.402465] input: Microsoft Microsoft� 2.4GHz Transceiver v4.0 as /class/input/input5
[48481.477203] generic-usb 0003:045E:0745.0002: input: USB HID v1.11 Mouse [Microsoft Microsoft� 2.4GHz Transceiver v4.0] on usb-musb_hdrc-1/input1
[48481.749420] input: Microsoft Microsoft� 2.4GHz Transceiver v4.0 as /class/input/input6
[48481.820953] generic-usb 0003:045E:0745.0003: input: USB HID v1.11 Device [Microsoft Microsoft� 2.4GHz Transceiver v4.0] on usb-musb_hdrc-1/input2
[48481.829223] usbcore: registered new interface driver usbhid
[48481.829315] usbhid: v2.6:USB HID core driver


MohammadAG 2010-05-20 12:04

Re: N900 will not allow USB OTG!
 
1 Attachment(s)
Patch to disable limits on power:
Code:

--- drivers/usb/core/generic.c        2008-12-25 01:26:37.000000000 +0200
+++ ../kernel-2.6.28.patched.working/drivers/usb/core/generic.c        2010-05-19 22:18:33.915723530 +0300
@@ -97,10 +97,10 @@
                  */
 
                /* Rule out configs that draw too much bus current */
-                if (c->desc.bMaxPower * 2 > udev->bus_mA) {
+                /*if (c->desc.bMaxPower * 2 > udev->bus_mA) {
                        insufficient_power++;
                        continue;
-                }
+                }*/
 
                /* When the first config's first interface is one of Microsoft's
                  * pet nonstandard Ethernet-over-USB protocols, ignore it unless
@@ -132,10 +132,10 @@
                        best = c;
        }
 
-        if (insufficient_power > 0)
+        /*if (insufficient_power > 0)
                dev_info(&udev->dev, "rejected %d configuration%s "
                        "due to insufficient available bus power\n",
-                        insufficient_power, plural(insufficient_power));
+                        insufficient_power, plural(insufficient_power));*/
 
        if (best) {
                i = best->desc.bConfigurationValue;

Patch for rx51_defconfig
Code:

--- arch/arm/configs/rx51_defconfig        2010-05-20 14:56:18.000000000 +0300
+++ ../kernel-2.6.28.patched.working/arch/arm/configs/rx51_defconfig        2010-05-20 15:01:24.068032001 +0300
@@ -1324,7 +1324,7 @@
 #
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE is not set
+CONFIG_FRAMEBUFFER_CONSOLE=y
 # CONFIG_LOGO is not set
 CONFIG_SOUND=y
 # CONFIG_SOUND_OSS_CORE is not set
@@ -1413,8 +1413,6 @@
 CONFIG_USB_DYNAMIC_MINORS=y
 CONFIG_USB_SUSPEND=y
 CONFIG_USB_OTG=y
-CONFIG_USB_OTG_WHITELIST=y
-CONFIG_USB_OTG_BLACKLIST_HUB=y
 CONFIG_USB_MON=y
 # CONFIG_USB_WUSB is not set
 # CONFIG_USB_WUSB_CBAF is not set

.config file has to be changed (use one attached)
Build with make bzImage.

slender 2010-05-20 12:10

Re: N900 will not allow USB OTG!
 
Looks wonderful, but what does these advancements here really mean if we speak just about reading/writing simple usb-stick?

- Do I need to patched kernel?
- What hardware/cables do I need
-- Does it matter how fast / on what order I connect cables+stick
- Is it mounted automatically
-- is fat32 the safest bet?

MohammadAG 2010-05-20 12:33

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by slender (Post 667532)
Looks wonderful, but what does these advancements here really mean if we speak just about reading/writing simple usb-stick?

- Do I need to patched kernel?
- What hardware/cables do I need
-- Does it matter how fast / on what order I connect cables+stick
- Is it mounted automatically
-- is fat32 the safest bet?

- Yes, patches above.
- Only an F-F adapter and the stock USB cable.
- It's just a bug at the moment that requires a connection to a PC first, fixing the driver should make it work without a PC.
- No, not at the moment
- File system doesn't matter, all should work, as long as the N900 supports them


All times are GMT. The time now is 22:55.

vBulletin® Version 3.8.8