aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/board-qsd8x50.c
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2010-12-08 03:07:07 -0500
committerDavid Brown <davidb@codeaurora.org>2010-12-16 16:53:39 -0500
commit7032d512cff979319f308e02223d0cf39b6e9a91 (patch)
tree871c5da649467110403a97f2a873449d72e74b91 /arch/arm/mach-msm/board-qsd8x50.c
parent50bc0ef42c76879f5d68a88c7063603dc0c9789b (diff)
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.c19
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 ed2af4ad97ed..2e8391307f55 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -20,6 +20,7 @@
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23#include <linux/usb/msm_hsusb.h>
23 24
24#include <asm/mach-types.h> 25#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
@@ -74,9 +75,24 @@ static int __init msm_init_smc91x(void)
74} 75}
75module_init(msm_init_smc91x); 76module_init(msm_init_smc91x);
76 77
78static int hsusb_phy_init_seq[] = {
79 0x08, 0x31, /* Increase HS Driver Amplitude */
80 0x20, 0x32, /* Enable and set Pre-Emphasis Depth to 10% */
81 -1
82};
83
84static struct msm_otg_platform_data msm_otg_pdata = {
85 .phy_init_seq = hsusb_phy_init_seq,
86 .mode = USB_PERIPHERAL,
87 .otg_control = OTG_PHY_CONTROL,
88};
89
77static struct platform_device *devices[] __initdata = { 90static struct platform_device *devices[] __initdata = {
78 &msm_device_uart3, 91 &msm_device_uart3,
79 &msm_device_smd, 92 &msm_device_smd,
93 &msm_device_otg,
94 &msm_device_hsusb,
95 &msm_device_hsusb_host,
80}; 96};
81 97
82static void __init qsd8x50_map_io(void) 98static void __init qsd8x50_map_io(void)
@@ -93,6 +109,9 @@ static void __init qsd8x50_init_irq(void)
93 109
94static void __init qsd8x50_init(void) 110static void __init qsd8x50_init(void)
95{ 111{
112 msm_device_otg.dev.platform_data = &msm_otg_pdata;
113 msm_device_hsusb.dev.parent = &msm_device_otg.dev;
114 msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
96 platform_add_devices(devices, ARRAY_SIZE(devices)); 115 platform_add_devices(devices, ARRAY_SIZE(devices));
97} 116}
98 117