Skip to content

Commit 68320e3

Browse files
Nitheesh Sekarvinodkoul
authored andcommitted
phy: qcom-m31: Add compatible, phy init sequence for IPQ5018
Add phy init sequence and compatible string for IPQ5018 chipset. Signed-off-by: Nitheesh Sekar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1852dfa commit 68320e3

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

drivers/phy/qualcomm/phy-qcom-m31.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,50 @@ struct m31_priv_data {
8282
unsigned int nregs;
8383
};
8484

85+
static const struct m31_phy_regs m31_ipq5018_regs[] = {
86+
{
87+
.off = USB_PHY_CFG0,
88+
.val = UTMI_PHY_OVERRIDE_EN
89+
},
90+
{
91+
.off = USB_PHY_UTMI_CTRL5,
92+
.val = POR_EN,
93+
.delay = 15
94+
},
95+
{
96+
.off = USB_PHY_FSEL_SEL,
97+
.val = FREQ_SEL
98+
},
99+
{
100+
.off = USB_PHY_HS_PHY_CTRL_COMMON0,
101+
.val = COMMONONN | FSEL | RETENABLEN
102+
},
103+
{
104+
.off = USB_PHY_REFCLK_CTRL,
105+
.val = CLKCORE
106+
},
107+
{
108+
.off = USB_PHY_UTMI_CTRL5,
109+
.val = POR_EN
110+
},
111+
{
112+
.off = USB_PHY_HS_PHY_CTRL2,
113+
.val = USB2_SUSPEND_N_SEL | USB2_SUSPEND_N | USB2_UTMI_CLK_EN
114+
},
115+
{
116+
.off = USB_PHY_UTMI_CTRL5,
117+
.val = 0x0
118+
},
119+
{
120+
.off = USB_PHY_HS_PHY_CTRL2,
121+
.val = USB2_SUSPEND_N | USB2_UTMI_CLK_EN
122+
},
123+
{
124+
.off = USB_PHY_CFG0,
125+
.val = 0x0
126+
},
127+
};
128+
85129
struct m31_phy_regs m31_ipq5332_regs[] = {
86130
{
87131
USB_PHY_CFG0,
@@ -268,13 +312,20 @@ static int m31usb_phy_probe(struct platform_device *pdev)
268312
return PTR_ERR_OR_ZERO(phy_provider);
269313
}
270314

315+
static const struct m31_priv_data m31_ipq5018_data = {
316+
.ulpi_mode = false,
317+
.regs = m31_ipq5018_regs,
318+
.nregs = ARRAY_SIZE(m31_ipq5018_regs),
319+
};
320+
271321
static const struct m31_priv_data m31_ipq5332_data = {
272322
.ulpi_mode = false,
273323
.regs = m31_ipq5332_regs,
274324
.nregs = ARRAY_SIZE(m31_ipq5332_regs),
275325
};
276326

277327
static const struct of_device_id m31usb_phy_id_table[] = {
328+
{ .compatible = "qcom,ipq5018-usb-hsphy", .data = &m31_ipq5018_data },
278329
{ .compatible = "qcom,ipq5332-usb-hsphy", .data = &m31_ipq5332_data },
279330
{ },
280331
};

0 commit comments

Comments
 (0)