From: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
To: george.moussalem@outlook.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>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 01/10] usb: dwc3: core: Allow glue layer to pass reference clock rate
Date: Mon, 7 Sep 2026 10:35:33 +0530 [thread overview]
Message-ID: <ap5GHUJAW/8uGHUA@hu-varada-blr.qualcomm.com> (raw)
In-Reply-To: <20260906-ipq-flatten-usb-v3-1-13e4e0f63123@outlook.com>
On Sun, Sep 06, 2026 at 08:46:40AM +0400, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
>
> Add ability to pass the reference clock rate from the glue layer to the
> DWC3 core driver. The core calculates the reference clock period and
> frame length adjustment based on the reference clock rate.
>
> In the flattened snsp-dwc3 model, it is currently not possible to pass a
> reference clock that differs from the default since:
> commit 613a2e655d4d ("usb: dwc3: core: Expose core driver as library")
>
> The new glue layers (incl. Qualcomm's) set the ignore_clocks_and_resets
> flag in dwc3_probe_data to true, which disables the core driver's clock
> management, thus it also doesn't acquire the reference clock from the
> devicetree needed in dwc3_ref_clk_period.
>
> There's an existing DT property 'snps,ref-clock-period-ns', but that's
> been deprecated. In addition, basing the rate from the period is often
> not accurate enough to derive the frame length adjustment value.
>
> This prevents moving chipsets such as IPQ5018, IPQ6018, IPQ5332, IPQ5424
> and IPQ9574 with a reference clock rate that computes values for the
> period and frame length adjustment different from the hardware default
> from moving to the flattened model.
>
> So, add ability to set the reference clock rate in dwc3_probe_data, then
> have the core obtain the clock rate and use that to calculate the
> required period and frame length adjustment.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
next prev parent reply other threads:[~2026-09-07 5:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 4:46 [PATCH v3 00/10] Flatten USB Controller Nodes on IPQ SoCs George Moussalem via B4 Relay
2026-09-06 4:46 ` [PATCH v3 01/10] usb: dwc3: core: Allow glue layer to pass reference clock rate George Moussalem via B4 Relay
2026-09-06 4:55 ` sashiko-bot
2026-09-07 5:05 ` Varadarajan Narayanan [this message]
2026-09-06 4:46 ` [PATCH v3 02/10] usb: dwc3: qcom: Add support for selecting UTMI as reference clock George Moussalem via B4 Relay
2026-09-07 4:06 ` Varadarajan Narayanan
2026-09-06 4:46 ` [PATCH v3 03/10] arm64: dts: qcom: ipq5018: Flatten usb controller node George Moussalem via B4 Relay
2026-09-06 4:46 ` [PATCH v3 04/10] arm64: dts: qcom: ipq5332: " George Moussalem via B4 Relay
2026-09-06 4:46 ` [PATCH v3 05/10] arm64: dts: qcom: ipq5424: Flatten usb controller nodes George Moussalem via B4 Relay
2026-09-06 4:58 ` sashiko-bot
2026-09-07 12:58 ` Konrad Dybcio
2026-09-06 4:46 ` [PATCH v3 06/10] arm64: dts: qcom: ipq6018: move DR mode to board DTS George Moussalem via B4 Relay
2026-09-07 12:57 ` Konrad Dybcio
2026-09-06 4:46 ` [PATCH v3 07/10] arm64: dts: qcom: ipq6018: Flatten usb controller nodes George Moussalem via B4 Relay
2026-09-07 12:58 ` Konrad Dybcio
2026-09-06 4:46 ` [PATCH v3 08/10] arm64: dts: qcom: ipq8074: move DR mode to board DTS George Moussalem via B4 Relay
2026-09-07 12:57 ` Konrad Dybcio
2026-09-06 4:46 ` [PATCH v3 09/10] arm64: dts: qcom: ipq8074: Flatten usb controller nodes George Moussalem via B4 Relay
2026-09-07 13:00 ` Konrad Dybcio
2026-09-06 4:46 ` [PATCH v3 10/10] arm64: dts: qcom: ipq9574: Flatten usb controller node George Moussalem via B4 Relay
2026-09-07 13:34 ` Abel Vesa
2026-09-09 9:09 ` Konrad Dybcio
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=ap5GHUJAW/8uGHUA@hu-varada-blr.qualcomm.com \
--to=varadarajan.narayanan@oss.qualcomm.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=george.moussalem@outlook.com \
--cc=gregkh@linuxfoundation.org \
--cc=konradybcio@kernel.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 \
/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