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: <b3950b6b-bfbe-da80-90cc-1a836958f931@collabora.com>
Date:   Mon, 7 Mar 2022 11:32:44 +0100
From:   AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
To:     Leilk Liu <leilk.liu@...iatek.com>, Mark Brown <broonie@...nel.org>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-spi@...r.kernel.org,
        linux-mediatek@...ts.infradead.org, Rob Herring <robh@...nel.org>
Subject: Re: [PATCH V3 2/7] dt-bindings: spi: Add compatible for MT7986 with
 single mode

Il 07/03/22 07:52, Leilk Liu ha scritto:
> This patch adds dt-binding documentation for MT7986 with single mode.
> 
> Signed-off-by: Leilk Liu <leilk.liu@...iatek.com>
> Acked-by: Rob Herring <robh@...nel.org>
> ---
>   Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
> index bfa44acb1bdd..48024b98408a 100644
> --- a/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
> +++ b/Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
> @@ -41,6 +41,7 @@ properties:
>                 - mediatek,mt8135-spi
>                 - mediatek,mt8173-spi
>                 - mediatek,mt8183-spi
> +              - mediatek,mt7986-spi-single
>   
>     reg:
>       maxItems: 1

I think that the best way to do this is to better organize the compatibles
per-hardware, here... or the compatibles list will eventually grow out of
control for little reason.

Since "IPM" is a new SPI controller IP, I would expect more and more MediaTek
SoCs using it in the future, so here's my proposal:

- Add a generic (const) compatible "mediatek,spi-ipm" to describe the hardware
- Add an enumeration with "mediatek,mt7986-spi-ipm" as the only member, as to
   prepare this binding for the future.
- Single and quad mode can be expressed with generic SPI bindings!

Specifically, you can express that with "spi-rx-bus-width" for SPI_RX_{....}
and "spi-tx-bus-width" for SPI_TX_{....}, so you don't need different compatibles
for "mediatek,mt7986-spi-single" and "mediatek,mt7896-spi-quad".

Fast example:

spi@...45678 {
     compatible = "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm";
     reg = <....>
     /* Quad mode */
     spi-rx-bus-width = <4>;
     spi-tx-bus-width = <4>;

     .... etc ....
}

Regards,
Angelo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ