All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Konrad Dybcio" <konradybcio@kernel.org>
Cc: linux-phy@lists.infradead.org, vkoul@kernel.org,
	neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH 2/3] phy: qcom: qmp-combo: Make v4/v5 targets use the right clamp
Date: Mon, 02 Nov 2026 14:37:24 +0000	[thread overview]
Message-ID: <sashiko-outbox-193588@kernel.org> (raw)
In-Reply-To: <20261102-topic-qmp_aon_clamp-v1-2-141c2cb6cdf6@oss.qualcomm.com>

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@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

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-11-02 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 13:59 [PATCH 0/3] Fix up AON clamps on qmp-combo-phy Konrad Dybcio
2026-11-02 13:59 ` [PATCH 1/3] phy: qcom: qmp-combo: Separate PCS misc clamp mapping Konrad Dybcio
2026-11-03  9:56   ` Abel Vesa
2026-11-02 13:59 ` [PATCH 2/3] phy: qcom: qmp-combo: Make v4/v5 targets use the right clamp Konrad Dybcio
2026-11-02 14:37   ` sashiko-bot [this message]
2026-11-03  9:57   ` Abel Vesa
2026-11-02 13:59 ` [PATCH 3/3] phy: qcom: qmp-combo: Use V6 offsets for PCS-AON clamps Konrad Dybcio
2026-11-03  9:57   ` Abel Vesa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-193588@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.