* [PATCH 0/2] Add support for IPQ9650 USB controller
@ 2026-08-25 5:08 Varadarajan Narayanan
2026-08-25 5:08 ` [PATCH 1/2] dt-bindings: usb: qcom,snps-dwc3: Add IPQ9650 compatible Varadarajan Narayanan
2026-08-25 5:08 ` [PATCH 2/2] usb: dwc3: qcom: Allow the glue layer to pass ref_clk to the core Varadarajan Narayanan
0 siblings, 2 replies; 5+ messages in thread
From: Varadarajan Narayanan @ 2026-08-25 5:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Wesley Cheng, Thinh Nguyen
Cc: linux-arm-msm, linux-usb, devicetree, linux-kernel,
Varadarajan Narayanan
Add bindings and dwc3-qcom glue driver changes for adding support to the
two USB controllers present in IPQ9650.
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
Varadarajan Narayanan (2):
dt-bindings: usb: qcom,snps-dwc3: Add IPQ9650 compatible
usb: dwc3: qcom: Allow the glue layer to pass ref_clk to the core
.../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 22 ++++++++++++++++++++++
drivers/usb/dwc3/dwc3-qcom.c | 7 +++++++
2 files changed, 29 insertions(+)
---
base-commit: 7c5f62582256b505a57975d1a8faa501c8d8878e
change-id: 20260820-ctrl-6015e1503b24
Best regards,
--
Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] dt-bindings: usb: qcom,snps-dwc3: Add IPQ9650 compatible
2026-08-25 5:08 [PATCH 0/2] Add support for IPQ9650 USB controller Varadarajan Narayanan
@ 2026-08-25 5:08 ` 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
1 sibling, 1 reply; 5+ messages in thread
From: Varadarajan Narayanan @ 2026-08-25 5:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Wesley Cheng, Thinh Nguyen
Cc: linux-arm-msm, linux-usb, devicetree, linux-kernel,
Varadarajan Narayanan
Add the qcom,ipq9650-dwc3 compatible for the two DWC3 USB controllers found
on IPQ9650, using qcom,snps-dwc3 as the fallback compatible.
One controller is connected to a High-Speed PHY, while the other is
connected to both High-Speed and SuperSpeed PHYs.
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
.../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
index ea60f7220afe..603d509a6ba1 100644
--- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
@@ -36,6 +36,7 @@ properties:
- qcom,ipq8064-dwc3
- qcom,ipq8074-dwc3
- qcom,ipq9574-dwc3
+ - qcom,ipq9650-dwc3
- qcom,kaanapali-dwc3
- qcom,maili-dwc3
- qcom,milos-dwc3
@@ -387,6 +388,26 @@ allOf:
- const: mock_utmi
- const: xo
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,ipq9650-dwc3
+ then:
+ properties:
+ clocks:
+ minItems: 6
+ maxItems: 6
+ clock-names:
+ items:
+ - const: cfg_noc
+ - const: core
+ - const: iface
+ - const: sleep
+ - const: mock_utmi
+ - const: ref_clk
+
- if:
properties:
compatible:
@@ -506,6 +527,7 @@ allOf:
- qcom,ipq5210-dwc3
- qcom,ipq5424-dwc3
- qcom,ipq9574-dwc3
+ - qcom,ipq9650-dwc3
then:
properties:
interrupts:
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] usb: dwc3: qcom: Allow the glue layer to pass ref_clk to the core
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-25 5:08 ` Varadarajan Narayanan
2026-08-28 10:06 ` Krzysztof Kozlowski
1 sibling, 1 reply; 5+ messages in thread
From: Varadarajan Narayanan @ 2026-08-25 5:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Wesley Cheng, Thinh Nguyen
Cc: linux-arm-msm, linux-usb, devicetree, linux-kernel,
Varadarajan Narayanan
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");
+ }
+
ret = dwc3_core_probe(&probe_data);
if (ret) {
ret = dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: qcom,snps-dwc3: Add IPQ9650 compatible
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
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-28 10:04 UTC (permalink / raw)
To: Varadarajan Narayanan
Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Wesley Cheng, Thinh Nguyen, linux-arm-msm,
linux-usb, devicetree, linux-kernel
On Tue, Aug 25, 2026 at 10:38:32AM +0530, Varadarajan Narayanan wrote:
> + then:
> + properties:
> + clocks:
> + minItems: 6
> + maxItems: 6
> + clock-names:
> + items:
> + - const: cfg_noc
> + - const: core
> + - const: iface
> + - const: sleep
> + - const: mock_utmi
> + - const: ref_clk
Just "ref" or "xo" (if it has purpose of XO), so this would fit the
eliza block
> +
> - if:
> properties:
> compatible:
> @@ -506,6 +527,7 @@ allOf:
> - qcom,ipq5210-dwc3
> - qcom,ipq5424-dwc3
> - qcom,ipq9574-dwc3
> + - qcom,ipq9650-dwc3
> then:
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] usb: dwc3: qcom: Allow the glue layer to pass ref_clk to the core
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
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-28 10:06 UTC (permalink / raw)
To: Varadarajan Narayanan
Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Wesley Cheng, Thinh Nguyen, linux-arm-msm,
linux-usb, devicetree, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-28 10:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox