From: Krzysztof Kozlowski <krzk@kernel.org>
To: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Wesley Cheng <quic_wcheng@quicinc.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] usb: dwc3: qcom: Allow the glue layer to pass ref_clk to the core
Date: Fri, 28 Aug 2026 12:06:43 +0200 [thread overview]
Message-ID: <20260828-grumpy-fresh-dragon-856e2e@quoll> (raw)
In-Reply-To: <20260825-ctrl-v1-2-609e2291814d@oss.qualcomm.com>
On Tue, Aug 25, 2026 at 10:38:33AM +0530, Varadarajan Narayanan wrote:
> The dwc3-qcom glue layer sets probe_data.ignore_clocks_and_resets before
> calling dwc3_core_probe(), so the DWC3 core does not acquire ref_clk on its
> own. This prevents dwc3_ref_clk_period() from programming GUCTL and GFLADJ
> from the reference clock rate.
>
> The deprecated snps,ref-clock-period-ns property is not a suitable
> replacement on IPQ9650. Its 24 MHz reference clock has a period of about
> 41.66 ns, while using 41 ns makes the calculated FLADJ value become 0 and
> leaves the reference clock configuration incorrect.
>
> Allow the Qualcomm glue driver to provide ref_clk to the DWC3 core for
> platforms that may need it.
>
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
> ---
> drivers/usb/dwc3/dwc3-qcom.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index ac68b4218b56..2d6de6469c1e 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -705,6 +705,13 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
> probe_data.res = &res;
> probe_data.ignore_clocks_and_resets = true;
> probe_data.properties = DWC3_DEFAULT_PROPERTIES;
> +
> + qcom->dwc.ref_clk = devm_clk_get_optional(dev, "ref_clk");
> + if (IS_ERR_OR_NULL(qcom->dwc.ref_clk)) {
> + qcom->dwc.ref_clk = NULL;
> + dev_info(dev, "NOT setting dwc.ref_clk\n");
No need for a message. Why every device should receive it during probe?
Aren't existing other devices use name "ref"? Why are you coming with
completely different name? SNPS binding also asks for ref.
Best regards,
Krzysztof
prev parent reply other threads:[~2026-08-28 10:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 5:08 [PATCH 0/2] Add support for IPQ9650 USB controller Varadarajan Narayanan
2026-08-25 5:08 ` [PATCH 1/2] dt-bindings: usb: qcom,snps-dwc3: Add IPQ9650 compatible Varadarajan Narayanan
2026-08-28 10:04 ` Krzysztof Kozlowski
2026-08-25 5:08 ` [PATCH 2/2] usb: dwc3: qcom: Allow the glue layer to pass ref_clk to the core Varadarajan Narayanan
2026-08-28 10:06 ` Krzysztof Kozlowski [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=20260828-grumpy-fresh-dragon-856e2e@quoll \
--to=krzk@kernel.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_wcheng@quicinc.com \
--cc=robh@kernel.org \
--cc=varadarajan.narayanan@oss.qualcomm.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
all inboxes | Powered by JetHome®