linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: han.xu@nxp.com, broonie@kernel.org, dev@kicherer.org,
	devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org,
	linux-spi@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH 1/2] spi: dt-bindings: spi-fsl-qspi: add optional sampling-delay
Date: Wed, 18 Jan 2023 09:51:21 +0100	[thread overview]
Message-ID: <30a7f1174b5c16f4f6c86eb8b25fba7a@walle.cc> (raw)
In-Reply-To: <2a684f19-6749-ddb0-6e32-4ffe35269cb3@linaro.org>

>>>>> unfortunately, the rx-sample-delay-ns property does not fit here, 
>>>>> as we
>>>>> can only delay
>>>>> the sampling point between zero and three "half cycles" (or edges), 
>>>>> not
>>>>> by an arbitrary
>>>>> number of nanoseconds.
>>>> 
>>>> Why this is a problem for FSL but not for other platforms having 
>>>> exactly
>>>> the same constraints/property?
>>> 
>>> Please use the common delay in DT and calculate to half cycle in 
>>> driver, we have
>>> the similar discussion before for fspi controller delay settings.
>> 
>> Do you mean [1]? There my suggestion was to use a -degrees property 
>> (because
>> it doesn't depend on the frequency). There wasn't any follow-up, or 
>> did I miss
>> something?
>> 
>> -michael
>> 
>> [1] 
>> https://lore.kernel.org/linux-spi/62f113a0cdb0d58bf04ab0b274912eb7@walle.cc/
> 
> I think the patch using existing ns property (and calculating cycles or
> phase shift or whatever was needed) was merged. In such case please go
> the same way.

I couldn't find anything that the fspi driver now supports this delay.

I still think this is the wrong way to go. Like I said, it depends on
the frequency, which means that you need to change the delay-ns property
everytime you change the frequency. Think of a bootloader which patches
the frequency (or something like that). But what's worse is that you
cannot have an enum in the binding for this property then.

Now OTOH, you could actually have a hardware which take the
delay as a time period, in that case this -delay-ns makes sense
and recalculating that into -degrees would be impossible.

Are there standard properties which expresses the same, but just in a
different way? Like for example drive strength as an impedance or in
current at a specific voltage. But having two different properties for
the same thing might be just as bad..

-michael

  reply	other threads:[~2023-01-18  9:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 11:50 [PATCH 0/2] spi: spi-fsl-qspi: support setting sampling delay through devicetree Mario Kicherer
2023-01-16 11:50 ` [PATCH 1/2] spi: dt-bindings: spi-fsl-qspi: add optional sampling-delay Mario Kicherer
2023-01-16 16:36   ` Rob Herring
2023-01-17 14:10   ` Rob Herring
2023-01-17 16:33     ` Mario Kicherer
2023-01-17 17:10       ` Krzysztof Kozlowski
2023-01-17 21:05         ` han.xu
2023-01-18  8:01           ` Michael Walle
2023-01-18  8:03             ` Krzysztof Kozlowski
2023-01-18  8:51               ` Michael Walle [this message]
2023-01-18 14:58           ` Mario Kicherer
2023-01-16 11:50 ` [PATCH 2/2] spi: spi-fsl-qspi: support setting sampling delay through devicetree Mario Kicherer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30a7f1174b5c16f4f6c86eb8b25fba7a@walle.cc \
    --to=michael@walle.cc \
    --cc=broonie@kernel.org \
    --cc=dev@kicherer.org \
    --cc=devicetree@vger.kernel.org \
    --cc=han.xu@nxp.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).