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: <455e31be-dc87-39b3-c7fe-22384959c556@linaro.org>
Date:   Wed, 5 Oct 2022 10:03:04 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Colin Foster <colin.foster@...advantage.com>
Cc:     linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, netdev@...r.kernel.org,
        Russell King <linux@...linux.org.uk>,
        Linus Walleij <linus.walleij@...aro.org>,
        UNGLinuxDriver@...rochip.com,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Lee Jones <lee@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Vladimir Oltean <olteanv@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH v3 net-next 12/14] dt-bindings: net: dsa: ocelot: add
 ocelot-ext documentation

On 05/10/2022 02:08, Colin Foster wrote:
> Hi Krzysztof,
> 
> On Tue, Oct 04, 2022 at 01:19:33PM +0200, Krzysztof Kozlowski wrote:
>> On 26/09/2022 02:29, Colin Foster wrote:
>>> The ocelot-ext driver is another sub-device of the Ocelot / Felix driver
>>> system, which currently supports the four internal copper phys.
>>>
>>> Signed-off-by: Colin Foster <colin.foster@...advantage.com>
> ...
>>> +  # Ocelot-ext VSC7512
>>> +  - |
>>> +    spi {
>>> +        soc@0 {
>>
>> soc in spi is a bit confusing.
>>
>> Does it even pass the tests? You have unit address but no reg.
> 
> I omitted those from the documentation. Rob's bot is usually quick to
> alert me when I forgot to run dt_binding_check and something fails
> though. I'll double check, but I thought everything passed.
> 
>>
>>> +            compatible = "mscc,vsc7512";
>>
>>
>>> +            #address-cells = <1>;
>>> +            #size-cells = <1>;
>>> +
>>> +            ethernet-switch@0 {
>>> +                compatible = "mscc,vsc7512-switch";
>>> +                reg = <0 0>;
>>
>> 0 is the address on which soc bus?
> 
> This one Vladimir brought up as well. The MIPS cousin of this chip
> is the VSC7514. They have exactly (or almost exactly) the same hardware,
> except the 7514 has an internal MIPS while the 7512 has an 8051.
> 
> Both chips can be controlled externally via SPI or PCIe. This is adding
> control for the chip via SPI.
> 
> For the 7514, you can see there's an array of 20 register ranges that
> all get mmap'd to 20 different regmaps.
> 
> (Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml)
> 
>     switch@...0000 {
>       compatible = "mscc,vsc7514-switch";
>       reg = <0x1010000 0x10000>,
>             <0x1030000 0x10000>,
>             <0x1080000 0x100>,
>             <0x10e0000 0x10000>,
>             <0x11e0000 0x100>,
>             <0x11f0000 0x100>,
>             <0x1200000 0x100>,
>             <0x1210000 0x100>,
>             <0x1220000 0x100>,
>             <0x1230000 0x100>,
>             <0x1240000 0x100>,
>             <0x1250000 0x100>,
>             <0x1260000 0x100>,
>             <0x1270000 0x100>,
>             <0x1280000 0x100>,
>             <0x1800000 0x80000>,
>             <0x1880000 0x10000>,
>             <0x1040000 0x10000>,
>             <0x1050000 0x10000>,
>             <0x1060000 0x10000>,
>             <0x1a0 0x1c4>;
>       reg-names = "sys", "rew", "qs", "ptp", "port0", "port1",
>             "port2", "port3", "port4", "port5", "port6",
>             "port7", "port8", "port9", "port10", "qsys",
>             "ana", "s0", "s1", "s2", "fdma";
> 
> 
> The suggestion was to keep the device trees of the 7512 and 7514 as
> similar as possible, so this will essentially become:
>     switch@...10000 {
>       compatible = "mscc,vsc7512-switch";
>       reg = <0x71010000 0x10000>,
>             <0x71030000 0x10000>,
>       ...

I don't understand how your answer relates to "reg=<0 0>;". How is it
going to become 0x71010000 if there is no other reg/ranges set in parent
nodes. The node has only one IO address, but you say the switch has 20
addresses...

Are we talking about same hardware?

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ