#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);
}
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:
You can see my USB modem attached to Defy has it's light ON!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); }
![]()
Would you compile this?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:
You can see my USB modem attached to Defy has it's light ON!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); }
![]()
Good stuff! Many people are interested by this; it even made the news in the CM7 thread.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...
defy will not be able to handle hi power devices...i would love to see this work ... this would be such a cool thing to connect an external hdd to the defy![]()
Would you publish your source code to a github repository, so more people could help you?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...