diff options
Diffstat (limited to 'include/linux/usb/msm_hsusb.h')
| -rw-r--r-- | include/linux/usb/msm_hsusb.h | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h index 32754835a39b..b0a39243295a 100644 --- a/include/linux/usb/msm_hsusb.h +++ b/include/linux/usb/msm_hsusb.h | |||
| @@ -23,21 +23,6 @@ | |||
| 23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | * Supported USB modes | ||
| 27 | * | ||
| 28 | * USB_PERIPHERAL Only peripheral mode is supported. | ||
| 29 | * USB_HOST Only host mode is supported. | ||
| 30 | * USB_OTG OTG mode is supported. | ||
| 31 | * | ||
| 32 | */ | ||
| 33 | enum usb_mode_type { | ||
| 34 | USB_NONE = 0, | ||
| 35 | USB_PERIPHERAL, | ||
| 36 | USB_HOST, | ||
| 37 | USB_OTG, | ||
| 38 | }; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * OTG control | 26 | * OTG control |
| 42 | * | 27 | * |
| 43 | * OTG_NO_CONTROL Id/VBUS notifications not required. Useful in host | 28 | * OTG_NO_CONTROL Id/VBUS notifications not required. Useful in host |
| @@ -115,27 +100,23 @@ enum usb_chg_type { | |||
| 115 | /** | 100 | /** |
| 116 | * struct msm_otg_platform_data - platform device data | 101 | * struct msm_otg_platform_data - platform device data |
| 117 | * for msm_otg driver. | 102 | * for msm_otg driver. |
| 118 | * @phy_init_seq: PHY configuration sequence. val, reg pairs | 103 | * @phy_init_seq: PHY configuration sequence values. Value of -1 is reserved as |
| 119 | * terminated by -1. | 104 | * "do not overwrite default vaule at this address". |
| 105 | * @phy_init_sz: PHY configuration sequence size. | ||
| 120 | * @vbus_power: VBUS power on/off routine. | 106 | * @vbus_power: VBUS power on/off routine. |
| 121 | * @power_budget: VBUS power budget in mA (0 will be treated as 500mA). | 107 | * @power_budget: VBUS power budget in mA (0 will be treated as 500mA). |
| 122 | * @mode: Supported mode (OTG/peripheral/host). | 108 | * @mode: Supported mode (OTG/peripheral/host). |
| 123 | * @otg_control: OTG switch controlled by user/Id pin | 109 | * @otg_control: OTG switch controlled by user/Id pin |
| 124 | * @default_mode: Default operational mode. Applicable only if | ||
| 125 | * OTG switch is controller by user. | ||
| 126 | * @pclk_src_name: pclk is derived from ebi1_usb_clk in case of 7x27 and 8k | ||
| 127 | * dfab_usb_hs_clk in case of 8660 and 8960. | ||
| 128 | */ | 110 | */ |
| 129 | struct msm_otg_platform_data { | 111 | struct msm_otg_platform_data { |
| 130 | int *phy_init_seq; | 112 | int *phy_init_seq; |
| 113 | int phy_init_sz; | ||
| 131 | void (*vbus_power)(bool on); | 114 | void (*vbus_power)(bool on); |
| 132 | unsigned power_budget; | 115 | unsigned power_budget; |
| 133 | enum usb_mode_type mode; | 116 | enum usb_dr_mode mode; |
| 134 | enum otg_control_type otg_control; | 117 | enum otg_control_type otg_control; |
| 135 | enum usb_mode_type default_mode; | ||
| 136 | enum msm_usb_phy_type phy_type; | 118 | enum msm_usb_phy_type phy_type; |
| 137 | void (*setup_gpio)(enum usb_otg_state state); | 119 | void (*setup_gpio)(enum usb_otg_state state); |
| 138 | char *pclk_src_name; | ||
| 139 | int (*link_clk_reset)(struct clk *link_clk, bool assert); | 120 | int (*link_clk_reset)(struct clk *link_clk, bool assert); |
| 140 | int (*phy_clk_reset)(struct clk *phy_clk); | 121 | int (*phy_clk_reset)(struct clk *phy_clk); |
| 141 | }; | 122 | }; |
| @@ -147,7 +128,6 @@ struct msm_otg_platform_data { | |||
| 147 | * @irq: IRQ number assigned for HSUSB controller. | 128 | * @irq: IRQ number assigned for HSUSB controller. |
| 148 | * @clk: clock struct of usb_hs_clk. | 129 | * @clk: clock struct of usb_hs_clk. |
| 149 | * @pclk: clock struct of usb_hs_pclk. | 130 | * @pclk: clock struct of usb_hs_pclk. |
| 150 | * @pclk_src: pclk source for voting. | ||
| 151 | * @phy_reset_clk: clock struct of usb_phy_clk. | 131 | * @phy_reset_clk: clock struct of usb_phy_clk. |
| 152 | * @core_clk: clock struct of usb_hs_core_clk. | 132 | * @core_clk: clock struct of usb_hs_core_clk. |
| 153 | * @regs: ioremapped register base address. | 133 | * @regs: ioremapped register base address. |
| @@ -168,7 +148,6 @@ struct msm_otg { | |||
| 168 | int irq; | 148 | int irq; |
| 169 | struct clk *clk; | 149 | struct clk *clk; |
| 170 | struct clk *pclk; | 150 | struct clk *pclk; |
| 171 | struct clk *pclk_src; | ||
| 172 | struct clk *phy_reset_clk; | 151 | struct clk *phy_reset_clk; |
| 173 | struct clk *core_clk; | 152 | struct clk *core_clk; |
| 174 | void __iomem *regs; | 153 | void __iomem *regs; |
| @@ -179,10 +158,18 @@ struct msm_otg { | |||
| 179 | atomic_t in_lpm; | 158 | atomic_t in_lpm; |
| 180 | int async_int; | 159 | int async_int; |
| 181 | unsigned cur_power; | 160 | unsigned cur_power; |
| 161 | int phy_number; | ||
| 182 | struct delayed_work chg_work; | 162 | struct delayed_work chg_work; |
| 183 | enum usb_chg_state chg_state; | 163 | enum usb_chg_state chg_state; |
| 184 | enum usb_chg_type chg_type; | 164 | enum usb_chg_type chg_type; |
| 185 | u8 dcd_retries; | 165 | u8 dcd_retries; |
| 166 | struct regulator *v3p3; | ||
| 167 | struct regulator *v1p8; | ||
| 168 | struct regulator *vddcx; | ||
| 169 | |||
| 170 | struct reset_control *phy_rst; | ||
| 171 | struct reset_control *link_rst; | ||
| 172 | int vdd_levels[3]; | ||
| 186 | }; | 173 | }; |
| 187 | 174 | ||
| 188 | #endif | 175 | #endif |
