#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#include <linux/bitfield.h>
#define QSCRATCH_GENERAL_CFG …
#define HSUSB_PHY_CTRL_REG …
#define HSUSB_CTRL_DMSEHV_CLAMP …
#define HSUSB_CTRL_USB2_SUSPEND …
#define HSUSB_CTRL_UTMI_CLK_EN …
#define HSUSB_CTRL_UTMI_OTG_VBUS_VALID …
#define HSUSB_CTRL_USE_CLKCORE …
#define HSUSB_CTRL_DPSEHV_CLAMP …
#define HSUSB_CTRL_COMMONONN …
#define HSUSB_CTRL_ID_HV_CLAMP …
#define HSUSB_CTRL_OTGSESSVLD_CLAMP …
#define HSUSB_CTRL_CLAMP_EN …
#define HSUSB_CTRL_RETENABLEN …
#define HSUSB_CTRL_POR …
#define HSUSB_GCFG_XHCI_REV …
#define SSUSB_PHY_CTRL_REG …
#define SSUSB_PHY_PARAM_CTRL_1 …
#define SSUSB_PHY_PARAM_CTRL_2 …
#define CR_PROTOCOL_DATA_IN_REG …
#define CR_PROTOCOL_DATA_OUT_REG …
#define CR_PROTOCOL_CAP_ADDR_REG …
#define CR_PROTOCOL_CAP_DATA_REG …
#define CR_PROTOCOL_READ_REG …
#define CR_PROTOCOL_WRITE_REG …
#define SSUSB_CTRL_REF_USE_PAD …
#define SSUSB_CTRL_TEST_POWERDOWN …
#define SSUSB_CTRL_LANE0_PWR_PRESENT …
#define SSUSB_CTRL_SS_PHY_EN …
#define SSUSB_CTRL_SS_PHY_RESET …
#define SSPHY_CTRL_RX_OVRD_IN_HI(lane) …
#define SSPHY_CTRL_TX_OVRD_DRV_LO(lane) …
#define SSPHY_RX_EQ_VALUE …
#define SSPHY_TX_DEEMPH_3_5DB …
#define SSPHY_MPLL_VALUE …
#define PHY_PARAM_CTRL1_TX_FULL_SWING_MASK …
#define PHY_PARAM_CTRL1_TX_DEEMPH_6DB_MASK …
#define PHY_PARAM_CTRL1_TX_DEEMPH_3_5DB_MASK …
#define PHY_PARAM_CTRL1_LOS_BIAS_MASK …
#define PHY_PARAM_CTRL1_MASK …
#define PHY_PARAM_CTRL1_TX_FULL_SWING(x) …
#define PHY_PARAM_CTRL1_TX_DEEMPH_6DB(x) …
#define PHY_PARAM_CTRL1_TX_DEEMPH_3_5DB(x) …
#define PHY_PARAM_CTRL1_LOS_BIAS(x) …
#define RX_OVRD_IN_HI_RX_RESET_OVRD …
#define RX_OVRD_IN_HI_RX_RX_RESET …
#define RX_OVRD_IN_HI_RX_EQ_OVRD …
#define RX_OVRD_IN_HI_RX_EQ_MASK …
#define RX_OVRD_IN_HI_RX_EQ(x) …
#define RX_OVRD_IN_HI_RX_EQ_EN_OVRD …
#define RX_OVRD_IN_HI_RX_EQ_EN …
#define RX_OVRD_IN_HI_RX_LOS_FILTER_OVRD …
#define RX_OVRD_IN_HI_RX_LOS_FILTER_MASK …
#define RX_OVRD_IN_HI_RX_RATE_OVRD …
#define RX_OVRD_IN_HI_RX_RATE_MASK …
#define TX_OVRD_DRV_LO_AMPLITUDE_MASK …
#define TX_OVRD_DRV_LO_PREEMPH_MASK …
#define TX_OVRD_DRV_LO_PREEMPH(x) …
#define TX_OVRD_DRV_LO_EN …
#define SSPHY_MPLL_MASK …
#define SSPHY_MPLL(x) …
#define SS_CR_CAP_ADDR_REG …
#define SS_CR_CAP_DATA_REG …
#define SS_CR_READ_REG …
#define SS_CR_WRITE_REG …
#define LATCH_SLEEP …
#define LATCH_TIMEOUT …
struct usb_phy { … };
struct phy_drvdata { … };
static inline void usb_phy_write_readback(struct usb_phy *phy_dwc3,
u32 offset,
const u32 mask, u32 val)
{ … }
static int wait_for_latch(void __iomem *addr)
{ … }
static int usb_ss_write_phycreg(struct usb_phy *phy_dwc3,
u32 addr, u32 val)
{ … }
static int usb_ss_read_phycreg(struct usb_phy *phy_dwc3,
u32 addr, u32 *val)
{ … }
static int qcom_ipq806x_usb_hs_phy_init(struct phy *phy)
{ … }
static int qcom_ipq806x_usb_hs_phy_exit(struct phy *phy)
{ … }
static int qcom_ipq806x_usb_ss_phy_init(struct phy *phy)
{ … }
static int qcom_ipq806x_usb_ss_phy_exit(struct phy *phy)
{ … }
static const struct phy_drvdata qcom_ipq806x_usb_hs_drvdata = …;
static const struct phy_drvdata qcom_ipq806x_usb_ss_drvdata = …;
static const struct of_device_id qcom_ipq806x_usb_phy_table[] = …;
MODULE_DEVICE_TABLE(of, qcom_ipq806x_usb_phy_table);
static int qcom_ipq806x_usb_phy_probe(struct platform_device *pdev)
{ … }
static struct platform_driver qcom_ipq806x_usb_phy_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;