Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp544068rdb; Mon, 15 Jan 2024 05:55:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpXMDor4mSK0Ow+2afOVYDzFN7AKCY/kXYPMOUzSJihFKas4b5R7lBUd90irXwGgMUsAgC X-Received: by 2002:a17:906:6d95:b0:a2a:9afe:1914 with SMTP id h21-20020a1709066d9500b00a2a9afe1914mr2617975ejt.52.1705326952958; Mon, 15 Jan 2024 05:55:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705326952; cv=none; d=google.com; s=arc-20160816; b=xHO/cKmVCgOjHs+4G+Fwop+fb7PcB1nhpJs+/WwXUSogsI3/OXa1GD3wpRyV+F+ZjQ em3qdoCqaN1In62SJ4ROC4rC6bm47XqOhlPBN1mppjVChG6SR/0jnIWDmYY0g/bpqBQc 75ptBOxDdwXA03gkIf1VBlM/kq0o+8+VyUS48Hywfa9zNRG3XEs1NDWYLlmiB29xiweB 0gWbVSKdZwodK8URUOyg2T2CggujqmhGs7V7hYSf3UMbZP6F+hR44Yy9Sv3ZtHteCol4 QR2GKinaB5YzRf6iHqD9++PRhWJwqEFaAYbUi1WJ6VENED/KwaepVuye8EJy/187f7hj yDWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=K85zJT+qT++kzzI1xx0+ItX9vmO1s0PJ1u1koFzADEI=; fh=GJcEmkLuyL/MhJKCXGUZz5H6hdLEZ7jEZdM6qFYvYDg=; b=FbU6P30bzaiHxzafjh48pwJn/om0fGdop/gv0CYC5pRlP4tZ4ttSeEbcpi7O2rHLim 0LsS/dJ60eHDqotrOkWwGPlMAoOIYaB6x62E9LaQD5H2xlNhB2g6/0xwxVYClmU9VVYa nhcaxdcwutH1igxm2k26/y5Phbh3TAyE3/qPHURwEacoQsH5WSLwXznvJyhJe1ErAf1v iZJpLJhb5uvqtnb59YcTvlkLAEs5YN+f3DGw/DPpeifeG3c/KRY/HDHyB7bszRKanCOR /MQgMXxD0agAA9/aZqDRrY3Zmceyrz3nwSjM+wn0bWI3QdJFTLoGlaMltXSMocsVZrRR FURQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="S0Zq/aVH"; spf=pass (google.com: domain of linux-kernel+bounces-26061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26061-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c22-20020a170906155600b00a2d0a8f21b8si2339268ejd.396.2024.01.15.05.55.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 05:55:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="S0Zq/aVH"; spf=pass (google.com: domain of linux-kernel+bounces-26061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26061-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 6D4AB1F22830 for ; Mon, 15 Jan 2024 13:55:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D451E17BD6; Mon, 15 Jan 2024 13:54:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S0Zq/aVH" Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 4D1A7179AA; Mon, 15 Jan 2024 13:54:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-40e67e90d5aso28191325e9.1; Mon, 15 Jan 2024 05:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705326863; x=1705931663; 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=K85zJT+qT++kzzI1xx0+ItX9vmO1s0PJ1u1koFzADEI=; b=S0Zq/aVHNBBNXpmJZqxWNAGtmyUAtZiSrDI5MYkWonN4wvTzfbfZmMJaf78Pfz23ai 3RMo5j6wedcxm5izvxnXUdjXJGzaiP4F6yd7y//EO+iotbplORq2Czn/TYg2J52YONeD 9ONwogTkvFgOw0ma1USL2MgMD+XGFBssC7HipMHWvVcgi9RT7t60oOLsut64fq1iOA5d W6JQ9AVLrOg4/nljJPXR0QUmzew0w+SDUHnpKQinpQpZEkhtohREKY4J01FTen0LLHQj NPTz+ierlZfg8ySU7MuMBTy1t24hUANJrQmjY+oLe3DqA/8+9IFPS2T4rjPqzo0ir0XB KMdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705326863; x=1705931663; 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=K85zJT+qT++kzzI1xx0+ItX9vmO1s0PJ1u1koFzADEI=; b=u6bSSzxDkFONx/K/T23FeTK81wDUXjSXj7SNUNyIIYPWc+ZuIJQGN8UmZAJByDYVja Dt+l6Lw/2cPWEQe1wJq2gYjedafzbxGr/sSB+Xa8i1xvOWVwyA5tbyd7M4RjLwOPEMFh K2vYKRqNv5LTgU8iYHuWEr5HhjC6+YnEe2KGprytXmpTUegd7h+WlsttmOoPisODwKrv SoaRFNi6kZeeIXsEh/JlUlZVpFH1V+iQ9iRlJz82MRRUB9GYcsEllGWblvHkniaLODU3 rLwwu1rVcXTxQ8Arfm4wnltw8iCvELKS2KBBNYkfoQRJdf+aisDHvwzoHf7YP0UfwFv+ 07+Q== X-Gm-Message-State: AOJu0YxeTIb/ca2WaMMztUY+FzxkZV/E0T1M5DXSIObxWfLvux4v8Y2B feDmU7ZKoO5FWtWOFx5OJas= X-Received: by 2002:a05:600c:218:b0:40d:8199:c3f with SMTP id 24-20020a05600c021800b0040d81990c3fmr2695257wmi.153.1705326863136; Mon, 15 Jan 2024 05:54:23 -0800 (PST) Received: from HYB-hhAwRlzzMZb.ad.analog.com ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id r10-20020a05600c458a00b0040e6efeac9esm7979651wmo.48.2024.01.15.05.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 05:54:22 -0800 (PST) From: Dumitru Ceclan To: 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 , 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 1/2] dt-bindings: adc: ad7173: add support for additional models Date: Mon, 15 Jan 2024 15:53:04 +0200 Message-ID: <20240115135416.10595-2-mitrutzceclan@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240115135416.10595-1-mitrutzceclan@gmail.com> References: <20240115135416.10595-1-mitrutzceclan@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support for: AD7172-2, AD7175-8, AD7177-2 Add hardware description of the AD771X family instead of "Bindings for" AD7172-4 does not feature an internal reference, check for ext-ref Signed-off-by: Dumitru Ceclan --- .../bindings/iio/adc/adi,ad7173.yaml | 50 +++++++++++++++++-- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml index 7c8caef76528..6d4b26e43144 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml @@ -11,19 +11,33 @@ maintainers: - Ceclan Dumitru description: | - Bindings for the Analog Devices AD717X ADC's. Datasheets for supported chips: + Analog Devices AD717X ADC's: + The AD717x family offer a complete integrated Sigma-Delta ADC solution which + can be used in high precision, low noise single channel applications + (Life Science measurements) or higher speed multiplexed applications + (Factory Automation PLC Input modules). 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. + + 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/AD7172-4.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/AD7175-8.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD7176-2.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7177-2.pdf properties: compatible: enum: - adi,ad7172-2 + - adi,ad7172-4 - adi,ad7173-8 - adi,ad7175-2 + - adi,ad7175-8 - adi,ad7176-2 + - adi,ad7177-2 reg: maxItems: 1 @@ -89,8 +103,10 @@ patternProperties: refout-avss: REFOUT/AVSS (Internal reference) avdd : AVDD - External reference refin2 only available on ad7173-8. - If not specified, internal reference used. + External reference refin2 only available on ad7173-8 and ad7172-4. + Internal reference refout-avss not available on ad7172-4. + + If not specified, internal reference used (if available). $ref: /schemas/types.yaml#/definitions/string enum: - refin @@ -111,12 +127,15 @@ required: allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# + # Only ad7172-4 and ad7173-8 support refin2 - if: properties: compatible: not: contains: - const: adi,ad7173-8 + anyOf: + - const: adi,ad7172-4 + - const: adi,ad7173-8 then: properties: refin2-supply: false @@ -129,6 +148,29 @@ allOf: - refout-avss - avdd + # Model ad7172-4 does not support internal reference + # mandatory to have an external reference + - if: + properties: + compatible: + contains: + const: adi,ad7172-4 + then: + patternProperties: + "^channel@[0-9a-f]$": + properties: + adi,reference-select: + enum: + - refin + - refin2 + - avdd + default: false + required: + - adi,reference-select + oneOf: + - required: [refin2-supply] + - required: [refin-supply] + unevaluatedProperties: false examples: -- 2.42.0