[PATCH 2/3] phy: qcom: qmp-combo: Make v4/v5 targets use the right clamp
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Nov 2 06:37:24 PST 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] phy: qcom: qmp-combo: dead QPHY_PCS_MISC_CLAMP_ENABLE entry in v5 layout
--
commit 5854e61ed6a55b0bb186cbe1a5d7267876acb2c9
Author: Konrad Dybcio <konrad.dybcio at oss.qualcomm.com>
phy: qcom: qmp-combo: Make v4/v5 targets use the right clamp
This commit updates QMP v4 and v5 combo PHY register layouts and autonomous
mode helpers to use the PCS clamp register instead of the PCS_MISC clamp
register.
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index 5a4e12698d516..ff8cc26667cdc 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -159,7 +159,7 @@ static const unsigned int qmp_v45_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
> [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V4_PCS_USB3_AUTONOMOUS_MODE_CTRL,
> [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V4_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR,
>
> - [QPHY_PCS_MISC_CLAMP_ENABLE] = QPHY_V4_PCS_MISC_CLAMP_ENABLE,
> + [QPHY_PCS_CLAMP_ENABLE] = QPHY_V4_PCS_CLAMP_ENABLE,
>
> [QPHY_COM_RESETSM_CNTRL] = QSERDES_V4_COM_RESETSM_CNTRL,
> [QPHY_COM_C_READY_STATUS] = QSERDES_V4_COM_C_READY_STATUS,
> @@ -186,6 +186,7 @@ static const unsigned int qmp_v5_5nm_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
> [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V5_PCS_USB3_AUTONOMOUS_MODE_CTRL,
> [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V5_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR,
>
> + [QPHY_PCS_CLAMP_ENABLE] = QPHY_V5_PCS_CLAMP_ENABLE,
> [QPHY_PCS_MISC_CLAMP_ENABLE] = QPHY_V5_PCS_MISC_CLAMP_ENABLE,
[Severity: Low]
This isn't a bug, but should QPHY_PCS_MISC_CLAMP_ENABLE also be removed from
qmp_v5_5nm_usb3phy_regs_layout here, matching qmp_v45_usb3phy_regs_layout?
In qmp_combo_enable_autonomous_mode() and qmp_combo_disable_autonomous_mode(),
the new cfg->regs[QPHY_PCS_CLAMP_ENABLE] branch is checked before the
pcs_misc fallback:
} else if (cfg->regs[QPHY_PCS_CLAMP_ENABLE]) {
qphy_clrbits(qmp->pcs, cfg->regs[QPHY_PCS_CLAMP_ENABLE], CLAMP_EN);
} else if (pcs_misc) {
qphy_clrbits(pcs_misc, cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE], CLAMP_EN);
}
Since QPHY_V5_PCS_CLAMP_ENABLE is non-zero (0x08c), the pcs_misc branch using
QPHY_PCS_MISC_CLAMP_ENABLE is no longer reachable for this layout. Dropping
that entry would also allow removing the now-unused phy-qcom-qmp-pcs-misc-v4.h
and phy-qcom-qmp-pcs-misc-v5.h includes from phy-qcom-qmp-combo.c.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102-topic-qmp_aon_clamp-v1-0-141c2cb6cdf6@oss.qualcomm.com?part=2
More information about the linux-phy
mailing list