2 * arch/arm/mach-tegra/include/mach/usb_phy.h
4 * Copyright (C) 2010 Google, Inc.
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #ifndef __MACH_USB_PHY_H
18 #define __MACH_USB_PHY_H
20 #include <linux/clk.h>
21 #include <linux/usb/otg.h>
23 struct tegra_utmip_config
{
24 u8 hssync_start_delay
;
33 struct tegra_ulpi_config
{
38 enum tegra_usb_phy_port_speed
{
39 TEGRA_USB_PHY_PORT_SPEED_FULL
= 0,
40 TEGRA_USB_PHY_PORT_SPEED_LOW
,
41 TEGRA_USB_PHY_PORT_SPEED_HIGH
,
44 enum tegra_usb_phy_mode
{
45 TEGRA_USB_PHY_MODE_DEVICE
,
46 TEGRA_USB_PHY_MODE_HOST
,
49 struct tegra_xtal_freq
;
51 struct tegra_usb_phy
{
53 const struct tegra_xtal_freq
*freq
;
55 void __iomem
*pad_regs
;
59 enum tegra_usb_phy_mode mode
;
61 struct otg_transceiver
*ulpi
;
64 struct tegra_usb_phy
*tegra_usb_phy_open(int instance
, void __iomem
*regs
,
65 void *config
, enum tegra_usb_phy_mode phy_mode
);
67 int tegra_usb_phy_power_on(struct tegra_usb_phy
*phy
);
69 void tegra_usb_phy_clk_disable(struct tegra_usb_phy
*phy
);
71 void tegra_usb_phy_clk_enable(struct tegra_usb_phy
*phy
);
73 void tegra_usb_phy_power_off(struct tegra_usb_phy
*phy
);
75 void tegra_usb_phy_preresume(struct tegra_usb_phy
*phy
);
77 void tegra_usb_phy_postresume(struct tegra_usb_phy
*phy
);
79 void tegra_ehci_phy_restore_start(struct tegra_usb_phy
*phy
,
80 enum tegra_usb_phy_port_speed port_speed
);
82 void tegra_ehci_phy_restore_end(struct tegra_usb_phy
*phy
);
84 void tegra_usb_phy_close(struct tegra_usb_phy
*phy
);
86 #endif /* __MACH_USB_PHY_H */