USB 2.0 Re: [maemo-developers] speeding up MMC (with success)

2006-10-02 Thread Frantisek Dufka

Koen Kooi wrote:

Frantisek Dufka schreef:
Yet when usb cable is

inserted kernel says something about full speed config. Unfortunately
full speed is 12Mbps USB 1.1 speed. USB 2.0 is called high speed.


usb 2.0 high speed = 12Mbps
usb 2.0 full speed = 480MBps

welcome to usb marketing speak :(


Are you sure? I haven't come across this meaning yet.

http://www.everythingusb.com/usb2/faq.htm
http://www.linux-usb.org/usb2.html

But anyway in kernel full speed realy means 12Mbps. Looks like 
g_file_storage can handle USB 2.0 (CONFIG_USB_GADGET_DUALSPEED) but it 
is not enabled.


It looks like the host mode is only 1.1 (there is only ohci-omap, not 
ehci) but can at least the client/OTG mode do USB 2.0? Or is 'USB 2.0 
device mode for PC connectivity' here http://europe.nokia.com/A4145105 a 
mistake?


Frantisek
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: USB 2.0 Re: [maemo-developers] speeding up MMC (with success)

2006-10-02 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Frantisek Dufka schreef:
 Koen Kooi wrote:
 Frantisek Dufka schreef:
 Yet when usb cable is
 inserted kernel says something about full speed config. Unfortunately
 full speed is 12Mbps USB 1.1 speed. USB 2.0 is called high speed.

 usb 2.0 high speed = 12Mbps
 usb 2.0 full speed = 480MBps

 welcome to usb marketing speak :(
 
 Are you sure? I haven't come across this meaning yet.
 
 http://www.everythingusb.com/usb2/faq.htm
 http://www.linux-usb.org/usb2.html
 
 But anyway in kernel full speed realy means 12Mbps. Looks like
 g_file_storage can handle USB 2.0 (CONFIG_USB_GADGET_DUALSPEED) but it
 is not enabled.
 
 It looks like the host mode is only 1.1 (there is only ohci-omap, not
 ehci) but can at least the client/OTG mode do USB 2.0? Or is 'USB 2.0
 device mode for PC connectivity' here http://europe.nokia.com/A4145105 a
 mistake?

You can retroactively label usb 1.1 devices '2.0' and the pxa270 can only do 
12Mbit
regardless of what intel's marketing department labels it.

regards,

Koen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFIMZCMkyGM64RGpERAiwQAJ9HMCHJAJhgWNlGPK2uSM/xdQ4qAACfZgHx
4dRda2QP9CSBWxDVZDEQqs8=
=J9Sj
-END PGP SIGNATURE-
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: USB 2.0 Re: [maemo-developers] speeding up MMC (with success)

2006-10-02 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Koen Kooi schreef:
 Frantisek Dufka schreef:
 Koen Kooi wrote:
 Frantisek Dufka schreef:
 Yet when usb cable is
 inserted kernel says something about full speed config. Unfortunately
 full speed is 12Mbps USB 1.1 speed. USB 2.0 is called high speed.
 usb 2.0 high speed = 12Mbps
 usb 2.0 full speed = 480MBps

 welcome to usb marketing speak :(
 Are you sure? I haven't come across this meaning yet.
 
 http://www.everythingusb.com/usb2/faq.htm
 http://www.linux-usb.org/usb2.html
 
 But anyway in kernel full speed realy means 12Mbps. Looks like
 g_file_storage can handle USB 2.0 (CONFIG_USB_GADGET_DUALSPEED) but it
 is not enabled.
 
 It looks like the host mode is only 1.1 (there is only ohci-omap, not
 ehci) but can at least the client/OTG mode do USB 2.0? Or is 'USB 2.0
 device mode for PC connectivity' here http://europe.nokia.com/A4145105 a
 mistake?
 
 You can retroactively label usb 1.1 devices '2.0' and the pxa270 can only do 
 12Mbit
 regardless of what intel's marketing department labels it.

And by the looks of it the omap1710 as well :(
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFIMZ+MkyGM64RGpERAtQ7AKCAB3G2QJhXpTCRMWiZ0Pgd4jNH9ACgqqDO
NIZPq3L0XvtoaYyria/Vw+I=
=K/DX
-END PGP SIGNATURE-
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: USB 2.0 Re: [maemo-developers] speeding up MMC (with success)

2006-10-02 Thread Frantisek Dufka

Koen Kooi wrote:

  And by the looks of it the omap1710 as well :(

Yes, found it - drivers/usb/gadget/omap_udc.c
* omap_udc.c -- for OMAP full speed udc;  most chips support OTG.

No word about high speed. Looks like high speed UDC is rare thing.
Found only this
http://lists-archives.org/linux-usb-devel/12023-musb_hdrc-high-speed-otg-controller-driver.html
I hope in will be in next nokia tablet together with OMAP 2430 and two 
SD/MMC slots :-)


Frantisek

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] speeding up MMC (with success)

2006-10-01 Thread Sascha Heid

Hi!

I tried your kernel with my 1GB extremetech and 2GB Kingston. No
problems so far and twice the speed (will try 4x later today).
Thanks for this free and very much needed hardware-upgrade, this will
certainly become of even greater value when we will be able to use the
mmc as root :-)

Regards
Sascha
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] speeding up MMC (with success)

2006-10-01 Thread Frantisek Dufka

Sascha Heid wrote:

Hi!

I tried your kernel with my 1GB extremetech and 2GB Kingston. No
problems so far and twice the speed (will try 4x later today).


Sounds good :-)


this will
certainly become of even greater value when we will be able to use the
mmc as root :-)


Yes, unfortunately current USB mass storage functionality seems to use 
only USB 1 speed so transfer over USB still has ~800KB/s limit. I wonder 
why USB 2.0 is not used. It is mentioned in N770 specs 
http://europe.nokia.com/A4145105 and OMAP 1710 should support USB OTG 
(which is IMO superset of USB 2.0 specifications). Yet when usb cable is 
inserted kernel says something about full speed config. Unfortunately 
full speed is 12Mbps USB 1.1 speed. USB 2.0 is called high speed.


But at least scp or ftp over wi-fi to card should be a bit faster now. 
Otherwise it is not very useful unless you have lots of data on MMC or 
boot from it (which I do).


Frantisek
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] speeding up MMC (with success)

2006-10-01 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Frantisek Dufka schreef:

 Yes, unfortunately current USB mass storage functionality seems to use
 only USB 1 speed so transfer over USB still has ~800KB/s limit. I wonder
 why USB 2.0 is not used. It is mentioned in N770 specs
 http://europe.nokia.com/A4145105 and OMAP 1710 should support USB OTG
 (which is IMO superset of USB 2.0 specifications). Yet when usb cable is
 inserted kernel says something about full speed config. Unfortunately
 full speed is 12Mbps USB 1.1 speed. USB 2.0 is called high speed.

usb 2.0 high speed = 12Mbps
usb 2.0 full speed = 480MBps

welcome to usb marketing speak :(

regards,

Koen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFH68oMkyGM64RGpERAtt5AJ9mVQK4dGBIWtCK+C6S+iJ3wiaBlwCfdLqi
AFr5tB9rjCHJi7/L0oUYgLI=
=50Q/
-END PGP SIGNATURE-
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] speeding up MMC (with success)

2006-09-30 Thread Frantisek Dufka

Hello,

recently I bought 2GB Kingston MMCmobile card and was a bit frustrated 
by N770 mmc slot speed. Basically any card inserted into N770 has speed 
~1.3MB/s. I digged a bit in kernel sources and googled for MMC specs and 
discovered this:


- maximum legacy MMC bus clock speed is 20Mhz
- MMC v4 specification adds faster bus speed - 26 and 52Mhz, 13 pin 
interface and 4 and 8 bit data bus width (legacy = 1 bit)
- TI OMAP mmc controller inside N770 uses 48Mhz reference clock and uses 
integer divider for reducing the speed to 24,16,12,...
- connector inside N770 has only 7 pins (maybe 6) so only 1 bit data 
transfers are possible


There is code in mmc driver which tries to determine proper speed that 
card reports it can handle. Then the omap mmc driver computes the 
divider. Fastest divider for 20Mhz bus speed should be 3 (as described 
in spru765a.pdf) which means 16Mhz (24 is too much). But there is 
strange line in omap mmc driver which then increases divider by one.


So in reality it looks like in the name of maximum compatibility the 
divider is finally set to 4 so the clock is set to 12Mhz (= up to 
1.5MB/s speed).


When commenting out line 'dsor++;' in drivers/mmc/omap.c the bus speed 
is set to 16Mhz and speed jumps to ~1.7MB/s. Unfortunately the 64MB MMC 
card included with N770 stops working. I'm not sure this is kernel bug 
or the card reports wrong speed but it certainly explains why the speed 
is reduced in official kernel. Luckily my Sandisk 1GB RS-MMC has no 
problems with 16Mhz (as should any modern MMC card rated for 20Mhz bus).


Then I found this patch
http://marc.theaimsgroup.com/?l=linux-kernelm=114453090518554w=2

Unfortunately 4bit data transfers are not possible unless one wants to 
add those 2 or 3 pins for SD card (and also MMCplus) compatibility to 
the slot, but switching to higher speed works. 26Mhz exactly is not 
possible due to 48Mhz clock but 24Mhz runs just fine with my Kingston 
2GB (as it should, specs say 0-26Mhz) and speed jumps to ~2.6MB/s (i.e. 
twice the original speed)


With this speed system boots noticeably faster from MMC than from 
internal flash - boot progress bar finishes at 3/4 and application 
startup feels a bit faster. Even the old speed was comparable to flash 
speed (since jffs2 uses compression which slows I/O down and hogs CPU) 
but now MMC card is clear winner :-)


Also newer cards should handle 52Mhz too. They report it in EXT_CSD 
register. So far there is no proper code in kernel to check this but 
when hardcoding 5200 to 
http://intr.overt.org/diff.cgi/diffs/mmcv4.diff and bumping up max omap 
mmc driver speed from 24Mhz to 48Mhz it looks like my Kingston 2gb 
MMCplus runs just fine with divider set to 1 = 48Mhz bus clock speed and 
data transfer speed goes to ~5MB/s. With this speed boot progress bar 
stops slightly after 1/2.


So far the stability looks fine (same as with old speed). I have set 
system to boot from MMC, have swap on partition 1 and so far it is OK.


I'm not sure TI supports 48Mhz for its MMC controller but I didn't found 
any limit mentioned in the docs and divider 1 seems to work fine. Also I 
hope the Kingston card really supports 52Mhz (or it should stop 
responding completely as defined by specs) so I hope I am not 
'overclocking' anything.


Hardcoding to 5200 is of course wrong and will fail with other 
cards, but 2600 is OK. Every MMCplus card must support 26Mhz bus 
clock speed.


If anyone wants to test kernel with those changes it is here
http:// fanoush.webpark.cz/maemo/zimage-su-18-200625-2gb-mmcplus26mhz.zip
Make sure you first load and boot it without flashing (flasher -l -b). I 
did not try this specific kernel as for easy hacking I'm using different 
kernel with mmc drivers as modules (needs adding to initfs and linuxrc 
script). Also make sure you don't mind killing your device or MMC card 
or losing some data. It works for me for few days but of course YMMV. 
For 52Mhz speed please hack and compile kernel yourself :-)


you can test card speed like this
Nokia770-26:~# time dd if=/dev/mmcblk0 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real0m 15.90s
user0m 0.02s
sys 0m 2.33s

80MB in 16 seconds, not bad :-)

Frantisek

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers