Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11356995ybi; Thu, 25 Jul 2019 14:58:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzahHbpLnHpe+s4g+Sik/XLBcAXbwrrJKwQFpoyz4ahdr+KSCOyq3ZF24ACXCl1ck9j4DnE X-Received: by 2002:a62:5214:: with SMTP id g20mr18788169pfb.187.1564091910448; Thu, 25 Jul 2019 14:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564091910; cv=none; d=google.com; s=arc-20160816; b=YN7AyK5QinW6CFD2slBBoA1fG6Adx5sJwt/z088pEMu9oF3cOFKWVu8KD9xLZxTr5a +LFXmnwlud021gxhmkUE0sL22PeuILCRkGdLuhzKm3FLq6cxRkemK9r14pjahvlgxPvt AK9XSPmsi3Br+1Oy8ZFjZt8byaV8P9mWE+Z5RgwAqjRdQLMMLZrJqlLmVUvoOFxzVSBo 9HMXKshKqtbo9RTpcjcxva2tI1R4me0q1rosBpkvEWlmy0tbJFmflZZ2dFv+MJ4UvrmF wtVvBBYDKcb7r5Ar3xqUQQ65t2YHbf5LHPNwMPLtiLj5RcxYmTY4yTKhOIDsrETtW5aj MDNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Wp+QhdeW2A/DPewAfoti8FKOTxYg3yKoHsdjFtv21+4=; b=XqpGHasE5vqo9/9eYDkbR9e/wIdBHhR4k4g3aWN9ozGFT4tI2xn6rI/89F5ZLA9flQ GMEpk6agPpOZCVx5s6Ahj54WHeBHZA4SMsOt6EZ2wy8kNBW7LaZvYKqZSuTNrsp1cBIs SdfQnWfH+/MakUVCXvbB1AwkgPRuHsppwKiO5MRuiZNGM3M//+UqQP7y1HdwgDHs0WlE Ijcpnez9AbhBAOm9iUJqZwXJjy1s2eEwzPXtbLL5Up1uE8w5B99n4GPES2wQsTcwt6fz SGZIfaxvrj4C5oiUPOnG5q6Oc/HlssQsL1UOuKtpkcwOxi7KQbDeLFKKdvJ++v8Pcobq MKlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=14MaIIpV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si15434815plr.187.2019.07.25.14.58.15; Thu, 25 Jul 2019 14:58:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=14MaIIpV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbfGYV4F (ORCPT + 99 others); Thu, 25 Jul 2019 17:56:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:44388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726823AbfGYV4E (ORCPT ); Thu, 25 Jul 2019 17:56:04 -0400 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B379A229F9; Thu, 25 Jul 2019 21:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564091763; bh=WiwQMRx4WG4irtjjyTFzZAkKpzMmVmnL5fSYWsS5oLM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=14MaIIpVNUHnvzAOUCW5ZR/5bwcop0S2xY27mFvq3/qsZm+vSzwUAs10bFXZwUnuL po2rTYzJQh4Dnrpv0GkxY14BfE/MlFy1gGcsxroPPtkAhf0PYfKrOSBbVSYOMiGCI0 gJbTJqBhr3ZHr3rQ6XMPXka0CYWsAUF/tE6Ksszg= Received: by mail-qt1-f174.google.com with SMTP id r6so46410341qtt.0; Thu, 25 Jul 2019 14:56:03 -0700 (PDT) X-Gm-Message-State: APjAAAXon4LyUkhxjBTTiEaRqkIjhvUqsQQTjYpL5UNnVAFLCz+Jxwkp uCsY2yFKz/a260dCCt2QCqP2bQZTAHWRQ0Vcvg== X-Received: by 2002:a0c:b786:: with SMTP id l6mr65421386qve.148.1564091762902; Thu, 25 Jul 2019 14:56:02 -0700 (PDT) MIME-Version: 1.0 References: <20190712064206.48249-1-ran.wang_1@nxp.com> <20190724204222.GA1234@bogus> In-Reply-To: From: Rob Herring Date: Thu, 25 Jul 2019 15:55:51 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V2 1/2] usb: dwc3: Add node to update cache type setting To: Ran Wang Cc: Greg Kroah-Hartman , Mark Rutland , Felipe Balbi , "linux-usb@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 24, 2019 at 8:29 PM Ran Wang wrote: > > Hi Rob, > > On Thursday, July 25, 2019 04:42 Rob Herring wrote: > > > > On Fri, Jul 12, 2019 at 02:42:05PM +0800, Ran Wang wrote: > > > Some Layerscape paltforms (such as LS1088A, LS2088A, etc) encounter > > > USB detect failues when adding dma-coherent to DWC3 node. This is > > > because the HW default cache type configuration of those SoC are not > > > right, need to be updated in DTS. > > > > > > Signed-off-by: Ran Wang > > > --- > > > Change in v2: > > > - New file. > > > > > > Documentation/devicetree/bindings/usb/dwc3.txt | 43 > > > ++++++++++++++++++++++++++ > > > 1 file changed, 43 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt > > > b/Documentation/devicetree/bindings/usb/dwc3.txt > > > index 8e5265e..7bc1cef 100644 > > > --- a/Documentation/devicetree/bindings/usb/dwc3.txt > > > +++ b/Documentation/devicetree/bindings/usb/dwc3.txt > > > @@ -110,6 +110,43 @@ Optional properties: > > > - in addition all properties from usb-xhci.txt from the current directory are > > > supported as well > > > > > > +* Cache type nodes (optional) > > > + > > > +The Cache type node is used to tell how to configure cache type on 4 > > > +different transfer types: Data Read, Desc Read, Data Write and Desc > > > +write. For each treasfer type, controller has a 4-bit register field > > > +to enable different cache type. Quoted from DWC3 data book Table 6-5 > > Cache Type Bit Assignments: > > > +---------------------------------------------------------------- > > > +MBUS_TYPE| bit[3] |bit[2] |bit[1] |bit[0] > > > +---------------------------------------------------------------- > > > +AHB |Cacheable |Bufferable |Privilegge |Data > > > +AXI3 |Write Allocate|Read Allocate|Cacheable |Bufferable > > > +AXI4 |Allocate Other|Allocate |Modifiable |Bufferable > > > +AXI4 |Other Allocate|Allocate |Modifiable |Bufferable > > > +Native |Same as AXI |Same as AXI |Same as AXI|Same as AXI > > > +---------------------------------------------------------------- > > > +Note: The AHB, AXI3, AXI4, and PCIe busses use different names for > > > +certain signals, which have the same meaning: > > > + Bufferable = Posted > > > + Cacheable = Modifiable = Snoop (negation of No Snoop) > > > > This should all be implied from the SoC specific compatible strings. > > Did you mean I could implement a soc driver which can be matched by compatible of 'fsl,ls1088a-dwc3' which will pass known bus type to DWC3 driver? If yes, how to pass? Yes. The DT match table can have data associated with that compatible string. Beyond that, I'm not really familiar with the DWC3 driver. Rob