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/devices-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/devices-msm7x30.c')
-rw-r--r-- | arch/arm/mach-msm/devices-msm7x30.c | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c index 7fcf2e3b7698..4e9a0ab3e937 100644 --- a/arch/arm/mach-msm/devices-msm7x30.c +++ b/arch/arm/mach-msm/devices-msm7x30.c | |||
@@ -56,6 +56,77 @@ struct platform_device msm_device_smd = { | |||
56 | .id = -1, | 56 | .id = -1, |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static struct resource resources_otg[] = { | ||
60 | { | ||
61 | .start = MSM_HSUSB_PHYS, | ||
62 | .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE, | ||
63 | .flags = IORESOURCE_MEM, | ||
64 | }, | ||
65 | { | ||
66 | .start = INT_USB_HS, | ||
67 | .end = INT_USB_HS, | ||
68 | .flags = IORESOURCE_IRQ, | ||
69 | }, | ||
70 | }; | ||
71 | |||
72 | struct platform_device msm_device_otg = { | ||
73 | .name = "msm_otg", | ||
74 | .id = -1, | ||
75 | .num_resources = ARRAY_SIZE(resources_otg), | ||
76 | .resource = resources_otg, | ||
77 | .dev = { | ||
78 | .coherent_dma_mask = 0xffffffff, | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | static struct resource resources_hsusb[] = { | ||
83 | { | ||
84 | .start = MSM_HSUSB_PHYS, | ||
85 | .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE, | ||
86 | .flags = IORESOURCE_MEM, | ||
87 | }, | ||
88 | { | ||
89 | .start = INT_USB_HS, | ||
90 | .end = INT_USB_HS, | ||
91 | .flags = IORESOURCE_IRQ, | ||
92 | }, | ||
93 | }; | ||
94 | |||
95 | struct platform_device msm_device_hsusb = { | ||
96 | .name = "msm_hsusb", | ||
97 | .id = -1, | ||
98 | .num_resources = ARRAY_SIZE(resources_hsusb), | ||
99 | .resource = resources_hsusb, | ||
100 | .dev = { | ||
101 | .coherent_dma_mask = 0xffffffff, | ||
102 | }, | ||
103 | }; | ||
104 | |||
105 | static u64 dma_mask = 0xffffffffULL; | ||
106 | static struct resource resources_hsusb_host[] = { | ||
107 | { | ||
108 | .start = MSM_HSUSB_PHYS, | ||
109 | .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE, | ||
110 | .flags = IORESOURCE_MEM, | ||
111 | }, | ||
112 | { | ||
113 | .start = INT_USB_HS, | ||
114 | .end = INT_USB_HS, | ||
115 | .flags = IORESOURCE_IRQ, | ||
116 | }, | ||
117 | }; | ||
118 | |||
119 | struct platform_device msm_device_hsusb_host = { | ||
120 | .name = "msm_hsusb_host", | ||
121 | .id = -1, | ||
122 | .num_resources = ARRAY_SIZE(resources_hsusb_host), | ||
123 | .resource = resources_hsusb_host, | ||
124 | .dev = { | ||
125 | .dma_mask = &dma_mask, | ||
126 | .coherent_dma_mask = 0xffffffffULL, | ||
127 | }, | ||
128 | }; | ||
129 | |||
59 | struct clk msm_clocks_7x30[] = { | 130 | struct clk msm_clocks_7x30[] = { |
60 | CLK_PCOM("adm_clk", ADM_CLK, NULL, 0), | 131 | CLK_PCOM("adm_clk", ADM_CLK, NULL, 0), |
61 | CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0), | 132 | CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0), |
@@ -107,6 +178,7 @@ struct clk msm_clocks_7x30[] = { | |||
107 | CLK_PCOM("tv_dac_clk", TV_DAC_CLK, NULL, 0), | 178 | CLK_PCOM("tv_dac_clk", TV_DAC_CLK, NULL, 0), |
108 | CLK_PCOM("tv_enc_clk", TV_ENC_CLK, NULL, 0), | 179 | CLK_PCOM("tv_enc_clk", TV_ENC_CLK, NULL, 0), |
109 | CLK_PCOM("uart_clk", UART2_CLK, &msm_device_uart2.dev, 0), | 180 | CLK_PCOM("uart_clk", UART2_CLK, &msm_device_uart2.dev, 0), |
181 | CLK_PCOM("usb_phy_clk", USB_PHY_CLK, NULL, 0), | ||
110 | CLK_PCOM("usb_hs_clk", USB_HS_CLK, NULL, OFF), | 182 | CLK_PCOM("usb_hs_clk", USB_HS_CLK, NULL, OFF), |
111 | CLK_PCOM("usb_hs_pclk", USB_HS_P_CLK, NULL, OFF), | 183 | CLK_PCOM("usb_hs_pclk", USB_HS_P_CLK, NULL, OFF), |
112 | CLK_PCOM("usb_hs_core_clk", USB_HS_CORE_CLK, NULL, OFF), | 184 | CLK_PCOM("usb_hs_core_clk", USB_HS_CORE_CLK, NULL, OFF), |