From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"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>,
"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 v5 5/9] spi: Documentation: add page on multi-lane support
Date: Mon, 19 Jan 2026 10:11:16 +0000 [thread overview]
Message-ID: <20260119101116.00002664@huawei.com> (raw)
In-Reply-To: <ad688ba9-7771-4b64-a9d7-ec5100345460@baylibre.com>
On Fri, 16 Jan 2026 16:35:13 -0600
David Lechner <dlechner@baylibre.com> wrote:
> On 1/14/26 3:10 AM, Jonathan Cameron wrote:
> > On Mon, 12 Jan 2026 11:45:23 -0600
> > David Lechner <dlechner@baylibre.com> 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.
> >>
>
> ...
>
> >> +
> >> +For example, a dual-simultaneous-sampling ADC with two 4-bit lanes might be
> >> +wired up like this::
> >> +
> >> + +--------------+ +----------+
> >> + | SPI | | AD4630 |
> >> + | Controller | | ADC |
> >> + | | | |
> >> + | CS0 |--->| CS |
> >> + | SCK |--->| SCK |
> >> + | SDO |--->| SDI |
> >> + | | | |
> >> + | SDIA0 |<---| SDOA0 |
> >> + | SDIA1 |<---| SDOA1 |
> >> + | SDIA2 |<---| SDOA2 |
> >> + | SDIA3 |<---| SDOA3 |
> >> + | | | |
> >> + | SDIB0 |<---| SDOB0 |
> >> + | SDIB1 |<---| SDOB1 |
> >> + | SDIB2 |<---| SDOB2 |
> >> + | SDIB3 |<---| SDOB3 |
> >> + | | | |
> >> + +--------------+ +----------+
> >> +
> >> +It is described in a devicetree like this::
> >> +
> >> + spi {
> >> + compatible = "my,spi-controller";
> >> +
> >> + ...
> >> +
> >> + adc@0 {
> >> + compatible = "adi,ad4630";
> >> + reg = <0>;
> >> + ...
> >> + spi-rx-bus-width = <4>, <4>; /* 2 lanes of 4 bits each */
> >> + ...
> >> + };
> >> + };
>
>
> ...
>
> >> +properties are needed to provide a mapping between controller lanes and the
> >> +physical lane wires.
> >> +
> >> +Here is an example where a multi-lane SPI controller has each lane wired to
> >> +separate single-lane peripherals::
> >> +
> >> + +--------------+ +----------+
> >> + | SPI | | Thing 1 |
> >> + | Controller | | |
> >> + | | | |
> >> + | CS0 |--->| CS |
> >> + | SDO0 |--->| SDI |
> >> + | SDI0 |<---| SDO |
> >> + | SCLK0 |--->| SCLK |
> >> + | | | |
> >> + | | +----------+
> >> + | |
> >> + | | +----------+
> >> + | | | Thing 2 |
> >> + | | | |
> >> + | CS1 |--->| CS |
> >> + | SDO1 |--->| SDI |
> >> + | SDI1 |<---| SDO |
> >> + | SCLK1 |--->| SCLK |
> >> + | | | |
> >> + +--------------+ +----------+
> >> +
> >> +This is described in a devicetree like this::
> >> +
> >> + spi {
> >> + compatible = "my,spi-controller";
> >> +
> >> + ...
> >> +
> >> + thing1@0 {
> >> + compatible = "my,thing1";
> >> + reg = <0>;
> >> + ...
> >> + };
> >> +
> >> + thing2@1 {
> >> + compatible = "my,thing2";
> >> + reg = <1>;
> >> + ...
> >> + spi-tx-lane-map = <1>; /* lane 0 is not used, lane 1 is used for tx wire */
> >> + spi-rx-lane-map = <1>; /* lane 0 is not used, lane 1 is used for rx wire */
> >
> > Whilst simple I'd kind of expect a multi lane case as the example, or this and
> > the multilane one? For me the comment that follows is sufficient for the 1 lane
> > offset case you have here.
>
> I thought that is what I did. I have one example that shows multiple lanes (ADC)
> and one example that shows the map (Thing 1/2).
>
> But I guess you mean that you want a 3rd example that show both the map and
> multiple lanes at the same time?
Oops. No. I was arguing....
>
> I chose these two examples because they came from real-world use cases that
> drove adding this feature. We didn't have a real-world case yet that used
> both the map and multiple lanes at the same time so I didn't include that.
>
> >
> >> + ...
> >> + };
> >> + };
> >> +
> >> +
> >> +The default values of ``spi-rx-bus-width`` and ``spi-tx-bus-width`` are ``<1>``,
> >> +so these properties can still be omitted even when ``spi-rx-lane-map`` and
> >> +``spi-tx-lane-map`` are used.
This comment is enough to allow you to drop the first example entirely and
just have the 2nd.
Jonathan
> >
> >
> >
>
>
>
next prev parent reply other threads:[~2026-01-19 10:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 17:45 [PATCH v5 0/9] spi: add multi-lane support David Lechner
2026-01-12 17:45 ` [PATCH v5 1/9] spi: dt-bindings: change spi-{rx,tx}-bus-width to arrays David Lechner
2026-01-12 17:45 ` [PATCH v5 2/9] spi: dt-bindings: add spi-{tx,rx}-lane-map properties David Lechner
2026-01-14 8:57 ` Jonathan Cameron
2026-01-12 17:45 ` [PATCH v5 3/9] spi: support controllers with multiple data lanes David Lechner
2026-01-12 19:07 ` Andy Shevchenko
2026-01-12 19:11 ` Mark Brown
2026-01-12 19:35 ` Andy Shevchenko
2026-01-16 23:12 ` David Lechner
2026-01-19 7:44 ` Andy Shevchenko
2026-01-14 9:05 ` Jonathan Cameron
2026-01-16 22:20 ` David Lechner
2026-01-12 17:45 ` [PATCH v5 4/9] spi: add multi_lane_mode field to struct spi_transfer David Lechner
2026-01-14 9:06 ` Jonathan Cameron
2026-01-12 17:45 ` [PATCH v5 5/9] spi: Documentation: add page on multi-lane support David Lechner
2026-01-14 9:10 ` Jonathan Cameron
2026-01-16 22:35 ` David Lechner
2026-01-19 10:11 ` Jonathan Cameron [this message]
2026-01-23 20:00 ` David Lechner
2026-01-12 17:45 ` [PATCH v5 6/9] spi: dt-bindings: adi,axi-spi-engine: add " David Lechner
2026-01-14 9:11 ` Jonathan Cameron
2026-01-12 17:45 ` [PATCH v5 7/9] spi: axi-spi-engine: support SPI_MULTI_LANE_MODE_STRIPE David Lechner
2026-01-14 9:16 ` Jonathan Cameron
2026-01-16 22:43 ` David Lechner
2026-01-12 17:45 ` [PATCH v5 8/9] dt-bindings: iio: adc: adi,ad7380: add spi-rx-bus-width property David Lechner
2026-01-12 17:45 ` [PATCH v5 9/9] iio: adc: ad7380: add support for multiple SPI lanes David Lechner
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=20260119101116.00002664@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=andy@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--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.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