Re: [PATCH v2 2/3] spi: dt-bindings: cdns,qspi-nor: Move slave-specific properties out

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

 



On Thu, Oct 28, 2021 at 06:15:17PM +0530, Pratyush Yadav wrote:
> The spi-slave-props.yaml schema contains slave-specific properties
> for SPI controllers that should be present in the slave node. Move
> slave-specific properties to a separate file and refer to it in
> spi-slave-props.yaml.

Other than s/slave/peripheral/, LGTM.

> 
> Signed-off-by: Pratyush Yadav <p.yadav@xxxxxx>
> 
> ---
> 
> Changes in v2:
> - New in v2.
> 
>  .../spi/cdns,qspi-nor-slave-props.yaml        | 42 +++++++++++++++++++
>  .../bindings/spi/cdns,qspi-nor.yaml           | 33 ---------------
>  .../bindings/spi/spi-slave-props.yaml         |  2 +
>  3 files changed, 44 insertions(+), 33 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/spi/cdns,qspi-nor-slave-props.yaml
> 
> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor-slave-props.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor-slave-props.yaml
> new file mode 100644
> index 000000000000..263382a5729a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor-slave-props.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spi/cdns,qspi-nor-slave-props.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Slave-specific properties for the Cadence QSPI controller.
> +
> +description:
> +  See spi-slave-props.yaml for more info.
> +
> +maintainers:
> +  - Pratyush Yadav <p.yadav@xxxxxx>
> +
> +properties:
> +  # cdns,qspi-nor.yaml
> +  cdns,read-delay:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Delay for read capture logic, in clock cycles.
> +
> +  cdns,tshsl-ns:
> +    description:
> +      Delay in nanoseconds for the length that the master mode chip select
> +      outputs are de-asserted between transactions.
> +
> +  cdns,tsd2d-ns:
> +    description:
> +      Delay in nanoseconds between one chip select being de-activated
> +      and the activation of another.
> +
> +  cdns,tchsh-ns:
> +    description:
> +      Delay in nanoseconds between last bit of current transaction and
> +      deasserting the device chip select (qspi_n_ss_out).
> +
> +  cdns,tslch-ns:
> +    description:
> +      Delay in nanoseconds between setting qspi_n_ss_out low and
> +      first bit transfer.
> +
> +additionalProperties: true
> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> index ca155abbda7a..a439e3ed753f 100644
> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> @@ -86,39 +86,6 @@ properties:
>      items:
>        enum: [ qspi, qspi-ocp ]
>  
> -# subnode's properties
> -patternProperties:
> -  "@[0-9a-f]+$":
> -    type: object
> -    description:
> -      Flash device uses the below defined properties in the subnode.
> -
> -    properties:
> -      cdns,read-delay:
> -        $ref: /schemas/types.yaml#/definitions/uint32
> -        description:
> -          Delay for read capture logic, in clock cycles.
> -
> -      cdns,tshsl-ns:
> -        description:
> -          Delay in nanoseconds for the length that the master mode chip select
> -          outputs are de-asserted between transactions.
> -
> -      cdns,tsd2d-ns:
> -        description:
> -          Delay in nanoseconds between one chip select being de-activated
> -          and the activation of another.
> -
> -      cdns,tchsh-ns:
> -        description:
> -          Delay in nanoseconds between last bit of current transaction and
> -          deasserting the device chip select (qspi_n_ss_out).
> -
> -      cdns,tslch-ns:
> -        description:
> -          Delay in nanoseconds between setting qspi_n_ss_out low and
> -          first bit transfer.
> -
>  required:
>    - compatible
>    - reg
> diff --git a/Documentation/devicetree/bindings/spi/spi-slave-props.yaml b/Documentation/devicetree/bindings/spi/spi-slave-props.yaml
> index 5166ec9b0353..4cc12a161da9 100644
> --- a/Documentation/devicetree/bindings/spi/spi-slave-props.yaml
> +++ b/Documentation/devicetree/bindings/spi/spi-slave-props.yaml
> @@ -87,5 +87,7 @@ properties:
>        Delay, in microseconds, after a write transfer.
>  
>  # The controller specific properties go here.
> +allOf:
> +  - $ref: cdns,qspi-nor-slave-props.yaml#
>  
>  additionalProperties: true
> -- 
> 2.33.1.835.ge9e5ba39a7
> 
> 



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux