From patchwork Wed Dec 7 13:19:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 30835 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp179313wrr; Wed, 7 Dec 2022 05:23:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5e8A+QpV9G1w9Cxij14PcuyKPADNIPkSL5KkFBNVIKtS/BFbzXOpzZXUs8DqGaWWMYs/c6 X-Received: by 2002:a63:1955:0:b0:477:50ed:6415 with SMTP id 21-20020a631955000000b0047750ed6415mr72838961pgz.535.1670419437645; Wed, 07 Dec 2022 05:23:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670419437; cv=none; d=google.com; s=arc-20160816; b=Hr9zgBuVUuCNLN6KsQZRIURWzfIENzZoWmPtJVGWESqCPNPoSPwylqupnH7/47U/5T s8SwrS8cYWSOhgE6Yj+NBDaYzDLSgOnvtgUoSX13E4rc7zIgj8Xx8x79C8YAHBrEaynx NO+6zBnpvynDqImnC8FpdKYB8F0ZZbr/gOeDGgoYB6dNrSf0PnefCux/Xw0kqLWsTBKy kR/+G/txalJXs4u+4YD7+4CkiZM+dViWKM7bnP2+5dSFGcoVh56/09diyF53j+zCvlAO mqB8FnLj6GmBwashQmTqBroB6uv9uO6Uetk0JSjUFx2QlJDxCRxqpzGsu/biRttDzIxS PP/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kjMcMPnlyHn9st3M0TCR/cUOpGAcdT+skvo8ptMlNNw=; b=q44MU6aFYN6EalL32xTLHJFFWPFXZ5k+l9x13Dbgk/CEf/SgQvkn4Mj+Vl+IAbSPYM T3MV6cDdlU/vYWEviTfVLy75vTIPzhnjyDPT2pqBfYCqUbZYt1fq1oT+SiIWUos0UxOs D0GIkOxkRiHJ+rQjPTZnRT94XEndGvK9enQHM3ADEnyb1svZxnAeuNWfSgkXKr6cGYp+ 9TQ5lmtQz6kFTLn5ObS3/KPXflt+NpjwiUIkvrW1aI+2FggE7KwPNW6a2682PZuewNGv ttQ8UyS1nG0sAiP+mxpLNWaqP6bktUiCDYYKDAjSsX5BLoVmNX4kqjOnN0LepYjU74R1 uZOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk13-20020a056a02028d00b00478bec2850asi8811661pgb.425.2022.12.07.05.23.44; Wed, 07 Dec 2022 05:23:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbiLGNTr (ORCPT + 99 others); Wed, 7 Dec 2022 08:19:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbiLGNTp (ORCPT ); Wed, 7 Dec 2022 08:19:45 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3B14140BC; Wed, 7 Dec 2022 05:19:43 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id D722E240008; Wed, 7 Dec 2022 13:19:40 +0000 (UTC) From: Quentin Schulz To: Minas Harutyunyan , Greg Kroah-Hartman Cc: Quentin Schulz , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, William Wu , Bin Yang , Frank Wang Subject: [PATCH 1/3] usb: dwc2: disable lpm feature on Rockchip SoCs Date: Wed, 7 Dec 2022 14:19:16 +0100 Message-Id: <20221206-dwc2-gadget-dual-role-v1-1-36515e1092cd@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221206-dwc2-gadget-dual-role-v1-0-36515e1092cd@theobroma-systems.com> References: <20221206-dwc2-gadget-dual-role-v1-0-36515e1092cd@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751561732363179425?= X-GMAIL-MSGID: =?utf-8?q?1751561732363179425?= From: Quentin Schulz LPM feature of DWC2 module integrated in Rockchip SoCs doesn't work properly or needs some additional handling, so disable it for now. Without disabling LPM feature, the USB ADB communication fail with the following error log: dwc2 ff580000.usb: new address 27 dwc2 ff580000.usb: Failed to exit L1 sleep state in 200us. dwc2 ff580000.usb: dwc2_hsotg_send_reply: cannot queue req dwc2 ff580000.usb: dwc2_hsotg_process_req_status: failed to send reply dwc2 ff580000.usb: dwc2_hsotg_enqueue_setup: failed queue (-11) dwc2 ff580000.usb: Failed to exit L1 sleep state in 200us. Signed-off-by: William Wu Signed-off-by: Frank Wang [diff vs vendor kernel: added lpm_clock_gating, besl and hird_threshold_en settings as seen in commit 53febc956900 ("usb: dwc2: disable Link Power Management on STM32MP15 HS OTG")] Signed-off-by: Quentin Schulz --- drivers/usb/dwc2/params.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 8eab5f38b1101..9ed9fd9569404 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -113,6 +113,10 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg) p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT; p->power_down = DWC2_POWER_DOWN_PARAM_NONE; + p->lpm = false; + p->lpm_clock_gating = false; + p->besl = false; + p->hird_threshold_en = false; } static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg) From patchwork Wed Dec 7 13:19:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 30836 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp179404wrr; Wed, 7 Dec 2022 05:24:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf71Pk8p6PcrFOo10/6RGxufNclmmoUhu4JOtO+njRt0CkoBXxkebRq+U4a/EHmwdU7Bbg21 X-Received: by 2002:a62:5b43:0:b0:573:6cfc:2210 with SMTP id p64-20020a625b43000000b005736cfc2210mr77072390pfb.55.1670419449449; Wed, 07 Dec 2022 05:24:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670419449; cv=none; d=google.com; s=arc-20160816; b=cNnPrZA1z/c+uf/Asi+dtsyMPJ9R6XQ83A+csccPGfoU1uhACyICsWjesxwKZczBmu YPitGvDEvs+9uzWMxn7Rk2EyLkFqPhrMxUZfdOIICJFyHSG5wDHKULTrr7D/GCudPhaP R8bj/Zi904YUHQeRhMNVX/UhWnypSUEqkV7kg624GiXD9oUwQzZFfmyE768g6WzinGFO FBRteOiW1W2wIzOJCYU8DQWcvOKEJVfvXgOaHyTe8sI0mvltBpMB5BFBlj/qhXjAnmAp Rl0jN8Dumjq2BO9mBC7pfY9z//zRMFrUVf0kS4HlXSZbCspYO+aK8XF4U8ZpoTgjOLL1 HstQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fEpJyXYjb7RCehQW0AtUqmPZPJpFFsq26KpTsoLKouY=; b=B/S5i1K8XxbNxQr1pvZVOcW/kcnBsMNmU/8/d91YJ11Hj70r27uMNhupHbR7ngjdZz UKhRrVxFA/RFDC5o/4exg/CWUP/kjlKZkuEzjMlbNXkJf2dPrLHysQSguhhDr+bfG1Kh xsDjbR2mCmSKupi368UeKSuZdfFXbd0AwkGjb7SshM0G+A1PIEp/KZAo6rVq46DNt3d6 yRcWOT2xb3jXC5lVSyHsVo22RMndZYBL9s/FJY2x5Qaa1E1ozTS1XUL/xHUMYNXK8CmT X1Qp1OQ0WQunldn1oOoI4nsJbOIRNZlXkO9+90ub6xy+nOEJot5rU335V68ayMLuOMFt UAUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a6544c6000000b0043adff6d43dsi20038812pgs.583.2022.12.07.05.23.56; Wed, 07 Dec 2022 05:24:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbiLGNTw (ORCPT + 99 others); Wed, 7 Dec 2022 08:19:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbiLGNTr (ORCPT ); Wed, 7 Dec 2022 08:19:47 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25894140BC; Wed, 7 Dec 2022 05:19:45 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id C29E8240004; Wed, 7 Dec 2022 13:19:42 +0000 (UTC) From: Quentin Schulz To: Minas Harutyunyan , Greg Kroah-Hartman Cc: Quentin Schulz , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, William Wu , Bin Yang , Frank Wang Subject: [PATCH 2/3] usb: dwc2: power on/off phy for peripheral mode in dual-role mode Date: Wed, 7 Dec 2022 14:19:17 +0100 Message-Id: <20221206-dwc2-gadget-dual-role-v1-2-36515e1092cd@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221206-dwc2-gadget-dual-role-v1-0-36515e1092cd@theobroma-systems.com> References: <20221206-dwc2-gadget-dual-role-v1-0-36515e1092cd@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751561744699737689?= X-GMAIL-MSGID: =?utf-8?q?1751561744699737689?= From: Quentin Schulz The PHY power is handled for peripheral mode but only when the device is forced into this peripheral mode. It is missing when the device is operating in peripheral mode when dual-role mode is enabled, so let's update the condition to match this scenario. Signed-off-by: Quentin Schulz --- drivers/usb/dwc2/gadget.c | 6 ++++-- drivers/usb/dwc2/platform.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 8b15742d9e8aa..62fa6378d2d73 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -4549,7 +4549,8 @@ static int dwc2_hsotg_udc_start(struct usb_gadget *gadget, hsotg->gadget.dev.of_node = hsotg->dev->of_node; hsotg->gadget.speed = USB_SPEED_UNKNOWN; - if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) { + if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL || + (hsotg->dr_mode == USB_DR_MODE_OTG && dwc2_is_device_mode(hsotg))) { ret = dwc2_lowlevel_hw_enable(hsotg); if (ret) goto err; @@ -4611,7 +4612,8 @@ static int dwc2_hsotg_udc_stop(struct usb_gadget *gadget) if (!IS_ERR_OR_NULL(hsotg->uphy)) otg_set_peripheral(hsotg->uphy->otg, NULL); - if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) + if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL || + (hsotg->dr_mode == USB_DR_MODE_OTG && dwc2_is_device_mode(hsotg))) dwc2_lowlevel_hw_disable(hsotg); return 0; diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index ec4ace0107f5f..1d4f1ba22b92a 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -576,7 +576,8 @@ static int dwc2_driver_probe(struct platform_device *dev) dwc2_debugfs_init(hsotg); /* Gadget code manages lowlevel hw on its own */ - if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) + if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL || + (hsotg->dr_mode == USB_DR_MODE_OTG && dwc2_is_device_mode(hsotg))) dwc2_lowlevel_hw_disable(hsotg); #if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \ From patchwork Wed Dec 7 13:19:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 30839 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp180798wrr; Wed, 7 Dec 2022 05:26:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf5rIsmLEeS9RljOoAejpyFI2aw+OpInkyhHarDskjTf9GehC6DuOrfjeRTAEfWItFgaUYJO X-Received: by 2002:a05:6402:e0d:b0:466:4168:6ea7 with SMTP id h13-20020a0564020e0d00b0046641686ea7mr20849275edh.273.1670419613841; Wed, 07 Dec 2022 05:26:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670419613; cv=none; d=google.com; s=arc-20160816; b=E3UxaAhDp/OLRud++dzRk1rc+F1Rswiwk8X5NmG167c3GTtAMLHs6VM4ga5eIsyI/f DxXCGZK0hyNC+RILZ2xPjAi2ACNAaaxvfXE0JVzV9wwTfGOrgBgp2Gc+vATYg1Qc+Kql lx6UMD4BBkRv4Oht/LY0US/WcXNEdFRbtYekL2d1C+pL/LY+twsAmcPMjOoudQpxEBBJ NneiMtsXfWE+qzEMRICy+A5xWw0innGydmb0EfwZ//LMJqXWJc30bYmdq++/3eV9iavH 9cQdSxw597lZ6b8/iou8/BNGh4uANAwBPKhsL0bVFTrOZnRK77h5nFfTPdDJWY0+6xK5 JiNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=U26f+M4wlDqheSbigFCS6ZSCHSIQRyS1mH7MNJFq3Q0=; b=QfSLetEr+fctl4sgDtAt8uF97TuMA34DIAyR9ONEMw3/AKIeQ3CD5gsoWzMm3yXE3v 8xNUgn8S82rglqlZTPrypOrmMdAKN7KxakCgNTWoyt0P62x3v/IpWHvIeJQY5rs1dtoZ nsHIZsNRFWbo/kC2pSojrOgCm6ALRMsINPwlc+D3UooF9eNG0rPvP7lqLdpmppGg4FR1 DlIAlPh24fe7g3//lj3Z3ShHBZhoczaCUsWXgFzUJml1hHtqXubH8Qm5U8PLSn/N9zpW 8+U3JoVazgFj3hz2+Y9rG8NLFRFEzcwowDHvth+ov49aG9Xbu3SUoNXYuHHFpBydVVLC 7JfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne1-20020a1709077b8100b00779f8e7ec5bsi18692031ejc.42.2022.12.07.05.26.30; Wed, 07 Dec 2022 05:26:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbiLGNT4 (ORCPT + 99 others); Wed, 7 Dec 2022 08:19:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbiLGNTu (ORCPT ); Wed, 7 Dec 2022 08:19:50 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A870140F7; Wed, 7 Dec 2022 05:19:49 -0800 (PST) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 72C2B24000F; Wed, 7 Dec 2022 13:19:44 +0000 (UTC) From: Quentin Schulz To: Minas Harutyunyan , Greg Kroah-Hartman Cc: Quentin Schulz , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, William Wu , Bin Yang , Frank Wang Subject: [PATCH 3/3] usb: dwc2: prevent core phy initialisation Date: Wed, 7 Dec 2022 14:19:18 +0100 Message-Id: <20221206-dwc2-gadget-dual-role-v1-3-36515e1092cd@theobroma-systems.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221206-dwc2-gadget-dual-role-v1-0-36515e1092cd@theobroma-systems.com> References: <20221206-dwc2-gadget-dual-role-v1-0-36515e1092cd@theobroma-systems.com> MIME-Version: 1.0 X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751561917051859156?= X-GMAIL-MSGID: =?utf-8?q?1751561917051859156?= From: Quentin Schulz From: Bin Yang The usb phys need to be controlled dynamically on some Rockchip SoCs. So set the new HCD flag which prevents USB core from trying to manage our phys. Signed-off-by: Bin Yang Signed-off-by: Frank Wang Signed-off-by: Quentin Schulz --- drivers/usb/dwc2/hcd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 657f1f659ffaf..757a66fa32fa8 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -5315,6 +5315,13 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg) if (!IS_ERR_OR_NULL(hsotg->uphy)) otg_set_host(hsotg->uphy->otg, &hcd->self); + /* + * do not manage the PHY state in the HCD core, instead let the driver + * handle this (for example if the PHY can only be turned on after a + * specific event) + */ + hcd->skip_phy_initialization = 1; + /* * Finish generic HCD initialization and start the HCD. This function * allocates the DMA buffer pool, registers the USB bus, requests the