From a9d39ebe91ecdd5ac0a0cf56ea162a19773db8da Mon Sep 17 00:00:00 2001 From: Thomas Abraham Date: Sun, 4 Jan 2009 09:41:09 +0530 Subject: usb : musb : Adding USB VBUS enable functionality for DM644x DVEVM Adding USB VBUS enable functionality for DM644x DVEVM (TI DaVinci) platform. Signed-off-by: Ravi Babu Signed-off-by: Swaminathan S Signed-off-by: Thomas Abraham Signed-off-by: Ajay Kumar Gupta Signed-off-by: Remy Bohmer --- board/davinci/dvevm/dvevm.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'board/davinci') diff --git a/board/davinci/dvevm/dvevm.c b/board/davinci/dvevm/dvevm.c index abf60b3..5dd081c 100644 --- a/board/davinci/dvevm/dvevm.c +++ b/board/davinci/dvevm/dvevm.c @@ -101,3 +101,26 @@ int misc_init_r(void) return(0); } + +#ifdef CONFIG_USB_DAVINCI + +/* IO Expander I2C address and USB VBUS enable mask */ +#define IOEXP_I2C_ADDR 0x3A +#define IOEXP_VBUSEN_MASK 1 + +/* + * This function enables USB VBUS by writting to IO expander using I2C. + * Note that the I2C is already initialized at this stage. This + * function is used by davinci specific USB wrapper code. + */ +void enable_vbus(void) +{ + uchar data; /* IO Expander data to enable VBUS */ + + /* Write to IO expander to enable VBUS */ + i2c_read(IOEXP_I2C_ADDR, 0, 0, &data, 1); + data &= ~IOEXP_VBUSEN_MASK; + i2c_write(IOEXP_I2C_ADDR, 0, 0, &data, 1); +} +#endif + -- cgit v1.1 From 538ef967715322f64ee08efa2296d9682111b014 Mon Sep 17 00:00:00 2001 From: Thomas Abraham Date: Sun, 4 Jan 2009 09:41:16 +0530 Subject: usb : musb : Enabling DM6446 (TI DaVinci) USB module power Enabling DM6446 (TI DaVinci) USB module power and MUSB low-level controller hook up to USB core layer. Signed-off-by: Ravi Babu Signed-off-by: Swaminathan S Signed-off-by: Thomas Abraham Signed-off-by: Ajay Kumar Gupta Signed-off-by: Remy Bohmer --- board/davinci/dvevm/dvevm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board/davinci') diff --git a/board/davinci/dvevm/dvevm.c b/board/davinci/dvevm/dvevm.c index 5dd081c..bf36f73 100644 --- a/board/davinci/dvevm/dvevm.c +++ b/board/davinci/dvevm/dvevm.c @@ -52,6 +52,7 @@ int board_init(void) lpsc_on(DAVINCI_LPSC_UART0); lpsc_on(DAVINCI_LPSC_TIMER1); lpsc_on(DAVINCI_LPSC_GPIO); + lpsc_on(DAVINCI_LPSC_USB); #if !defined(CONFIG_SYS_USE_DSPLINK) /* Powerup the DSP */ -- cgit v1.1