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:   Fri, 18 Nov 2022 18:29:46 +0000
From:   "Larson, Bradley" <Bradley.Larson@....com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
CC:     Rob Herring <robh@...nel.org>, Brad Larson <brad@...sando.io>,
        "krzysztof.kozlowski@...aro.org" <krzysztof.kozlowski@...aro.org>,
        "adrian.hunter@...el.com" <adrian.hunter@...el.com>,
        "alcooperx@...il.com" <alcooperx@...il.com>,
        "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "brijeshkumar.singh@....com" <brijeshkumar.singh@....com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "catalin.marinas@....com" <catalin.marinas@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "fancer.lancer@...il.com" <fancer.lancer@...il.com>,
        "gerg@...ux-m68k.org" <gerg@...ux-m68k.org>,
        "gsomlo@...il.com" <gsomlo@...il.com>,
        "krzk@...nel.org" <krzk@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "p.yadav@...com" <p.yadav@...com>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "piotrs@...ence.com" <piotrs@...ence.com>,
        "rdunlap@...radead.org" <rdunlap@...radead.org>,
        "samuel@...lland.org" <samuel@...lland.org>,
        "Suthikulpanit, Suravee" <Suravee.Suthikulpanit@....com>,
        "Lendacky, Thomas" <Thomas.Lendacky@....com>,
        "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
        "will@...nel.org" <will@...nel.org>,
        "yamada.masahiro@...ionext.com" <yamada.masahiro@...ionext.com>
Subject: Re: [PATCH v8 06/17] dt-bindings: mfd: amd,pensando-elbasr: Add AMD
 Pensando Elba System Resource chip

[AMD Official Use Only - General]

Hi Geert,

From: Geert Uytterhoeven <geert@...ux-m68k.org>
Sent: Friday, November 18, 2022 12:42 AM
> ...
> > &spi0 {
> >         #address-cells = <1>;
> >         #size-cells = <0>;
> >         num-cs = <4>;
> >         cs-gpios = <0>, <0>, <&porta 1 GPIO_ACTIVE_LOW>,
> >                    <&porta 7 GPIO_ACTIVE_LOW>;
> >         status = "okay";
> >
> >         rstc: system-controller@0 {
> >                 compatible = "amd,pensando-elbasr";
> >                 reg = <0>;
> >                 spi-max-frequency = <12000000>;
> >                 #reset-cells = <1>;
> >         };
> >
> >         system-controller@1 {
> >                 compatible = "amd,pensando-elbasr";
> >                 reg = <1>;
> >                 spi-max-frequency = <12000000>;
> >         };
> >
> >         system-controller@2 {
> >                 compatible = "amd,pensando-elbasr";
> >                 reg = <2>;
> >                 spi-max-frequency = <12000000>;
> >                 interrupt-parent = <&porta>;
> >                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> >         };
> >
> >         system-controller@3 {
> >                 compatible = "amd,pensando-elbasr";
> >                 reg = <3>;
> >                 spi-max-frequency = <12000000>;
> >         };
>
> The above describes 4 individual but further identical (they have the
> same compatible value) devices, while above you say they are not identical:
>
>     The IP at CS0 is a bunch of miscellaneous mgmt registers.
>     CS1 is a designware I2C master/slave.
>     CS2 is a Lattice dual I2C master.
>     CS3 is internal storage for the CPLD or FPGA depending on the
> hardware implementation.
>
> So either this should be modelled as a single subnode with 4 chip
> selects[*]:
>
>         system-controller@0 {
>                 compatible = "amd,pensando-elbasr";
>                 reg = <0 1 2 3 4>;
>                 spi-max-frequency = <12000000>;
>                 #reset-cells = <1>;
>         };
>
> or as 4 separate subnodes, each using 4 different compatible values.
> Giving the wildly different functionalities provided by each, you also need
> 4 binding documents.
>
> [*] I'm not sure the Linux SPI core actually supports this yet.

Thanks, I was unfamiliar with reg <0 ...> with differences between
the nodes such as reset-cells for one and interrupts on another.
Below dts boots ok and will change binding and driver as needed.

&spi0 {
        #address-cells = <1>;
        #size-cells = <0>;
        num-cs = <4>;
        cs-gpios = <0>, <0>, <&porta 1 GPIO_ACTIVE_LOW>,
                   <&porta 7 GPIO_ACTIVE_LOW>;
        status = "okay";

        rstc: system-controller@0 {
                compatible = "amd,pensando-elbasr";
                reg = <0 1 2 3>;
                spi-max-frequency = <12000000>;
                interrupt-parent = <&porta>;
                interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
                #reset-cells = <1>;
        };
};

Regards,
Brad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ