devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Juergen Gross <jgross@suse.com>
Cc: John Youn <John.Youn@synopsys.com>,
	Pavan Kondeti <quic_pkondeti@quicinc.com>
Subject: [RFC PATCH 0/4] usb: xhci: Introduce xhci-snps
Date: Fri, 03 Jun 2022 19:48:00 -0700	[thread overview]
Message-ID: <cover.1654310542.git.Thinh.Nguyen@synopsys.com> (raw)

Synopsys DWC_usb3x IPs are used on many different platforms. Since they share
the same IP, often the quirks are common across different platforms and
versions. This drives the need to find a way to handle all the common (and
platform specific) quirks and separate its logic from dwc3 and xhci core logic.
Hopefully it can also reduce introducing new device properties while
maintaining abstraction.

So, let's create a xhci-snps glue extension that can apply to xhci-plat and
xhci-pci glue drivers and teach it to handle DWC_usb3x hosts. For this
particular change, we'll start with xhci-plat glue driver.

NOTE: This is a quick implementation of how I'd imagine to handle this. I
apologize if it may lack documentation. It doesn't have all the common quirks
added. I'd like to receive some feedbacks before moving forward.

Many thanks!
Thinh


Thinh Nguyen (4):
  dt-bindings: usb: usb-xhci: Add xhci-snps-quirks
  usb: dwc3: host: Always set xhci-snps-quirks
  usb: dwc3: core: Share global register access with xhci driver
  usb: xhci: Introduce Synopsys glue extension for DWC_usb3x

 .../devicetree/bindings/usb/usb-xhci.yaml     |   4 +
 drivers/usb/dwc3/core.c                       |   4 +-
 drivers/usb/dwc3/host.c                       |   4 +-
 drivers/usb/host/Kconfig                      |   8 +
 drivers/usb/host/Makefile                     |   3 +
 drivers/usb/host/xhci-plat.c                  |  40 ++++
 drivers/usb/host/xhci-plat.h                  |   3 +
 drivers/usb/host/xhci-snps.c                  | 185 ++++++++++++++++++
 drivers/usb/host/xhci-snps.h                  |  32 +++
 9 files changed, 280 insertions(+), 3 deletions(-)
 create mode 100644 drivers/usb/host/xhci-snps.c
 create mode 100644 drivers/usb/host/xhci-snps.h


base-commit: 97fa5887cf283bb75ffff5f6b2c0e71794c02400
-- 
2.28.0


             reply	other threads:[~2022-06-04  2:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-04  2:48 Thinh Nguyen [this message]
2022-06-04  2:48 ` [RFC PATCH 1/4] dt-bindings: usb: usb-xhci: Add xhci-snps-quirks Thinh Nguyen
2022-06-09 17:48   ` Rob Herring
2022-06-09 18:11     ` Thinh Nguyen
2022-06-10 16:52       ` Rob Herring
2022-06-10 17:45         ` Thinh Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1654310542.git.Thinh.Nguyen@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgross@suse.com \
    --cc=krzk@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mathias.nyman@intel.com \
    --cc=mka@chromium.org \
    --cc=quic_pkondeti@quicinc.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).