linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Doug Anderson" <dianders@chromium.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Alan Stern" <stern@rowland.harvard.edu>,
	"Frank Rowand" <frowand.list@gmail.com>,
	"Mathias Nyman" <mathias.nyman@intel.com>,
	"Felipe Balbi" <balbi@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"Peter Chen" <peter.chen@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Linux USB List" <linux-usb@vger.kernel.org>,
	"Bastien Nocera" <hadess@hadess.net>,
	"Ravi Chandra Sadineni" <ravisadineni@chromium.org>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Roger Quadros" <rogerq@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Stephen Boyd" <swboyd@chromium.org>,
	"Al Cooper" <alcooperx@gmail.com>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Alexandre TORGUE - foss" <alexandre.torgue@foss.st.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Andrey Zhizhikin" <andrey.zhizhikin@leica-geosystems.com>,
	"Andy Gross" <agross@kernel.org>, "Arnd Bergmann" <arnd@arndb.de>,
	"Aswath Govindraju" <a-govindraju@ti.com>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Dong Aisheng" <aisheng.dong@nxp.com>,
	"Enric Balletbo i Serra" <enric.balletbo@collabora.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Gregory Clement" <gregory.clement@bootlin.com>,
	"Grygorii Strashko" <grygorii.strashko@ti.com>,
	"Guido Günther" <agx@sigxcpu.org>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Jens Axboe" <axboe@kernel.dk>, "Johan Hovold" <johan@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@canonical.com>,
	"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"Lionel DEBIEVE" <lionel.debieve@st.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Martin Jücker" <martin.juecker@gmail.com>,
	"Nishanth Menon" <nm@ti.com>,
	"Olivier MOYSAN" <olivier.moysan@st.com>,
	"Pawel Laszczak" <pawell@cadence.com>,
	"Robert Richter" <rric@kernel.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Tony Lindgren" <tony@atomide.com>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Will Deacon" <will@kernel.org>,
	"William Cohen" <wcohen@redhat.com>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	"Łukasz Stelmach" <l.stelmach@samsung.com>
Subject: Re: [PATCH v16 0/7] usb: misc: Add onboard_usb_hub driver
Date: Tue, 19 Oct 2021 15:10:25 -0700	[thread overview]
Message-ID: <YW9CUabfA0HrtTAq@google.com> (raw)
In-Reply-To: <03f28680-35eb-25f4-5041-f3a56144da24@foss.st.com>

On Tue, Oct 19, 2021 at 06:04:06PM +0200, Fabrice Gasnier wrote:
> On 10/15/21 8:39 AM, Greg Kroah-Hartman wrote:
> > On Thu, Oct 14, 2021 at 02:38:55PM -0700, Doug Anderson wrote:
> >> Hi,
> >>
> >> On Tue, Sep 21, 2021 at 10:09 AM Matthias Kaehlcke <mka@chromium.org> wrote:
> >>>
> >>> Hi Greg,
> >>>
> >>> are there any actions pending or can this land in usb-testing?
> >>>
> >>> I confirmed that this series can be rebased on top of v5.15-rc2
> >>> without conflicts.
> >>
> >> I'm quite interested to know what the next action items are, too. This
> >> is one of the very few patches we have for trogdor (excluding MIPI
> >> camera, which is a long story) that we're carrying downstream, so I'm
> >> keenly interested in making sure it's unblocked (if, indeed, it's
> >> blocked on anything).
> >>
> >> If folks feel that this needs more review eyes before landing again
> >> then I'll try to find some time in the next week or two. If it's just
> >> waiting for the merge window to open/close so it can have maximal bake
> >> time, that's cool too. Please yell if there's something that I can do
> >> to help, though! :-)
> > 
> > I would love more review-eyes on this please.
> > 
> 
> Hi,
> 
> I noticed this series some time ago, and wanted to take a closer look.
> 
> The same issue this series address is seen on stm32 board for instance.
> (arch/arm/boot/dts/stm32mp15xx-dkx.dtsi). On board HUB (not described in
> the DT) is supplied by an always-on regulator.
> So it could could be interesting/useful to address the same case ,
> on stm32 boards, where USB2 (ehci-platform driver) is used currently.
> 
> I noticed a few things, especially on the dt-bindings. I've some
> questions here.
> 
> In this series, RTS5411 is used. The dt-bindings documents it as a child
> node of the USB controller. E.g.
> 
> &usb {
> 	usb_hub_2_0: hub@1 {
> 		...
> 	};
> 
> 	usb_hub_3_0: hub@2 {
> 	};
> }
> 
> I had a quick look at RTS5411 datasheet. It looks like there's an i2c
> interface too.
> - I guess the I2C interface isn't used in your case ?
>   (I haven't checked what it could be used for...)

Correct, the i2c interface isn't used on my board.

Also the binding isn't completely new, it is based on the generic USB
binding (https://www.kernel.org/doc/Documentation/devicetree/bindings/usb/usb-device.txt)

> In the stm32 boards (stm32mp15xx-dkx), there's an usb2514b chip
> - that also could be wired on I2C interface (0R mount option)
> - unused on stm32 boards by default
> 
> usb2514b chip already has a dt-bindings (with compatible), and a driver:
> - drivers/usb/misc/usb251xb.c
> - Documentation/devicetree/bindings/usb/usb251xb.txt
> 
> It is defined more as an i2c chip, so I'd expect it as an i2c child,
> e.g. like:
> 
> &i2c {
> 	usb2514b@2c {
> 		compatible = "microchip,usb2514b";
> 		...
> 	};
> };
> 
> 
> This way, I don't see how it could be used together with onboard_usb_hub
> driver ? (But I may have missed it)

Indeed, you can either use the i2c driver for the hub or the onboard_usb_hub
driver, but not both at the same time. The i2c driver requires the hub to be
powered before communicating with it over i2c, hence the power sequence
should not be delegated to the onboard_usb_hub driver.

> Is it possible to use a phandle, instead of a child node ?

The child node is part of the generic USB binding. The onboard_usb_hub
driver needs it to find the USB device(s) that correspond to the hub,
to optionally power the hub off during system suspend when no wakeup
capable devices are connected.

> However, in the stm32mp15xx-dkx case, i2c interface isn't wired/used by
> default. So obviously the i2c driver isn't used. In this case, could the
> "microchip,usb2514b" be listed in onboard_usb_hub driver ?
> (wouldn't it be redundant ?)

You would use the compatible string of the generic USB binding, i.e.
"usbVID,PID", which would have to be added to the onboard_usb_hub driver.

> In this case it would be a child node of the usb DT node... Maybe that's
> more a question for Rob: would it be "legal" regarding existing
> dt-bindings ?

The USB node is always there implicitly (the USB device exists), the only
difference is that the node is added explicitly (plus additional
properties).

There was a somewhat related long-winded discussion with Rob on an earlier
version of the driver/binding:
https://lore.kernel.org/linux-usb/1613055380.685661.519681.nullmailer@robh.at.kernel.org/

  reply	other threads:[~2021-10-19 22:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 19:52 [PATCH v16 0/7] usb: misc: Add onboard_usb_hub driver Matthias Kaehlcke
2021-08-13 19:52 ` [PATCH v16 1/7] " Matthias Kaehlcke
2021-11-11 23:31   ` Doug Anderson
2021-11-16  2:08     ` Matthias Kaehlcke
2021-08-13 19:52 ` [PATCH v16 2/7] of/platform: Add stubs for of_platform_device_create/destroy() Matthias Kaehlcke
2021-08-13 19:52 ` [PATCH v16 3/7] ARM: configs: Explicitly enable USB_XHCI_PLATFORM where needed Matthias Kaehlcke
2021-08-26  6:45   ` Roger Quadros
2021-08-26  7:56   ` Krzysztof Kozlowski
2021-08-13 19:52 ` [PATCH v16 4/7] arm64: defconfig: Explicitly enable USB_XHCI_PLATFORM Matthias Kaehlcke
2021-08-26  6:46   ` Roger Quadros
2021-08-13 19:52 ` [PATCH v16 5/7] usb: Specify dependencies on USB_XHCI_PLATFORM with 'depends on' Matthias Kaehlcke
2021-08-26  6:46   ` Roger Quadros
2021-11-11 23:48   ` Doug Anderson
2021-11-16 18:07     ` Matthias Kaehlcke
2021-08-13 19:52 ` [PATCH v16 6/7] usb: host: xhci-plat: Create platform device for onboard hubs in probe() Matthias Kaehlcke
2021-10-20 13:05   ` Mathias Nyman
2021-10-20 20:27     ` Matthias Kaehlcke
2021-10-20 20:37       ` Alan Stern
2021-10-20 21:01         ` Matthias Kaehlcke
2021-10-20 21:57           ` Alan Stern
2021-08-13 19:52 ` [PATCH v16 7/7] arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Matthias Kaehlcke
2021-09-21 17:08 ` [PATCH v16 0/7] usb: misc: Add onboard_usb_hub driver Matthias Kaehlcke
2021-10-14 21:38   ` Doug Anderson
2021-10-15  6:39     ` Greg Kroah-Hartman
2021-10-19 16:04       ` Fabrice Gasnier
2021-10-19 22:10         ` Matthias Kaehlcke [this message]
2021-10-20  6:21         ` Michal Simek
2021-10-20 17:41           ` 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:
  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=YW9CUabfA0HrtTAq@google.com \
    --to=mka@chromium.org \
    --cc=a-govindraju@ti.com \
    --cc=agross@kernel.org \
    --cc=agx@sigxcpu.org \
    --cc=aisheng.dong@nxp.com \
    --cc=alcooperx@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=andrey.zhizhikin@leica-geosystems.com \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=balbi@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=digetx@gmail.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=enric.balletbo@collabora.com \
    --cc=f.fainelli@gmail.com \
    --cc=fabrice.gasnier@foss.st.com \
    --cc=festevam@gmail.com \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=grygorii.strashko@ti.com \
    --cc=hadess@hadess.net \
    --cc=jagan@amarulasolutions.com \
    --cc=johan@kernel.org \
    --cc=krzk@kernel.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=l.stelmach@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lionel.debieve@st.com \
    --cc=m.szyprowski@samsung.com \
    --cc=mani@kernel.org \
    --cc=martin.juecker@gmail.com \
    --cc=mathias.nyman@intel.com \
    --cc=michal.simek@xilinx.com \
    --cc=nm@ti.com \
    --cc=olivier.moysan@st.com \
    --cc=pawell@cadence.com \
    --cc=peter.chen@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=ravisadineni@chromium.org \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=rric@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=shawnguo@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=swboyd@chromium.org \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    --cc=viresh.kumar@linaro.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vkoul@kernel.org \
    --cc=wcohen@redhat.com \
    --cc=will@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).