From patchwork Tue Apr 2 10:39:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jules Maselbas X-Patchwork-Id: 10881385 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 0053317E0 for ; Tue, 2 Apr 2019 10:40:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFE442885F for ; Tue, 2 Apr 2019 10:40:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D47CF28867; Tue, 2 Apr 2019 10:40:19 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 8C97C2885F for ; Tue, 2 Apr 2019 10:40:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729104AbfDBKkQ (ORCPT ); Tue, 2 Apr 2019 06:40:16 -0400 Received: from zimbra2.kalray.eu ([92.103.151.219]:45394 "EHLO zimbra2.kalray.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbfDBKkQ (ORCPT ); Tue, 2 Apr 2019 06:40:16 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 8720927E0432; Tue, 2 Apr 2019 12:40:14 +0200 (CEST) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id mAanHS15Lvwp; Tue, 2 Apr 2019 12:40:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 4307427E042C; Tue, 2 Apr 2019 12:40:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 4307427E042C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1554201614; bh=RbFihdFutKkDQpwwRKRFQykx3XrU5LVyMMBUFtaNDnE=; h=From:To:Date:Message-Id:MIME-Version; b=InIF0oLKbAmy5fpEvlh0hdRUt2l0WTO8CjbOhv4c+oN8Cg98YPkodJnNMK6lQ2Zj2 Ep46ICtUo6oZyPqw2OJR882nRwl4v55XuIMlTjIN9IApWpK7uOLaFe2uPof+Qp8TEE RlRCmwLXQDflHt2PpmLRr8kPMgJAtphJ/UCuzPHU= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Z_XM3XYMzSsG; Tue, 2 Apr 2019 12:40:14 +0200 (CEST) Received: from tellis.lin.mbt.kalray.eu (unknown [192.168.36.206]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 247DE27E0316; Tue, 2 Apr 2019 12:40:14 +0200 (CEST) From: Jules Maselbas To: Minas Harutyunyan Cc: Greg Kroah-Hartman , Pierre-Yves Kerbrat , linux-usb@vger.kernel.org, Jules Maselbas Subject: [PATCH 0/5] usb: dwc2: Improve gadget phy init Date: Tue, 2 Apr 2019 12:39:17 +0200 Message-Id: <20190402103922.16729-1-jmaselbas@kalray.eu> X-Mailer: git-send-email 2.21.0.196.g041f5ea MIME-Version: 1.0 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 Hi, Theses patches tries to clean a bit dwc2's phy initialization and fix an issue in gadget mode where the utmi phy width is set regardless of utmi being used or not. I believe that when using ulpi a phy width of 8 bits must be used, but this wasn't the case as the variable phyif was set by default to 16 bits. Best, Jules --- Jules Maselbas (5): usb: dwc2: Move UTMI_PHY_DATA defines closer usb: dwc2: Move phy init into core usb: dwc2: gadget: Remove duplicated phy init usb: dwc2: gadget: Replace phyif with phy_utmi_width usb: dwc2: gadget: Move gadget phy init into core phy init drivers/usb/dwc2/core.c | 199 ++++++++++++++++++++++++++++++++++++ drivers/usb/dwc2/core.h | 3 +- drivers/usb/dwc2/gadget.c | 34 ++---- drivers/usb/dwc2/hcd.c | 190 ---------------------------------- drivers/usb/dwc2/hw.h | 6 +- drivers/usb/dwc2/platform.c | 5 +- 6 files changed, 211 insertions(+), 226 deletions(-)