lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 Oct 2021 15:10:25 -0700
From:   Matthias Kaehlcke <mka@...omium.org>
To:     Fabrice Gasnier <fabrice.gasnier@...s.st.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Doug Anderson <dianders@...omium.org>,
        Rob Herring <robh+dt@...nel.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Frank Rowand <frowand.list@...il.com>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Felipe Balbi <balbi@...nel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>, Peter Chen <peter.chen@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux USB List <linux-usb@...r.kernel.org>,
        Bastien Nocera <hadess@...ess.net>,
        Ravi Chandra Sadineni <ravisadineni@...omium.org>,
        Michal Simek <michal.simek@...inx.com>,
        Roger Quadros <rogerq@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Al Cooper <alcooperx@...il.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Alexandre TORGUE - foss <alexandre.torgue@...s.st.com>,
        Andrew Lunn <andrew@...n.ch>,
        Andrey Zhizhikin <andrey.zhizhikin@...ca-geosystems.com>,
        Andy Gross <agross@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        Aswath Govindraju <a-govindraju@...com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        Dmitry Osipenko <digetx@...il.com>,
        Dong Aisheng <aisheng.dong@....com>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Fabio Estevam <festevam@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Gregory Clement <gregory.clement@...tlin.com>,
        Grygorii Strashko <grygorii.strashko@...com>,
        Guido Günther <agx@...xcpu.org>,
        Jagan Teki <jagan@...rulasolutions.com>,
        Jens Axboe <axboe@...nel.dk>, Johan Hovold <johan@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        Lionel DEBIEVE <lionel.debieve@...com>,
        Manivannan Sadhasivam <mani@...nel.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Mark Brown <broonie@...nel.org>,
        Martin Jücker <martin.juecker@...il.com>,
        Nishanth Menon <nm@...com>,
        Olivier MOYSAN <olivier.moysan@...com>,
        Pawel Laszczak <pawell@...ence.com>,
        Robert Richter <rric@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tony Lindgren <tony@...mide.com>,
        Vinod Koul <vkoul@...nel.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Will Deacon <will@...nel.org>,
        William Cohen <wcohen@...hat.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        linux-omap <linux-omap@...r.kernel.org>,
        linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
        Łukasz Stelmach <l.stelmach@...sung.com>
Subject: Re: [PATCH v16 0/7] usb: misc: Add onboard_usb_hub driver

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@...omium.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/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ