From patchwork Mon Jan 21 14:02:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jochen Sprickerhof X-Patchwork-Id: 10773947 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A54D5139A for ; Mon, 21 Jan 2019 14:46:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93FEA29C24 for ; Mon, 21 Jan 2019 14:46:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 884EE29C39; Mon, 21 Jan 2019 14:46:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DD0C29C24 for ; Mon, 21 Jan 2019 14:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729635AbfAUOqT (ORCPT ); Mon, 21 Jan 2019 09:46:19 -0500 Received: from smtprelay08.ispgateway.de ([134.119.228.106]:31506 "EHLO smtprelay08.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729641AbfAUOqT (ORCPT ); Mon, 21 Jan 2019 09:46:19 -0500 X-Greylist: delayed 2649 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Jan 2019 09:46:17 EST Received: from [91.248.4.1] (helo=localhost) by smtprelay08.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gla9K-0001mS-0a; Mon, 21 Jan 2019 15:02:02 +0100 Date: Mon, 21 Jan 2019 15:02:04 +0100 From: Jochen Sprickerhof To: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Vivek Gautam , Andrzej Pietrasiewicz , Kishon Vijay Abraham I Subject: [PATCH] usb: dwc3: Enable GBit Ethernet on Odroid XU4 Message-ID: <20190121140204.GA2360@vis> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Df-Sender: NTc3MDAz Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Note that it only works with USB_XHCI_PLATFORM=y. Also it needs a hard reset when coming from an unpatched kernel. This was included in the original patch in https://patchwork.kernel.org/patch/9992809/ but got dropped when accepted in d8c80bb3b55b phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800. Old behaviour: $ lsusb -t /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 480M New behaviour: $ lsusb -t /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M Tested on Debian unstable using u-boot-exynos (2018.11+dfsg-2) and Linux 4.19.14. Signed-off-by: Jochen Sprickerhof --- Hi, I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors. Cheers Jochen drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index a1b126f90261..0008bccc30aa 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1169,7 +1169,8 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) dev_err(dev, "failed to initialize host\n"); return ret; } - phy_calibrate(dwc->usb2_generic_phy); + if (dwc->usb2_generic_phy) + phy_calibrate(dwc->usb2_generic_phy); break; case USB_DR_MODE_OTG: INIT_WORK(&dwc->drd_work, __dwc3_set_mode);