Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2130860lqb; Mon, 27 May 2024 08:48:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMQnsq8dwNw6UMQjvaXMYlVUGVL/kDhNaWQJwO9v83kCS5nbOYISRbqhC42gjfYuSs5EuKGU1b/yYQAxJ5JSaJxMQ8/WSLEsNKSN9p5w== X-Google-Smtp-Source: AGHT+IHtg8OZd8HSJbJSLXG9LXIo13CUWPlP7uBGFyUpEioclXYwUQWi7PeibQu6svvtJV/LhG1p X-Received: by 2002:a05:6359:5f88:b0:18f:9dda:502d with SMTP id e5c5f4694b2df-197e5466abdmr1260390155d.22.1716824893134; Mon, 27 May 2024 08:48:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716824893; cv=pass; d=google.com; s=arc-20160816; b=W1USvL2HMMKdzZhORK5vEwXYsjrGdVWDrLGV8v2WdMTRmlzIyHLceHd74UkvLAlJYs sLqHoiGs8kIvhleDWGFQKDjg4VFOjyZuRfYT2+Gep8mPe2EABBYTVu7JklSvdMUCGURw qMt5PK0alfHj+x3Q+7spQ5zgIQSUm1v2ismPSjipK/AbrsYQq2q0tFs3GA+yM/cX7ULG afIL66Y5SToO1AGcN/E2GLN0AsaBbVLukJ27AxinMnYs39058EWvP8olSHyabCfoL9FE YsHg4//IySG+Jk7vhcKjvSSD97NIBni7aDU637GHRYlXhfTA2JtI6daSjJgmTc2OspnM HbOQ== ARC-Message-Signature: i=2; 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=P55Jv4h7jsUm37sll4dvV/rarKgAJHPzr9ghJjpczzE=; fh=AZT2APFvbPdudOS1qkizVnAfs4NemHT+t6OXML9ZqVY=; b=ygnelV5pOqyC+tZXhud1khtUqebP8kRsQ2+wjZrqF9vJ8y7XLf2ZFCscgMfvp8/s83 UQKEScBFtrCYFMNsWSy+5n+crwzNN9rwdyDsI6FhYQUHwGg12QXO8836oA8Dp9fbqhqk T5yzi54ZujAzrQx/SQmzpDsJ2uNteeO+drijf7tX3nS7TtvLOxN56+9b9xO8nkfcEYps t/AX/WqBU2q9ioSwhMd1HOh6iTcEWQqJXytp4xumzorTAs6loKXNm2Wlt/n748VclwjT Ij4g+I168jA4gsFtKhAtI2wV8HNYE4rNPSePlQIGyiwqzPwLWF7Q6TfwBgysJXDChUkz IzvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dolcini.it header.s=default header.b=BPhqvm4B; arc=pass (i=1 spf=pass spfdomain=dolcini.it dkim=pass dkdomain=dolcini.it dmarc=pass fromdomain=dolcini.it); spf=pass (google.com: domain of linux-kernel+bounces-191086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dolcini.it Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68221b73003si6652167a12.51.2024.05.27.08.48.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 08:48:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@dolcini.it header.s=default header.b=BPhqvm4B; arc=pass (i=1 spf=pass spfdomain=dolcini.it dkim=pass dkdomain=dolcini.it dmarc=pass fromdomain=dolcini.it); spf=pass (google.com: domain of linux-kernel+bounces-191086-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dolcini.it 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 69FB7289159 for ; Mon, 27 May 2024 15:41:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D843B61FFA; Mon, 27 May 2024 15:41:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="BPhqvm4B" Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (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 042751E868; Mon, 27 May 2024 15:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716824484; cv=none; b=aLnF3eC766rsxHj0Lo2TvO6K87uscZIW6K+zpcq7XGSWb0uQDEJGQUJuL8dTkQoj4h5DcLvLMAfHhk1muVM0gjtz/On9DUtzsTvrR2eMCVCyRrNdln2ppY+9LHEvAl3yBwBynTE1MRPvWRUzN3N9YhPB3jbTBQB/uYQAM9jPVhI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716824484; c=relaxed/simple; bh=Rj5PIlDFNaOJxdQqaPTtbgIWtQYQeE66I14+sbNsVTY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=rZzpfvxT2TUAdfnk9Z6oOzAazjfSw10GmUIGSagzkDE0oD86d4x1wzT1FS156NQbepf42BU2Hp+wUjWnaK6P2qtYu4XwEt45M4j4mykH5jEfReYcVB+jgwD2SylsDlwo7DDVh9jp2JvDVC6fl41JfKVVumFFdWPK/ygxhrOR2Lg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=BPhqvm4B; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 672EC206BF; Mon, 27 May 2024 17:41:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1716824478; bh=P55Jv4h7jsUm37sll4dvV/rarKgAJHPzr9ghJjpczzE=; h=From:To:Subject; b=BPhqvm4BoBBhnE4O2cPXIQHB/NJXT40fjf1hmOiFyo6zfwV8NP4nwXlLl2nf+eLLt E85wbIsyDWHnBEr2fS5PGzxuWkkRuQPRNS+wfx5bltZ1rnDWdkvbNcO+4/geKpmOj0 ZC+x0EIUenFLIm13ctII7MdHJZRWw2VFcQSfLh94aDROw2Scw0wesDgIpX6v/MhseO 2QFmleAM1C7+kbedAx+rVACOARDqbfRMW4v58i0DogKYdgxyQXp0V15lSbwPpu7yNm OjSmtftn7hG+mHNNh5xBtwvhU3bnKfjrwGUd3Q248F/qjN5CPfzW/UOamKtFUJsv06 ZBiUpVQK6QwyA== From: Francesco Dolcini To: Francesco Dolcini , =?UTF-8?q?Jo=C3=A3o=20Paulo=20Gon=C3=A7alves?= , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Gon=C3=A7alves?= , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 1/2] dt-bindings: iio: adc: add ti,ads1119 Date: Mon, 27 May 2024 17:40:49 +0200 Message-Id: <20240527154050.24975-2-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240527154050.24975-1-francesco@dolcini.it> References: <20240527154050.24975-1-francesco@dolcini.it> 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 From: João Paulo Gonçalves Add devicetree bindings for Texas Instruments ADS1119 16-bit ADC with I2C interface. Datasheet: https://www.ti.com/lit/gpn/ads1119 Signed-off-by: João Paulo Gonçalves Signed-off-by: Francesco Dolcini --- .../bindings/iio/adc/ti,ads1119.yaml | 122 ++++++++++++++++++ MAINTAINERS | 7 + 2 files changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml new file mode 100644 index 000000000000..ab4f01199dbe --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml @@ -0,0 +1,122 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,ads1119.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments ADS1119 ADC + +maintainers: + - João Paulo Gonçalves + +description: | + The TI ADS1119 is a precision 16-bit ADC over I2C that offers single-ended and + differential measurements using a multiplexed input. It features a programmable + gain, a programmable sample rate, an internal oscillator and voltage reference, + and a 50/60Hz rejection filter. + +properties: + compatible: + const: ti,ads1119 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + reset-gpios: + maxItems: 1 + + vref-supply: + description: + ADC external reference voltage (VREF). + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +patternProperties: + "^channel@([0-6])$": + $ref: adc.yaml + type: object + description: | + ADC channels. + + properties: + reg: + description: | + 0: Voltage over AIN0 and AIN1. + 1: Voltage over AIN2 and AIN3. + 2: Voltage over AIN1 and AIN2. + 3: Voltage over AIN0 and GND. + 4: Voltage over AIN1 and GND. + 5: Voltage over AIN2 and GND. + 6: Voltage over AIN3 and GND. + items: + - minimum: 0 + maximum: 6 + + ti,gain: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + PGA gain value. + enum: [1, 4] + default: 1 + + ti,datarate: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Data acquisition rate in samples per second. + enum: [20, 90, 330, 1000] + default: 20 + + required: + - reg + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + adc@40 { + compatible = "ti,ads1119"; + reg = <0x40>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + channel@0 { + reg = <0>; + ti,gain = <4>; + ti,datarate = <330>; + }; + + channel@4 { + reg = <4>; + ti,datarate = <1000>; + }; + + channel@5 { + reg = <5>; + ti,gain = <4>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index d6c90161c7bf..f1b2c4b815e2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22380,6 +22380,13 @@ M: Robert Richter S: Odd Fixes F: drivers/gpio/gpio-thunderx.c +TI ADS1119 ADC DRIVER +M: Francesco Dolcini +M: João Paulo Gonçalves +L: linux-iio@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/iio/adc/ti,ads1119.yaml + TI ADS7924 ADC DRIVER M: Hugo Villeneuve L: linux-iio@vger.kernel.org -- 2.39.2