public inbox for linux-phy@lists.infradead.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Wayne Chang <waynec@nvidia.com>,
	jckuo@nvidia.com, vkoul@kernel.org, kishon@kernel.org,
	thierry.reding@gmail.com
Cc: linux-phy@lists.infradead.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] phy: tegra: xusb: Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from trk_hw_mode
Date: Wed, 7 May 2025 10:39:36 +0100	[thread overview]
Message-ID: <7666d6e3-9fd5-45aa-9a29-144514ab3533@nvidia.com> (raw)
In-Reply-To: <20250507024820.1648733-2-waynec@nvidia.com>

Hi Wayne,

On 07/05/2025 03:48, Wayne Chang wrote:
> The logic that drives the pad calibration values resides in the
> controller reset domain and so the calibration values are only being
> captured when the controller is out of reset. However, by clearing the
> CYA_TRK_CODE_UPDATE_ON_IDLE bit, the calibration values can be set
> while the controller is in reset.
> 
> The CYA_TRK_CODE_UPDATE_ON_IDLE bit was previously cleared based on the
> trk_hw_mode flag, but this dependency is not necessary. Instead,
> introduce a new flag, trk_update_on_idle, to independently control this
> bit.
> 
> Fixes: d8163a32ca95 ("phy: tegra: xusb: Add Tegra234 support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> ---
>   drivers/phy/tegra/xusb-tegra186.c | 14 ++++++++------
>   drivers/phy/tegra/xusb.h          |  1 +
>   2 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c
> index fae6242aa730..dd0aaf305e90 100644
> --- a/drivers/phy/tegra/xusb-tegra186.c
> +++ b/drivers/phy/tegra/xusb-tegra186.c
> @@ -650,14 +650,15 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl)
>   		udelay(100);
>   	}
>   
> -	if (padctl->soc->trk_hw_mode) {
> -		value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL2);
> -		value |= USB2_TRK_HW_MODE;
> +	value = padctl_readl(padctl, XUSB_PADCTL_USB2_BIAS_PAD_CTL2);
> +	if (padctl->soc->trk_update_on_idle)
>   		value &= ~CYA_TRK_CODE_UPDATE_ON_IDLE;
> -		padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL2);
> -	} else {
> +	if (padctl->soc->trk_hw_mode)
> +		value |= USB2_TRK_HW_MODE;
> +	padctl_writel(padctl, value, XUSB_PADCTL_USB2_BIAS_PAD_CTL2);
> +
> +	if (!padctl->soc->trk_hw_mode)
>   		clk_disable_unprepare(priv->usb2_trk_clk);
> -	}
>   
>   	mutex_unlock(&padctl->lock);


Can we rebase this on top of the fix 'phy: tegra: xusb: remove a stray 
unlock'? This does not apply on top of that patch.

Thanks
Jon
-- 
nvpublic


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

  reply	other threads:[~2025-05-07  9:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07  2:48 [PATCH 0/2] Disable periodic tracking on Tegra234 Wayne Chang
2025-05-07  2:48 ` [PATCH 1/2] phy: tegra: xusb: Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from trk_hw_mode Wayne Chang
2025-05-07  9:39   ` Jon Hunter [this message]
2025-05-07  2:48 ` [PATCH 2/2] phy: tegra: xusb: Disable periodic tracking on Tegra234 Wayne Chang

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=7666d6e3-9fd5-45aa-9a29-144514ab3533@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=jckuo@nvidia.com \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=vkoul@kernel.org \
    --cc=waynec@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox