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

phy: qcom-qusb2: Add support for QCS615

Add init sequence and phy configuration for QCS615.

Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241224084621.4139021-3-krishna.kurapati@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Krishna Kurapati and committed by
Vinod Koul
8adbf20e 413918c4

+27
+27
drivers/phy/qualcomm/phy-qcom-qusb2.c
··· 166 166 QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_AUTOPGM_CTL1, 0x9f), 167 167 }; 168 168 169 + static const struct qusb2_phy_init_tbl qcs615_init_tbl[] = { 170 + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xc8), 171 + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0xb3), 172 + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE3, 0x83), 173 + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE4, 0xc0), 174 + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TUNE, 0x30), 175 + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL1, 0x79), 176 + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL2, 0x21), 177 + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TEST2, 0x14), 178 + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_AUTOPGM_CTL1, 0x9f), 179 + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00), 180 + }; 181 + 169 182 static const unsigned int ipq6018_regs_layout[] = { 170 183 [QUSB2PHY_PLL_STATUS] = 0x38, 171 184 [QUSB2PHY_PORT_TUNE1] = 0x80, ··· 366 353 367 354 .disable_ctrl = POWER_DOWN, 368 355 .mask_core_ready = PLL_LOCKED, 356 + .autoresume_en = BIT(0), 357 + }; 358 + 359 + static const struct qusb2_phy_cfg qcs615_phy_cfg = { 360 + .tbl = qcs615_init_tbl, 361 + .tbl_num = ARRAY_SIZE(qcs615_init_tbl), 362 + .regs = ipq6018_regs_layout, 363 + 364 + .disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN), 365 + .mask_core_ready = PLL_LOCKED, 366 + /* autoresume not used */ 369 367 .autoresume_en = BIT(0), 370 368 }; 371 369 ··· 974 950 }, { 975 951 .compatible = "qcom,msm8998-qusb2-phy", 976 952 .data = &msm8998_phy_cfg, 953 + }, { 954 + .compatible = "qcom,qcs615-qusb2-phy", 955 + .data = &qcs615_phy_cfg, 977 956 }, { 978 957 .compatible = "qcom,qcm2290-qusb2-phy", 979 958 .data = &sm6115_phy_cfg,