From patchwork Wed Jan 10 20:28:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 1885156 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=v5DAHdyb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.80.249; helo=am.mirrors.kernel.org; envelope-from=devicetree+bounces-31174-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T9KCb35Tyz1yPp for ; Thu, 11 Jan 2024 07:29:31 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0AC5B1F22FFB for ; Wed, 10 Jan 2024 20:29:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA88B4EB41; Wed, 10 Jan 2024 20:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="v5DAHdyb" X-Original-To: devicetree@vger.kernel.org Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) (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 E22AD4EB2C for ; Wed, 10 Jan 2024 20:29:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-204301f2934so3018476fac.1 for ; Wed, 10 Jan 2024 12:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1704918560; x=1705523360; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2JXksM7CDCG/lkWMAjBejDKWK/w9upChSXLmiJsLKPw=; b=v5DAHdyb0YSQaVyt0RNMCBVCPAbK3DkIG2TGl1FVocSV2CkMnLX72xmW8xQBt96Pcf 2bDDeCPvROTE2BeC3JKmvGDrWzTzbRXqk2M0XSUc/oQUr+14XO6iZRVTL6OfTHrEr+RN Euf11gtsdMToWNKRfZkiZ6t+vwsYMvcOEZhM9ymYItDTTp1RJiPG/qxCHDTXXW3Xh1cU fJGG7LvxhKKvZIg/8cJR519wP3111LcP3nfmHkOfaJmNi+9cOthLPSYfSjZUhp+dUrUo 1z5uw1as4CxeqHLhGbhxqmfDxB6d74rTu1afD61sQbdGEh+XcOR+qhnYJWwlTRE6I5bc z/kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704918560; x=1705523360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2JXksM7CDCG/lkWMAjBejDKWK/w9upChSXLmiJsLKPw=; b=TdyRhAgibpZ+RwBSWMtVSALsmemE5kXx7WtrlQKOa1g55nTreyhHaXbyMt8IhKzuta FOcmERTi4Hc39tBuKjy8sdfa2nnO7Jw85iMS6XDF2jTB1QirWJb9/SnHA3FulFFcIQcF eQnaYgR3iOhzvk76ZVNJwPp93DpboaMPug8jyKIeSNbhPFIHEw1C5+j669jG5+3w5nCT NmQ947I8cQhewdT8ZW1j2I97sspc09Tbpo6I0vP32CEWoqVAOTtQOjAaRGYH6D9Y4NSu CdykDDx+TuMG/TpdGe35x563/2TvOt+wF9A5ZDh2v4LycCZ4xSPGf14p2CnlA/pBAOQn tJBA== X-Gm-Message-State: AOJu0Yy7vnAMfkMzZwrxEmVi0EEOiS6jZcVbSUsQb/aBZGhOdFxpLxOQ mO86Fckp4qYABPmnDVdyk6TZxQUkv+dIkA== X-Google-Smtp-Source: AGHT+IHAwa8gw3VjPDWZUWAcDHddSW68o81tl/JL4oDatVEPm9Nxk7ayDw+WyOkSBXY7laprrO2lOw== X-Received: by 2002:a05:6870:ac26:b0:206:812f:97db with SMTP id kw38-20020a056870ac2600b00206812f97dbmr161811oab.90.1704918559893; Wed, 10 Jan 2024 12:29:19 -0800 (PST) Received: from freyr.lechnology.com (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id l33-20020a0568302b2100b006dbf5ca14b9sm852502otv.47.2024.01.10.12.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 12:29:19 -0800 (PST) From: David Lechner To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: David Lechner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org Subject: [PATCH v4 1/2] dt-bindings: iio: adc: Add binding for AD7380 ADCs Date: Wed, 10 Jan 2024 14:28:40 -0600 Message-ID: <20240110-ad7380-mainline-v4-1-93a1d96b50fa@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240110-ad7380-mainline-v4-0-93a1d96b50fa@baylibre.com> References: <20240110-ad7380-mainline-v4-0-93a1d96b50fa@baylibre.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mailer: b4 0.12.4 This adds a binding specification for the Analog Devices Inc. AD7380 family of ADCs. Signed-off-by: David Lechner Reviewed-by: Conor Dooley --- As discussed in [1], the proposed spi-rx-bus-channels property is a complex new SPI core feature, so it was nacked for now on the grounds that it should be accepted without the corresponding SPI core changes. I dropped the Reviewed-by since no DT maintainers responded on that thread. [1]: https://lore.kernel.org/linux-spi/0a774bc6-3bf9-4b5f-92e0-8bd673e71a33@sirena.org.uk/ Changes in v4: - Dropped spi-rx-bus-channels property. Changes in v3: - Picked up Conor's Reviewed-By on the adi,ad7380 bindings Changes in v2: - Added new patch with generic spi-rx-bus-channels property - Added maxItems to reg property - Replaced adi,sdo-mode property with spi-rx-bus-channels - Made spi-rx-bus-channels property optional with default value of 1 (this made the if: check more complex) - Changed example to use gpio for interrupt .../devicetree/bindings/iio/adc/adi,ad7380.yaml | 86 ++++++++++++++++++++++ MAINTAINERS | 9 +++ 2 files changed, 95 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..5a70d1ee768b --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7380.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices Simultaneous Sampling Analog to Digital Converters + +maintainers: + - Michael Hennerich + - Nuno Sá + +description: | + * 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 + +$ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + enum: + - adi,ad7380 + - adi,ad7381 + - adi,ad7383 + - adi,ad7384 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 80000000 + spi-cpol: true + spi-cpha: true + + 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 omitted, + the internal 2.5V reference is used. + + interrupts: + description: + When the device is using 1-wire mode, this property is used to optionally + specify the ALERT interrupt. + maxItems: 1 + +required: + - compatible + - reg + - vcc-supply + - vlogic-supply + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad7380"; + reg = <0>; + + spi-cpol; + spi-cpha; + spi-max-frequency = <80000000>; + + interrupts = <27 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpio0>; + + vcc-supply = <&supply_3_3V>; + vlogic-supply = <&supply_3_3V>; + refio-supply = <&supply_2_5V>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index fe1f6f97f96a..e2a998be5879 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -430,6 +430,15 @@ W: http://wiki.analog.com/AD7142 W: https://ez.analog.com/linux-software-drivers F: drivers/input/misc/ad714x.c +AD738X ADC DRIVER (AD7380/1/2/4) +M: Michael Hennerich +M: Nuno Sá +R: David Lechner +S: Supported +W: https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad738x +W: https://ez.analog.com/linux-software-drivers +F: Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml + AD7877 TOUCHSCREEN DRIVER M: Michael Hennerich S: Supported