Devicetree
 help / color / mirror / Atom feed
From: Jisheng Zhang <jszhang@kernel.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] spi: dt-bindings: cdns,xspi: add sdma-io-width
Date: Wed, 20 May 2026 20:17:07 +0800	[thread overview]
Message-ID: <ag2mQzz0tBQBmc4O@xhacker> (raw)
In-Reply-To: <14719378-7bf5-4688-81e9-bccedf618d18@kernel.org>

On Wed, May 20, 2026 at 02:16:21PM +0200, Krzysztof Kozlowski wrote:
> On 20/05/2026 13:48, Jisheng Zhang wrote:
> > On Wed, May 20, 2026 at 09:09:55AM +0200, Krzysztof Kozlowski wrote:
> >> On 20/05/2026 01:38, Jisheng Zhang wrote:
> >>> On Fri, May 15, 2026 at 10:00:50AM +0200, Krzysztof Kozlowski wrote:
> >>>> On Mon, May 11, 2026 at 11:17:31AM +0800, Jisheng Zhang wrote:
> >>>>> The cdns xspi controller SDMA data port may support wider I/O width.
> >>>>> Wider I/O width can benefit performance. A simple test with QSPI nor
> >>>>> flash on one arm64 platform:
> >>>>>
> >>>>> 1 byte io width (default):
> >>>>>  # dd if=/dev/mtdblock0 of=/dev/null bs=8192 count=1000
> >>>>>  1000+0 records in
> >>>>>  1000+0 records out
> >>>>>  8192000 bytes (7.8MB) copied, 1.368735 seconds, 5.7MB/s
> >>>>>
> >>>>> 4 bytes io width:
> >>>>>  # dd if=/dev/mtdblock0 of=/dev/null bs=8192 count=1000
> >>>>>  1000+0 records in
> >>>>>  1000+0 records out
> >>>>>  8192000 bytes (7.8MB) copied, 1.088787 seconds, 7.2MB/s
> >>>>>
> >>>>> Improved by 26.3%!
> >>>>>
> >>>>> Add dt binding for sdma-io-width.
> >>>>>
> >>>>> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> >>>>> ---
> >>>>>  Documentation/devicetree/bindings/spi/cdns,xspi.yaml | 6 ++++++
> >>>>>  1 file changed, 6 insertions(+)
> >>>>>
> >>>>> diff --git a/Documentation/devicetree/bindings/spi/cdns,xspi.yaml b/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
> >>>>> index 38a5795589de..1fd4b6dfd417 100644
> >>>>> --- a/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
> >>>>> +++ b/Documentation/devicetree/bindings/spi/cdns,xspi.yaml
> >>>>> @@ -40,6 +40,12 @@ properties:
> >>>>>    interrupts:
> >>>>>      maxItems: 1
> >>>>>  
> >>>>> +  sdma-io-width:
> >>>>> +    description: Slave DMA data port I/O width (in bytes)
> >>>>
> >>>> Waht is SDMA? What is Slave DMA? The same?
> >>>>
> >>>> Why this cannot be deduced from the compatible? DMA is fixed per
> >>>> platform and SDMA do not sound like SPI device (so slave in older
> >>>> terminology) property.
> >>>
> >>> in cdns xspi, sdma == slave dma. It can be read by any master, such
> >>> as DMA engine or CPU. Its purpose and usage is similar as the data
> >>> reg in other spi controllers, e.g the DW_SPI_DR in dw spi. 
> >>
> >> You did not really answer the questions.
> >>
> > 
> > If you mean "Why this cannot be deduced from the compatible?", I think
> > the slave dma port is part of the cdns xspi, so its io width belongs
> > to xSPI device property.
> > From another side, we have seen such property in other drivers such as
> > the reg-io-width for the dw spi DW_SPI_DR port io width.
> 
> So you mean it depends on SPI device? Then why spi-peripheral-props is

Nope, it depends on the spi controller itself.

> not applicable here?
> 
> If this is not bus width, but DMA-something, is not really then SPI
> device dependent, but rather DMA controller limitation, so either

The "sdma" name is a bit misleading but that's from the hw. It's
a data io port in fact. Any SPI controller has this data io reg or
port. It's not DMA controller at all. IMHO, what io width
may be supported is determined by the setting during IP configuration. 

So from this point of view, is it SPI controller property?

> deducible from compatible or something else is missing here.
> 
> Argument that some drivers do that is obviously wrong, so I am jumping
> there.
> 
> Best regards,
> Krzysztof

  reply	other threads:[~2026-05-20 12:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11  3:17 [PATCH 0/2] spi: cadence-xspi: support 4bytes sdma-io-width Jisheng Zhang
2026-05-11  3:17 ` [PATCH 1/2] spi: dt-bindings: cdns,xspi: add sdma-io-width Jisheng Zhang
2026-05-11 22:52   ` sashiko-bot
2026-05-15  8:00   ` Krzysztof Kozlowski
2026-05-19 23:38     ` Jisheng Zhang
2026-05-20  7:09       ` Krzysztof Kozlowski
2026-05-20 11:48         ` Jisheng Zhang
2026-05-20 12:16           ` Krzysztof Kozlowski
2026-05-20 12:17             ` Jisheng Zhang [this message]
2026-05-20 12:30             ` Mark Brown
2026-05-20 13:22               ` Krzysztof Kozlowski
2026-05-20 13:18                 ` Jisheng Zhang
2026-05-20 14:21                   ` Krzysztof Kozlowski
2026-05-11  3:17 ` [PATCH 2/2] spi: cadence-xspi: support 4bytes sdma-io-width Jisheng Zhang
2026-05-11 23:18   ` sashiko-bot

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=ag2mQzz0tBQBmc4O@xhacker \
    --to=jszhang@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.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