From patchwork Fri Nov 11 22:05:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 693979 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tFv9y3ZFPz9t1b for ; Sat, 12 Nov 2016 09:05:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b="hTfosO4e"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964851AbcKKWFk (ORCPT ); Fri, 11 Nov 2016 17:05:40 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35063 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936599AbcKKWFi (ORCPT ); Fri, 11 Nov 2016 17:05:38 -0500 Received: by mail-wm0-f65.google.com with SMTP id a20so264668wme.2; Fri, 11 Nov 2016 14:05:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=B8IcCDRJGsbwie/bJATn7OYwVR54qp19Csi4FLvdwvU=; b=hTfosO4eiHIQsP+7Kc/STuDm6BnXZTw5HjlhGP/tOyx5xxh/O60PfxfjlHzZwHdsau tm3u1m+5z5EZ2oi3MRX2n8zOUS3A8T62k394oK3Q8tgT70gE5+eU1DhMNvbhquoI3Kli Qveqs8sIXLbE9JCpJgO5vJt8StB7tR695264yK+SumYxJr7Q9TjNcDQvLTCcRQ7+/KWB UHz0toByQYczRMhk1D4Sj6lQet2VE9yhCLaWdqX9CeGZZuz/h142jbeomZdWdzB/PE70 HS9UT+ypnxHkxQ270kZuTxpU8NnUZ8dfNG2Df8lS/fZ4Oj2KGkqYwTwwNHLJxikMswyp BC3Q== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=B8IcCDRJGsbwie/bJATn7OYwVR54qp19Csi4FLvdwvU=; b=Wyi7kH+p/orR3kneDQslgTg0hjld/upG2euupx83nsmZruaP1WTdAjZx6hmgHgeRGy 95wBe/MwmxjsVLOWeXVYGjHf71eX0EJ/hn5SosU+Pbw5GEjhhmjnFTMmOZay4IuaEjBf QZTqLdHh7Z1wxnjmeVQvQEWHw7uLdk790YN86AsRnUL4WrIf5ts4aI2P8giZjAsjHWt5 KGyDSrBq7utVK7gZMW6AwKTZwMfsbhrt0j9pcUZdUxLdK/8Kp9PQDdLAgBBA+Auk2Xd1 ZeL9Eaptr23zfP9j1XJw/r67+4OT+rtNrb9Wnvx1OLPrbs/CO30FtprqqpPcrNwHhPro JVPg== X-Gm-Message-State: ABUngve6uPzV04bM4Slgr4A+JIVeczvENYfFyKGmy6nS5P4IRCwPpraCdDQ4nx8eslQ63w== X-Received: by 10.28.73.136 with SMTP id w130mr149213wma.82.1478901936201; Fri, 11 Nov 2016 14:05:36 -0800 (PST) Received: from debian64.daheim (pD9F881AE.dip0.t-ipconnect.de. [217.248.129.174]) by smtp.gmail.com with ESMTPSA id jq10sm13593459wjb.46.2016.11.11.14.05.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2016 14:05:35 -0800 (PST) From: Christian Lamparter X-Google-Original-From: Christian Lamparter Received: from localhost.daheim ([127.0.0.1] helo=debian64.localnet) by debian64.daheim with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1c5Jx0-0001Ya-RA; Fri, 11 Nov 2016 23:05:34 +0100 To: John Youn Cc: Christian Lamparter , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , Mark Rutland , Rob Herring , Greg Kroah-Hartman , Felipe Balbi Subject: Re: [PATCH 1/2] usb: dwc2: add amcc,dwc-otg support Date: Fri, 11 Nov 2016 23:05:34 +0100 Message-ID: <1546251.ssrfyj8Loe@debian64> User-Agent: KMail/5.2.3 (Linux/4.9.0-rc4-wt+; KDE/5.27.0; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hello, On Friday, November 11, 2016 1:22:16 PM CET John Youn wrote: > On 11/11/2016 12:59 PM, Christian Lamparter wrote: > > This patch adds support for the "amcc,usb-otg" device > > which is found in the PowerPC Canyonlands' dts. > > > > The device definition was added by: > > commit c89b3458d8cc ("powerpc/44x: Add USB DWC DTS entry to Canyonlands board")' > > but without any driver support as the dwc2 driver wasn't > > available at that time. > > > > Note: The system can't use the generic "snps,dwc2" compatible > > because of the special ahbcfg configuration. The default > > GAHBCFG_HBSTLEN_INCR4 of snps,dwc2 can cause a system hang > > when the USB and SATA is used concurrently. > > I don't want to add any more of these param structures to the driver > unless really necessary. We're trying to remove usage of them in favor > of using auto-detected defaults and device properties to override > them. Ok, thanks. I think that would work. I've attached an updated patch. Can it be applied/queued now? Or do you want me to resent it later? > The AHB Burst is actually one of the ones we were going to do next > because our platform also doesn't work well with INCR4. In fact I'm > thinking of making the default INCR. Is that actually possible to change the default still? This would require to re-evaluate all existing archs/platforms that use "snps,dwc2" for INCR16 compatibility. >From what I can tell based would be: bcm11351, bcm21664, bcm23550, exynos3250, stm32f429, rk3xxx, stratix10, meson-gxbb, rt3050 and some Altera FPGAs. > If that's all you need then a devicetree binding should be enough > right? Yes. The device is working fine so far. Regards, Christian Acked-by: John Youn --- >From 70dd4be016b89655a56bc8260f04683b50f07644 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sun, 6 Nov 2016 00:39:24 +0100 Subject: [PATCH] usb: dwc2: add amcc,dwc-otg support This patch adds support for the "amcc,usb-otg" device which is found in the PowerPC Canyonlands' dts. The device definition was added by: commit c89b3458d8cc ("powerpc/44x: Add USB DWC DTS entry to Canyonlands board")' but without any driver support as the dwc2 driver wasn't available at that time. Note: The system can't use the generic "snps,dwc2" compatible because of the special ahbcfg configuration. The default GAHBCFG_HBSTLEN_INCR4 of snps,dwc2 can cause a system hang when the USB and SATA is used concurrently. Cc: Felipe Balbi Cc: John Youn Signed-off-by: Christian Lamparter --- v1->v2: - moved definitons to params.c - removed dma_enable / host_dma parameter - added dma_desc_fs_enable parameter v2->v3: - removed parameters Please queue this patch until GAHBCFG_HBSTLEN_INCR16 is the default for ahbcfg. --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + drivers/usb/dwc2/params.c | 1 + 2 files changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index 10a2a4b..6ccfe85 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.txt +++ b/Documentation/devicetree/bindings/usb/dwc2.txt @@ -12,6 +12,7 @@ Required properties: - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs; - "amlogic,meson8b-usb": The DWC2 USB controller instance in Amlogic Meson8b SoCs; - "amlogic,meson-gxbb-usb": The DWC2 USB controller instance in Amlogic S905 SoCs; + - "amcc,dwc-otg": The DWC2 USB controller instance in AMCC Canyonlands 460EX SoCs; - snps,dwc2: A generic DWC2 USB controller with default parameters. - reg : Should contain 1 register range (address and length) - interrupts : Should contain 1 interrupt diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 64d5c66..9506ab0 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -239,6 +239,7 @@ const struct of_device_id dwc2_of_match_table[] = { { .compatible = "samsung,s3c6400-hsotg", .data = NULL}, { .compatible = "amlogic,meson8b-usb", .data = ¶ms_amlogic }, { .compatible = "amlogic,meson-gxbb-usb", .data = ¶ms_amlogic }, + { .compatible = "amcc,dwc-otg", .data = NULL }, {}, }; MODULE_DEVICE_TABLE(of, dwc2_of_match_table);