aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/tegra_usb_phy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/tegra_usb_phy.h')
-rw-r--r--include/linux/usb/tegra_usb_phy.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
index d2ca919a5b73..1de16c324ec8 100644
--- a/include/linux/usb/tegra_usb_phy.h
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -18,19 +18,36 @@
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
32struct 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
21struct tegra_utmip_config { 39struct tegra_utmip_config {
22 u8 hssync_start_delay; 40 u8 hssync_start_delay;
23 u8 elastic_limit; 41 u8 elastic_limit;
24 u8 idle_wait_delay; 42 u8 idle_wait_delay;
25 u8 term_range_adj; 43 u8 term_range_adj;
44 bool xcvr_setup_use_fuses;
26 u8 xcvr_setup; 45 u8 xcvr_setup;
27 u8 xcvr_lsfslew; 46 u8 xcvr_lsfslew;
28 u8 xcvr_lsrslew; 47 u8 xcvr_lsrslew;
29}; 48 u8 xcvr_hsslew;
30 49 u8 hssquelch_level;
31struct tegra_ulpi_config { 50 u8 hsdiscon_level;
32 int reset_gpio;
33 const char *clk;
34}; 51};
35 52
36enum tegra_usb_phy_port_speed { 53enum tegra_usb_phy_port_speed {
@@ -39,12 +56,6 @@ enum tegra_usb_phy_port_speed {
39 TEGRA_USB_PHY_PORT_SPEED_HIGH, 56 TEGRA_USB_PHY_PORT_SPEED_HIGH,
40}; 57};
41 58
42enum tegra_usb_phy_mode {
43 TEGRA_USB_PHY_MODE_DEVICE,
44 TEGRA_USB_PHY_MODE_HOST,
45 TEGRA_USB_PHY_MODE_OTG,
46};
47
48struct tegra_xtal_freq; 59struct tegra_xtal_freq;
49 60
50struct tegra_usb_phy { 61struct tegra_usb_phy {
@@ -55,18 +66,17 @@ struct tegra_usb_phy {
55 struct clk *clk; 66 struct clk *clk;
56 struct clk *pll_u; 67 struct clk *pll_u;
57 struct clk *pad_clk; 68 struct clk *pad_clk;
58 enum tegra_usb_phy_mode mode; 69 struct regulator *vbus;
70 enum usb_dr_mode mode;
59 void *config; 71 void *config;
72 const struct tegra_phy_soc_config *soc_config;
60 struct usb_phy *ulpi; 73 struct usb_phy *ulpi;
61 struct usb_phy u_phy; 74 struct usb_phy u_phy;
62 struct device *dev;
63 bool is_legacy_phy; 75 bool is_legacy_phy;
64 bool is_ulpi_phy; 76 bool is_ulpi_phy;
65 int reset_gpio; 77 int reset_gpio;
66}; 78};
67 79
68struct usb_phy *tegra_usb_get_phy(struct device_node *dn);
69
70void tegra_usb_phy_preresume(struct usb_phy *phy); 80void tegra_usb_phy_preresume(struct usb_phy *phy);
71 81
72void tegra_usb_phy_postresume(struct usb_phy *phy); 82void tegra_usb_phy_postresume(struct usb_phy *phy);