diff options
| author | Tuomas Tynkkynen <ttynkkynen@nvidia.com> | 2013-08-12 09:06:51 -0400 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2013-08-12 14:29:48 -0400 |
| commit | 3e635202ce40e4d7ff3fafc18db70c5d28cc6622 (patch) | |
| tree | 9feaee838221202b9a87e5ae49e6f94f212f17b7 /include/linux | |
| parent | f5833a0bde5d7795b19f8a881278e5506ab5764b (diff) | |
usb: phy: tegra: Tegra30 support
The Tegra30 USB PHY is a bit different than the Tegra20 PHY:
- The EHCI controller supports the HOSTPC register extension, and some
of the fields that the PHY needs to modify (PHCD and PTS) have moved
to the new HOSTPC register.
- Some of the UTMI PLL configuration registers have moved from the USB
register space to the Clock-And-Reset controller space. In Tegra30
the clock driver is responsible for configuring the UTMI PLL.
- The USBMODE register must be explicitly written to enter host mode.
- Certain PHY parameters need to be programmed for optimal signal
quality. Support for this will be added in the next patch.
The new tegra_phy_soc_config structure is added to describe the
differences between the SoCs.
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/usb/tegra_usb_phy.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index d3db274610a1..d3a63c354db9 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h | |||
| @@ -18,6 +18,24 @@ | |||
| 18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
| 19 | #include <linux/usb/otg.h> | 19 | #include <linux/usb/otg.h> |
| 20 | 20 | ||
| 21 | /* | ||
| 22 | * utmi_pll_config_in_car_module: true if the UTMI PLL configuration registers | ||
| 23 | * should be set up by clk-tegra, false if by the PHY code | ||
| 24 | * has_hostpc: true if the USB controller has the HOSTPC extension, which | ||
| 25 | * changes the location of the PHCD and PTS fields | ||
| 26 | * requires_usbmode_setup: true if the USBMODE register needs to be set to | ||
| 27 | * enter host mode | ||
| 28 | * requires_extra_tuning_parameters: true if xcvr_hsslew, hssquelch_level | ||
| 29 | * and hsdiscon_level should be set for adequate signal quality | ||
| 30 | */ | ||
| 31 | |||
| 32 | struct tegra_phy_soc_config { | ||
| 33 | bool utmi_pll_config_in_car_module; | ||
| 34 | bool has_hostpc; | ||
| 35 | bool requires_usbmode_setup; | ||
| 36 | bool requires_extra_tuning_parameters; | ||
| 37 | }; | ||
| 38 | |||
| 21 | struct tegra_utmip_config { | 39 | struct tegra_utmip_config { |
| 22 | u8 hssync_start_delay; | 40 | u8 hssync_start_delay; |
| 23 | u8 elastic_limit; | 41 | u8 elastic_limit; |
| @@ -47,6 +65,7 @@ struct tegra_usb_phy { | |||
| 47 | struct regulator *vbus; | 65 | struct regulator *vbus; |
| 48 | enum usb_dr_mode mode; | 66 | enum usb_dr_mode mode; |
| 49 | void *config; | 67 | void *config; |
| 68 | const struct tegra_phy_soc_config *soc_config; | ||
| 50 | struct usb_phy *ulpi; | 69 | struct usb_phy *ulpi; |
| 51 | struct usb_phy u_phy; | 70 | struct usb_phy u_phy; |
| 52 | bool is_legacy_phy; | 71 | bool is_legacy_phy; |
