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: <20250915211036.GA3390851-robh@kernel.org>
Date: Mon, 15 Sep 2025 16:10:36 -0500
From: Rob Herring <robh@...nel.org>
To: "Bastien Curutchet (Schneider Electric)" <bastien.curutchet@...tlin.com>
Cc: Woojung Huh <woojung.huh@...rochip.com>, UNGLinuxDriver@...rochip.com,
	Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, Marek Vasut <marex@...x.de>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	Miquèl Raynal <miquel.raynal@...tlin.com>,
	Pascal Eberhard <pascal.eberhard@...com>, netdev@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 2/3] dt-bindings: net: dsa: microchip: Add
 strap description to set SPI mode

On Fri, Sep 12, 2025 at 11:09:13AM +0200, Bastien Curutchet (Schneider Electric) wrote:
> At reset, KSZ8463 uses a strap-based configuration to set SPI as
> interface bus. If the required pull-ups/pull-downs are missing (by
> mistake or by design to save power) the pins may float and the
> configuration can go wrong preventing any communication with the switch.
> 
> Add a 'reset' pinmux state
> Add a KSZ8463 specific strap description that can be used by the driver
> to drive the strap pins during reset. Two GPIOs are used. Users must
> describe either both of them or none of them.
> 
> Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@...tlin.com>
> ---
>  .../devicetree/bindings/net/dsa/microchip,ksz.yaml | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> index db8175b4ced6d136ba97c371b68ba993637e444a..099c6b373704427755c3d8cad4b1cd930219f2f2 100644
> --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> @@ -34,6 +34,13 @@ properties:
>        - microchip,ksz8567
>        - microchip,lan9646
>  
> +  pinctrl-names:
> +    items:
> +      - const: default
> +      - const: reset
> +        description:
> +          Used during reset for strap configuration.
> +
>    reset-gpios:
>      description:
>        Should be a gpio specifier for a reset line.
> @@ -139,6 +146,23 @@ allOf:
>                      should be provided externally.
>                dependencies:
>                  microchip,rmii-clk-internal: [ethernet]
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: microchip,ksz8463
> +    then:
> +      properties:
> +        strap-rxd0-gpios:
> +          description:
> +            RXD0 pin, used to select SPI as bus interface.
> +        strap-rxd1-gpios:
> +          description:
> +            RXD1 pin, used to select SPI as bus interface.
> +
> +dependencies:
> +  strap-rxd0-gpios: [ strap-rxd1-gpios ]
> +  strap-rxd1-gpios: [ strap-rxd0-gpios ]

It would be simpler to define "strap-rxd-gpios" with a length of 2 
entries:

straps-rxd-gpios:
  minItems: 2
  maxItems: 2

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ