From: Jonathan Santos <Jonathan.Santos@analog.com>
To: <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Jonathan Santos <Jonathan.Santos@analog.com>,
<dlechner@baylibre.com>, <nuno.sa@analog.com>,
<michael.hennerich@analog.com>, <broonie@kernel.org>,
<jonath4nns@gmail.com>, <marcelo.schmitt1@gmail.com>,
<andriy.shevchenko@intel.com>
Subject: [PATCH v3 1/6] dt-bindings: iio: adc: ad7768-1: Document multidevice support
Date: Mon, 17 Aug 2026 20:32:28 -0300 [thread overview]
Message-ID: <d19a27738ac13307191dd09cd4a3ac5df7f7ba32.1786973376.git.Jonathan.Santos@analog.com> (raw)
In-Reply-To: <cover.1786973376.git.Jonathan.Santos@analog.com>
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.
Add an example for a four ADAQ7768-1 aggregation, with shared DRDY and
SYNC_IN pin.
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
---
Changes in v3:
* New patch.
---
.../bindings/iio/adc/adi,ad7768-1.yaml | 78 ++++++++++++++++++-
1 file changed, 77 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
index dfa2d7fa9fb3..804793a56d1d 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
@@ -26,7 +26,10 @@ properties:
- adi,adaq7769-1
reg:
- maxItems: 1
+ minItems: 1
+ maxItems: 4
+ description:
+ Chip select number. For multi-device setups, one entry per device.
clocks:
maxItems: 1
@@ -109,6 +112,12 @@ properties:
reset-gpios:
maxItems: 1
+ spi-rx-bus-width:
+ description:
+ Bus width per CS. For multi-device setups (multiple reg entries), one
+ entry per device must be provided. Required when reg has more than
+ one entry.
+
spi-cpol: true
spi-cpha: true
@@ -203,6 +212,15 @@ allOf:
properties:
pga-gpios: false
+ # spi-rx-bus-width is required for multi-device setups
+ - if:
+ properties:
+ reg:
+ minItems: 2
+ then:
+ required:
+ - spi-rx-bus-width
+
unevaluatedProperties: false
examples:
@@ -244,4 +262,62 @@ examples:
};
};
};
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/iio/adc/adi,ad7768-1.h>
+ /*
+ * Four ADAQ7768-1 devices aggregated on a single SPI controller.
+ * Each device occupies one CS and one data lane; DRDY and SYNC_IN
+ * pins are wired together across all four devices.
+ */
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ adc@0 {
+ compatible = "adi,adaq7768-1";
+ reg = <0>, <1>, <2>, <3>;
+ spi-max-frequency = <2000000>;
+ spi-rx-bus-width = <1>, <1>, <1>, <1>;
+ spi-cpol;
+ spi-cpha;
+ vref-supply = <&adc_vref>;
+ pga-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>,
+ <&gpio 11 GPIO_ACTIVE_HIGH>,
+ <&gpio 12 GPIO_ACTIVE_HIGH>;
+ interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+ interrupt-parent = <&gpio>;
+ #trigger-source-cells = <1>;
+ adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ clocks = <&ad7768_mclk>;
+ clock-names = "mclk";
+ gpio-controller;
+ #gpio-cells = <2>;
+ #io-channel-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@0 {
+ reg = <0>;
+ label = "channel_0";
+ };
+
+ channel@1 {
+ reg = <1>;
+ label = "channel_1";
+ };
+
+ channel@2 {
+ reg = <2>;
+ label = "channel_2";
+ };
+
+ channel@3 {
+ reg = <3>;
+ label = "channel_3";
+ };
+ };
+ };
...
--
2.34.1
next prev parent reply other threads:[~2026-08-17 23:32 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 ` Jonathan Santos [this message]
2026-08-18 6:46 ` [PATCH v3 1/6] dt-bindings: iio: adc: ad7768-1: Document multidevice support 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
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=d19a27738ac13307191dd09cd4a3ac5df7f7ba32.1786973376.git.Jonathan.Santos@analog.com \
--to=jonathan.santos@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=broonie@kernel.org \
--cc=dlechner@baylibre.com \
--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®