blob: 7e14d8109d11337a35b69e3bc45bb78aba949ebb [file] [log] [blame]
Thierry Redingf202e022014-12-09 22:25:09 -07001#ifndef _TEGRA_XUSB_PADCTL_H_
2#define _TEGRA_XUSB_PADCTL_H_
3
4struct tegra_xusb_phy;
5
6/**
7 * tegra_xusb_phy_get() - obtain a reference to a specified padctl PHY
8 * @type: the type of PHY to obtain
9 *
10 * The type of PHY varies between SoC generations. Typically there are XUSB,
11 * PCIe and SATA PHYs, though not all generations support all of them. The
12 * value of type can usually be directly parsed from a device tree.
13 *
14 * Return: a pointer to the PHY or NULL if no such PHY exists
15 */
16struct tegra_xusb_phy *tegra_xusb_phy_get(unsigned int type);
17
Simon Glasscf0c6e22017-07-25 08:29:59 -060018void tegra_xusb_padctl_init(void);
JC Kuof479aca2020-03-26 16:10:09 -070019void tegra_xusb_padctl_exit(void);
Thierry Redingf202e022014-12-09 22:25:09 -070020int tegra_xusb_phy_prepare(struct tegra_xusb_phy *phy);
21int tegra_xusb_phy_enable(struct tegra_xusb_phy *phy);
22int tegra_xusb_phy_disable(struct tegra_xusb_phy *phy);
23int tegra_xusb_phy_unprepare(struct tegra_xusb_phy *phy);
24
25#endif