From 87252652954badab992ad47f00c6355ce4c71770 Mon Sep 17 00:00:00 2001 From: Tapas Rana Date: Wed, 28 Oct 2026 17:26:12 +0530 Subject: [PATCH] phy: qcom: qmp-combo: Fix X1E80100 offsets table to enable PCS_AON clamp control x1e80100_usb3dpphy_cfg uses qmp_v6_n4_usb3phy_regs_layout for .regs, which maps QPHY_PCS_CLAMP_ENABLE to QPHY_V6_PCS_AON_CLAMP_ENABLE, expecting the clamp-enable bit in the pcs_aon region. But its .offsets points to qmp_combo_offsets_v5, which has no usb3_pcs_aon member, so qmp->pcs_aon is never mapped. This forces qmp_combo_enable/disable_autonomous_mode() to fall back to pcs_misc and write the AON clamp offset there instead, so the I/O clamp is not correctly controlled during USB autonomous mode. Add qmp_combo_offsets_v6, identical to qmp_combo_offsets_v5 but with usb3_pcs_aon = 0x0100 set, and point x1e80100_usb3dpphy_cfg.offsets at it instead. Signed-off-by: Tapas Rana --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 3ac29c6eaa68d..758f6de1fce39 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -2375,6 +2375,21 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v5 = { .dp_dp_phy = 0x2200, }; +static const struct qmp_combo_offsets qmp_combo_offsets_v6 = { + .com = 0x0000, + .txa = 0x0400, + .rxa = 0x0600, + .txb = 0x0a00, + .rxb = 0x0c00, + .usb3_serdes = 0x1000, + .usb3_pcs_misc = 0x1200, + .usb3_pcs = 0x1400, + .usb3_pcs_aon = 0x0100, + .usb3_pcs_usb = 0x1700, + .dp_serdes = 0x2000, + .dp_dp_phy = 0x2200, +}; + static const struct qmp_combo_offsets qmp_combo_offsets_v8 = { .com = 0x0000, .txa = 0x1400, @@ -2632,7 +2647,7 @@ static const struct qmp_phy_cfg sc8280xp_usb43dpphy_cfg = { }; static const struct qmp_phy_cfg x1e80100_usb3dpphy_cfg = { - .offsets = &qmp_combo_offsets_v5, + .offsets = &qmp_combo_offsets_v6, .serdes_tbl = x1e80100_usb43dp_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(x1e80100_usb43dp_serdes_tbl),