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: <20240628-cake-ocean-25363137b1ab@spud>
Date: Fri, 28 Jun 2024 17:48:26 +0100
From: Conor Dooley <conor@...nel.org>
To: Ayush Singh <ayush@...gleboard.org>
Cc: Mark Brown <broonie@...nel.org>,
	Vaishnav M A <vaishnav@...gleboard.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Derek Kiernan <derek.kiernan@....com>,
	Dragan Cvetic <dragan.cvetic@....com>,
	Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Nishanth Menon <nm@...com>, Vignesh Raghavendra <vigneshr@...com>,
	Tero Kristo <kristo@...nel.org>, Michael Walle <mwalle@...nel.org>,
	Andrew Lunn <andrew@...n.ch>, jkridner@...gleboard.org,
	robertcnelson@...gleboard.org, linux-spi@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v5 3/7] dt-bindings: mikrobus: Add mikrobus-spi binding

On Thu, Jun 27, 2024 at 09:56:13PM +0530, Ayush Singh wrote:
> Add bindings for MikroBUS boards using SPI interface.
> 
> Almost all of the properties that are valid for SPI devices can be used
> except reg. Since the goal is to allow use of the same MikroBUS board
> across different connectors, config needs to be independent of the actual
> SPI controller in mikroBUS port(s), it is not possible to define the
> chipselect by number in advance. Thus, `spi-cs-apply` property is used to
> specify the chipselect(s) by name.
> 
> Another important fact is that while there is a CS pin in the mikroBUS
> connector, some boards (eg SPI Extend Click) use additional pins as
> chipselect. Thus we need a way to specify the CS pin(s) in terms of
> mikcrobus-connector which can then handle bindings the actual CS pin(s).
> 
> Link: https://www.mikroe.com/spi-extend-click SPI Extend Click
> 
> Signed-off-by: Ayush Singh <ayush@...gleboard.org>
> ---
>  .../devicetree/bindings/mikrobus/mikrobus-spi.yaml | 37 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 38 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mikrobus/mikrobus-spi.yaml b/Documentation/devicetree/bindings/mikrobus/mikrobus-spi.yaml
> new file mode 100644
> index 000000000000..35ca2cce3b03
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mikrobus/mikrobus-spi.yaml
> @@ -0,0 +1,37 @@
> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mikrobus/mikrobus-spi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: mikroBUS add-on board using SPI
> +
> +maintainers:
> +  - Ayush Singh <ayush@...gleboard.org>
> +
> +allOf:
> +  - $ref: /schemas/mikrobus/mikrobus-board.yaml#
> +
> +properties:
> +  compatible:
> +    const: mikrobus-spi
> +
> +  spi-cs-apply:
> +    minItems: 1
> +    maxItems: 12
> +    items:
> +      enum: [default, pwm, int, rx, tx, scl, sda, an, rst, sck, cipo, copi]

Property descriptions belong in the property, not in the commit message.


> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    thermo-click {
> +      compatible = "maxim,max31855k", "mikrobus,spi";

I am really not keen on what this implies, as I think Rob and I have
already mentioned, the connector should handle the "mapping" and the
regular SPI/I2C/whatever bindings for the SPI devices themselves
should be usable.

Also you clearly didn't test this binding - please test them.

Thanks,
Conor.

> +      spi-max-frequency = <1000000>;
> +      pinctrl-apply = "default", "spi_default";
> +      spi-cs-apply = "default";
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 14eba18832d5..88f2b3adc824 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -15114,6 +15114,7 @@ M:	Vaishnav M A <vaishnav@...gleboard.org>
>  S:	Maintained
>  F:	Documentation/devicetree/bindings/connector/mikrobus-connector.yaml
>  F:	Documentation/devicetree/bindings/mikrobus/mikrobus-board.yaml
> +F:	Documentation/devicetree/bindings/mikrobus/mikrobus-spi.yaml
>  
>  MIKROTIK CRS3XX 98DX3236 BOARD SUPPORT
>  M:	Luka Kovacic <luka.kovacic@...tura.hr>
> 
> -- 
> 2.45.2
> 

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ