From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 302603E5A08 for ; Fri, 4 Sep 2026 20:47:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788554829; cv=none; b=DFBUsACpospREJehpZxowxSZp2bhmwGsUt8jKNmj2cysxRE0VxxBAD+7/MgFMRcTSzdnbnbOuzhwYhO16w+xiIAv8ElI3WnF+f/GoXk3wUEQDCFbR96rH307kO6SL6ImPqcUJnc5v/wvWp3+w6B4x0Z/ePf77nHAsIrrxFNVdJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788554829; c=relaxed/simple; bh=VqRTI1vSnxqFnngxsPxK1C9AC5MxqlqL7Rry6uCm37k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=l1zMfKvMc8g3ip3hBt0FA9ypLqV4ILXdt4YdDYCRkAvG7hnm0aypjiC5tMHrVlVhbrN/yo3MMLR6AX7P9duZlAGHjtxV8TBYlSKiIhUy5Dp7ZdiBCY/Y8xZClZHfktjNg7LIZJouX5Hdk1lJ3OpSba9FgWqO5VYuC9lR8/V0XgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XlFNGKSo; arc=none smtp.client-ip=209.85.128.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XlFNGKSo" Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-81f3b227a4aso21369277b3.1 for ; Fri, 04 Sep 2026 13:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788554824; x=1789159624; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=bt1HqSrLvYKEai7M5FJi0Yxz+CgX3DRE2Qu0CFMj0Ww=; b=XlFNGKSoL562DbhqLVPpHZYqOT4tW40WxfEqRe2KEMUaK7u47t8iprHFOWdz+dbRxP UqI7INtC1nEW/VOIzAtzsda7amhpZJ7mmphJuedYgVDQo3f53AxD60eAYtq7lbVEur/5 sE38ansDBhn9tDeARp+F1n3Rn+scZJEU119PAzy9gXiNxZ+DmAYhfHEL+ToBzNGsBJ+9 JsClHSyoWU3HDPPZW5aIjDTzaxprMwKGzomgmbD6HSMEkckpXJZdP7HG727ZTkvxxZQs fLyKLhhn/RtDDq+v218tAyyq2cT/phKnq7IQ2DNpXJLovXi0+18hczXWa/NnHUmaRTg2 ujpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788554824; x=1789159624; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=bt1HqSrLvYKEai7M5FJi0Yxz+CgX3DRE2Qu0CFMj0Ww=; b=KG0o+xDbqu7HeYtquaZKgYHXTYq1V9dDI5KusVTG1IXI6/WD2hMjZLkP2UWcZYTM1l 9huFlPOZwBc7soFgS2RsLuGZUqBF7Mh15wCHqLc1UojwRtjIxYfQwncmxlEvpv1JHpg/ 9LlxePkOYiUYcXNjb6ng94yj2cmrtd90zjdypw/ZGaiku8oYRzC1MhU/3fcJ13Nu3TC9 051yosDzfQAikxPvsxFNpfxcy+U2CoRmxaop+2p86FTgO2VeqtbMmIEO1j/rrnbkVnrI Yj+8ulStOMR7sWEo/pxzRQLVk58yMqsUFIFX/GZvBYHRkn9xGg6Vd4yCH/rIyvbel4xS ZiHA== X-Forwarded-Encrypted: i=1; AKwUvBzaK+xrraN9H7B/HCwZd0ExQA1zGAXPcr3tXI0blR7GsCnLbS1FzBrOM6vI6JZ8uMJ2zuRcOtsoHadOx0s=@vger.kernel.org X-Gm-Message-State: AFuF++nkfM8EOx/eZHnE/fg1z6QfAmQGA1y/dvCoSYmrKttjZlD5pBlF BDHOC6JxorMReqLS+L+RpxGjv6GDJlNxfhcajmv8THUR66lMpfkUUd54 X-Gm-Gg: AYBFou0/N0A0/ajnAAFc7g1UHU8s3hOoA9a7v6cgdG5/cJUdFpSaV5LdjgXtAymqszI KJjioMUm6PEcncExncoFuXZzUzTrzaauUPty65P0riJYRarCRkd3O5d93GlXnnmOuDmK0k3uZYf ohygxcRwt1v4l5JmFMHbr76T3hmlFmretAYnLz2egUWCYoVDZsply/1n+6jCp+Ljs67BnTBX4JT XDMzeXQNCd6xRpupUjmsxllMXhv3tUNjrArZRNM8HQdehHiNrY+5BPw1pzMuTd919fQcOpeGIP3 16kEj54zXDKWv5d6luImRF10LkogfjEhRLA9ywgjbNnwW7DGD/CLEN2kMVG3EwFEXA6iAy1J/gn K0M+ZxL3Y/yu5ohUHPTx3HcQfGuucgaKpcpU0MRYfz6HXBg6VVahpbbblp+9BkrHkT+PCQKEoQ4 fBzOg9hNzSnVRfs6eFmUCnE0tDjSnxmwpoNPQHtOk6Y4iVDiEs5dWZDRcXb1fCe2UfahzA X-Received: by 2002:a05:690c:5310:b0:873:5ddf:d865 with SMTP id 00721157ae682-8735ddfdac0mr10268087b3.48.1788554823272; Fri, 04 Sep 2026 13:47:03 -0700 (PDT) Received: from localhost ([2804:30c:94d:7300:da0f:c2c1:1aa6:43da]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8714a0ae915sm26231117b3.24.2026.09.04.13.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2026 13:47:02 -0700 (PDT) Date: Fri, 4 Sep 2026 17:47:56 -0300 From: Marcelo Schmitt To: Conor Dooley Cc: Marcelo Schmitt , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux@analog.com, jic23@kernel.org, nuno.sa@analog.com, dlechner@baylibre.com, andy@kernel.org, Michael.Hennerich@analog.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org Subject: Re: [PATCH v1 08/13] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode Message-ID: References: <20260903-liquefy-prologue-9ec914cccf04@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260903-liquefy-prologue-9ec914cccf04@spud> On 09/03, Conor Dooley wrote: > On Wed, Sep 02, 2026 at 02:24:02PM -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 > > --- > > .../bindings/iio/adc/adi,ad4134.yaml | 22 +++++++++++++++++++ > > 1 file changed, 22 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml > > index ea6d7e026419..d843c02a394a 100644 > > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml > > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml > > @@ -131,6 +131,28 @@ 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 ] > > + description: | > > + This property indicates the SPI wiring configuration. > > + > > + When this property is omitted, it is assumed that the device is using > > + 'no-cs' wiring. When this property is present, it indicates that the > > + device is using one of the following wiring configurations: > ... > I'd also really appreciate a dts example for a system > with one-channel-chain or two-channel-chain looks, given the second > device may require different supplies etc. I have no impression in my > head of how the dt would be constructed, so I'd like to see wht you have > in mind. I've added the daisy-chain modes for completeness. It has the same semantics of ad7944 (daisy-)chain, despite the wiring being different. It looks like the supplies for the chained devices are simply assumed to be there (unless I'm missing something?). Though, now that I'm checking how to configure AD4134 for daisy-chain, I'm not sure how we could set them in dt. For 3 devices, we would have spi { ... adc@0 { compatible = "adi,ad4134"; reg = <0>; spi-rx-bus-width = <1>, <1>; /* 2 lanes of 1 bit each */ #daisy-chained-devices = <2>; adi,spi-mode = "4-wire"; }; }; But, the peripheral needs a register write to set the DOUT lines to 2-line daisy-chain and it doesn't seem to have register access propagation. So, we would need spi { ... adc@0 { compatible = "adi,ad4134"; spi-rx-bus-width = <1>, <1>; /* 2 lanes of 1 bit each */ #daisy-chained-devices = <2>; adi,spi-mode = "4-wire"; }; adc@1 { compatible = "adi,ad4134"; adi,spi-mode = "4-wire"; }; adc@2 { compatible = "adi,ad4134"; adi,spi-mode = "4-wire"; }; }; with adc@1 and adc@2 only set for register access. Even if not a dt-doc issue, that might (probably) lead to interface issues. The top of the daisy-chain may want to read from the other ADCs, but those could also be requested by IIO sysfs operations. > > > + > > + * 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. > > + With best regards, Marcelo