Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp291539rdb; Tue, 5 Dec 2023 05:46:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxvd986iZ/l4ZikYcvN1GgWZzVQjnEEGFLjrC6fUeugkFh0zyDfK41Pjq8actqwbLqn1kr X-Received: by 2002:a05:6358:5e14:b0:16d:fc9b:6fce with SMTP id q20-20020a0563585e1400b0016dfc9b6fcemr6542761rwn.4.1701783999007; Tue, 05 Dec 2023 05:46:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701783998; cv=none; d=google.com; s=arc-20160816; b=qdLtUzw8j+53wEGB1j/3DUCLUQL21t5bQUdEzRVdMvOKbtekitL1TzxWqHuyRLqZkI tz9xKhZLd8R803kcGUUWMHX2tOPs1L/bL2GMoSrooQ80pxTAd2RhGF1eqwtBGSgktZGF FNc3JjEgNOq2J5CdSShDqO9ySb/Qn14nFUDMvaj2vUahkqR0U8ftVs1mbx5bYil9Y+te o/cTQF6FAP5BoNGuK8U3QPO6tfVFfKjkCGQduQ39Blbux7V71JSNDbAxsMnIul6K8B9T z9+sjJtjxojoa+P2JvSw7EcCABjshwDywrcVmCkE1dntH1vkng/3SKckRFQLom24SqAG 7Wfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=TTeJ0EDjbcdiYqEviIIm+5LsxySuiePtzDtzi3eR2Yk=; fh=1v8qjlWkRil9/k3Vlr7oNOCu/usaQ+EROEWsKy6Ng1M=; b=PnSUpKNuRX3QfOsekQvP9j2ayuaw40y9U27URgSYgZNw170Xfi9pbGk7aNKhonhX9X ShogRLzM0yHu1dElb6cp6F2Z6jv3hYGC9mFDgFCbmJH7Ue9u0aafPlUMqHxitAxKWU6S tUzlcyGtQynKd7aRqM3vWbSIV3BywR6mBO/D8AbHn8Cz1SVkCZM5qOpYfw47isYgH4Uv lnaSejY/vBrw16kXZeNeexj0uaBaeYwsM5+07bNC5AdiQ5n2E33OvsqIKeuaR/R/XeHf Uhl/0GJeksimpE/4Bl4kyn0InbRkwxCNeC891N7ttB28TZtP1JDCzpMND+7r/EfNL98G R0SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b=OSyp3xub; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x13-20020a63fe4d000000b005c1cd1ba05csi9334247pgj.240.2023.12.05.05.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 05:46:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b=OSyp3xub; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EB8D48075008; Tue, 5 Dec 2023 05:46:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345418AbjLENqV (ORCPT + 99 others); Tue, 5 Dec 2023 08:46:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235188AbjLENqU (ORCPT ); Tue, 5 Dec 2023 08:46:20 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E05218B; Tue, 5 Dec 2023 05:46:26 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-54cff638658so1589184a12.1; Tue, 05 Dec 2023 05:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701783984; x=1702388784; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TTeJ0EDjbcdiYqEviIIm+5LsxySuiePtzDtzi3eR2Yk=; b=OSyp3xubmVf3/SGcYs4CKgXLGwycCsS8MWahSbkOaPyGUMa45i2mQNsc9t51oOhcgE rBMkdiOCTjBC5wjqsWv+oKCkRLWlRe5XaTPCkJH7aglwZIRfgMQCwp5cCMvGocVuHAgT 5KZRdep0T1afkyc+mf0PCLqtTvlWaf1if1ji8RbxcjjcvMsVG5qfYA+LIJH0/9BynOy+ iSuDAdncqkJDwAT80h5LucxqQBslJVJVgh9lfhr1wK8SRGo2vzci8rw2YXYvBLOFFnlG svfBTahx3NkxAGNbtMTligud259B/8KkEXRY+Zmn2y5Y8JxOyqkPLcaU2os/rFG3C+Nn KpoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701783984; x=1702388784; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TTeJ0EDjbcdiYqEviIIm+5LsxySuiePtzDtzi3eR2Yk=; b=fY+lKuxC1xeqvv3OUR8YpN0Oh9BQLeYa7z0FLc5r+ZamNfcNN3HIsyolS3RtuCRPd9 B9f/wPHwVZ9kysiJlCUAGZzjx6GqzR5IJD7v5Dm3X+6QiKW3e2YoGBKcVkFqn+VsDAF6 9GtvSIIlOt0J3swut/cwO1mwBaUXA3gTKCCLzQuYJ0KKQnbtiFqvYg/l1EBMJTJYMl8U HV0QiSawIl128B564hoXMfJ5KeuuRdT30NQFhfxpP0JW2KaHODdIGLezUsZgr4evJTw3 zjpAgl7tIWUOhLDDzKtP6fz+tDao32UxlIeYrtP+JLSCfemquQhztSSZz0gfFT0MGmV+ oWog== X-Gm-Message-State: AOJu0YyYttdQ0y6sFxojNsdbPTGZt5Mv2hQlMpiAnX0+ZznfmoKkXAkZ cHVsi2rNeOQ/WMZYDM1E/Xzw0T9NuLtoBuC8wDE= X-Received: by 2002:a50:8d4e:0:b0:548:5605:4682 with SMTP id t14-20020a508d4e000000b0054856054682mr3942458edt.21.1701783984336; Tue, 05 Dec 2023 05:46:24 -0800 (PST) Received: from HYB-hhAwRlzzMZb.ad.analog.com ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id by6-20020a0564021b0600b0054cacb41abasm1102233edb.60.2023.12.05.05.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 05:46:23 -0800 (PST) From: Dumitru Ceclan Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Walle , Andy Shevchenko , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , =?UTF-8?q?Leonard=20G=C3=B6hrs?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dumitru Ceclan Subject: [PATCH v7 1/2] dt-bindings: adc: add AD7173 Date: Tue, 5 Dec 2023 15:42:20 +0200 Message-ID: <20231205134223.17335-1-mitrutzceclan@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.3 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 lipwig.vger.email To: unlisted-recipients:; (no To-header on input) 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 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 05:46:36 -0800 (PST) The AD7173 family offer a complete integrated Sigma-Delta ADC solution which can be used in high precision, low noise single channel applications or higher speed multiplexed applications. The Sigma-Delta ADC is intended primarily for measurement of signals close to DC but also delivers outstanding performance with input bandwidths out to ~10kHz. Signed-off-by: Dumitru Ceclan --- .../bindings/iio/adc/adi,ad7173.yaml | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml new file mode 100644 index 000000000000..087820a0cf48 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml @@ -0,0 +1,170 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2023 Analog Devices Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7173.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7173 ADC + +maintainers: + - Ceclan Dumitru + +description: | + Bindings for the Analog Devices AD717X ADC's. Datasheets for supported chips: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-2.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7176-2.pdf + +properties: + compatible: + enum: + - adi,ad7172-2 + - adi,ad7173-8 + - adi,ad7175-2 + - adi,ad7176-2 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + spi-max-frequency: + maximum: 20000000 + + refin-supply: + description: external reference supply, can be used as reference for conversion. + + refin2-supply: + description: external reference supply, can be used as reference for conversion. + + avdd-supply: + description: avdd supply, can be used as reference for conversion. + + required: + - compatible + - reg + - interrupts + +patternProperties: + "^channel@[0-9a-f]$": + type: object + $ref: adc.yaml + unevaluatedProperties: false + + properties: + reg: + minimum: 0 + maximum: 15 + + diff-channels: + items: + minimum: 0 + maximum: 31 + + adi,reference-select: + description: | + Select the reference source to use when converting on + the specific channel. Valid values are: + refin : REFIN(+)/REFIN(−). + refin2 : REFIN2(+)/REFIN2(−) + refout-avss: REFOUT/AVSS (Internal reference) + avdd : AVDD + + External reference refin2 only available on ad7173-8. + If not specified, internal reference used. + enum: + - refin + - refin2 + - refout-avss + - avdd + default: refout-avss + + required: + - reg + - diff-channels + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + + - if: + properties: + compatible: + not: + contains: + const: adi,ad7173-8 + then: + properties: + refin2-supply: false + patternProperties: + "^channel@[0-9a-f]$": + properties: + adi,reference-select: + enum: + - refin + - refout-avss + - avdd + +unevaluatedProperties: false + +examples: + - | + #include + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad7173-8"; + reg = <0>; + + #address-cells = <1>; + #size-cells = <0>; + + interrupts = <25 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpio>; + spi-max-frequency = <5000000>; + + refin-supply = <&dummy_regulator>; + + channel@0 { + reg = <0>; + bipolar; + diff-channels = <0 1>; + adi,reference-select = "refin"; + }; + + channel@1 { + reg = <1>; + diff-channels = <2 3>; + }; + + channel@2 { + reg = <2>; + bipolar; + diff-channels = <4 5>; + }; + + channel@3 { + reg = <3>; + bipolar; + diff-channels = <6 7>; + }; + + channel@4 { + reg = <4>; + diff-channels = <8 9>; + adi,reference-select = "avdd"; + }; + }; + }; -- 2.42.0