public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Cc: "Mark Brown" <broonie@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Marcelo Schmitt" <marcelo.schmitt@analog.com>,
	"Michael Hennerich" <michael.hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Sean Anderson" <sean.anderson@linux.dev>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH v4 5/9] spi: Documentation: add page on multi-lane support
Date: Thu, 8 Jan 2026 09:56:57 -0600	[thread overview]
Message-ID: <c93a528c-39d6-4e29-b64a-ecf75032b60d@baylibre.com> (raw)
In-Reply-To: <aV-mpFCF_ET3AZ1B@debian-BULLSEYE-live-builder-AMD64>

On 1/8/26 6:44 AM, Marcelo Schmitt wrote:
> Actually, one more thing ...
> 
> On 12/19, David Lechner wrote:
>> Add a new page to Documentation/spi/ describing how multi-lane SPI
>> support works. This is uncommon functionality so it deserves its own
>> documentation page.
>>
>> Signed-off-by: David Lechner <dlechner@baylibre.com>
>> ---
> ...
>> +- :c:macro:`SPI_MULTI_BUS_MODE_STRIPE`: Send or receive two different data words
>> +    at the same time, one on each lane. This means that the buffer needs to be
>> +    sized to hold data for all lanes. Data is interleaved in the buffer, with
>> +    the first word corresponding to lane 0, the second to lane 1, and so on.
>> +    Once the last lane is used, the next word in the buffer corresponds to lane
>> +    0 again. Accordingly, the buffer size must be a multiple of the number of
>> +    lanes. This mode works for both reads and writes.
>> +
>> +    Example::
>> +
>> +        struct spi_transfer xfer = {
>> +            .rx_buf = rx_buf,
>> +            .len = 2,
>> +            .multi_lane_mode = SPI_MULTI_BUS_MODE_STRIPE,
>> +        };
>> +
>> +        spi_sync_transfer(spi, &xfer, 1);
>> +
>> +    Each tx wire has a different data word sent simultaneously::
> In this example, the controller is reading data so the rx wires have different
> data word received?

Yes, I tried to make that clear below by having a different value
for each.
> 
>> +
>> +        controller    < data bits <     peripheral
>> +        ----------   ----------------   ----------
>> +            SDI 0    0-0-0-1-0-0-0-1    SDO 0
>> +            SDI 1    1-0-0-0-1-0-0-0    SDO 1
>> +
>> +    After the transfer, ``rx_buf[0] == 0x11`` (word from SDO 0) and
>> +    ``rx_buf[1] == 0x88`` (word from SDO 1).


  reply	other threads:[~2026-01-08 15:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 21:32 [PATCH v4 0/9] spi: add multi-lane support David Lechner
2025-12-19 21:32 ` [PATCH v4 1/9] spi: dt-bindings: change spi-{rx,tx}-bus-width to arrays David Lechner
2026-01-06 16:36   ` Rob Herring (Arm)
2026-01-08 12:26   ` Marcelo Schmitt
2026-01-11 11:52   ` Jonathan Cameron
2025-12-19 21:32 ` [PATCH v4 2/9] spi: dt-bindings: add spi-{tx,rx}-lane-map properties David Lechner
2025-12-19 22:40   ` Rob Herring (Arm)
2026-01-07 15:57   ` Rob Herring (Arm)
2026-01-08 12:29   ` Marcelo Schmitt
2026-01-08 14:40     ` Rob Herring
2025-12-19 21:32 ` [PATCH v4 3/9] spi: support controllers with multiple data lanes David Lechner
2025-12-27 15:16   ` Andy Shevchenko
2026-01-12 17:01     ` David Lechner
2025-12-27 17:18   ` Jonathan Cameron
2025-12-19 21:32 ` [PATCH v4 4/9] spi: add multi_lane_mode field to struct spi_transfer David Lechner
2025-12-27 15:14   ` Andy Shevchenko
2026-01-12 17:10     ` David Lechner
2025-12-19 21:32 ` [PATCH v4 5/9] spi: Documentation: add page on multi-lane support David Lechner
2026-01-08 12:40   ` Marcelo Schmitt
2026-01-08 15:57     ` David Lechner
2026-01-08 12:44   ` Marcelo Schmitt
2026-01-08 15:56     ` David Lechner [this message]
2026-01-08 16:43       ` Marcelo Schmitt
2026-01-08 17:22         ` David Lechner
2025-12-19 21:32 ` [PATCH v4 6/9] spi: dt-bindings: adi,axi-spi-engine: add " David Lechner
2026-01-06 16:36   ` Rob Herring (Arm)
2025-12-19 21:32 ` [PATCH v4 7/9] spi: axi-spi-engine: support SPI_MULTI_LANE_MODE_STRIPE David Lechner
2026-01-08 12:45   ` Marcelo Schmitt
2025-12-19 21:32 ` [PATCH v4 8/9] dt-bindings: iio: adc: adi,ad7380: add spi-rx-bus-width property David Lechner
2026-01-06 16:37   ` Rob Herring (Arm)
2025-12-19 21:32 ` [PATCH v4 9/9] iio: adc: ad7380: add support for multiple SPI lanes David Lechner
2026-01-08 12:46   ` Marcelo Schmitt
2026-01-11 11:57 ` [PATCH v4 0/9] spi: add multi-lane support Jonathan Cameron

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=c93a528c-39d6-4e29-b64a-ecf75032b60d@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=andy@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=marcelo.schmitt@analog.com \
    --cc=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=sean.anderson@linux.dev \
    /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