* [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core
@ 2026-07-23 10:54 Krishna Kurapati
2026-08-04 23:38 ` Thinh Nguyen
2026-09-08 22:33 ` Val Packett
0 siblings, 2 replies; 7+ messages in thread
From: Krishna Kurapati @ 2026-07-23 10:54 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman
Cc: linux-arm-msm, linux-usb, linux-kernel, Krishna Kurapati
DWC3 driver does manage phys itself sufficiently for Qualcomm platforms.
If xhci-skip-phy-init is not set, the HCD core does a phy_init and phy_
exit is done only when roothub is being destroyed. Due to this, during
system suspend in host mode, although phy_exit is done by DWC3 core, the
init_count on phy is never down to zero since HCD core also did an init.
consequently causing phy's exit routine to not be called. Hence, add
support to skip phy management by USB core.
Some Exynos platforms still do rely on USB core for phy_calibrate calls,
hence disable USB core management for Qualcomm platforms only.
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
---
Link to PHY calibrate handling for Exynos platforms:
https://lore.kernel.org/all/20190829053028.32438-1-m.szyprowski@samsung.com/
---
drivers/usb/dwc3/dwc3-qcom.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index ac68b4218b56..ba26e61df915 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -19,6 +19,7 @@
#include <linux/iopoll.h>
#include <linux/usb/hcd.h>
#include <linux/usb.h>
+#include <linux/property.h>
#include "core.h"
#include "glue.h"
@@ -419,6 +420,16 @@ static irqreturn_t qcom_dwc3_resume_irq(int irq, void *data)
return IRQ_HANDLED;
}
+static int dwc3_qcom_set_swnode(struct device *dev)
+{
+ const struct property_entry props[] = {
+ PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk"),
+ {}
+ };
+
+ return device_create_managed_software_node(dev, props, NULL);
+}
+
static void dwc3_qcom_select_utmi_clk(struct dwc3_qcom *qcom)
{
/* Configure dwc3 to use UTMI clock as PIPE clock not present */
@@ -683,6 +694,10 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
if (ignore_pipe_clk)
dwc3_qcom_select_utmi_clk(qcom);
+ ret = dwc3_qcom_set_swnode(dev);
+ if (ret)
+ goto clk_disable;
+
qcom->mode = usb_get_dr_mode(dev);
if (qcom->mode == USB_DR_MODE_HOST) {
---
base-commit: 80574c40598aedbc1751c528e414d7e224bc6313
change-id: 20260720-dwc3-skip-init-quirk-c110eae068ac
Best regards,
--
Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core
2026-07-23 10:54 [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core Krishna Kurapati
@ 2026-08-04 23:38 ` Thinh Nguyen
2026-09-08 22:33 ` Val Packett
1 sibling, 0 replies; 7+ messages in thread
From: Thinh Nguyen @ 2026-08-04 23:38 UTC (permalink / raw)
To: Krishna Kurapati
Cc: Thinh Nguyen, Greg Kroah-Hartman, linux-arm-msm, linux-usb, linux-kernel
On Thu, Jul 23, 2026, Krishna Kurapati wrote:
> DWC3 driver does manage phys itself sufficiently for Qualcomm platforms.
> If xhci-skip-phy-init is not set, the HCD core does a phy_init and phy_
> exit is done only when roothub is being destroyed. Due to this, during
> system suspend in host mode, although phy_exit is done by DWC3 core, the
> init_count on phy is never down to zero since HCD core also did an init.
> consequently causing phy's exit routine to not be called. Hence, add
> support to skip phy management by USB core.
>
> Some Exynos platforms still do rely on USB core for phy_calibrate calls,
> hence disable USB core management for Qualcomm platforms only.
So this is a fix applicable to all qcom platforms right? Do we need to
add Fixes tag and backport this change?
Regardless,
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
>
> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> ---
> Link to PHY calibrate handling for Exynos platforms:
> https://urldefense.com/v3/__https://lore.kernel.org/all/20190829053028.32438-1-m.szyprowski@samsung.com/__;!!A4F2R9G_pg!aP037GeN4WssfY2NPRwwFsPNYLtng9TCmzBFu8aoGmYWzLzD7vxM-Mt1sOwfv6KUBe7GsvyRbuktzot9dM8jEcYTWSdnmhMkjHJ3rQ$
> ---
> drivers/usb/dwc3/dwc3-qcom.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index ac68b4218b56..ba26e61df915 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -19,6 +19,7 @@
> #include <linux/iopoll.h>
> #include <linux/usb/hcd.h>
> #include <linux/usb.h>
> +#include <linux/property.h>
> #include "core.h"
> #include "glue.h"
>
> @@ -419,6 +420,16 @@ static irqreturn_t qcom_dwc3_resume_irq(int irq, void *data)
> return IRQ_HANDLED;
> }
>
> +static int dwc3_qcom_set_swnode(struct device *dev)
> +{
> + const struct property_entry props[] = {
> + PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk"),
> + {}
> + };
> +
> + return device_create_managed_software_node(dev, props, NULL);
> +}
> +
> static void dwc3_qcom_select_utmi_clk(struct dwc3_qcom *qcom)
> {
> /* Configure dwc3 to use UTMI clock as PIPE clock not present */
> @@ -683,6 +694,10 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
> if (ignore_pipe_clk)
> dwc3_qcom_select_utmi_clk(qcom);
>
> + ret = dwc3_qcom_set_swnode(dev);
> + if (ret)
> + goto clk_disable;
> +
> qcom->mode = usb_get_dr_mode(dev);
>
> if (qcom->mode == USB_DR_MODE_HOST) {
>
> ---
> base-commit: 80574c40598aedbc1751c528e414d7e224bc6313
> change-id: 20260720-dwc3-skip-init-quirk-c110eae068ac
>
> Best regards,
> --
> Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core
2026-07-23 10:54 [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core Krishna Kurapati
2026-08-04 23:38 ` Thinh Nguyen
@ 2026-09-08 22:33 ` Val Packett
2026-09-08 22:43 ` Val Packett
1 sibling, 1 reply; 7+ messages in thread
From: Val Packett @ 2026-09-08 22:33 UTC (permalink / raw)
To: Krishna Kurapati, Thinh Nguyen, Greg Kroah-Hartman
Cc: linux-arm-msm, linux-usb, linux-kernel
On 7/23/26 7:54 AM, Krishna Kurapati wrote:
> DWC3 driver does manage phys itself sufficiently for Qualcomm platforms.
> If xhci-skip-phy-init is not set, the HCD core does a phy_init and phy_
> exit is done only when roothub is being destroyed. Due to this, during
> system suspend in host mode, although phy_exit is done by DWC3 core, the
> init_count on phy is never down to zero since HCD core also did an init.
> consequently causing phy's exit routine to not be called. Hence, add
> support to skip phy management by USB core.
>
> Some Exynos platforms still do rely on USB core for phy_calibrate calls,
> hence disable USB core management for Qualcomm platforms only.
>
> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> ---
> Link to PHY calibrate handling for Exynos platforms:
> https://lore.kernel.org/all/20190829053028.32438-1-m.szyprowski@samsung.com/
Hi,
this was merged into -next a few days ago, and I'm seeing warnings on
boot now:
[ 0.613188] sysfs: cannot create duplicate filename
'/devices/platform/soc@0/a800000.usb/software_node'
[ 0.613195] CPU: 10 UID: 0 PID: 93 Comm: kworker/u49:0 Tainted: G
W 7.3.0-rc2-next-20260907-uwu+ #143 PREEMPT(full)
[ 0.613197] Tainted: [W]=WARN
[ 0.613198] Hardware name: Dell Inc. Latitude 7455/0FK7MX, BIOS
2.13.0 09/19/2025
[ 0.613199] Workqueue: events_unbound deferred_probe_work_func
[ 0.613206] Call trace:
[..]
[ 0.613226] device_create_managed_software_node+0xe8/0x108
[ 0.613227] dwc3_qcom_probe+0x5a4/0x7b0
There is indeed already a software node being created in the shared dwc3
core code.
Could there be any other consequences than a duplicate sysfs path?
Maybe the property should instead be added to all qcom device trees?
Thanks,
~val
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core
2026-09-08 22:33 ` Val Packett
@ 2026-09-08 22:43 ` Val Packett
2026-09-09 1:46 ` Thinh Nguyen
0 siblings, 1 reply; 7+ messages in thread
From: Val Packett @ 2026-09-08 22:43 UTC (permalink / raw)
To: Krishna Kurapati, Thinh Nguyen, Greg Kroah-Hartman
Cc: linux-arm-msm, linux-usb, linux-kernel
On 9/8/26 7:33 PM, Val Packett wrote:
>
> On 7/23/26 7:54 AM, Krishna Kurapati wrote:
>> DWC3 driver does manage phys itself sufficiently for Qualcomm platforms.
>> If xhci-skip-phy-init is not set, the HCD core does a phy_init and phy_
>> exit is done only when roothub is being destroyed. Due to this, during
>> system suspend in host mode, although phy_exit is done by DWC3 core, the
>> init_count on phy is never down to zero since HCD core also did an init.
>> consequently causing phy's exit routine to not be called. Hence, add
>> support to skip phy management by USB core.
>>
>> Some Exynos platforms still do rely on USB core for phy_calibrate calls,
>> hence disable USB core management for Qualcomm platforms only.
>>
>> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
>> ---
>> Link to PHY calibrate handling for Exynos platforms:
>> https://lore.kernel.org/all/20190829053028.32438-1-m.szyprowski@samsung.com/
>>
>
> Hi,
>
> this was merged into -next a few days ago, and I'm seeing warnings on
> boot now:
>
> [ 0.613188] sysfs: cannot create duplicate filename
> '/devices/platform/soc@0/a800000.usb/software_node'
> [ 0.613195] CPU: 10 UID: 0 PID: 93 Comm: kworker/u49:0 Tainted: G
> W 7.3.0-rc2-next-20260907-uwu+ #143 PREEMPT(full)
> [ 0.613197] Tainted: [W]=WARN
> [ 0.613198] Hardware name: Dell Inc. Latitude 7455/0FK7MX, BIOS
> 2.13.0 09/19/2025
> [ 0.613199] Workqueue: events_unbound deferred_probe_work_func
> [ 0.613206] Call trace:
> [..]
> [ 0.613226] device_create_managed_software_node+0xe8/0x108
> [ 0.613227] dwc3_qcom_probe+0x5a4/0x7b0
>
> There is indeed already a software node being created in the shared
> dwc3 core code.
>
> Could there be any other consequences than a duplicate sysfs path?
>
Answering my own question: even worse messages when the controller
switches to gadget mode (which happens even with chargers when DRD is
enabled)
[ 5.620951] refcount_t: underflow; use-after-free.
[ 5.620957] WARNING: lib/refcount.c:28 at
refcount_warn_saturate+0xd8/0x140, CPU#2: kworker/2:1/98
[ 5.621075] CPU: 2 UID: 0 PID: 98 Comm: kworker/2:1 Tainted: G
W 7.3.0-rc2-next-20260907-uwu+ #143 PREEMPT(full)
[ 5.621077] Tainted: [W]=WARN
[ 5.621078] Hardware name: Dell Inc. Latitude 7455/0FK7MX, BIOS
2.13.0 09/19/2025
[ 5.621079] Workqueue: events_freezable __dwc3_set_mode
[..]
[ 5.621114] Call trace:
[ 5.621115] refcount_warn_saturate+0xd8/0x140 (P)
[ 5.621117] kobject_put+0x11c/0x230
[ 5.621121] software_node_notify_remove+0xdc/0xf8
[ 5.621124] device_del+0x1dc/0x328
[ 5.621126] usb_disconnect+0x1d8/0x348
[ 5.621129] usb_remove_hcd+0x100/0x2a8
[ 5.621131] xhci_plat_remove+0x8c/0x170
[ 5.621134] platform_remove+0x28/0x40
[ 5.621135] device_release_driver_internal+0x174/0x290
[ 5.621138] device_release_driver+0x20/0x38
[ 5.621140] bus_remove_device+0x19c/0x1f8
[ 5.621142] device_del+0x1c4/0x328
[ 5.621143] platform_device_unregister+0x34/0xc0
[ 5.621145] dwc3_host_exit+0x50/0x70
[ 5.621146] __dwc3_set_mode+0xa4/0x378
[..]
[ 5.644535] Unable to handle kernel paging request at virtual address
006563697665642f
[ 5.644537] Mem abort info:
[ 5.644538] ESR = 0x0000000096000004
[ 5.644539] EC = 0x25: DABT (current EL), IL = 32 bits
[ 5.644540] SET = 0, FnV = 0
[ 5.644541] EA = 0, S1PTW = 0
[ 5.644542] FSC = 0x04: level 0 translation fault
[ 5.644543] Data abort info:
[ 5.644543] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
[ 5.644545] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 5.644546] GCS = 0, Overlay = 0, DirtyBit = 0
[ 5.644546] [006563697665642f] address between user and kernel
address ranges
[ 5.644548] Internal error: Oops: 0000000096000004 [#1] SMP
[ 5.644653] CPU: 2 UID: 0 PID: 98 Comm: kworker/2:1 Tainted: G
W 7.3.0-rc2-next-20260907-uwu+ #143 PREEMPT(full)
[ 5.644655] Tainted: [W]=WARN
[ 5.644656] Hardware name: Dell Inc. Latitude 7455/0FK7MX, BIOS
2.13.0 09/19/2025
[ 5.644657] Workqueue: events_freezable __dwc3_set_mode
[ 5.644664] pc : __pi_strcmp+0x9c/0x140
[ 5.644668] lr : software_node_property_present+0x60/0x98
[ 5.644697] Call trace:
[ 5.644698] __pi_strcmp+0x9c/0x140 (P)
[ 5.644700] device_property_present+0x9c/0xc0
[ 5.644703] dwc3_gadget_init+0x230/0x7b0
[ 5.644704] __dwc3_set_mode+0x314/0x378
[ 5.644707] process_scheduled_works+0x1b8/0x538
[ 5.644710] worker_thread+0x1fc/0x2f8
[ 5.644711] kthread+0x114/0x148
[ 5.644713] ret_from_fork+0x10/0x20
> Thanks,
> ~val
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core
2026-09-08 22:43 ` Val Packett
@ 2026-09-09 1:46 ` Thinh Nguyen
2026-09-09 3:07 ` Krishna Kurapati
0 siblings, 1 reply; 7+ messages in thread
From: Thinh Nguyen @ 2026-09-09 1:46 UTC (permalink / raw)
To: Val Packett
Cc: Krishna Kurapati, Thinh Nguyen, Greg Kroah-Hartman,
linux-arm-msm, linux-usb, linux-kernel
On Tue, Sep 08, 2026, Val Packett wrote:
>
> On 9/8/26 7:33 PM, Val Packett wrote:
> >
> > On 7/23/26 7:54 AM, Krishna Kurapati wrote:
> > > DWC3 driver does manage phys itself sufficiently for Qualcomm platforms.
> > > If xhci-skip-phy-init is not set, the HCD core does a phy_init and phy_
> > > exit is done only when roothub is being destroyed. Due to this, during
> > > system suspend in host mode, although phy_exit is done by DWC3 core, the
> > > init_count on phy is never down to zero since HCD core also did an init.
> > > consequently causing phy's exit routine to not be called. Hence, add
> > > support to skip phy management by USB core.
> > >
> > > Some Exynos platforms still do rely on USB core for phy_calibrate calls,
> > > hence disable USB core management for Qualcomm platforms only.
> > >
> > > Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> > > ---
> > > Link to PHY calibrate handling for Exynos platforms:
> > > https://urldefense.com/v3/__https://lore.kernel.org/all/20190829053028.32438-1-m.szyprowski@samsung.com/__;!!A4F2R9G_pg!aoY0pB27Tlxo3u1RzNzwPHpGsjuAgJWtPeKMvDrL___6gEQb28ew8Rg-O1877xBHB92Zv2fY3_Zbb2aoEQY$
> > >
> >
> > Hi,
> >
> > this was merged into -next a few days ago, and I'm seeing warnings on
> > boot now:
> >
> > [ 0.613188] sysfs: cannot create duplicate filename
> > '/devices/platform/soc@0/a800000.usb/software_node'
> > [ 0.613195] CPU: 10 UID: 0 PID: 93 Comm: kworker/u49:0 Tainted: G
> > W 7.3.0-rc2-next-20260907-uwu+ #143 PREEMPT(full)
> > [ 0.613197] Tainted: [W]=WARN
> > [ 0.613198] Hardware name: Dell Inc. Latitude 7455/0FK7MX, BIOS
> > 2.13.0 09/19/2025
> > [ 0.613199] Workqueue: events_unbound deferred_probe_work_func
> > [ 0.613206] Call trace:
> > [..]
> > [ 0.613226] device_create_managed_software_node+0xe8/0x108
> > [ 0.613227] dwc3_qcom_probe+0x5a4/0x7b0
> >
> > There is indeed already a software node being created in the shared dwc3
> > core code.
> >
> > Could there be any other consequences than a duplicate sysfs path?
> >
> Answering my own question: even worse messages when the controller switches
> to gadget mode (which happens even with chargers when DRD is enabled)
>
Thanks for the report Val.
Hi Krishna,
Can you help send a revert patch until a proper change is in available?
Thanks,
Thinh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core
2026-09-09 1:46 ` Thinh Nguyen
@ 2026-09-09 3:07 ` Krishna Kurapati
0 siblings, 0 replies; 7+ messages in thread
From: Krishna Kurapati @ 2026-09-09 3:07 UTC (permalink / raw)
To: Thinh Nguyen, Val Packett
Cc: Greg Kroah-Hartman, linux-arm-msm, linux-usb, linux-kernel
On 9/9/2026 7:16 AM, Thinh Nguyen wrote:
> On Tue, Sep 08, 2026, Val Packett wrote:
>>
>> On 9/8/26 7:33 PM, Val Packett wrote:
>>>
>>> On 7/23/26 7:54 AM, Krishna Kurapati wrote:
>>>> DWC3 driver does manage phys itself sufficiently for Qualcomm platforms.
>>>> If xhci-skip-phy-init is not set, the HCD core does a phy_init and phy_
>>>> exit is done only when roothub is being destroyed. Due to this, during
>>>> system suspend in host mode, although phy_exit is done by DWC3 core, the
>>>> init_count on phy is never down to zero since HCD core also did an init.
>>>> consequently causing phy's exit routine to not be called. Hence, add
>>>> support to skip phy management by USB core.
>>>>
>>>> Some Exynos platforms still do rely on USB core for phy_calibrate calls,
>>>> hence disable USB core management for Qualcomm platforms only.
>>>>
>>>> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
>>>> ---
>>>> Link to PHY calibrate handling for Exynos platforms:
>>>> https://urldefense.com/v3/__https://lore.kernel.org/all/20190829053028.32438-1-m.szyprowski@samsung.com/__;!!A4F2R9G_pg!aoY0pB27Tlxo3u1RzNzwPHpGsjuAgJWtPeKMvDrL___6gEQb28ew8Rg-O1877xBHB92Zv2fY3_Zbb2aoEQY$
>>>>
>>>
>>> Hi,
>>>
>>> this was merged into -next a few days ago, and I'm seeing warnings on
>>> boot now:
>>>
>>> [ 0.613188] sysfs: cannot create duplicate filename
>>> '/devices/platform/soc@0/a800000.usb/software_node'
>>> [ 0.613195] CPU: 10 UID: 0 PID: 93 Comm: kworker/u49:0 Tainted: G
>>> W 7.3.0-rc2-next-20260907-uwu+ #143 PREEMPT(full)
>>> [ 0.613197] Tainted: [W]=WARN
>>> [ 0.613198] Hardware name: Dell Inc. Latitude 7455/0FK7MX, BIOS
>>> 2.13.0 09/19/2025
>>> [ 0.613199] Workqueue: events_unbound deferred_probe_work_func
>>> [ 0.613206] Call trace:
>>> [..]
>>> [ 0.613226] device_create_managed_software_node+0xe8/0x108
>>> [ 0.613227] dwc3_qcom_probe+0x5a4/0x7b0
>>>
>>> There is indeed already a software node being created in the shared dwc3
>>> core code.
>>>
>>> Could there be any other consequences than a duplicate sysfs path?
>>>
>> Answering my own question: even worse messages when the controller switches
>> to gadget mode (which happens even with chargers when DRD is enabled)
>>
>
>
> Thanks for the report Val.
>
> Hi Krishna,
>
> Can you help send a revert patch until a proper change is in available?
>
Sure, will send a revert patch.
Regards,
Krishna,
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core
@ 2026-09-14 14:35 Krishna Kurapati
0 siblings, 0 replies; 7+ messages in thread
From: Krishna Kurapati @ 2026-09-14 14:35 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, linux-arm-msm, Krishna Kurapati
DWC3 driver does manage phys itself sufficiently for Qualcomm platforms.
If xhci-skip-phy-init is not set, the HCD core does a phy_init and phy_
exit is done only when roothub is being destroyed. Due to this, during
system suspend in host mode, although phy_exit is done by DWC3 core, the
init_count on phy is never down to zero since HCD core also did an init.
consequently causing phy's exit routine to not be called. Hence, add
support to skip phy management by USB core.
Some Exynos platforms still do rely on USB core for phy_calibrate calls,
hence disable USB core management for Qualcomm platforms only.
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
---
Initially, a patch was sent adding software_node properties [1]. But it
was causing a bootup issue as mentioned in [2]. Hence a revert was sent
to fix it [3]. This patch uses a different approach as opposed to adding
sofware node properties and was tested on sm8750 mtp.
[1]: https://lore.kernel.org/all/20260723-dwc3-skip-init-quirk-v1-1-97682bb44ebd@oss.qualcomm.com/
[2]: https://lore.kernel.org/all/cbb4ae94-7862-4d91-b01d-0d7f18d49a45@packett.cool/
[3]: https://lore.kernel.org/all/20260909-xhci-fixes-revert-v1-1-7cc97fa0f307@oss.qualcomm.com/
---
drivers/usb/dwc3/core.c | 3 +++
drivers/usb/dwc3/core.h | 1 +
drivers/usb/dwc3/dwc3-qcom.c | 1 +
drivers/usb/dwc3/glue.h | 2 ++
drivers/usb/dwc3/host.c | 5 ++++-
5 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index fd5c2cd36c59..d9f4e4109abb 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1694,6 +1694,9 @@ static void dwc3_get_software_properties(struct dwc3 *dwc,
if (properties->needs_full_reinit)
dwc->needs_full_reinit = true;
+ if (properties->skip_phy_init)
+ dwc->skip_phy_init = true;
+
dwc->gsbuscfg0_reqinfo = DWC3_GSBUSCFG0_REQINFO_UNSPECIFIED;
if (properties->gsbuscfg0_reqinfo !=
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 608daeb7ef10..b72869380933 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -1420,6 +1420,7 @@ struct dwc3 {
unsigned wakeup_configured:1;
unsigned suspended:1;
unsigned susphy_state:1;
+ unsigned skip_phy_init:1;
u16 imod_interval;
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index e6b6beb38fcb..5387658dd38d 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -738,6 +738,7 @@ 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;
+ probe_data.properties.skip_phy_init = true;
ret = dwc3_core_probe(&probe_data);
if (ret) {
ret = dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
diff --git a/drivers/usb/dwc3/glue.h b/drivers/usb/dwc3/glue.h
index d738e1739ae0..72c5593e657a 100644
--- a/drivers/usb/dwc3/glue.h
+++ b/drivers/usb/dwc3/glue.h
@@ -14,10 +14,12 @@
* @gsbuscfg0_reqinfo: Value to be programmed in the GSBUSCFG0.REQINFO field
* @needs_full_reinit: indicate the controller may not remain power during system
* pm and need full initialization
+ * @skip_phy_init: skip xHCI PHY initialization on host init
*/
struct dwc3_properties {
u32 gsbuscfg0_reqinfo;
unsigned needs_full_reinit:1;
+ unsigned skip_phy_init:1;
};
#define DWC3_DEFAULT_PROPERTIES ((struct dwc3_properties){ \
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index c5674161b2b0..3fb8be8be590 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -130,7 +130,7 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)
int dwc3_host_init(struct dwc3 *dwc)
{
- struct property_entry props[6];
+ struct property_entry props[7];
struct platform_device *xhci;
int ret, irq;
int prop_idx = 0;
@@ -174,6 +174,9 @@ int dwc3_host_init(struct dwc3 *dwc)
if (dwc->usb2_lpm_disable)
props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb2-lpm-disable");
+ if (dwc->skip_phy_init)
+ props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk");
+
/**
* WORKAROUND: dwc3 revisions <=3.00a have a limitation
* where Port Disable command doesn't work.
---
base-commit: 7f69cecb6098fada87b010c911aa736a5af8f679
change-id: 20260914-xhci-skip-phy-init-d0a6bd96b13f
Best regards,
--
Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-14 14:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-23 10:54 [PATCH] usb: dwc3: qcom: Add support to skip phy management by USB core Krishna Kurapati
2026-08-04 23:38 ` Thinh Nguyen
2026-09-08 22:33 ` Val Packett
2026-09-08 22:43 ` Val Packett
2026-09-09 1:46 ` Thinh Nguyen
2026-09-09 3:07 ` Krishna Kurapati
2026-09-14 14:35 Krishna Kurapati
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®