Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1727391rdf; Sun, 5 Nov 2023 11:33:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHR4lFit5biKo4SMsgXM9MauoV/V6Zoj2EGeAipYSrzcl/tziWI9u2PhV22XSleburhdQsm X-Received: by 2002:a05:6a20:4414:b0:181:82f0:6f77 with SMTP id ce20-20020a056a20441400b0018182f06f77mr10842841pzb.61.1699212788156; Sun, 05 Nov 2023 11:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699212788; cv=none; d=google.com; s=arc-20160816; b=LJ4sYUC2ubAOrxLIUQG5Q0og7QFdtUAj5NE7k7vXLkJ5vzrkr/CJi5g3OgZTTWJ/s3 qsZkkR5V7o20GM837wJsBA/WVsJkFElCdcQfukCGSGeL3lHH8nubqN2Ux84ezlRgTvTJ 71oozyrm2zoS5qrrOOQDeLRwhxPDaGGLeH3NS3Pk4L24QAkM3/xb6lvt0q4YYoTpqHy6 8RIgA/JwMEk+udF6UjKWs9vwzSaXGyOnVDjlagRWET6273g6C7YarDmP43xIlKdP38x8 5W15ilqs4ZMJ5qIqMySuUTvvFxWQ1+IFlt7BHH/ZyW9MsoRAKrZXxtZxII96oztDnE0S QfGA== 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 :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=agF7FmNdxJL43+j1iH0SmmU3n7HdFDcises4JFJGz6w=; fh=iUGTc4tHb702OK5lIaI6XrrQVU2FacpyFaGclMiiM5U=; b=zH6+jih6f2unhzJ3cOq6+3BVNm0soaEI61mVbwDIBlWtGdX4usTSeJpc99eC99ORuP oJv1rLtkZ4Yi4K1M+bo3jPkJQ9AJbL0A78fm/0Uqy5s1Op/LikDg2gL6DkMiPZIJrwdS rQ48gSWQrpBDTm3FAgLIv/eAGIr0a96aC2aRvq5WKUw9WsK+9sLBy1bjnLZlxZ7gfIDG 4quLiHuU3n/Zo9hGwyfowKjwbvJlwaj5lfikJ4og7nZ6zqKPBxrVEUfUbQagzSelLGEJ PIce5emi+Kx4S8Na1mGGniNuNBctiqRlUG1X9WdOQaHmlyA3UXEbvpE+anqs913moYVu XwdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b=jGwR9eYN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id kr12-20020a170903080c00b001cc467a339esi6034368plb.389.2023.11.05.11.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 11:33:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b=jGwR9eYN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id DDECF807F4BA; Sun, 5 Nov 2023 11:33:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229597AbjKETcc (ORCPT + 99 others); Sun, 5 Nov 2023 14:32:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjKETca (ORCPT ); Sun, 5 Nov 2023 14:32:30 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9483D112; Sun, 5 Nov 2023 11:32:26 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-9ae2cc4d17eso577879766b.1; Sun, 05 Nov 2023 11:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699212745; x=1699817545; 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=agF7FmNdxJL43+j1iH0SmmU3n7HdFDcises4JFJGz6w=; b=jGwR9eYNOJDMOLKfx2jyA6SIiq9a77nOH8sGVHSeHK92DAgylbuf+wjmuFeHlk1PhV dF3SlS61l8klyZC+deN3gPAr/5JJ5lqB+g+fxPjCL5YtNUQeg4HpCAYprPemM4bFbOKk KfPGSEmODLU7ipKcjkxjbxBTZBzFC7dxBgMNcpaR4+kBn0B8ow74GOhcKmcpQTBNKQdL Gup5iiHTgQk54ji3zgWlNJ6YA1PAHn1L88iID4DO7zo4CtS+vKICArLJ8+IQfNP8MRFx e/mE4fTNw1adJuT4QMqudSscAwCStxtAvYsXttKSzFlHX6qOylAHnQsozfNnBEm7I9r/ YXWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699212745; x=1699817545; 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=agF7FmNdxJL43+j1iH0SmmU3n7HdFDcises4JFJGz6w=; b=tE5uvX95D2x+MSUqUjeJ+dYXtcVlrERCHamoH3wBoe0jYDuxlK8UwM0EBGIvgJp0xX Oe7TcuWL5cbnW+3zJVbdoSEnR4kMMd7YfmUOG9r2U3olG1teU1xjFU+tyIN7/skKlBw/ Fr8HNd/0nj6bw+T3PAmXSgTtszU/ZNd795a9yMmZUY7viMlZUje9eEk6NKQHqA5hoRXV rmXHo2404OZtH/EA/uV6Jc8C/1Qkwuzsnb+cbk0cgqVLjH3sdXhauEoVyQNKc6s4Nqzq OfwpW2Lc7YbDUgVPc5tSDQJkdsXGw1VFbBX81PtTOoqGqyi+fjHVAgwyoB4wNBFkcQUq vPUg== X-Gm-Message-State: AOJu0YyJfoTwh7g/glmy3zjMckHQ2AH9XCAXxFxCQAwqReff7SYOsWJ2 FTN7mYaKYc+sQ4cL5cHm+hQ= X-Received: by 2002:a17:907:1b22:b0:9c2:a072:78c4 with SMTP id mp34-20020a1709071b2200b009c2a07278c4mr11405087ejc.25.1699212744922; Sun, 05 Nov 2023 11:32:24 -0800 (PST) Received: from spiri.. ([5.14.137.80]) by smtp.gmail.com with ESMTPSA id d26-20020a1709064c5a00b009b947aacb4bsm3300259ejw.191.2023.11.05.11.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 11:32:24 -0800 (PST) From: alisadariana@gmail.com Cc: Alisa-Dariana Roman , Lars-Peter Clausen , Michael Hennerich , Alexandru Tachici , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Shevchenko , Maksim Kiselev , Arnd Bergmann , Cosmin Tanislav , Hugo Villeneuve , Marius Cristea , Marcus Folkesson , Ibrahim Tilki , ChiaEn Wu , Ivan Mikhaylov , Niklas Schnelle , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] dt-bindings: iio: adc: ad7192: Add AD7194 support Date: Sun, 5 Nov 2023 21:31:30 +0200 Message-Id: <20231105193132.47009-3-alisadariana@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231105193132.47009-1-alisadariana@gmail.com> References: <20231105193132.47009-1-alisadariana@gmail.com> MIME-Version: 1.0 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 fry.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 (fry.vger.email [0.0.0.0]); Sun, 05 Nov 2023 11:33:05 -0800 (PST) From: Alisa-Dariana Roman Unlike the other AD719Xs, AD7194 has configurable differential channels. The default configuration for these channels can be changed from the devicetree. Also add an example for AD7194 devicetree. Signed-off-by: Alisa-Dariana Roman --- .../bindings/iio/adc/adi,ad7192.yaml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml index 16def2985ab4..b9a9f7b20670 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml @@ -21,8 +21,15 @@ properties: - adi,ad7190 - adi,ad7192 - adi,ad7193 + - adi,ad7194 - adi,ad7195 + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + reg: maxItems: 1 @@ -96,6 +103,31 @@ required: - spi-cpol - spi-cpha +patternProperties: + "^channel@([0-9a-f])$": + type: object + $ref: adc.yaml + unevaluatedProperties: false + + properties: + reg: + description: The channel index. + minimum: 0 + maximum: 7 + + diff-channels: + description: | + The differential channel pair for Ad7194 configurable channels. The + first channel is the positive input, the second channel is the + negative input. + items: + minimum: 1 + maximum: 16 + + required: + - reg + - diff-channels + allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# @@ -127,3 +159,40 @@ examples: adi,burnout-currents-enable; }; }; + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "adi,ad7194"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpol; + spi-cpha; + clocks = <&ad7192_mclk>; + clock-names = "mclk"; + interrupts = <25 0x2>; + interrupt-parent = <&gpio>; + dvdd-supply = <&dvdd>; + avdd-supply = <&avdd>; + vref-supply = <&vref>; + + adi,refin2-pins-enable; + adi,rejection-60-Hz-enable; + adi,buffer-enable; + adi,burnout-currents-enable; + + channel@0 { + reg = <0>; + diff-channels = <1 6>; + }; + + channel@1 { + reg = <1>; + diff-channels = <2 3>; + }; + }; + }; -- 2.34.1