Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 1 | /* linux/include/asm-arm/arch-msm/hsusb.h |
| 2 | * |
| 3 | * Copyright (C) 2008 Google, Inc. |
| 4 | * Author: Brian Swetland <swetland@google.com> |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 5 | * Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved. |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 6 | * |
| 7 | * This software is licensed under the terms of the GNU General Public |
| 8 | * License version 2, as published by the Free Software Foundation, and |
| 9 | * may be copied, distributed, and modified under those terms. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #ifndef __ASM_ARCH_MSM_HSUSB_H |
| 19 | #define __ASM_ARCH_MSM_HSUSB_H |
| 20 | |
| 21 | #include <linux/types.h> |
Ido Shayevitz | 9fb8345 | 2012-04-01 17:45:58 +0300 | [diff] [blame] | 22 | #include <linux/usb/ch9.h> |
| 23 | #include <linux/usb/gadget.h> |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 24 | #include <linux/usb/otg.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 25 | #include <linux/wakelock.h> |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 26 | |
Ido Shayevitz | d1cb16c | 2012-03-28 18:57:47 +0200 | [diff] [blame] | 27 | /* |
| 28 | * The following are bit fields describing the usb_request.udc_priv word. |
| 29 | * These bit fields are set by function drivers that wish to queue |
| 30 | * usb_requests with sps/bam parameters. |
| 31 | */ |
| 32 | #define MSM_PIPE_ID_MASK (0x1F) |
| 33 | #define MSM_TX_PIPE_ID_OFS (16) |
| 34 | #define MSM_SPS_MODE BIT(5) |
| 35 | #define MSM_IS_FINITE_TRANSFER BIT(6) |
| 36 | #define MSM_PRODUCER BIT(7) |
| 37 | #define MSM_DISABLE_WB BIT(8) |
| 38 | #define MSM_ETD_IOC BIT(9) |
| 39 | #define MSM_INTERNAL_MEM BIT(10) |
| 40 | #define MSM_VENDOR_ID BIT(16) |
| 41 | |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 42 | /** |
| 43 | * Supported USB modes |
| 44 | * |
| 45 | * USB_PERIPHERAL Only peripheral mode is supported. |
| 46 | * USB_HOST Only host mode is supported. |
| 47 | * USB_OTG OTG mode is supported. |
| 48 | * |
| 49 | */ |
| 50 | enum usb_mode_type { |
| 51 | USB_NONE = 0, |
| 52 | USB_PERIPHERAL, |
| 53 | USB_HOST, |
| 54 | USB_OTG, |
| 55 | }; |
| 56 | |
| 57 | /** |
| 58 | * OTG control |
| 59 | * |
| 60 | * OTG_NO_CONTROL Id/VBUS notifications not required. Useful in host |
| 61 | * only configuration. |
| 62 | * OTG_PHY_CONTROL Id/VBUS notifications comes form USB PHY. |
| 63 | * OTG_PMIC_CONTROL Id/VBUS notifications comes from PMIC hardware. |
| 64 | * OTG_USER_CONTROL Id/VBUS notifcations comes from User via sysfs. |
| 65 | * |
| 66 | */ |
| 67 | enum otg_control_type { |
| 68 | OTG_NO_CONTROL = 0, |
| 69 | OTG_PHY_CONTROL, |
| 70 | OTG_PMIC_CONTROL, |
| 71 | OTG_USER_CONTROL, |
| 72 | }; |
| 73 | |
| 74 | /** |
Pavankumar Kondeti | d860852 | 2011-05-04 10:19:47 +0530 | [diff] [blame] | 75 | * PHY used in |
| 76 | * |
| 77 | * INVALID_PHY Unsupported PHY |
| 78 | * CI_45NM_INTEGRATED_PHY Chipidea 45nm integrated PHY |
| 79 | * SNPS_28NM_INTEGRATED_PHY Synopsis 28nm integrated PHY |
| 80 | * |
| 81 | */ |
| 82 | enum msm_usb_phy_type { |
| 83 | INVALID_PHY = 0, |
| 84 | CI_45NM_INTEGRATED_PHY, |
| 85 | SNPS_28NM_INTEGRATED_PHY, |
| 86 | }; |
| 87 | |
| 88 | #define IDEV_CHG_MAX 1500 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 89 | #define IDEV_CHG_MIN 500 |
Pavankumar Kondeti | d860852 | 2011-05-04 10:19:47 +0530 | [diff] [blame] | 90 | #define IUNIT 100 |
| 91 | |
Pavankumar Kondeti | aa449e1 | 2011-11-04 11:09:26 +0530 | [diff] [blame] | 92 | #define IDEV_ACA_CHG_MAX 1500 |
| 93 | #define IDEV_ACA_CHG_LIMIT 500 |
| 94 | |
Pavankumar Kondeti | d860852 | 2011-05-04 10:19:47 +0530 | [diff] [blame] | 95 | /** |
| 96 | * Different states involved in USB charger detection. |
| 97 | * |
| 98 | * USB_CHG_STATE_UNDEFINED USB charger is not connected or detection |
| 99 | * process is not yet started. |
| 100 | * USB_CHG_STATE_WAIT_FOR_DCD Waiting for Data pins contact. |
| 101 | * USB_CHG_STATE_DCD_DONE Data pin contact is detected. |
| 102 | * USB_CHG_STATE_PRIMARY_DONE Primary detection is completed (Detects |
| 103 | * between SDP and DCP/CDP). |
| 104 | * USB_CHG_STATE_SECONDARY_DONE Secondary detection is completed (Detects |
| 105 | * between DCP and CDP). |
| 106 | * USB_CHG_STATE_DETECTED USB charger type is determined. |
| 107 | * |
| 108 | */ |
| 109 | enum usb_chg_state { |
| 110 | USB_CHG_STATE_UNDEFINED = 0, |
| 111 | USB_CHG_STATE_WAIT_FOR_DCD, |
| 112 | USB_CHG_STATE_DCD_DONE, |
| 113 | USB_CHG_STATE_PRIMARY_DONE, |
| 114 | USB_CHG_STATE_SECONDARY_DONE, |
| 115 | USB_CHG_STATE_DETECTED, |
| 116 | }; |
| 117 | |
| 118 | /** |
| 119 | * USB charger types |
| 120 | * |
| 121 | * USB_INVALID_CHARGER Invalid USB charger. |
| 122 | * USB_SDP_CHARGER Standard downstream port. Refers to a downstream port |
| 123 | * on USB2.0 compliant host/hub. |
| 124 | * USB_DCP_CHARGER Dedicated charger port (AC charger/ Wall charger). |
| 125 | * USB_CDP_CHARGER Charging downstream port. Enumeration can happen and |
| 126 | * IDEV_CHG_MAX can be drawn irrespective of USB state. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 127 | * USB_ACA_A_CHARGER B-device is connected on accessory port with charger |
| 128 | * connected on charging port. This configuration allows |
| 129 | * charging in host mode. |
| 130 | * USB_ACA_B_CHARGER No device (or A-device without VBUS) is connected on |
| 131 | * accessory port with charger connected on charging port. |
| 132 | * USB_ACA_C_CHARGER A-device (with VBUS) is connected on |
| 133 | * accessory port with charger connected on charging port. |
| 134 | * USB_ACA_DOCK_CHARGER A docking station that has one upstream port and one |
| 135 | * or more downstream ports. Capable of supplying |
| 136 | * IDEV_CHG_MAX irrespective of devices connected on |
| 137 | * accessory ports. |
Pavankumar Kondeti | d860852 | 2011-05-04 10:19:47 +0530 | [diff] [blame] | 138 | */ |
| 139 | enum usb_chg_type { |
| 140 | USB_INVALID_CHARGER = 0, |
| 141 | USB_SDP_CHARGER, |
| 142 | USB_DCP_CHARGER, |
| 143 | USB_CDP_CHARGER, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 144 | USB_ACA_A_CHARGER, |
| 145 | USB_ACA_B_CHARGER, |
| 146 | USB_ACA_C_CHARGER, |
| 147 | USB_ACA_DOCK_CHARGER, |
Pavankumar Kondeti | d860852 | 2011-05-04 10:19:47 +0530 | [diff] [blame] | 148 | }; |
| 149 | |
| 150 | /** |
Mayank Rana | 248698c | 2012-04-19 00:03:16 +0530 | [diff] [blame] | 151 | * Used different VDDCX voltage voting mechnism |
| 152 | * VDDCX_CORNER Vote for VDDCX Corner voltage |
| 153 | * VDDCX Vote for VDDCX Absolute voltage |
| 154 | */ |
| 155 | enum usb_vdd_type { |
| 156 | VDDCX_CORNER = 0, |
| 157 | VDDCX, |
| 158 | VDD_TYPE_MAX, |
| 159 | }; |
| 160 | |
| 161 | /** |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 162 | * struct msm_otg_platform_data - platform device data |
Pavankumar Kondeti | dfb2130 | 2011-03-04 22:45:02 +0530 | [diff] [blame] | 163 | * for msm_otg driver. |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 164 | * @phy_init_seq: PHY configuration sequence. val, reg pairs |
| 165 | * terminated by -1. |
Mayank Rana | 8549e63 | 2012-01-23 12:49:54 +0530 | [diff] [blame] | 166 | * @vbus_power: VBUS power on/off routine.It should return result |
| 167 | * as success(zero value) or failure(non-zero value). |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 168 | * @power_budget: VBUS power budget in mA (0 will be treated as 500mA). |
| 169 | * @mode: Supported mode (OTG/peripheral/host). |
| 170 | * @otg_control: OTG switch controlled by user/Id pin |
| 171 | * @default_mode: Default operational mode. Applicable only if |
| 172 | * OTG switch is controller by user. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 173 | * @pmic_id_irq: IRQ number assigned for PMIC USB ID line. |
Vijayavardhan Vennapusa | fc464f0 | 2011-11-04 21:54:00 +0530 | [diff] [blame] | 174 | * @mhl_enable: indicates MHL connector or not. |
Ofir Cohen | 4da266f | 2012-01-03 10:19:29 +0200 | [diff] [blame] | 175 | * @disable_reset_on_disconnect: perform USB PHY and LINK reset |
| 176 | * on USB cable disconnection. |
Pavankumar Kondeti | 2d09e5f | 2012-01-16 08:56:57 +0530 | [diff] [blame] | 177 | * @enable_dcd: Enable Data Contact Detection circuit. if not set |
| 178 | * wait for 600msec before proceeding to primary |
| 179 | * detection. |
Manu Gautam | cd82e9d | 2011-12-20 14:17:28 +0530 | [diff] [blame] | 180 | * @bus_scale_table: parameters for bus bandwidth requirements |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 181 | */ |
| 182 | struct msm_otg_platform_data { |
| 183 | int *phy_init_seq; |
Mayank Rana | 8549e63 | 2012-01-23 12:49:54 +0530 | [diff] [blame] | 184 | int (*vbus_power)(bool on); |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 185 | unsigned power_budget; |
| 186 | enum usb_mode_type mode; |
| 187 | enum otg_control_type otg_control; |
| 188 | enum usb_mode_type default_mode; |
Pavankumar Kondeti | d860852 | 2011-05-04 10:19:47 +0530 | [diff] [blame] | 189 | enum msm_usb_phy_type phy_type; |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 190 | void (*setup_gpio)(enum usb_otg_state state); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 191 | int pmic_id_irq; |
Vijayavardhan Vennapusa | fc464f0 | 2011-11-04 21:54:00 +0530 | [diff] [blame] | 192 | bool mhl_enable; |
Ofir Cohen | 4da266f | 2012-01-03 10:19:29 +0200 | [diff] [blame] | 193 | bool disable_reset_on_disconnect; |
Pavankumar Kondeti | 2d09e5f | 2012-01-16 08:56:57 +0530 | [diff] [blame] | 194 | bool enable_dcd; |
Manu Gautam | cd82e9d | 2011-12-20 14:17:28 +0530 | [diff] [blame] | 195 | struct msm_bus_scale_pdata *bus_scale_table; |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 196 | }; |
| 197 | |
Vijayavardhan Vennapusa | a315203 | 2012-03-05 16:29:30 +0530 | [diff] [blame] | 198 | /* Timeout (in msec) values (min - max) associated with OTG timers */ |
| 199 | |
| 200 | #define TA_WAIT_VRISE 100 /* ( - 100) */ |
| 201 | #define TA_WAIT_VFALL 500 /* ( - 1000) */ |
| 202 | |
| 203 | /* |
| 204 | * This option is set for embedded hosts or OTG devices in which leakage |
| 205 | * currents are very minimal. |
| 206 | */ |
| 207 | #ifdef CONFIG_USB_OTG |
| 208 | #define TA_WAIT_BCON 30000 /* (1100 - 30000) */ |
| 209 | #else |
| 210 | #define TA_WAIT_BCON -1 |
| 211 | #endif |
| 212 | |
| 213 | #define TA_AIDL_BDIS 500 /* (200 - ) */ |
| 214 | #define TA_BIDL_ADIS 155 /* (155 - 200) */ |
| 215 | #define TB_SRP_FAIL 6000 /* (5000 - 6000) */ |
| 216 | #define TB_ASE0_BRST 200 /* (155 - ) */ |
| 217 | |
| 218 | /* TB_SSEND_SRP and TB_SE0_SRP are combined */ |
| 219 | #define TB_SRP_INIT 2000 /* (1500 - ) */ |
| 220 | |
| 221 | #define TA_TST_MAINT 10100 /* (9900 - 10100) */ |
| 222 | #define TB_TST_SRP 3000 /* ( - 5000) */ |
| 223 | #define TB_TST_CONFIG 300 |
| 224 | |
| 225 | /* Timeout variables */ |
| 226 | |
| 227 | #define A_WAIT_VRISE 0 |
| 228 | #define A_WAIT_VFALL 1 |
| 229 | #define A_WAIT_BCON 2 |
| 230 | #define A_AIDL_BDIS 3 |
| 231 | #define A_BIDL_ADIS 4 |
| 232 | #define B_SRP_FAIL 5 |
| 233 | #define B_ASE0_BRST 6 |
| 234 | #define A_TST_MAINT 7 |
| 235 | #define B_TST_SRP 8 |
| 236 | #define B_TST_CONFIG 9 |
| 237 | |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 238 | /** |
| 239 | * struct msm_otg: OTG driver data. Shared by HCD and DCD. |
| 240 | * @otg: USB OTG Transceiver structure. |
| 241 | * @pdata: otg device platform data. |
| 242 | * @irq: IRQ number assigned for HSUSB controller. |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 243 | * @clk: clock struct of alt_core_clk. |
| 244 | * @pclk: clock struct of iface_clk. |
| 245 | * @phy_reset_clk: clock struct of phy_clk. |
| 246 | * @core_clk: clock struct of core_bus_clk. |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 247 | * @regs: ioremapped register base address. |
| 248 | * @inputs: OTG state machine inputs(Id, SessValid etc). |
| 249 | * @sm_work: OTG state machine work. |
Pavankumar Kondeti | 87c0104 | 2010-12-07 17:53:58 +0530 | [diff] [blame] | 250 | * @in_lpm: indicates low power mode (LPM) state. |
| 251 | * @async_int: Async interrupt arrived. |
Pavankumar Kondeti | d860852 | 2011-05-04 10:19:47 +0530 | [diff] [blame] | 252 | * @cur_power: The amount of mA available from downstream port. |
| 253 | * @chg_work: Charger detection work. |
| 254 | * @chg_state: The state of charger detection process. |
| 255 | * @chg_type: The type of charger attached. |
| 256 | * @dcd_retires: The retry count used to track Data contact |
| 257 | * detection process. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 258 | * @wlock: Wake lock struct to prevent system suspend when |
| 259 | * USB is active. |
| 260 | * @usbdev_nb: The notifier block used to know about the B-device |
| 261 | * connected. Useful only when ACA_A charger is |
| 262 | * connected. |
| 263 | * @mA_port: The amount of current drawn by the attached B-device. |
Pavankumar Kondeti | aa449e1 | 2011-11-04 11:09:26 +0530 | [diff] [blame] | 264 | * @id_timer: The timer used for polling ID line to detect ACA states. |
Anji jonnala | 7da3f26 | 2011-12-02 17:22:14 -0800 | [diff] [blame] | 265 | * @xo_handle: TCXO buffer handle |
Manu Gautam | cd82e9d | 2011-12-20 14:17:28 +0530 | [diff] [blame] | 266 | * @bus_perf_client: Bus performance client handle to request BUS bandwidth |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 267 | */ |
| 268 | struct msm_otg { |
| 269 | struct otg_transceiver otg; |
| 270 | struct msm_otg_platform_data *pdata; |
| 271 | int irq; |
| 272 | struct clk *clk; |
| 273 | struct clk *pclk; |
| 274 | struct clk *phy_reset_clk; |
| 275 | struct clk *core_clk; |
| 276 | void __iomem *regs; |
| 277 | #define ID 0 |
| 278 | #define B_SESS_VLD 1 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 279 | #define ID_A 2 |
| 280 | #define ID_B 3 |
| 281 | #define ID_C 4 |
Vijayavardhan Vennapusa | a315203 | 2012-03-05 16:29:30 +0530 | [diff] [blame] | 282 | #define A_BUS_DROP 5 |
| 283 | #define A_BUS_REQ 6 |
| 284 | #define A_SRP_DET 7 |
| 285 | #define A_VBUS_VLD 8 |
| 286 | #define B_CONN 9 |
| 287 | #define ADP_CHANGE 10 |
| 288 | #define POWER_UP 11 |
| 289 | #define A_CLR_ERR 12 |
| 290 | #define A_BUS_RESUME 13 |
| 291 | #define A_BUS_SUSPEND 14 |
| 292 | #define A_CONN 15 |
| 293 | #define B_BUS_REQ 16 |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 294 | unsigned long inputs; |
| 295 | struct work_struct sm_work; |
Jack Pham | 5ca279b | 2012-05-14 18:42:54 -0700 | [diff] [blame^] | 296 | bool sm_work_pending; |
| 297 | atomic_t pm_suspended; |
Pavankumar Kondeti | 87c0104 | 2010-12-07 17:53:58 +0530 | [diff] [blame] | 298 | atomic_t in_lpm; |
| 299 | int async_int; |
Pavankumar Kondeti | d860852 | 2011-05-04 10:19:47 +0530 | [diff] [blame] | 300 | unsigned cur_power; |
| 301 | struct delayed_work chg_work; |
| 302 | enum usb_chg_state chg_state; |
| 303 | enum usb_chg_type chg_type; |
| 304 | u8 dcd_retries; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 305 | struct wake_lock wlock; |
| 306 | struct notifier_block usbdev_nb; |
| 307 | unsigned mA_port; |
Pavankumar Kondeti | aa449e1 | 2011-11-04 11:09:26 +0530 | [diff] [blame] | 308 | struct timer_list id_timer; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 309 | unsigned long caps; |
Stephen Boyd | 30ad10b | 2012-03-01 14:51:04 -0800 | [diff] [blame] | 310 | struct msm_xo_voter *xo_handle; |
Manu Gautam | cd82e9d | 2011-12-20 14:17:28 +0530 | [diff] [blame] | 311 | uint32_t bus_perf_client; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 312 | /* |
| 313 | * Allowing PHY power collpase turns off the HSUSB 3.3v and 1.8v |
| 314 | * analog regulators while going to low power mode. |
| 315 | * Currently only 8960(28nm PHY) has the support to allowing PHY |
| 316 | * power collapse since it doesn't have leakage currents while |
| 317 | * turning off the power rails. |
| 318 | */ |
| 319 | #define ALLOW_PHY_POWER_COLLAPSE BIT(0) |
| 320 | /* |
| 321 | * Allow PHY RETENTION mode before turning off the digital |
| 322 | * voltage regulator(VDDCX). |
| 323 | */ |
| 324 | #define ALLOW_PHY_RETENTION BIT(1) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 325 | unsigned long lpm_flags; |
| 326 | #define PHY_PWR_COLLAPSED BIT(0) |
| 327 | #define PHY_RETENTIONED BIT(1) |
Ofir Cohen | 4da266f | 2012-01-03 10:19:29 +0200 | [diff] [blame] | 328 | int reset_counter; |
Vijayavardhan Vennapusa | a315203 | 2012-03-05 16:29:30 +0530 | [diff] [blame] | 329 | unsigned long b_last_se0_sess; |
| 330 | unsigned long tmouts; |
| 331 | u8 active_tmout; |
| 332 | struct hrtimer timer; |
Mayank Rana | 248698c | 2012-04-19 00:03:16 +0530 | [diff] [blame] | 333 | enum usb_vdd_type vdd_type; |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 334 | }; |
| 335 | |
Vijayavardhan Vennapusa | e3316a1 | 2011-10-15 06:05:17 +0530 | [diff] [blame] | 336 | struct msm_hsic_host_platform_data { |
| 337 | unsigned strobe; |
| 338 | unsigned data; |
Hemant Kumar | e627597 | 2012-02-29 20:06:21 -0800 | [diff] [blame] | 339 | struct msm_bus_scale_pdata *bus_scale_table; |
Vijayavardhan Vennapusa | e3316a1 | 2011-10-15 06:05:17 +0530 | [diff] [blame] | 340 | }; |
| 341 | |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 342 | struct msm_usb_host_platform_data { |
| 343 | unsigned int power_budget; |
Hemant Kumar | 5692535 | 2012-02-13 16:59:52 -0800 | [diff] [blame] | 344 | unsigned int dock_connect_irq; |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 345 | }; |
| 346 | |
Amit Blay | 4d57d36 | 2012-04-28 11:00:21 +0300 | [diff] [blame] | 347 | struct msm_hsic_peripheral_platform_data { |
| 348 | bool keep_core_clk_on_suspend_workaround; |
| 349 | }; |
| 350 | |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 351 | struct usb_bam_pipe_connect { |
| 352 | u32 src_phy_addr; |
| 353 | int src_pipe_index; |
| 354 | u32 dst_phy_addr; |
| 355 | int dst_pipe_index; |
| 356 | u32 data_fifo_base_offset; |
| 357 | u32 data_fifo_size; |
| 358 | u32 desc_fifo_base_offset; |
| 359 | u32 desc_fifo_size; |
| 360 | }; |
| 361 | |
| 362 | struct msm_usb_bam_platform_data { |
| 363 | struct usb_bam_pipe_connect *connections; |
Ofir Cohen | 010009b | 2012-01-26 16:49:17 +0200 | [diff] [blame] | 364 | int usb_active_bam; |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 365 | int usb_bam_num_pipes; |
| 366 | }; |
Ofir Cohen | 010009b | 2012-01-26 16:49:17 +0200 | [diff] [blame] | 367 | |
| 368 | enum usb_bam { |
| 369 | HSUSB_BAM = 0, |
| 370 | HSIC_BAM, |
| 371 | }; |
Ido Shayevitz | d1cb16c | 2012-03-28 18:57:47 +0200 | [diff] [blame] | 372 | |
Ido Shayevitz | 9fb8345 | 2012-04-01 17:45:58 +0300 | [diff] [blame] | 373 | int msm_ep_config(struct usb_ep *ep); |
| 374 | int msm_ep_unconfig(struct usb_ep *ep); |
| 375 | int msm_data_fifo_config(struct usb_ep *ep, u32 addr, u32 size); |
| 376 | |
Pavankumar Kondeti | e0c201f | 2010-12-07 17:53:55 +0530 | [diff] [blame] | 377 | #endif |