]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/phy/qualcomm/phy-qcom-qmp-usb.c
Merge tag 'phy-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
[thirdparty/linux.git] / drivers / phy / qualcomm / phy-qcom-qmp-usb.c
index 6b6994cb77d73f334fbb531850e260a60b6697ba..85253936fac352a5189d7b5fa89535ba264b5686 100644 (file)
@@ -1281,6 +1281,14 @@ static const char * const qmp_phy_vreg_l[] = {
        "vdda-phy", "vdda-pll",
 };
 
+static const struct qmp_usb_offsets qmp_usb_offsets_v3 = {
+       .serdes         = 0,
+       .pcs            = 0x800,
+       .pcs_misc       = 0x600,
+       .tx             = 0x200,
+       .rx             = 0x400,
+};
+
 static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = {
        .serdes         = 0,
        .pcs            = 0x800,
@@ -1289,7 +1297,7 @@ static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = {
        .rx             = 0x400,
 };
 
-static const struct qmp_usb_offsets qmp_usb_offsets_v3 = {
+static const struct qmp_usb_offsets qmp_usb_offsets_v3_msm8996 = {
        .serdes         = 0,
        .pcs            = 0x600,
        .tx             = 0x200,
@@ -1328,6 +1336,22 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v7 = {
        .rx             = 0x1000,
 };
 
+static const struct qmp_phy_cfg ipq6018_usb3phy_cfg = {
+       .offsets                = &qmp_usb_offsets_v3,
+
+       .serdes_tbl             = ipq9574_usb3_serdes_tbl,
+       .serdes_tbl_num         = ARRAY_SIZE(ipq9574_usb3_serdes_tbl),
+       .tx_tbl                 = msm8996_usb3_tx_tbl,
+       .tx_tbl_num             = ARRAY_SIZE(msm8996_usb3_tx_tbl),
+       .rx_tbl                 = ipq8074_usb3_rx_tbl,
+       .rx_tbl_num             = ARRAY_SIZE(ipq8074_usb3_rx_tbl),
+       .pcs_tbl                = ipq8074_usb3_pcs_tbl,
+       .pcs_tbl_num            = ARRAY_SIZE(ipq8074_usb3_pcs_tbl),
+       .vreg_list              = qmp_phy_vreg_l,
+       .num_vregs              = ARRAY_SIZE(qmp_phy_vreg_l),
+       .regs                   = qmp_v3_usb3phy_regs_layout,
+};
+
 static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
        .offsets                = &qmp_usb_offsets_v3,
 
@@ -1361,7 +1385,7 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
-       .offsets                = &qmp_usb_offsets_v3,
+       .offsets                = &qmp_usb_offsets_v3_msm8996,
 
        .serdes_tbl             = msm8996_usb3_serdes_tbl,
        .serdes_tbl_num         = ARRAY_SIZE(msm8996_usb3_serdes_tbl),
@@ -2168,7 +2192,7 @@ err_node_put:
 static const struct of_device_id qmp_usb_of_match_table[] = {
        {
                .compatible = "qcom,ipq6018-qmp-usb3-phy",
-               .data = &ipq8074_usb3phy_cfg,
+               .data = &ipq6018_usb3phy_cfg,
        }, {
                .compatible = "qcom,ipq8074-qmp-usb3-phy",
                .data = &ipq8074_usb3phy_cfg,