mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>,
	Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	andersson@kernel.org, konradybcio@kernel.org
Subject: Re: [PATCH V1] spi: Add support for Double Transfer Rate (DTR) mode
Date: Wed, 26 Mar 2025 14:48:50 +0000	[thread overview]
Message-ID: <fbad733f-d034-4d63-ab82-ed867f0ed5d4@linaro.org> (raw)
In-Reply-To: <c89603b7-b70c-4b55-ac87-f84ce5be2c6c@quicinc.com>



On 3/26/25 2:25 PM, Mukesh Kumar Savaliya wrote:
> Hi Mark, thanks for your comment.
> 
> On 3/26/2025 6:34 PM, Mark Brown wrote:
>> On Wed, Mar 26, 2025 at 02:09:54PM +0530, Mukesh Kumar Savaliya wrote:
>>
>>> This change introduces a new field `dtr_mode` in the `spi_transfer`
>>> structure. The `dtr_mode` field allows protocol drivers to indicate if
>>> Double Transfer Rate (DTR) mode is supported for a given transfer. When
>>> `dtr_mode` is set to true, the SPI controller will use DTR mode
>>> otherwise, it will default to single transfer mode.
>>
>>> The QSPI controller driver uses this flag and configures single or
>>> double
>>> transfer rate using the controller register.
>>
>> We should have a flag in the controller indicating if it supports this,
>> and code in the core which returns an error if a driver attempts to use
>> it when the controller doesn't support it.
> Have added below in spi.h which can be set by client and controller
> driver should be using it to decide mode.
> 
> + bool        dtr_mode;
> 
> since default it's false, should continue with SDR.
> I believe for QSPI, it supports SDR or DDR, but it's not applicable to
> standard SPI right ? So not sure in which case we should return an error ?
> 

Please check how spimem is dealing with DTR, same ideas shall be applied
for spi transfers.

Cheers,
ta

  parent reply	other threads:[~2025-03-26 14:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26  8:39 Mukesh Kumar Savaliya
2025-03-26  9:21 ` Jyothi Kumar Seerapu
2025-03-26 12:55   ` Konrad Dybcio
2025-03-26 13:04 ` Mark Brown
2025-03-26 14:25   ` Mukesh Kumar Savaliya
2025-03-26 14:42     ` Mark Brown
2025-03-27 10:03       ` Mukesh Kumar Savaliya
2025-03-27 14:07         ` Mark Brown
2025-04-04 13:53           ` Mukesh Kumar Savaliya
2025-03-26 14:48     ` Tudor Ambarus [this message]
2025-03-27 10:10       ` Mukesh Kumar Savaliya

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=fbad733f-d034-4d63-ab82-ed867f0ed5d4@linaro.org \
    --to=tudor.ambarus@linaro.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=quic_msavaliy@quicinc.com \
    /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

all inboxes | Powered by JetHome®