Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

N800 experimental host mode patches updated

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


tony at atomide

Oct 12, 2007, 12:07 PM

Post #1 of 14 (4855 views)
Permalink
N800 experimental host mode patches updated

Hi all,

I did a quick update of the N800 host mode patches against
osso55 kernel release, and latest musb driver snapshot
from linux-omap tree.

The musb driver in linux-omap tree has had quite a few
changes since July, so the host mode should work much
better now. I've only done minimal testing on it to make
sure mass storage devices are enumerated.

The patches are available at:

http://www.muru.com/linux/n800-usb-host/

Cheers,

Tony
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


lbattraw at gmail

Oct 12, 2007, 12:53 PM

Post #2 of 14 (4770 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

Hi Tony, before anyone else asks-- would you mind posting a compiled kernel
image so it's not necessary to for everyone to set up the cross-compiling
environment and apply the patches, etc.? It would be greatly appreciated-

Thanks!
Larry Battraw

On 10/12/07, Tony Lindgren <tony [at] atomide> wrote:
>
> Hi all,
>
> I did a quick update of the N800 host mode patches against
> osso55 kernel release, and latest musb driver snapshot
> from linux-omap tree.
>
> The musb driver in linux-omap tree has had quite a few
> changes since July, so the host mode should work much
> better now. I've only done minimal testing on it to make
> sure mass storage devices are enumerated.
>
> The patches are available at:
>
> http://www.muru.com/linux/n800-usb-host/
>
> Cheers,
>
> Tony
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>


tony at atomide

Oct 12, 2007, 12:58 PM

Post #3 of 14 (4769 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

* Larry Battraw <lbattraw [at] gmail> [071012 12:53]:
> Hi Tony, before anyone else asks-- would you mind posting a compiled kernel
> image so it's not necessary to for everyone to set up the cross-compiling
> environment and apply the patches, etc.? It would be greatly appreciated-

Heh, well the thing is that I don't have scratchbox set up either, I'm just
using arm-none-linux-gnueabi-gcc... So I don't think the wlan would load.

Anybody else here willing to provide the compiled kernels? Maybe throw
in also the MMC patches from http://intr.overt.org/blog/?p=63 :)

Tony

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


dufkaf at seznam

Oct 12, 2007, 1:07 PM

Post #4 of 14 (4768 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

Tony Lindgren wrote:

> Anybody else here willing to provide the compiled kernels? Maybe throw
> in also the MMC patches from http://intr.overt.org/blog/?p=63 :)

Just finished the crypto API enabled kernel
http://www.internettablettalk.com/forums/showthread.php?p=81758#post81758
so I guess I'll just add this and rebuild the kernel once again :-) Will
take few minutes.

F
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


tony at atomide

Oct 12, 2007, 1:11 PM

Post #5 of 14 (4789 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

* Frantisek Dufka <dufkaf [at] seznam> [071012 13:07]:
> Tony Lindgren wrote:
>
>> Anybody else here willing to provide the compiled kernels? Maybe throw
>> in also the MMC patches from http://intr.overt.org/blog/?p=63 :)
>
> Just finished the crypto API enabled kernel
> http://www.internettablettalk.com/forums/showthread.php?p=81758#post81758
> so I guess I'll just add this and rebuild the kernel once again :-) Will
> take few minutes.

Great! I look forward flashing it :)

Tony


_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


dufkaf at seznam

Oct 12, 2007, 2:09 PM

Post #6 of 14 (4773 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

OK, my attempt is here
http://fanoush.wz.cz/maemo/4.2007-usbhost-kernel.tar.gz
http://fanoush.wz.cz/maemo/4.2007-usbhost-modules.tar.gz

It boots, has 48Mhz MMC mode enabled but without the mmc clock debug
patch since it is printed very often (at least when one boots from MMC).

I have actually never tried host mode with N800, just 770 and when doing
echo host > /sys/devices/platform/musb_hdrc/mode
with this kernel nothing happens in log and it still contains "b_idle".
Tried to connect powered hub, mmc card reader and mouse and it does
nothing. I dont have proper cable for autoswitching, just regular
mini-USB with female to female adapter on the end.

kernel contains .config so please check if anything is wrong. Since I
already had custom config I tried to enable same options by hand.

Frantisek
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


syrjala at sci

Oct 12, 2007, 2:46 PM

Post #7 of 14 (4777 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

On Fri, Oct 12, 2007 at 11:09:41PM +0200, Frantisek Dufka wrote:
> OK, my attempt is here
> http://fanoush.wz.cz/maemo/4.2007-usbhost-kernel.tar.gz
> http://fanoush.wz.cz/maemo/4.2007-usbhost-modules.tar.gz
>
> It boots, has 48Mhz MMC mode enabled but without the mmc clock debug
> patch since it is printed very often (at least when one boots from MMC).
>
> I have actually never tried host mode with N800, just 770 and when doing
> echo host > /sys/devices/platform/musb_hdrc/mode
> with this kernel nothing happens in log and it still contains "b_idle".
> Tried to connect powered hub, mmc card reader and mouse and it does
> nothing. I dont have proper cable for autoswitching, just regular
> mini-USB with female to female adapter on the end.
>
> kernel contains .config so please check if anything is wrong. Since I
> already had custom config I tried to enable same options by hand.

I didn't test this particular kernel but I did use host mode a few days
ago. I had to disable CONFIG_USB_OTG_WHITELIST to make it work.

--
Ville Syrjälä
syrjala [at] sci
http://www.sci.fi/~syrjala/
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


tony at atomide

Oct 12, 2007, 2:55 PM

Post #8 of 14 (4762 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

* syrjala [at] sci <syrjala [at] sci> [071012 14:46]:
> On Fri, Oct 12, 2007 at 11:09:41PM +0200, Frantisek Dufka wrote:
> > OK, my attempt is here
> > http://fanoush.wz.cz/maemo/4.2007-usbhost-kernel.tar.gz
> > http://fanoush.wz.cz/maemo/4.2007-usbhost-modules.tar.gz
> >
> > It boots, has 48Mhz MMC mode enabled but without the mmc clock debug
> > patch since it is printed very often (at least when one boots from MMC).
> >
> > I have actually never tried host mode with N800, just 770 and when doing
> > echo host > /sys/devices/platform/musb_hdrc/mode
> > with this kernel nothing happens in log and it still contains "b_idle".
> > Tried to connect powered hub, mmc card reader and mouse and it does
> > nothing. I dont have proper cable for autoswitching, just regular
> > mini-USB with female to female adapter on the end.
> >
> > kernel contains .config so please check if anything is wrong. Since I
> > already had custom config I tried to enable same options by hand.
>
> I didn't test this particular kernel but I did use host mode a few days
> ago. I had to disable CONFIG_USB_OTG_WHITELIST to make it work.

Yes, that should be unset.

Tony
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


dufkaf at seznam

Oct 12, 2007, 2:57 PM

Post #9 of 14 (4792 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

syrjala [at] sci wrote:
> I didn't test this particular kernel but I did use host mode a few days
> ago. I had to disable CONFIG_USB_OTG_WHITELIST to make it work.
>

Thanks, just tried and it didn't help. Still the same. Also found later
that this kernel with host mode patches kills also normal client mode.
After boot when attached to PC it does nothing too.

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


tony at atomide

Oct 12, 2007, 6:52 PM

Post #10 of 14 (4775 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

* Frantisek Dufka <dufkaf [at] seznam> [071012 14:57]:
> syrjala [at] sci wrote:
> > I didn't test this particular kernel but I did use host mode a few days
> > ago. I had to disable CONFIG_USB_OTG_WHITELIST to make it work.
> >
>
> Thanks, just tried and it didn't help. Still the same. Also found later
> that this kernel with host mode patches kills also normal client mode.
> After boot when attached to PC it does nothing too.

It needs a gadget loaded to be active because it runs in OTG mode.
For some reason g_file_storage is not loaded automatically, do things
work if you run /usr/sbin/osso-usb-mass-storage-enable.sh after booting?

If I run that, peripheral and host modes work.

Regards,

Tony
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


dufkaf at seznam

Oct 13, 2007, 12:48 AM

Post #11 of 14 (4766 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

Tony Lindgren wrote:

> It needs a gadget loaded to be active because it runs in OTG mode.
> For some reason g_file_storage is not loaded automatically, do things
> work if you run /usr/sbin/osso-usb-mass-storage-enable.sh after booting?
>
> If I run that, peripheral and host modes work.
>

Yes, that was the trick, thank you. The script above takes storage
devices as a parameter so it should be run like
/usr/sbin/osso-usb-mass-storage-enable.sh /dev/mmcblk0 /dev/mmcblk1

Tried, hub, mouse and flash disk and they get detected. Will do more
tests this evening (it is morning here now).

I have re-uploaded the kernel with CONFIG_USB_OTG_WHITELIST disabled.

BTW, when after host mode I did
echo otg > /sys/devices/platform/musb_hdrc/mode
N800 was not properly dedected by PC (with Windows XP), it said 'device
malfunctioned' and prompted for driver install. I had to run
echo peripheral > /sys/devices/platform/musb_hdrc/mode
To see my cards mounted on PC.

Regards,
Frantisek

Oh, and thanks for your work on N800 host mode patches :-)
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


tony at atomide

Oct 13, 2007, 9:32 AM

Post #12 of 14 (4750 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

Hi,

* Frantisek Dufka <dufkaf [at] seznam> [071013 00:48]:
> Tony Lindgren wrote:
>
>> It needs a gadget loaded to be active because it runs in OTG mode.
>> For some reason g_file_storage is not loaded automatically, do things
>> work if you run /usr/sbin/osso-usb-mass-storage-enable.sh after booting?
>> If I run that, peripheral and host modes work.
>
> Yes, that was the trick, thank you. The script above takes storage devices
> as a parameter so it should be run like
> /usr/sbin/osso-usb-mass-storage-enable.sh /dev/mmcblk0 /dev/mmcblk1
>
> Tried, hub, mouse and flash disk and they get detected. Will do more tests
> this evening (it is morning here now).

OK good. No idea why it does not start automatically any longer though.

> I have re-uploaded the kernel with CONFIG_USB_OTG_WHITELIST disabled.

Great!

> BTW, when after host mode I did
> echo otg > /sys/devices/platform/musb_hdrc/mode
> N800 was not properly dedected by PC (with Windows XP), it said 'device
> malfunctioned' and prompted for driver install. I had to run
> echo peripheral > /sys/devices/platform/musb_hdrc/mode
> To see my cards mounted on PC.

Yes, changing back to peripheral mode without ID pin grounded is a known
issue... Unfortunately I don't have time to look into that right now.

> Oh, and thanks for your work on N800 host mode patches :-)

No problem, thank you for providing custom kernel!

Tony
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


juuso.rasanen at hotmail

Oct 17, 2007, 1:49 AM

Post #13 of 14 (4713 views)
Permalink
RE: N800 experimental host mode patches updated [In reply to]

>> OK, my attempt is here
> http://fanoush.wz.cz/maemo/4.2007-usbhost-kernel.tar.gz
> http://fanoush.wz.cz/maemo/4.2007-usbhost-modules.tar.gz

Thank you!

What is the role of this latter file? Should I copy the files of this "modules" directory into somewhere at N800?

Currently I just flashed the kernel with following command:
./flasher-3.0 -f -k zImage-usbhost --enable-usb-host-mode --enable-rd-mode -R

and totally ignored the latter modules file... It seems that the devices are now somehow detected but they don't get any drivers allocated. This was verifyid with the usbtree (http://www.linux-usb.org/usbtree) script...

/home/user # /usr/sbin/osso-usb-mass-storage-enable.sh /dev/mmcblk0 /dev/mmcblk1
/home/user # echo otg> /sys/devices/platform/musb_hdrc/mode
/home/user # echo host> /sys/devices/platform/musb_hdrc/mode
/home/user # mount -t usbfs procbususb /proc/bus/usb
/home/user # usbtree
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/4p, 480M
|__ Port 2: Dev 3, If 0, Class=HID, Driver=none, 1.5M
|__ Port 2: Dev 3, If 1, Class=HID, Driver=none, 1.5M
|__ Port 3: Dev 4, If 0, Class=stor., Driver=none, 480M

And the devices (a keyboard and a mass storage stick) are not working either... :( Only the powered usb hub seems to be fine.

So, what could be of help there??

Juuso Räsänen
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


dufkaf at seznam

Oct 17, 2007, 2:14 AM

Post #14 of 14 (4732 views)
Permalink
Re: N800 experimental host mode patches updated [In reply to]

Juuso Räsänen wrote:
> What is the role of this latter file?

kernel modules (i.e. drivers), you need to extract it somewhere and use
insmod (as root) to add some of them to kernel at runtime (depends on
device you want to use).

For usb storage you need to insert those in drivers/scsi/ and
drivers/usb/storage/. For keyboard you need drivers/usb/input/usbhid.ko



>
> Currently I just flashed the kernel with following command:
> ./flasher-3.0 -f -k zImage-usbhost --enable-usb-host-mode --enable-rd-mode -R

You don't need "--enable-usb-host-mode --enable-rd-mode" for this.

> So, what could be of help there??

Google for 'linux kernel modules' to get familiar with the concept.

BTW there is some issue with mounting cards (related to ke-recv
service). Once you switch to host mode with ke-recv running, cards get
unmounted (and swap turned off). You can prevent this by stopping
ke-recv before switching and starting it after switch.

/etc/init.d/ke-recv stop
/etc/init.d/ke-recv start

Similar for switching back - usb icon will go away after setting mode
back to 'peripheral' and restarting ke-recv.

Frantisek
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.