mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
	Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org,
	michal.simek@amd.com, robert.hancock@calian.com
Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, git@amd.com,
	Neal Frager <neal.frager@amd.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] usb: dwc3: xilinx: make sure pipe clock is deselected in usb2 only mode
Date: Mon, 18 Nov 2024 17:00:30 +0100	[thread overview]
Message-ID: <a35ba8dc-fd4a-41ae-9ad7-7702f4f48980@korsgaard.com> (raw)
In-Reply-To: <1731942491-1992368-1-git-send-email-radhey.shyam.pandey@amd.com>

On 11/18/24 16:08, Radhey Shyam Pandey wrote:
> From: Neal Frager <neal.frager@amd.com>
> 
> When the USB3 PHY is not defined in the Linux device tree, there could
> still be a case where there is a USB3 PHY is active on the board and

2nd "is " should be dropped. This sounds a bit confusing to me as the 
PHY is on-chip on zynqmp, maybe you are referring to a reference clock 
input to the PS-GTR instead?


> enabled by the first stage bootloader.  If serdes clock is being used
> then the USB will fail to enumerate devices in 2.0 only mode.
> 
> To solve this, make sure that the PIPE clock is deselected whenever the
> USB3 PHY is not defined and guarantees that the USB2 only mode will work
> in all cases.
> 
> Fixes: 9678f3361afc ("usb: dwc3: xilinx: Skip resets and USB3 register settings for USB2.0 mode")
> Cc: stable@vger.kernel.org
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
> ---
> Changes for v2:
> - Add stable@vger.kernel.org in CC.

Other than that looks good, thanks.

Acked-by: Peter Korsgaard <peter@korsgaard.com>


> ---
>   drivers/usb/dwc3/dwc3-xilinx.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c
> index e3738e1610db..a33a42ba0249 100644
> --- a/drivers/usb/dwc3/dwc3-xilinx.c
> +++ b/drivers/usb/dwc3/dwc3-xilinx.c
> @@ -121,8 +121,11 @@ static int dwc3_xlnx_init_zynqmp(struct dwc3_xlnx *priv_data)
>   	 * in use but the usb3-phy entry is missing from the device tree.
>   	 * Therefore, skip these operations in this case.
>   	 */
> -	if (!priv_data->usb3_phy)
> +	if (!priv_data->usb3_phy) {
> +		/* Deselect the PIPE Clock Select bit in FPD PIPE Clock register */
> +		writel(PIPE_CLK_DESELECT, priv_data->regs + XLNX_USB_FPD_PIPE_CLK);
>   		goto skip_usb3_phy;
> +	}
>   
>   	crst = devm_reset_control_get_exclusive(dev, "usb_crst");
>   	if (IS_ERR(crst)) {
> 
> base-commit: 744cf71b8bdfcdd77aaf58395e068b7457634b2c

-- 
Bye, Peter Korsgaard


      reply	other threads:[~2024-11-18 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 15:08 Radhey Shyam Pandey
2024-11-18 16:00 ` Peter Korsgaard [this message]

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=a35ba8dc-fd4a-41ae-9ad7-7702f4f48980@korsgaard.com \
    --to=peter@korsgaard.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=git@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=neal.frager@amd.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=robert.hancock@calian.com \
    --cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®