From: David Lechner <dlechner@baylibre.com>
To: "Nuno Sá" <nuno.sa@analog.com>
Cc: Jonathan Santos <Jonathan.Santos@analog.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
michael.hennerich@analog.com, broonie@kernel.org,
jonath4nns@gmail.com, marcelo.schmitt1@gmail.com,
andriy.shevchenko@intel.com
Subject: Re: [PATCH v3 1/6] dt-bindings: iio: adc: ad7768-1: Document multidevice support
Date: Tue, 18 Aug 2026 10:26:58 -0500 [thread overview]
Message-ID: <1c0fe275-3358-49ab-a238-7eb89127cce8@baylibre.com> (raw)
In-Reply-To: <aoR1Uo2W5BtiYRSY@nsa>
On 8/18/26 10:14 AM, Nuno Sá wrote:
> On Tue, Aug 18, 2026 at 10:02:50AM -0500, David Lechner wrote:
>> On 8/17/26 6:32 PM, Jonathan Santos wrote:
>>> The AD7768-1 family supports aggregating up to four devices on a single
>>> SPI controller, with each device occupying a dedicated CS line and a
>>> single data lane.
>>>
>>> Extend the `reg` property to accept up to 4 entries (one per device).
>>>
>>> Add `spi-rx-bus-width` property to declare the per-device lane count.
>>> Since each lane is bound to one CS, the number of entries must match
>>> `reg`. Make it required when `reg` has more than one entry.
>>>
>> I don't see why we should have to require the spi-rx-bus-width property.
>> It seems logical that if it is not present, then we would assume one
>> lane per CS. This is already how bindings work.
>>
>> For example, adi,ad4080 and ge,achc have multiple CS lines and don't
>> require any bus width properties.
>
> Hmm that's my default then! I was the one requesting it. Basically
> because of:
>
> https://elixir.bootlin.com/linux/v7.2/source/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml#L76
>
> So I thought that $refing spi-peripheral-props.yaml and leaving the
> default value would make dtbs_check to fail if one used
>
> spi-rx-bus-width = <1>, <1>, <1>, <1>;
>
> in DT.
>
> Won't it fail?
>
> And if we don't give the property I believe we'll have:
>
> https://elixir.bootlin.com/linux/v7.2/source/drivers/spi/spi.c#L2509
>
> And given these series assumption of spi->num_rx_lanes == number of
> devices (which I don't agree btw), I thought we would need to make
> spi-rx-bus-width explicit in our bindings! I still think but I might be
> wrong and I'm by no means an expert on dt bindings schemas work :)
>
> - Nuno Sá
>
>>
Now that I'm reading the later patches again, it is jogging my memory.
I forgot that we want this to operate like a single multi-lane device
when reading data.
So for that part, yes, having spi-rx-bus-width kind of makes sense.
And I'm thinking that we might need a new property to indicate that
this should be treated as a composite device rather than main + 3
auxiliary. I'll reply more about that in a later patch.
next prev parent reply other threads:[~2026-08-18 15:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 23:32 [PATCH v3 0/6] spi: add multi-CS and multi-chip aggregation support Jonathan Santos
2026-08-17 23:32 ` [PATCH v3 1/6] dt-bindings: iio: adc: ad7768-1: Document multidevice support Jonathan Santos
2026-08-18 6:46 ` Krzysztof Kozlowski
2026-08-18 13:35 ` David Lechner
2026-08-18 15:02 ` David Lechner
2026-08-18 15:14 ` Nuno Sá
2026-08-18 15:26 ` David Lechner [this message]
2026-08-17 23:32 ` [PATCH v3 2/6] spi: support simultaneous assertion of multiple CS Jonathan Santos
2026-08-18 6:39 ` Andy Shevchenko
2026-08-18 16:06 ` David Lechner
2026-08-22 0:10 ` Jonathan Santos
2026-09-02 20:13 ` David Lechner
2026-08-17 23:32 ` [PATCH v3 3/6] spi: expand device name to include all CS lines for multi-CS devices Jonathan Santos
2026-08-18 6:45 ` Andy Shevchenko
2026-08-18 16:14 ` Nuno Sá
2026-08-19 6:59 ` Andy Shevchenko
2026-08-17 23:33 ` [PATCH v3 4/6] spi: introduce SPI ancillary device with lanes Jonathan Santos
2026-08-18 6:53 ` Andy Shevchenko
2026-08-17 23:33 ` [PATCH v3 5/6] spi: spi-engine-ex: Add support for multi-CS devices Jonathan Santos
2026-08-18 7:01 ` Andy Shevchenko
2026-08-17 23:33 ` [PATCH v3 6/6] iio: adc: ad7768-1: add support for multiple chip aggregation Jonathan Santos
2026-08-18 7:10 ` Andy Shevchenko
2026-08-18 16:17 ` Nuno Sá
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=1c0fe275-3358-49ab-a238-7eb89127cce8@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Jonathan.Santos@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=broonie@kernel.org \
--cc=jonath4nns@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=marcelo.schmitt1@gmail.com \
--cc=michael.hennerich@analog.com \
--cc=nuno.sa@analog.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®