Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <quic_nsekar@quicinc.com>
Link: https://lore.kernel.org/r/20230904063635.24975-3-quic_nsekar@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Nitheesh Sekar and committed by
Vinod Koul
68320e35 1852dfaa

+51
+51
drivers/phy/qualcomm/phy-qcom-m31.c
··· 82 82 unsigned int nregs; 83 83 }; 84 84 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 + 85 129 struct m31_phy_regs m31_ipq5332_regs[] = { 86 130 { 87 131 USB_PHY_CFG0, ··· 312 268 return PTR_ERR_OR_ZERO(phy_provider); 313 269 } 314 270 271 + static const struct m31_priv_data m31_ipq5018_data = { 272 + .ulpi_mode = false, 273 + .regs = m31_ipq5018_regs, 274 + .nregs = ARRAY_SIZE(m31_ipq5018_regs), 275 + }; 276 + 315 277 static const struct m31_priv_data m31_ipq5332_data = { 316 278 .ulpi_mode = false, 317 279 .regs = m31_ipq5332_regs, ··· 325 275 }; 326 276 327 277 static const struct of_device_id m31usb_phy_id_table[] = { 278 + { .compatible = "qcom,ipq5018-usb-hsphy", .data = &m31_ipq5018_data }, 328 279 { .compatible = "qcom,ipq5332-usb-hsphy", .data = &m31_ipq5332_data }, 329 280 { }, 330 281 };