Re: [PATCH v5 3/7] dt-bindings: mikrobus: Add mikrobus-spi binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
> ---
>  .../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@xxxxxxxxxxxxxxx>
> +
> +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@xxxxxxxxxxxxxxx>
>  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@xxxxxxxxxx>
> 
> -- 
> 2.45.2
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux