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]
Message-ID: <20220519144441.tqhihlaq6vbmpmvd@skbuf>
Date:   Thu, 19 May 2022 14:44:41 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     Colin Foster <colin.foster@...advantage.com>
CC:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Terry Bowman <terry.bowman@....com>,
        Wolfram Sang <wsa@...nel.org>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Steen Hegelund <Steen.Hegelund@...rochip.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Russell King <linux@...linux.org.uk>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Lee Jones <lee.jones@...aro.org>
Subject: Re: [RFC v8 net-next 00/16] add support for VSC7512 control over SPI

Hi Colin,

On Sat, May 14, 2022 at 03:00:10PM -0700, Colin Foster wrote:
> On Mon, May 09, 2022 at 05:13:05PM +0000, Vladimir Oltean wrote:
> > Hi Colin,
> > 
> > On Sun, May 08, 2022 at 11:52:57AM -0700, Colin Foster wrote:
> > > 
> > > 		mdio0: mdio0@0 {
> > 
> > This is going to be interesting. Some drivers with multiple MDIO buses
> > create an "mdios" container with #address-cells = <1> and put the MDIO
> > bus nodes under that. Others create an "mdio" node and an "mdio0" node
> > (and no address for either of them).
> > 
> > The problem with the latter approach is that
> > Documentation/devicetree/bindings/net/mdio.yaml does not accept the
> > "mdio0"/"mdio1" node name for an MDIO bus.
> 
> I'm starting this implementation. Yep - it is interesting.
> 
> A quick grep for "mdios" only shows one hit:
> arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dts
> 
> While that has an mdios field (two, actually), each only has one mdio
> bus, and they all seem to get parsed / registered through
> sja1105_mdiobus_.*_register.
> 
> 
> Is this change correct (I have a feeling it isn't):
> 
> ocelot-chip@0 {
>     #address-cells = <1>;
>     #size-cells = <0>;
> 
>     ...
> 
>     mdio0: mdio@0 {
>         reg=<0>;
>         ...
>     };
> 
>     mdio1: mdio@1 {
>         reg = <1>;
>         ...
>     };
>     ...
> };
> 
> When I run this with MFD's (use,)of_reg, things work as I'd expect. But
> I don't directly have the option to use an "mdios" container here
> because MFD runs "for_each_child_of_node" doesn't dig into
> mdios->mdio0...

Sorry for the delayed response. I think you can avoid creating an
"mdios" container node, but you need to provide some "reg" values based
on which the MDIO controllers can be distinguished. What is your convention
for "reg" values of MFD cells? Maybe pass the base address/size of this
device's regmap as the "reg", even if the driver itself won't use it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ