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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 12 Jan 2022 18:29:00 +0100
From:   Marek Behún <kabel@...nel.org>
To:     Rob Herring <robh@...nel.org>
Cc:     devicetree@...r.kernel.org, Vladimir Oltean <olteanv@...il.com>,
        Holger Brunck <holger.brunck@...achienergy.com>,
        Andrew Lunn <andrew@...n.ch>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Russell King <rmk+kernel@...linux.org.uk>,
        linux-phy@...ts.infradead.org, Vinod Koul <vkoul@...nel.org>,
        Kishon Vijay Abraham I <kishon@...com>
Subject: Re: [PATCH devicetree 2/2] dt-bindings: phy: Add
 `tx-amplitude-microvolt` property binding

Hello Rob,

On Wed, 15 Dec 2021 15:58:40 -0600
Rob Herring <robh@...nel.org> wrote:

> On Wed, Dec 15, 2021 at 12:34:32AM +0100, Marek Behún wrote:
> > Common PHYs often have the possibility to specify peak-to-peak voltage
> > on the differential pair - the default voltage sometimes needs to be
> > changed for a particular board.  
> 
> I can envision needing this, but I can't say that I've seen custom 
> properties being proposed for this purpose.
> 
> > 
> > Add properties `tx-amplitude-microvolt` and
> > `tx-amplitude-microvolt-names` for this purpose. The second property is
> > needed to specify  
> 
> Is the amplitude peak to peak? You just said it was, but perhaps make 
> the property name more clearly defined: tx-p2p-microvolt

Yes, it is peak to peak.

> > 
> > Example usage with only one voltage (it will be used for all supported
> > PHY modes, the `tx-amplitude-microvolt-names` property is not needed in
> > this case):
> > 
> >   tx-amplitude-microvolt = <915000>;
> > 
> > Example usage with voltages for multiple modes:
> > 
> >   tx-amplitude-microvolt = <915000>, <1100000>, <1200000>;
> >   tx-amplitude-microvolt-names = "2500base-x", "usb", "pcie";  
> 
> I'm not wild about the -names, but I think outside of ethernet most 
> cases will only be 1 entry.
> 
> For a phy provider with multiple phys, what if each one needs a 
> different voltage (for the same mode)?

For such a provider I think the best way would be to have the different
PHYs each have a subnode:
  phy-provider {
    phy@0 {
      tx-p2p-microvolt = ...;
    };
  }
> 
> > 
> > Signed-off-by: Marek Behún <kabel@...nel.org>
> > ---
> > 
> > I wanted to constrain the values allowed in the
> > `tx-amplitude-microvolt-names` property to:
> > - ethernet SerDes modes (sgmii, qsgmii, 10gbase-r, 2500base-x, ...)
> > - PCIe modes (pattern: ^pcie[1-6]?$)
> > - USB modes (pattern: ^usb((-host|-device|-otg)?-(ls|fs|hs|ss|ss\+|4))?$)
> > - DisplayPort modes (pattern: ^dp(-rbr|-hbr[23]?|-uhbr-(10|13.5|20))?$)
> > - Camera modes (mipi-dphy, mipi-dphy-univ, mipi-dphy-v2.5-univ)
> > - Storage modes (sata, ufs-hs, ufs-hs-a, ufs-hs-b)
> > 
> > But was unable to. The '-names' suffix implies string-array type, and
> > string-array type does not allow to specify a type for all items in a
> > simple way, i.e.:
> >   items:
> >     enum:
> >       - sgmii
> >       - sata
> >       - usb
> >       ...  
> 
> Works here: Documentation/devicetree/bindings/arm/samsung/pmu.yaml:56
> 
> The requirement is you need to constrain the size with maxItems. It can 
> be a 'should be enough for anyone' value.

Thx.

Marek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ