Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1501364lqz; Mon, 1 Apr 2024 08:10:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHoXs8eJ+jIpGQ6y17fvBBmOTI9OolYKpTir/Pb4oLFuHmEVwIb8CecdwGDFuPnH/qOcdJxkm/9TOUVeGX4TSWgsocb7K1dNOHIN9oQw== X-Google-Smtp-Source: AGHT+IEVqtlOsngimBROSpspamvFYe/FRr+VTeb7bmB50FbSPYZmrm11IIQKJH5kAKJirPVBjv0f X-Received: by 2002:ac8:5bd1:0:b0:432:f433:b5ce with SMTP id b17-20020ac85bd1000000b00432f433b5cemr2364400qtb.27.1711984256579; Mon, 01 Apr 2024 08:10:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711984256; cv=pass; d=google.com; s=arc-20160816; b=mwKT2vrnelwTRPhKnzjml6JuZRbx0eTg+kPE943GJ4BNCr5dotm+mmtlJDgWwOE3qj mOscIhSWUT0AVGTfKeNr8sfA4YhAYcBhUnrb0cADkNr0f10aizSm52ElM74UDGZyx/9I okxN7OodaO+4bOaKdufe7RkxYEZ5QDO2B/QgLryP23+yGOZgc/lR8lbQce1oWMwHVjiv e0mahCcSm435DSPpJO+m6HDJ9zYoe0WKf9AiIAftXqoDbIKnskUriJuj3htulUEzW9LW n/Xeqb+zqfDQLLyv3GHa797hX1dSBEM2f2gPPnYWfwngAZpEL0JtpYUIH/Sn/4XwyfyB 9ZTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=Q4Oy34Uhc+syj8Cqv3sGKjTNaAHNFns23k40VUZ9lu8=; fh=LhdatDguh+IuN1lDyS6rzhx9ubttSYYZpDCGFgekH1E=; b=Fx5PZ4M3V0KJn+uHwL44MkFiRWkghQRsOM/+3UJ0JVszsncUCDblyPyFvpVPPTDge2 D09rq82xvi0LBCCe8yHs2MZzK3aE6IJ2/5YxQjsbLvecSeQTAhk/KVs2LmtiNxHnPrU3 nGuDNr3/5BRWv6IPI7Nn3OTePL8ZmQjnruPUKNpIX0a6pPAzwVCJRo7puG1m9eLea6l/ uZbOz/o191eW5ELFXH9rKhh7OQ9KrROJxnm67VFaI02fX8laOuqogAF0sbVi9gpIj6vI lAREcCboG5FcxZx8CerlZoS7KlmxI7hxG2kMmOug0rSB8IXE0EVGS2ZcmTg1lAievpab PWwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kqIzWbE/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-126776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126776-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n12-20020a05622a11cc00b00432d75bcb77si3968985qtk.520.2024.04.01.08.10.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 08:10:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kqIzWbE/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-126776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126776-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 436BE1C20EC5 for ; Mon, 1 Apr 2024 15:10:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F10C482EF; Mon, 1 Apr 2024 15:10:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kqIzWbE/" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77AA745BEC; Mon, 1 Apr 2024 15:10:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711984217; cv=none; b=gQ+MWWL9B75qEEzKzsNIl6tn9LBxr2IYLSrAxGyOyeoLwfIjfpQlXo3gwYO6i/2ApXuUrx+kxGoxTwyiNBMGs8PIZYOoGJThtEAJpC0rBA5K0buGRzHNPgHCwaeaUMV82RWO7CUwHoD5EvF41lqU/cUoZQaGcpsz9ncSGzJZvvQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711984217; c=relaxed/simple; bh=ypyseA7gjkezHNz8byQb1xroCwMnLrrumCgs2qcJ9TM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H/b9PHRqP0p/rAOhpIcR0vRGqp2AP8t2vuD7LRJXmBohdU3bylH3ZU2pWLOCJsSBxVtBGAQ04Su6estFnTMtJu0vATVBH5GRpqkoeQ96bTnyRfEIXZn+U2L/uDxl2X9Fz+5Rj8+xheMr7Js5JpUlaUVadz4XakMzl2TrZ6l71/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kqIzWbE/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 11CEFC43390; Mon, 1 Apr 2024 15:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711984217; bh=ypyseA7gjkezHNz8byQb1xroCwMnLrrumCgs2qcJ9TM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=kqIzWbE/88Dxgs2PUcPDRr4wCvLECfF7SyBly1ZZdfPqyzF1TqIC62iPGfu6mCp1y PApzigXBT3XRaFaTC2g9yxdOfw6DmHjCy7E8zq/NTr4o3nA6ia2v5TvaNtJSqQYZPw tTW5yAbseOcyif1tIkuAFr5slgU/kGRHfKKV1+1U7z5VzoVadDC+8kq6jmwSsaczwg uMgyElTWfF/zipJXK1EJXyJ5Vq2DXJKQm3UGzMDWRLXic2ghvX6qlUoO+0wXTDbuKm WMtaj86hNbhlun4u/o3EVCslxAR8T2+A4VdSothhK6QdmIig8fFdPNlHZkuvOykNhQ TUyuz2rlxwrWQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0A84CD1288; Mon, 1 Apr 2024 15:10:16 +0000 (UTC) From: Dumitru Ceclan via B4 Relay Date: Mon, 01 Apr 2024 18:32:19 +0300 Subject: [PATCH 1/6] dt-bindings: adc: ad7173: add support for ad411x 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="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240401-ad4111-v1-1-34618a9cc502@analog.com> References: <20240401-ad4111-v1-0-34618a9cc502@analog.com> In-Reply-To: <20240401-ad4111-v1-0-34618a9cc502@analog.com> To: Ceclan Dumitru Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David Lechner , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dumitru Ceclan X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1711985550; l=4017; i=dumitru.ceclan@analog.com; s=20240313; h=from:subject:message-id; bh=ZyRClsyDd6RKV/PtoHfGxoOfXDbJoSHfK85MVhx0ze8=; b=OVfXhcFTgH9CYNC7fhmMZbavK94vVtJeh+VDoQk2nZ9ZKe93KmREz9IS2PvDGUG6wrpoXP4TU tS58/VzjVh1AsCfd01MdgrIYEuNU+n4kbO4agDA4qQqmCt6T01rMm+d X-Developer-Key: i=dumitru.ceclan@analog.com; a=ed25519; pk=HdqMlVyrcazwoiai7oN6ghU+Bj1pusGUFRl30jhS7Bo= X-Endpoint-Received: by B4 Relay for dumitru.ceclan@analog.com/20240313 with auth_id=140 X-Original-From: Dumitru Ceclan Reply-To: dumitru.ceclan@analog.com From: Dumitru Ceclan Add support for: AD4111, AD4112, AD4114, AD4115, AD4116. AD411x family ADCs support a VCOM pin, dedicated for single-ended usage. AD4111/AD4112 support current channels, usage is implemented by specifying channel reg values bigger than 15. Signed-off-by: Dumitru Ceclan --- .../devicetree/bindings/iio/adc/adi,ad7173.yaml | 59 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml index ea6cfcd0aff4..bba2de0a52f3 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml @@ -19,7 +19,18 @@ description: | primarily for measurement of signals close to DC but also delivers outstanding performance with input bandwidths out to ~10kHz. + Analog Devices AD411x ADC's: + The AD411X family encompasses a series of low power, low noise, 24-bit, + sigma-delta analog-to-digital converters that offer a versatile range of + specifications. They integrate an analog front end suitable for processing + fully differential/single-ended and bipolar voltage inputs. + Datasheets for supported chips: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-4.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf @@ -31,6 +42,11 @@ description: | properties: compatible: enum: + - adi,ad4111 + - adi,ad4112 + - adi,ad4114 + - adi,ad4115 + - adi,ad4116 - adi,ad7172-2 - adi,ad7172-4 - adi,ad7173-8 @@ -125,10 +141,19 @@ patternProperties: properties: reg: + description: + Reg values 16-19 are only permitted for ad4111/ad4112 current channels. minimum: 0 - maximum: 15 + maximum: 19 diff-channels: + description: + For using current channels specify only the positive channel. + (IIN2+, IIN2−) -> diff-channels = <2 0> + + Family AD411x supports a dedicated VCOM voltage input. + To select it set the second channel to 16. + (VIN2, VCOM) -> diff-channels = <2 16> items: minimum: 0 maximum: 31 @@ -166,7 +191,6 @@ allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# # Only ad7172-4, ad7173-8 and ad7175-8 support vref2 - # Other models have [0-3] channel registers - if: properties: compatible: @@ -187,6 +211,37 @@ allOf: - vref - refout-avss - avdd + + - if: + properties: + compatible: + contains: + enum: + - adi,ad4114 + - adi,ad4115 + - adi,ad4116 + - adi,ad7173-8 + - adi,ad7175-8 + then: + patternProperties: + "^channel@[0-9a-f]$": + properties: + reg: + maximum: 15 + + - if: + properties: + compatible: + contains: + enum: + - adi,ad7172-2 + - adi,ad7175-2 + - adi,ad7176-2 + - adi,ad7177-2 + then: + patternProperties: + "^channel@[0-9a-f]$": + properties: reg: maximum: 3 -- 2.43.0