diff options
| author | Venu Byravarasu <vbyravarasu@nvidia.com> | 2012-09-05 09:20:23 -0400 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2012-09-05 09:43:57 -0400 |
| commit | 1ba8216f0bc02af6ba70d1108d60eb1b064395e4 (patch) | |
| tree | 6b7c478d2e4f63ff837678c4a99a4a854801ec86 /include/linux/usb | |
| parent | de4217d90fed1b1714a270ceb5d092f7314e8bda (diff) | |
usb: move phy driver from mach-tegra to drivers/usb
As part of this patch:
1. Moved existing tegra phy driver to drivers/USB directory.
2. Added standard USB phy driver APIs to tegra phy driver.
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/tegra_usb_phy.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h new file mode 100644 index 000000000000..176b1ca06ae4 --- /dev/null +++ b/include/linux/usb/tegra_usb_phy.h | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Google, Inc. | ||
| 3 | * | ||
| 4 | * This software is licensed under the terms of the GNU General Public | ||
| 5 | * License version 2, as published by the Free Software Foundation, and | ||
| 6 | * may be copied, distributed, and modified under those terms. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __TEGRA_USB_PHY_H | ||
| 16 | #define __TEGRA_USB_PHY_H | ||
| 17 | |||
| 18 | #include <linux/clk.h> | ||
| 19 | #include <linux/usb/otg.h> | ||
| 20 | |||
| 21 | struct tegra_utmip_config { | ||
| 22 | u8 hssync_start_delay; | ||
| 23 | u8 elastic_limit; | ||
| 24 | u8 idle_wait_delay; | ||
| 25 | u8 term_range_adj; | ||
| 26 | u8 xcvr_setup; | ||
| 27 | u8 xcvr_lsfslew; | ||
| 28 | u8 xcvr_lsrslew; | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct tegra_ulpi_config { | ||
| 32 | int reset_gpio; | ||
| 33 | const char *clk; | ||
| 34 | }; | ||
| 35 | |||
| 36 | enum tegra_usb_phy_port_speed { | ||
| 37 | TEGRA_USB_PHY_PORT_SPEED_FULL = 0, | ||
| 38 | TEGRA_USB_PHY_PORT_SPEED_LOW, | ||
| 39 | TEGRA_USB_PHY_PORT_SPEED_HIGH, | ||
| 40 | }; | ||
| 41 | |||
| 42 | enum tegra_usb_phy_mode { | ||
| 43 | TEGRA_USB_PHY_MODE_DEVICE, | ||
| 44 | TEGRA_USB_PHY_MODE_HOST, | ||
| 45 | }; | ||
| 46 | |||
| 47 | struct tegra_xtal_freq; | ||
| 48 | |||
| 49 | struct tegra_usb_phy { | ||
| 50 | int instance; | ||
| 51 | const struct tegra_xtal_freq *freq; | ||
| 52 | void __iomem *regs; | ||
| 53 | void __iomem *pad_regs; | ||
| 54 | struct clk *clk; | ||
| 55 | struct clk *pll_u; | ||
| 56 | struct clk *pad_clk; | ||
| 57 | enum tegra_usb_phy_mode mode; | ||
| 58 | void *config; | ||
| 59 | struct usb_phy *ulpi; | ||
| 60 | struct usb_phy u_phy; | ||
| 61 | struct device *dev; | ||
| 62 | }; | ||
| 63 | |||
| 64 | struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, | ||
| 65 | void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode); | ||
| 66 | |||
| 67 | void tegra_usb_phy_clk_disable(struct tegra_usb_phy *phy); | ||
| 68 | |||
| 69 | void tegra_usb_phy_clk_enable(struct tegra_usb_phy *phy); | ||
| 70 | |||
| 71 | void tegra_usb_phy_preresume(struct tegra_usb_phy *phy); | ||
| 72 | |||
| 73 | void tegra_usb_phy_postresume(struct tegra_usb_phy *phy); | ||
| 74 | |||
| 75 | void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy, | ||
| 76 | enum tegra_usb_phy_port_speed port_speed); | ||
| 77 | |||
| 78 | void tegra_ehci_phy_restore_end(struct tegra_usb_phy *phy); | ||
| 79 | |||
| 80 | #endif /* __TEGRA_USB_PHY_H */ | ||
