diff options
author | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2010-12-08 13:37:07 +0530 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2010-12-16 13:53:39 -0800 |
commit | 7032d512cff979319f308e02223d0cf39b6e9a91 (patch) | |
tree | 871c5da649467110403a97f2a873449d72e74b91 /arch/arm/mach-msm/board-qsd8x50.c | |
parent | 50bc0ef42c76879f5d68a88c7063603dc0c9789b (diff) | |
download | kernel_samsung_espresso10-7032d512cff979319f308e02223d0cf39b6e9a91.zip kernel_samsung_espresso10-7032d512cff979319f308e02223d0cf39b6e9a91.tar.gz kernel_samsung_espresso10-7032d512cff979319f308e02223d0cf39b6e9a91.tar.bz2 |
MSM: Add USB suport for QSD8x50
OTG driver takes care of putting hardware into low power mode. Hence
make peripheral and host devices as children of OTG device and let
runtime PM takes care of notifying peripheral and host state to
OTG device. VBUS power up and shutdown routines are implemented by
modem processor. As RPC infrastructure is not available, configure
USB in peripheral only mode.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm/board-qsd8x50.c')
-rw-r--r-- | arch/arm/mach-msm/board-qsd8x50.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index ed2af4a..2e83913 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c @@ -20,6 +20,7 @@ #include <linux/gpio.h> #include <linux/platform_device.h> #include <linux/delay.h> +#include <linux/usb/msm_hsusb.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -74,9 +75,24 @@ static int __init msm_init_smc91x(void) } module_init(msm_init_smc91x); +static int hsusb_phy_init_seq[] = { + 0x08, 0x31, /* Increase HS Driver Amplitude */ + 0x20, 0x32, /* Enable and set Pre-Emphasis Depth to 10% */ + -1 +}; + +static struct msm_otg_platform_data msm_otg_pdata = { + .phy_init_seq = hsusb_phy_init_seq, + .mode = USB_PERIPHERAL, + .otg_control = OTG_PHY_CONTROL, +}; + static struct platform_device *devices[] __initdata = { &msm_device_uart3, &msm_device_smd, + &msm_device_otg, + &msm_device_hsusb, + &msm_device_hsusb_host, }; static void __init qsd8x50_map_io(void) @@ -93,6 +109,9 @@ static void __init qsd8x50_init_irq(void) static void __init qsd8x50_init(void) { + msm_device_otg.dev.platform_data = &msm_otg_pdata; + msm_device_hsusb.dev.parent = &msm_device_otg.dev; + msm_device_hsusb_host.dev.parent = &msm_device_otg.dev; platform_add_devices(devices, ARRAY_SIZE(devices)); } |