xref: /OK3568_Linux_fs/u-boot/arch/arm/include/asm/arch-tegra/xusb-padctl.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun #ifndef _TEGRA_XUSB_PADCTL_H_
2*4882a593Smuzhiyun #define _TEGRA_XUSB_PADCTL_H_
3*4882a593Smuzhiyun 
4*4882a593Smuzhiyun struct tegra_xusb_phy;
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun /**
7*4882a593Smuzhiyun  * tegra_xusb_phy_get() - obtain a reference to a specified padctl PHY
8*4882a593Smuzhiyun  * @type: the type of PHY to obtain
9*4882a593Smuzhiyun  *
10*4882a593Smuzhiyun  * The type of PHY varies between SoC generations. Typically there are XUSB,
11*4882a593Smuzhiyun  * PCIe and SATA PHYs, though not all generations support all of them. The
12*4882a593Smuzhiyun  * value of type can usually be directly parsed from a device tree.
13*4882a593Smuzhiyun  *
14*4882a593Smuzhiyun  * Return: a pointer to the PHY or NULL if no such PHY exists
15*4882a593Smuzhiyun  */
16*4882a593Smuzhiyun struct tegra_xusb_phy *tegra_xusb_phy_get(unsigned int type);
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun void tegra_xusb_padctl_init(void);
19*4882a593Smuzhiyun int tegra_xusb_phy_prepare(struct tegra_xusb_phy *phy);
20*4882a593Smuzhiyun int tegra_xusb_phy_enable(struct tegra_xusb_phy *phy);
21*4882a593Smuzhiyun int tegra_xusb_phy_disable(struct tegra_xusb_phy *phy);
22*4882a593Smuzhiyun int tegra_xusb_phy_unprepare(struct tegra_xusb_phy *phy);
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun #endif
25