From patchwork Tue Jun 7 15:57:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Rae X-Patchwork-Id: 631697 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rPGSw61smz9sxS for ; Wed, 8 Jun 2016 01:58:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b=YD/K7DCG; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6D986B3807; Tue, 7 Jun 2016 17:58:39 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7PjYa9ktGEYa; Tue, 7 Jun 2016 17:58:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C6F97B3802; Tue, 7 Jun 2016 17:58:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E2134B3802 for ; Tue, 7 Jun 2016 17:58:34 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JoEmUoGJ54rC for ; Tue, 7 Jun 2016 17:58:34 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by theia.denx.de (Postfix) with ESMTPS id 674C64BE6F for ; Tue, 7 Jun 2016 17:58:30 +0200 (CEST) Received: by mail-pf0-f182.google.com with SMTP id 62so79126568pfd.1 for ; Tue, 07 Jun 2016 08:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=4GaQ+4INmQzyo+P4Bq+V8Yo0hjRJqH/e+ks+NQjHT/k=; b=YD/K7DCGAeWXRsDyR0Pt2iqE5RaprVwJxdcE4i4JiHaP0YzNy3bDJsH3Feaqoe/p6N g7Nd5SmOR48cVuWOMLab6OzTlo/AffKPksRWQfkQsTXLObIbReby9PbDM/o+9/4at+Cf Pt1x8NrlXK5QJDV1lmdN3sYnvu3cLa0n3jlx4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4GaQ+4INmQzyo+P4Bq+V8Yo0hjRJqH/e+ks+NQjHT/k=; b=jWhmviZtOxTt5bVi+iJx0x84VvUBNo4ntcWT0SHvXCND/lWG6MVtiH/6uOeb8Utkvs hhs+ufjoAXLajVtp0aWwmKPf6zrIEgv9RiqokczjSudq7ABDJb9JLOxDMVcOyU+c6wsW eJAS9J7Z2BLnuocwOD7ES2Ljqd3wRf+9WtissewDCQSZuJ7ryr6RLWVs5eM31sosrMSi wfBoPUSb0a5h1suOEz8sgGY3Vmwo6aMuAGQYWCAcGikvxdxdDKUkcE/XoUlsrChT/v6D suLMmCVIwBLw+iS0CPkuFe+xmE0w566o6p4/IWDwKkpQI30Uw3BmT2fXGVV1xfqjXnr4 kKbA== X-Gm-Message-State: ALyK8tK9KZ6GgCuDQtsAfx65O4CvkllqF4nLpCTtqa17vqlNRphnKm+1dFU3jpqE4Y3Igfov X-Received: by 10.98.88.69 with SMTP id m66mr163730pfb.68.1465315107976; Tue, 07 Jun 2016 08:58:27 -0700 (PDT) Received: from VM-host64-64-A1.ric.broadcom.com ([216.31.219.19]) by smtp.gmail.com with ESMTPSA id 14sm36248434pfu.83.2016.06.07.08.58.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jun 2016 08:58:27 -0700 (PDT) From: Steve Rae To: u-boot@lists.denx.de, Albert Aribaud Date: Tue, 7 Jun 2016 08:57:57 -0700 Message-Id: <1465315078-30192-1-git-send-email-srae@broadcom.com> X-Mailer: git-send-email 1.8.5 Cc: Marek Vasut , Tom Rini , Steve Rae Subject: [U-Boot] [PATCH v4 1/2] usb: dwc2_udc_otg: support 8-bit interface X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Define CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 to allow the physical interface to be 8-bit (rather than 16-bit). Signed-off-by: Steve Rae --- from [1] (line ~124) /* The Kona PHY supports an 8-bit wide UTMI interface */ [...snip...] module_platform_driver(bcm_kona_usb2_driver); MODULE_ALIAS("platform:bcm-kona-usb2"); MODULE_AUTHOR("Matt Porter "); MODULE_DESCRIPTION("BCM Kona USB 2.0 PHY driver"); MODULE_LICENSE("GPL v2"); [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/phy/phy-bcm-kona-usb2.c Changes in v4: - split defconfig's into separate patch (per Marek) Changes in v3: - implement Marek's suggestion Changes in v2: - implement as Kconfig drivers/usb/gadget/Kconfig | 10 ++++++++++ drivers/usb/gadget/dwc2_udc_otg.c | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index a35a1c7..ae62476 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -52,6 +52,16 @@ config USB_GADGET_DWC2_OTG driver to operate in Peripheral mode. This option requires USB_GADGET to be enabled. +if USB_GADGET_DWC2_OTG + +config USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 + bool "DesignWare USB2.0 HS OTG controller 8-bit PHY bus width" + help + Set the Designware USB2.0 high-speed OTG controller + PHY interface width to 8 bits, rather than the default (16 bits). + +endif # USB_GADGET_DWC2_OTG + config CI_UDC bool "ChipIdea device controller" select USB_GADGET_DUALSPEED diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index cb20b00..a23278d 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -415,7 +415,11 @@ static void reconfig_usbd(struct dwc2_udc *dev) |0<<7 /* Ulpi DDR sel*/ |0<<6 /* 0: high speed utmi+, 1: full speed serial*/ |0<<4 /* 0: utmi+, 1:ulpi*/ +#ifdef CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 + |0<<3 /* phy i/f 0:8bit, 1:16bit*/ +#else |1<<3 /* phy i/f 0:8bit, 1:16bit*/ +#endif |0x7<<0; /* HS/FS Timeout**/ if (dev->pdata->usb_gusbcfg)