From patchwork Mon Aug 19 14:11:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Trevor Gamblin X-Patchwork-Id: 13768419 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (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 7DEC216CD0D for ; Mon, 19 Aug 2024 14:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724076715; cv=none; b=uAVWgG7zOVxuL5Or7ssmI56xbRjyTaJ/KSdXVpo9C6Y19FumskA1wIFiPmeetIv6B4sSalW57ap1IONgy5ANkHTngpofsJjUQDoRDJgPDurQTbMPsY0o3alOk4nEe5oZJRrRN9Fz3ovAtWxKCrcuHZzppsVpeyKFABlnD0qWkHs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724076715; c=relaxed/simple; bh=C8n6al0UQHRK5+RU6bfx1TRuStxVMF1ocwSi47nH5Tg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ESat/rDD8e/Cibst7+IzQB9SrrH7gDMZik5exIBgBp7bPh9nastlPj98xvLBFwpF+/g/uP7L0PQKMPZ3M3C/YeUFM3BntKgoGEJAL8Xn7iMTf767PI9VcLFEQ7O3ZXXeSIZmsQMD4TvtemR585CwdxB0pUOffVw8YiLCCOAOzhU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=hcOwyAbA; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="hcOwyAbA" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-7a1d066a5daso294617485a.3 for ; Mon, 19 Aug 2024 07:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1724076712; x=1724681512; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=fXNNTNSx46SE+zZh2rt7jOj3EPKkFSdZlt64/WcUGsY=; b=hcOwyAbAFIWRWdcp1040seH4iBroVJxPygcACWxbH25u6hPWene4ZHam9NfQdoJkdi 8sPiUSYjqke+sRjhK7sNdS35K9ftlkCBkDVKHiigi2/Jb3dag6muvxukI1mezLhwgmHy xu0qLudfRcZdkPMcrUcHmIzV1La6m412bK4YtSYU2tBhPo3nkrL822QgOE6rl/pArWzj wfxWShrWzuqDMN9A+Y+c5eLZqRxHA9RSEU09e/Sqi+f95p5up+SNbqHcc+tt7B/L/o3f YCnCpx5/AHHJ374c4rRGKdUq/Fibc5nNyLTKCpYhVKUSHNFuKi9m8xUARNu653XwfhFl tX6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724076712; x=1724681512; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fXNNTNSx46SE+zZh2rt7jOj3EPKkFSdZlt64/WcUGsY=; b=ZD9vq1LYzidChJ/w44nHZcLjWia03HnwbmWY3mEBWFoWWzcP9KKtYrnZH0MeFMR/cT 79/uVBlgU8PWDdRyB5cfVrmbWzXFjP8MnfvltEBis7BFsM4zF+3wp34NmX4ynt0BVhhG /i97+szD12K0t5L1wqT3YrmTZCv8BR+Kp1R/Wtk4tMvA+UN4GRoK83woDOy5YkWEugEQ Fxm6deYMFMt16UfEnx2O4Nfh3z+x05OTai0ZNfnePbe/Udg2wtngRZunWEdhzepp3o12 dNXDgNSrJRZEpCa2MCCu0veKdIFu4DjFRfE7IMUcgeHNmwZ6I/q11xvy4SPWoXvfexVY AIzg== X-Gm-Message-State: AOJu0YzDZgWliQiohUEFY75/mWk3Tap+tUp2HkvYVb51Euo6jgT6oD0b ZDw+mPMcgdDIJ4Ph5I/Kf2c+R8uNNlwCDsQ0BvNV8Oh/Pb/lzCqT+iT6CU/2lVE= X-Google-Smtp-Source: AGHT+IHeOmp7OwQlB723ECayQeKNOcr3tyjBqBm4/OF+5vstRaDlZy5H4OQfNQmO5viptck1XMp7Bg== X-Received: by 2002:a05:620a:44d6:b0:7a3:49dc:f084 with SMTP id af79cd13be357-7a506954c44mr1227922185a.35.1724076712103; Mon, 19 Aug 2024 07:11:52 -0700 (PDT) Received: from [127.0.1.1] (d24-150-219-207.home.cgocable.net. [24.150.219.207]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-454c0186bf4sm17630871cf.83.2024.08.19.07.11.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 07:11:51 -0700 (PDT) From: Trevor Gamblin Date: Mon, 19 Aug 2024 10:11:43 -0400 Subject: [PATCH v3 1/3] dt-bindings: iio: adc: add AD762x/AD796x ADCs Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240819-ad7625_r1-v3-1-75d5217c76b5@baylibre.com> References: <20240819-ad7625_r1-v3-0-75d5217c76b5@baylibre.com> In-Reply-To: <20240819-ad7625_r1-v3-0-75d5217c76b5@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , David Lechner , Uwe Kleine-Konig Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Trevor Gamblin X-Mailer: b4 0.14.1 Add a binding specification for the Analog Devices Inc. AD7625, AD7626, AD7960, and AD7961 ADCs. Signed-off-by: Trevor Gamblin Reviewed-by: Conor Dooley --- .../devicetree/bindings/iio/adc/adi,ad7625.yaml | 176 +++++++++++++++++++++ MAINTAINERS | 9 ++ 2 files changed, 185 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7625.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7625.yaml new file mode 100644 index 000000000000..8848562af28f --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7625.yaml @@ -0,0 +1,176 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7625.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices Fast PulSAR Analog to Digital Converters + +maintainers: + - Michael Hennerich + - Nuno Sá + +description: | + A family of single channel differential analog to digital converters. + + * https://www.analog.com/en/products/ad7625.html + * https://www.analog.com/en/products/ad7626.html + * https://www.analog.com/en/products/ad7960.html + * https://www.analog.com/en/products/ad7961.html + +properties: + compatible: + enum: + - adi,ad7625 + - adi,ad7626 + - adi,ad7960 + - adi,ad7961 + + vdd1-supply: true + vdd2-supply: true + vio-supply: true + + ref-supply: + description: + Voltage regulator for the external reference voltage (REF). + + refin-supply: + description: + Voltage regulator for the reference buffer input (REFIN). + + clocks: + description: + The clock connected to the CLK pins, gated by the clk_gate PWM. + maxItems: 1 + + pwms: + items: + - description: PWM connected to the CNV input on the ADC. + - description: PWM that gates the clock connected to the ADC's CLK input. + + pwm-names: + items: + - const: cnv + - const: clk_gate + + io-backends: + description: + The AXI ADC IP block connected to the D+/- and DCO+/- lines of the + ADC. An example backend can be found at + http://analogdevicesinc.github.io/hdl/projects/pulsar_lvds/index.html. + maxItems: 1 + + adi,no-dco: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates the wiring of the DCO+/- lines. If true, then they are + grounded and the device is in self-clocked mode. If this is not + present, then the device is in echoed clock mode. + + adi,en0-always-on: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates if EN0 is hard-wired to the high state. If neither this + nor en0-gpios are present, then EN0 is hard-wired low. + + adi,en1-always-on: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates if EN1 is hard-wired to the high state. If neither this + nor en1-gpios are present, then EN1 is hard-wired low. + + adi,en2-always-on: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates if EN2 is hard-wired to the high state. If neither this + nor en2-gpios are present, then EN2 is hard-wired low. + + adi,en3-always-on: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates if EN3 is hard-wired to the high state. If neither this + nor en3-gpios are present, then EN3 is hard-wired low. + + en0-gpios: + description: + Configurable EN0 pin. + + en1-gpios: + description: + Configurable EN1 pin. + + en2-gpios: + description: + Configurable EN2 pin. + + en3-gpios: + description: + Configurable EN3 pin. + +required: + - compatible + - vdd1-supply + - vdd2-supply + - vio-supply + - clocks + - pwms + - pwm-names + - io-backends + +allOf: + - if: + required: + - ref-supply + then: + properties: + refin-supply: false + - if: + required: + - refin-supply + then: + properties: + ref-supply: false + - if: + properties: + compatible: + contains: + enum: + - adi,ad7625 + - adi,ad7626 + then: + properties: + en2-gpios: false + en3-gpios: false + adi,en2-always-on: false + adi,en3-always-on: false + + - if: + properties: + compatible: + contains: + enum: + - adi,ad7960 + - adi,ad7961 + then: + # ad796x parts must have one of the two supplies + oneOf: + - required: [ref-supply] + - required: [refin-supply] + +additionalProperties: false + +examples: + - | + #include + adc { + compatible = "adi,ad7625"; + vdd1-supply = <&supply_5V>; + vdd2-supply = <&supply_2_5V>; + vio-supply = <&supply_2_5V>; + io-backends = <&axi_adc>; + clocks = <&ref_clk>; + pwms = <&axi_pwm_gen 0 0>, <&axi_pwm_gen 1 0>; + pwm-names = "cnv", "clk_gate"; + en0-gpios = <&gpio0 86 GPIO_ACTIVE_HIGH>; + en1-gpios = <&gpio0 87 GPIO_ACTIVE_HIGH>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 42decde38320..2361f92751dd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1260,6 +1260,15 @@ F: Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml F: drivers/iio/addac/ad74413r.c F: include/dt-bindings/iio/addac/adi,ad74413r.h +ANALOG DEVICES INC AD7625 DRIVER +M: Michael Hennerich +M: Nuno Sá +R: Trevor Gamblin +S: Supported +W: https://ez.analog.com/linux-software-drivers +W: http://analogdevicesinc.github.io/hdl/projects/pulsar_lvds/index.html +F: Documentation/devicetree/bindings/iio/adc/adi,ad7625.yaml + ANALOG DEVICES INC AD7768-1 DRIVER M: Michael Hennerich L: linux-iio@vger.kernel.org