diff options
author | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2010-12-08 03:07:08 -0500 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2010-12-16 16:53:39 -0500 |
commit | 5155e2c70fc50bc475911dab5dba2f80130523c7 (patch) | |
tree | cbbace825fc748fcfcbdf759cf50ae2f06afc96f /arch/arm/mach-msm/board-msm7x30.c | |
parent | 7032d512cff979319f308e02223d0cf39b6e9a91 (diff) |
MSM: Add USB support for MSM7x30
Add USB OTG, peripheral and host devices. This patch also adds
usb_phy_clk which is required for resetting the PHY. VBUS power up
and shutdown routines depends on PMIC module. As PMIC driver is
unavailable, 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-msm7x30.c')
-rw-r--r-- | arch/arm/mach-msm/board-msm7x30.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index 05241df3f9b6..6f3b9735e970 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/smsc911x.h> | 24 | #include <linux/smsc911x.h> |
25 | #include <linux/usb/msm_hsusb.h> | ||
25 | 26 | ||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
@@ -39,11 +40,26 @@ | |||
39 | 40 | ||
40 | extern struct sys_timer msm_timer; | 41 | extern struct sys_timer msm_timer; |
41 | 42 | ||
43 | static int hsusb_phy_init_seq[] = { | ||
44 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ | ||
45 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ | ||
46 | -1 | ||
47 | }; | ||
48 | |||
49 | static struct msm_otg_platform_data msm_otg_pdata = { | ||
50 | .phy_init_seq = hsusb_phy_init_seq, | ||
51 | .mode = USB_PERIPHERAL, | ||
52 | .otg_control = OTG_PHY_CONTROL, | ||
53 | }; | ||
54 | |||
42 | static struct platform_device *devices[] __initdata = { | 55 | static struct platform_device *devices[] __initdata = { |
43 | #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER) | 56 | #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER) |
44 | &msm_device_uart2, | 57 | &msm_device_uart2, |
45 | #endif | 58 | #endif |
46 | &msm_device_smd, | 59 | &msm_device_smd, |
60 | &msm_device_otg, | ||
61 | &msm_device_hsusb, | ||
62 | &msm_device_hsusb_host, | ||
47 | }; | 63 | }; |
48 | 64 | ||
49 | static void __init msm7x30_init_irq(void) | 65 | static void __init msm7x30_init_irq(void) |
@@ -53,6 +69,10 @@ static void __init msm7x30_init_irq(void) | |||
53 | 69 | ||
54 | static void __init msm7x30_init(void) | 70 | static void __init msm7x30_init(void) |
55 | { | 71 | { |
72 | msm_device_otg.dev.platform_data = &msm_otg_pdata; | ||
73 | msm_device_hsusb.dev.parent = &msm_device_otg.dev; | ||
74 | msm_device_hsusb_host.dev.parent = &msm_device_otg.dev; | ||
75 | |||
56 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 76 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
57 | } | 77 | } |
58 | 78 | ||