[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220526054642.zw44mgw2bd2u5v76@ti.com>
Date: Thu, 26 May 2022 11:16:42 +0530
From: Pratyush Yadav <p.yadav@...com>
To: Rob Herring <robh@...nel.org>
CC: Serge Semin <fancer.lancer@...il.com>,
Mark Brown <broonie@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
<linux-spi@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] spi: dt-bindings: Move 'rx-sample-delay-ns' to
spi-peripheral-props.yaml
Hi Rob,
On 25/05/22 04:00PM, Rob Herring wrote:
> SPI bus per device properties must be defined in spi-peripheral-props.yaml
> for unevaluatedProperties checks to work correctly on device nodes.
>
> This has the side effect of promoting 'rx-sample-delay-ns' to be a
> common property, but functionally it's no different if it was defined in
> a Synopsys specific schema file.
Functionally it is no different, but does this property make sense for
other controllers? If not then I don't see why we should pollute the
common list with controller-specific ones. For one, this now no longer
makes it obvious that this property should only be used with the
Synopsys controller. And if you keep making small exceptions for other
controllers too, soon the common list will be full of controller
properties and it will be a mess finding out what belongs to who.
>
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
> .../bindings/spi/snps,dw-apb-ssi.yaml | 18 +++++++++---------
> .../bindings/spi/spi-peripheral-props.yaml | 5 +++++
> 2 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> index d7e08b03e204..e25d44c218f2 100644
> --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> @@ -124,9 +124,16 @@ properties:
>
> rx-sample-delay-ns:
> default: 0
> - description: Default value of the rx-sample-delay-ns property.
> + description: |
> + Default value of the rx-sample-delay-ns property.
> This value will be used if the property is not explicitly defined
> - for a SPI slave device. See below.
> + for a SPI slave device.
> +
> + SPI Rx sample delay offset, unit is nanoseconds.
> + The delay from the default sample time before the actual sample of the
> + rxd input signal occurs. The "rx_sample_delay" is an optional feature
> + of the designware controller, and the upper limit is also subject to
> + controller configuration.
>
> patternProperties:
> "^.*@[0-9a-f]+$":
> @@ -142,13 +149,6 @@ patternProperties:
> spi-tx-bus-width:
> const: 1
>
> - rx-sample-delay-ns:
> - description: SPI Rx sample delay offset, unit is nanoseconds.
> - The delay from the default sample time before the actual
> - sample of the rxd input signal occurs. The "rx_sample_delay"
> - is an optional feature of the designware controller, and the
> - upper limit is also subject to controller configuration.
> -
> unevaluatedProperties: false
>
> required:
> diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> index 5e32928c4fc3..6ffb74352bef 100644
> --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
> @@ -71,6 +71,11 @@ properties:
> description:
> Delay, in microseconds, after a read transfer.
>
> + rx-sample-delay-ns:
> + description: SPI Rx sample delay offset, unit is nanoseconds.
> + The delay from the default sample time before the actual
> + sample of the rxd input signal occurs.
> +
> spi-tx-bus-width:
> description:
> Bus width to the SPI bus used for write transfers.
> --
> 2.34.1
>
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
Powered by blists - more mailing lists