Re: [PATCH v3 08/13] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode

From: Rob Herring

Date: Wed Sep 30 2026 - 08:17:41 EST


On Tue, Sep 29, 2026 at 07:44:22PM -0300, Marcelo Schmitt wrote:
> Document how AD4134 chips are connected to the host SPI controller
> according to different wiring configurations.
>
> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
> ---
> Change log v2 -> v3:
> - Adjusted spi-rx-bus-width constraints.
>
> Unfortunately, I missed SPI connection mode properties when introducing AD4134
> dt-doc and the device driver defaulted to a no-CS configuration. Due to that,
> conventional 4-wire mode can't be made default without leading to a regression.
> Still, updating the SPI mode default to 4-wire is a sensible thing to do later
> on if acceptable.
>
> .../bindings/iio/adc/adi,ad4134.yaml | 51 ++++++++++++++++---
> 1 file changed, 44 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml
> index ea6d7e026419..0b2a2cbfadae 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml
> @@ -131,6 +131,26 @@ properties:
> enum: [ free-running, gated ]
> default: gated
>
> + adi,spi-mode:
> + $ref: /schemas/types.yaml#/definitions/string
> + enum: [ no-cs, 4-wire, one-channel-chain, two-channel-chain ]
> + default: no-cs
> + description: |
> + This property indicates the SPI wiring configuration.
> + * no-cs: The datasheet calls this "minimum I/O mode". In this mode, the CS
> + line is not used (tied to GND).
> + * 4-wire: Specifies a conventional SPI wiring configuration.
> + * one-channel-chain: In this mode, the DOUT0 line of one chip is connected
> + to DOUT2 of the next chip upstream in the chain. Only the data interface
> + of the upmost device in the stream is in direct connection with the
> + digital host.
> + * two-channel-chain: In this mode, the DOUT0 and DOUT1 lines of one chip
> + are respectively connected to DOUT2 and DOUT3 of the next chip upstream
> + in the chain. Only the data interface of the upmost device in the stream
> + is in direct connection with the digital host.
> +
> + '#daisy-chained-devices': true
> +
> required:
> - compatible
> - reg
> @@ -141,13 +161,30 @@ required:
> - clocks
> - clock-names
>
> -oneOf:
> - - required:
> - - ldoin-supply
> - - required:
> - - avdd1v8-supply
> - - dvdd1v8-supply
> - - clkvdd-supply
> +allOf:
> + - oneOf:
> + - required:
> + - ldoin-supply
> + - required:
> + - avdd1v8-supply
> + - dvdd1v8-supply
> + - clkvdd-supply
> +
> + - oneOf:
> + - required: [adi,spi-mode, '#daisy-chained-devices']
> + properties:
> + adi,spi-mode:
> + const: one-channel-chain
> + spi-rx-bus-width:
> + const: 1
> + - required: [adi,spi-mode, '#daisy-chained-devices']
> + properties:
> + adi,spi-mode:
> + const: two-channel-chain
> + spi-rx-bus-width:
> + const: 1, 1

This is not valid. I think it evaluates to a string. You want:

items:
- const: 1
- const: 1

Rob