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

phy: qualcomm: qcom-uniphy-pcie 28LP add support for IPQ5018

The Qualcomm UNIPHY PCIe PHY 28LP is found on both IPQ5332 and IPQ5018.
Adding the PHY init sequence, pipe clock rate, and compatible for IPQ5018.

Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://lore.kernel.org/r/20250326-ipq5018-pcie-v7-2-e1828fef06c9@outlook.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Nitheesh Sekar and committed by
Vinod Koul
dfc820d2 aae29082

+45
+45
drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
··· 75 75 76 76 #define phy_to_dw_phy(x) container_of((x), struct qca_uni_pcie_phy, phy) 77 77 78 + static const struct qcom_uniphy_pcie_regs ipq5018_regs[] = { 79 + { 80 + .offset = SSCG_CTRL_REG_4, 81 + .val = 0x1cb9, 82 + }, { 83 + .offset = SSCG_CTRL_REG_5, 84 + .val = 0x023a, 85 + }, { 86 + .offset = SSCG_CTRL_REG_3, 87 + .val = 0xd360, 88 + }, { 89 + .offset = SSCG_CTRL_REG_1, 90 + .val = 0x1, 91 + }, { 92 + .offset = SSCG_CTRL_REG_2, 93 + .val = 0xeb, 94 + }, { 95 + .offset = CDR_CTRL_REG_4, 96 + .val = 0x3f9, 97 + }, { 98 + .offset = CDR_CTRL_REG_5, 99 + .val = 0x1c9, 100 + }, { 101 + .offset = CDR_CTRL_REG_2, 102 + .val = 0x419, 103 + }, { 104 + .offset = CDR_CTRL_REG_1, 105 + .val = 0x200, 106 + }, { 107 + .offset = PCS_INTERNAL_CONTROL_2, 108 + .val = 0xf101, 109 + }, 110 + }; 111 + 78 112 static const struct qcom_uniphy_pcie_regs ipq5332_regs[] = { 79 113 { 80 114 .offset = PHY_CFG_PLLCFG, ··· 120 86 .offset = PHY_CFG_GEN3_ALIGN_HOLDOFF_TIME, 121 87 .val = 0xcf, 122 88 }, 89 + }; 90 + 91 + static const struct qcom_uniphy_pcie_data ipq5018_data = { 92 + .lane_offset = 0x800, 93 + .phy_type = PHY_TYPE_PCIE_GEN2, 94 + .init_seq = ipq5018_regs, 95 + .init_seq_num = ARRAY_SIZE(ipq5018_regs), 96 + .pipe_clk_rate = 125 * MEGA, 123 97 }; 124 98 125 99 static const struct qcom_uniphy_pcie_data ipq5332_data = { ··· 254 212 255 213 static const struct of_device_id qcom_uniphy_pcie_id_table[] = { 256 214 { 215 + .compatible = "qcom,ipq5018-uniphy-pcie-phy", 216 + .data = &ipq5018_data, 217 + }, { 257 218 .compatible = "qcom,ipq5332-uniphy-pcie-phy", 258 219 .data = &ipq5332_data, 259 220 }, {