USB Host mode on Defy

pachuau86

Senior Member
May 10, 2009
163
14
0
Aizawl
any developments on this?? getting my defy next week... Samsung Galaxy S 2 supports this but no developments on the Samsung Galaxy afaik (same chipset as Defy)
 
Last edited:

MAPGPS

Member
Dec 26, 2004
16
17
0
Finally I bought my Defy, and began to do more research on it.

My first attempt was to turn on the VBUS 5V power supply for the USB port on Defy.
I have made it happened by insmod a dummy module with following piece of code executed during the module init:
Code:
#define MBASE 0xfa0ab000 //got from:
//data# dmesg|grep Peripheral
//[    8.125518] musb_hdrc: USB Peripheral mode controller at fa0ab000 using DMA,IRQ 92

void power_on_vbus(void)
{
	u8 reg;
	void __iomem *mbase = MBASE;

	reg = musb_readb(mbase, MUSB_TESTMODE);
	reg |= MUSB_TEST_FORCE_HOST;
	musb_writeb(mbase, MUSB_TESTMODE, reg);
}
You can see my USB modem attached to Defy has it's light ON!

 

Attachments

Last edited:

tmuell

New member
Feb 14, 2011
3
1
0
wow this is great.

it is still possible to access the usb host mode from linux ?

see:
http://android.galoula.com/en/LinuxInstall/
http://labs.igep.es/index.php/How_to_get_the_Ubuntu_distribution


Finally I bought my Defy, and began to do more research on it.

My first attempt was to turn on the VBUS 5V power supply for the USB port on Defy.
I have made it happened by insmod a dummy module with following piece of code executed during the module init:
Code:
#define MBASE 0xfa0ab000 //got from:
//data# dmesg|grep Peripheral
//[    8.125518] musb_hdrc: USB Peripheral mode controller at fa0ab000 using DMA,IRQ 92

void power_on_vbus(void)
{
	u8 reg;
	void __iomem *mbase = MBASE;

	reg = musb_readb(mbase, MUSB_TESTMODE);
	reg |= MUSB_TEST_FORCE_HOST;
	musb_writeb(mbase, MUSB_TESTMODE, reg);
}
You can see my USB modem attached to Defy has it's light ON!

 
  • Like
Reactions: marhensa

dangpzanco

Senior Member
Dec 27, 2010
717
86
0
Finally I bought my Defy, and began to do more research on it.

My first attempt was to turn on the VBUS 5V power supply for the USB port on Defy.
I have made it happened by insmod a dummy module with following piece of code executed during the module init:
Code:
#define MBASE 0xfa0ab000 //got from:
//data# dmesg|grep Peripheral
//[    8.125518] musb_hdrc: USB Peripheral mode controller at fa0ab000 using DMA,IRQ 92

void power_on_vbus(void)
{
	u8 reg;
	void __iomem *mbase = MBASE;

	reg = musb_readb(mbase, MUSB_TESTMODE);
	reg |= MUSB_TEST_FORCE_HOST;
	musb_writeb(mbase, MUSB_TESTMODE, reg);
}
You can see my USB modem attached to Defy has it's light ON!

Would you compile this?

Sent from my Milestone 2 XDA App
 

[] AL []

Recognized Contributor
Feb 22, 2011
2,865
4,625
0
Yes, it was compiled by ARM cross-compiler as a kernel module.
It is not for people to use at this moment, just to demo that Defy has USB OTG hardware capability, thus USB Host is possible.

The effort is on software, and I'm working on it...
Good stuff! Many people are interested by this; it even made the news in the CM7 thread.

I don't know if it would be of any help, but you can see my latest post on this over there.

Good luck and thanks for your effort in this matter.
 

dangpzanco

Senior Member
Dec 27, 2010
717
86
0
Yes, it was compiled by ARM cross-compiler as a kernel module.
It is not for people to use at this moment, just to demo that Defy has USB OTG hardware capability, thus USB Host is possible.

The effort is on software, and I'm working on it...
Would you publish your source code to a github repository, so more people could help you?
Or it is already published?

Sent from my Milestone 2 XDA App
 

tmuell

New member
Feb 14, 2011
3
1
0
any news ?
it would be great when the source of the kernel module will be published.

i also want to hack a little bit with this ;-)