mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: "Nuno Sá" <noname.nuno@gmail.com>,
	"Janani Sunil" <janani.sunil@analog.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Marius Cristea" <marius.cristea@microchip.com>,
	"Marcus Folkesson" <marcus.folkesson@gmail.com>,
	"Kent Gustavsson" <kent@minoris.se>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	"Janani Sunil" <jan.sun97@gmail.com>,
	linux-spi@vger.kernel.org, "Kent Gustavsson" <nedo80@gmail.com>
Subject: Re: [PATCH v6 1/5] spi: dt-bindings: Add spi-device-addr peripheral property
Date: Thu, 16 Jul 2026 18:06:13 +0100	[thread overview]
Message-ID: <20260716-stole-copious-7cdaacb6cef6@spud> (raw)
In-Reply-To: <0e3e45fe-4c34-45d0-b985-0938f60b5914@sirena.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1961 bytes --]

On Thu, Jul 16, 2026 at 01:28:15PM +0100, Mark Brown wrote:
> On Thu, Jul 16, 2026 at 11:22:19AM +0200, Nuno Sá wrote:
> > On Wed, Jul 15, 2026 at 02:37:12PM +0100, Mark Brown wrote:
> 
> > > You still need to work out how the ID appears in the byte stream that
> > > gets sent to/from the device, that's way more information than just a
> > > number and not something the byte stream SPI offers is going to cope
> > > well with.
> 
> > Not sure if I'm following you. Those ID pins just become something you
> > need to set on the spi_xfer. Or in Janani case, she's using regmap
> > reg_base in order to set the right thing depending on the address. I
> > would image this is always something that peripherals need to address in
> > terms of how the message/stream needs to be set. So my understanding is
> > that this should be pretty much transparent for the spi core.
> 
> Oh, isn't that just multi-pin chip selects then:
> 
>    https://patch.msgid.link/cover.1783729282.git.Jonathan.Santos@analog.com

No, I think that's something different.

In this case, there is one chip select that all instances of the device
share. Both the ADI and Microchip devices then use the upper bits of the
first/address byte during reads and write to access individual devices.
In the microchip case that I'm familiar with, what upper bits the device
responds to are set by fuses in the factory. They also share the same MOSI
and MISO.

https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP3911-3.3V-Two-Channel-Analog-Front-End-DS20002286D.pdf
(See Figure 6-1 and section 6.2 on page 43)

The SPI core already supports two of these devices from Microchip, since
it just modifies the contents of tx_buf in a spi_transfer.

What Jonathan is working on seems to be a setup where they have multiple
instances of a device with their own chip selects and their own MISO, but
a shared SCLK and MOSI.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-07-16 17:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 11:41 [PATCH v6 0/5] iio: dac: Add support for AD5529R DAC Janani Sunil
2026-07-15 11:41 ` [PATCH v6 1/5] spi: dt-bindings: Add spi-device-addr peripheral property Janani Sunil
2026-07-15 13:09   ` Mark Brown
2026-07-15 13:29     ` Nuno Sá
2026-07-15 13:37       ` Mark Brown
2026-07-16  9:22         ` Nuno Sá
2026-07-16 12:28           ` Mark Brown
2026-07-16 17:06             ` Conor Dooley [this message]
2026-07-17 11:51               ` Mark Brown
2026-07-17 13:52                 ` Nuno Sá
2026-07-15 11:41 ` [PATCH v6 2/5] dt-bindings: iio: adc: microchip,mcp3564: Add spi-device-addr Janani Sunil
2026-07-15 11:41 ` [PATCH v6 3/5] dt-bindings: iio: adc: microchip,mcp3911: " Janani Sunil
2026-07-15 11:41 ` [PATCH v6 4/5] dt-bindings: iio: dac: Add AD5529R Janani Sunil
2026-07-15 11:41 ` [PATCH v6 5/5] iio: dac: Add AD5529R DAC driver support Janani Sunil
2026-07-15 22:22   ` Uwe Kleine-König

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=20260716-stole-copious-7cdaacb6cef6@spud \
    --to=conor@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jan.sun97@gmail.com \
    --cc=janani.sunil@analog.com \
    --cc=jic23@kernel.org \
    --cc=kent@minoris.se \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marcus.folkesson@gmail.com \
    --cc=marius.cristea@microchip.com \
    --cc=nedo80@gmail.com \
    --cc=noname.nuno@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.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