archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <>
To: Alexander Dahl <>
Cc: Greg Kroah-Hartman <>,
	Alan Stern <>,
	Rob Herring <>,
	Frank Rowand <>,
	Michal Simek <>,,
	Douglas Anderson <>,, Peter Chen <>,, Stephen Boyd <>,
	Ravi Chandra Sadineni <>,
	Krzysztof Kozlowski <>,
	Bastien Nocera <>,
	Al Cooper <>,
	"Alexander A. Klimov" <>,
	Andy Gross <>,
	Bjorn Andersson <>,
	Christian Lamparter <>,
	Colin Ian King <>,
	Dmitry Osipenko <>,
	Fabio Estevam <>,
	Masahiro Yamada <>,
	Mathias Nyman <>,
	Vinod Koul <>,
Subject: Re: [PATCH v10 0/5] USB: misc: Add onboard_usb_hub driver
Date: Wed, 12 May 2021 09:37:10 -0700	[thread overview]
Message-ID: <YJwENo/> (raw)
In-Reply-To: <>

Hi Alexander,

On Wed, May 12, 2021 at 09:19:54AM +0200, Alexander Dahl wrote:
> Hello Matthias,
> just a curious informal question, see below.
> Am Tue, May 11, 2021 at 03:52:18PM -0700 schrieb Matthias Kaehlcke:
> > This series adds:
> > - the onboard_usb_hub_driver
> > - glue in the xhci-plat driver to create the onboard_usb_hub
> >   platform device if needed
> > - a device tree binding for the Realtek RTS5411 USB hub controller
> > - device tree changes that add RTS5411 entries for the QCA SC7180
> >   based boards trogdor and lazor
> > - a couple of stubs for platform device functions to avoid
> >   unresolved symbols with certain kernel configs
> > 
> > The main issue the driver addresses is that a USB hub needs to be
> > powered before it can be discovered. For discrete onboard hubs (an
> > example for such a hub is the Realtek RTS5411) this is often solved
> > by supplying the hub with an 'always-on' regulator, which is kind
> > of a hack. Some onboard hubs may require further initialization
> > steps, like changing the state of a GPIO or enabling a clock, which
> > requires even more hacks. This driver creates a platform device
> > representing the hub which performs the necessary initialization.
> > Currently it only supports switching on a single regulator, support
> > for multiple regulators or other actions can be added as needed.
> > Different initialization sequences can be supported based on the
> > compatible string.
> This sounds like it would be useful for other hub controllers as well?
> For example, would the Microchip USB3503 (former SMSC,
> drivers/usb/misc/usb3503.c, [1]) fall into this category? That chip is
> used on the "Cubietech Cubietruck Plus" for example.

usb3503.c provides two 'separate' USB3503 drivers (which share some
code), a i2c client driver and a platform driver. IIUC on a system with
an USB3503 only one of these drivers is used. Theoretically it should be
feasible to extend the onboard_usb_hub driver to cover the functionality
of the platform driver in usb3503.c (essentially to control GPIOs and
clocks at initialization time and suspend/resume). Another question is
whether that would be desirable, since the i2c and the platform driver
share code, which then would be duplicated in the i2c and onboard_usb_hub
driver, unless a way is found to keep sharing that code.

The i2c driver can't be completely replaced by the onboard_usb_hub
driver, due to the i2c communications. It might be possible to have the
i2c driver and the onboard_usb_hub collaborate, however I expect it
would take a certain effort to design and implement a solid solution.



  reply	other threads:[~2021-05-12 17:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 22:52 [PATCH v10 0/5] USB: misc: Add onboard_usb_hub driver Matthias Kaehlcke
2021-05-11 22:52 ` [PATCH v10 5/5] arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Matthias Kaehlcke
2021-05-12  7:19 ` [PATCH v10 0/5] USB: misc: Add onboard_usb_hub driver Alexander Dahl
2021-05-12 16:37   ` Matthias Kaehlcke [this message]
2021-05-21 12:30 ` Greg Kroah-Hartman
2021-05-25 17:42   ` Matthias Kaehlcke

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:

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

  git send-email \
    --in-reply-to=YJwENo/ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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).