Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3841731rdb; Mon, 11 Dec 2023 01:13:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpK/WAMapAI4J/5S/zxKVRgR+B/kIxfL0E0p0RkHKmdj+sin6etR/omG534v/O31RUbsr1 X-Received: by 2002:a17:90b:47ce:b0:286:94b0:b680 with SMTP id kc14-20020a17090b47ce00b0028694b0b680mr2922407pjb.27.1702286017350; Mon, 11 Dec 2023 01:13:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286017; cv=none; d=google.com; s=arc-20160816; b=OdwLm2CjBJpWyW0w9XtBtXUxcJnHGqD4FHBnsNHjukFsOhwN9Zzsc0CP/Q5q71ECmV q6WE+ENuaW1vQUrL+wI6FngT1EqDS/yCztuDRWzRlEtRBk+2NSMTMBsVRrqlCGWc8bOL E3+sGc3ldBnFSA3RQbuV7DzeUwCInwrK+d1tMI4XVU6dxKbi3kYCQEpuQB011MOSeyDm n7Mc+PuHAIDcmWRhmXSTYW8jG+Uu52p1IdctpS/7vwUoM3PHWXcQbaO4hMiV3nw81K3L swmO6iR5LpFchJ7NwDIUjHJnFolFJIlYpkaPOrGpgLk4urV8B5Qar2Q72v1pA8m2UYf+ fYMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=pMuq41y0q5sJqso/AUvyl7ZAzaKQVaVlE4PNh5IKGB8=; fh=qpWsUIdLTgzOXbAbLTkCZ40KMC6YjLs20PzUQcFPIew=; b=lc3rUSRwXc7PQ727KWZFdulmWv0E+iIQHOzFN9gmUFsos/mtoWY6RcvpmWiJ+Vp80F d0ZXKOaZqWbLUDqkuZK5Gt+KfseY5pWLdP0mYWuRY4awlA+IQDcE9A5BaUX3EXYAKoUB S4A8Z5c7afnIW7f6nqL0Gc7yonvpLxnyLu8XMN4Y2WUegwaw8KIiediHXu5SSctoiH6o jzubqNbVVUFFC4+1h55FnqNpOQFIr0aIdttzzzOp4Sg6vtMcD15pSP8pvFcrTu0doNK3 QClNbdb0EfUPtE6juCOGVDdq+R3WlVSCBFFLSmnprPI2MJIC/z46C7f9CYSxrDs8KbhD xKyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=XZBWTh9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id a3-20020a17090abe0300b00280ca5f4ca5si7071118pjs.113.2023.12.11.01.13.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=XZBWTh9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7C49E80785E7; Mon, 11 Dec 2023 01:13:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234196AbjLKJNT (ORCPT + 99 others); Mon, 11 Dec 2023 04:13:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234155AbjLKJNR (ORCPT ); Mon, 11 Dec 2023 04:13:17 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF105123 for ; Mon, 11 Dec 2023 01:13:15 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ca2573d132so52166371fa.0 for ; Mon, 11 Dec 2023 01:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1702285994; x=1702890794; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pMuq41y0q5sJqso/AUvyl7ZAzaKQVaVlE4PNh5IKGB8=; b=XZBWTh9dUsNLObywd7mGcxjZ7x3APuo1IaI+HZV3I+o6UdM+akYvit6amayZCW0JD1 RyPNiHO2jFlNH1EWuYNjYEYWhLEkJ3vtK11mPcA4iwpULU3K1+kPd0PmznjWfzfbySLK Sl06ceN1xBbA2Xzj2++HFtEu1Ouhp1Kf4XK0kmqgai6XtitLMX+j0tfY6lJ/6D+zSRmz /fT+Pc0OXYYwIRr+b0svIj+JtssZoSh349qxKD4FSr1ZmtkczYaE+3kTIT28HwlYiPRv BnyQakvbN0B2G6+xNfbXaB67rKQm6+6VZyPqxLw/KWjvIU5Nd8GBmjJIQcg+lpmpekif bltQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702285994; x=1702890794; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pMuq41y0q5sJqso/AUvyl7ZAzaKQVaVlE4PNh5IKGB8=; b=hEeeqaP1/n6jJq8WMoP7Pei6k7vv+wcyvx6XFLAcdoQ5KDwgGXpigX6aT7V8Z9KOIe sXYsxEdMky7js8I8/j2dbu9xulFFE9ZFl94Cqa6xEb0bmApS/Tdauu15/9TzvEhvqUdG uxNDlk5GjzrfNTZmzXt+fE8ggFc7MnsHC8BNnHBlsKmOZmYFqwbKcOxXDHQGqpuWhj+d ANNEKbV2H/DXaEW/cZ6skVF/NkabX4ueVYMw+iONYFzadLkWHXFV9haRu5NcvecEHIVD CGE9mi3dC9ehbYDJTOqzwGLJLbH3XaarJ6IdJppDjaf5vFb9d1mcJel67WzGcEPQnNhb gclw== X-Gm-Message-State: AOJu0YyD+xOThb/4Ao0eoS0zYwB7cWn8jch9JLyGqU8qWnSXJCXj0f1K tEi+8Wz+kW99itFboPHOKNuecEDEauSnEvl4aOzLyA== X-Received: by 2002:a2e:a417:0:b0:2ca:3591:6667 with SMTP id p23-20020a2ea417000000b002ca35916667mr1391946ljn.82.1702285993598; Mon, 11 Dec 2023 01:13:13 -0800 (PST) MIME-Version: 1.0 References: <20231208-ad7380-mainline-v1-0-2b33fe2f44ae@baylibre.com> <20231208-ad7380-mainline-v1-1-2b33fe2f44ae@baylibre.com> <20231210134932.0bb429f1@jic23-huawei> In-Reply-To: <20231210134932.0bb429f1@jic23-huawei> From: David Lechner Date: Mon, 11 Dec 2023 10:13:02 +0100 Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: iio: adc: Add binding for AD7380 ADCs To: Jonathan Cameron Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , =?UTF-8?B?TnVubyBTw6E=?= , Alexandru Ardelean , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 11 Dec 2023 01:13:34 -0800 (PST) On Sun, Dec 10, 2023 at 2:49=E2=80=AFPM Jonathan Cameron = wrote: > > On Fri, 8 Dec 2023 09:51:40 -0600 > David Lechner wrote: > > > This adds a binding specification for the Analog Devices Inc. AD7380 > > family of ADCs. > > > > Signed-off-by: David Lechner > Hi David, > > Comments inline. A question for Mark Brown on the 2-wire bit.. > Do we have existing DT bindings for devices with parallel spi data > outputs? > > > --- > > .../devicetree/bindings/iio/adc/adi,ad7380.yaml | 102 +++++++++++++= ++++++++ > > MAINTAINERS | 9 ++ > > 2 files changed, 111 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml = b/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml > > new file mode 100644 > > index 000000000000..e9a0b72cd9d3 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml > ... > > > > + * https://www.analog.com/en/products/ad7380.html > > + * https://www.analog.com/en/products/ad7381.html > > + * https://www.analog.com/en/products/ad7383.html > > + * https://www.analog.com/en/products/ad7384.html > > > + adi,sdo-mode: > > + $ref: /schemas/types.yaml#/definitions/string > > + enum: [ 1-wire, 2-wire ] > > + description: > > + In 1-wire mode, the SDOA pin acts as the sole data line and the = SDOB/ALERT > > + pin acts as the ALERT interrupt signal. In 2-wire mode, data for= input A > > + is read from SDOA and data for input B is read from SDOB/ALERT (= and the > > + ALERT interrupt signal is not available). > > This is fun... If I understand correctly 2-wire requires two SPI buses (= or a complex > spi controller that does parallel serial channels). No, it wouldn't work with two separate SPI busses. Only a special controller with parallel serial channels. > What would description for that > look like in DT and can we not establish what is wanted here from that bu= s description > rather than an adi specific property? > > Seems a bit like parallel-memories. I don't think this is the same as parallel-memories. Looking at the the patch [1] it looks like parallel memories requires multiple CS lines to connect to multiple chips to make the multiple chips behave as one chip but otherwise works like SPI_RX_DUAL. This ADC, on the other hand, works as if two chips that share everything except the MISO line. Each MISO line (SDOA and SDOB) shifts out one bit of two different words in parallel on each line instead of two bits of the same word like SPI_RX_DUAL busses. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit= /?h=3Dfor-6.8&id=3D88a50c1663ffa9f6b31705c6bf7a887a2c8d9434 > > Mark, any insights into what we should do to describe this? > > > + > > + vcc-supply: > > + description: A 3V to 3.6V supply that powers the chip. > > + > > + vlogic-supply: > > + description: > > + A 1.65V to 3.6V supply for the logic pins. > > + > > + refio-supply: > > + description: > > + A 2.5V to 3.3V supply for the external reference voltage. When o= mitted, > > + the internal 2.5V reference is used. > > + > > + interrupts: > > + description: > > + When the device is using 1-wire mode, this property is used to o= ptionally > > + specify the ALERT interrupt. > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + - adi,sdo-mode > > Could define a default of 1-wire? Simplifies things a little in the bind= ings. > > > + - vcc-supply > > + - vlogic-supply > >