From patchwork Sat Apr 24 17:03:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 426822 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2300247jao; Sat, 24 Apr 2021 10:05:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+JlMiMXKcvwuTLgT6EIQ2T1TRar42QFWYwqP8zqsitC9x/S/gFsuBR6uk5yCw/S5VSMs7 X-Received: by 2002:a17:902:b592:b029:ec:b451:5805 with SMTP id a18-20020a170902b592b02900ecb4515805mr9752086pls.72.1619283923578; Sat, 24 Apr 2021 10:05:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619283923; cv=none; d=google.com; s=arc-20160816; b=hnBvCXntky8RLWno1x1Z62vsL6mYLaEg/nU0HmBqybb/VBPg2dYN3kMMXs/ReSlnNV BK+q0T2rIWKaYzP3IHb6RnFnFqU4xVTualLLtzCIygb3YNO7kOxKKcyh845Li4QIV3H3 BpMlfTyDI0x/WJHo9b5lMh+7fa5DoIyX9tJeNCDXMbsWgyX/QTap2YFn/dfdTkVS9k3t wfr/DwF/Ds8vG5I06y+u3DKyUaZVXD3F3zRRIg6LKEbA+yp7WxF8V1qH3JsR6LbD+OgX +RLD4ZWxDXPfXahOoCPjix+c7FW+1Nrx0W2xYhVu9b4IHL2iG70cboCUPUBDAaNCRIRb q9pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ySXmv/4iqjv3yfhyzyrIpHUGUyOK3jXYqrDTP7CByQ0=; b=d9Cz2wSDe70WEuwXqT8SdurX68jInEOvLXHDo2LIpSKttR4ZYxO0eGaL8YkAw997WV jL0FaDdbk5nJi3AxkGAGjXZfixh9Vj5Gy8E5pF6rGKb9d7yRjsN+NXuaKj+s2U4Szow6 +e+aNVsIX00XodthcY75E4/6nKQiyNx+2VIjlfk9k6Q4KSJF25M8cmn0jLMcZDRoKGU3 w620LHwnAVmXKGzURFnJKwXl7y8ARHf4fWKaEY/CmxZhfS5guLm11SQeqzKZNEbIvY9b eTZA24p5No10rGTxvRNs7uhme1fd44+Hz791+nw+iN4ohgC01ddnJQPKHk0A4PIXMwvA tiPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V6hwH693; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si13299978pji.139.2021.04.24.10.05.23; Sat, 24 Apr 2021 10:05:23 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V6hwH693; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233684AbhDXRF5 (ORCPT + 6 others); Sat, 24 Apr 2021 13:05:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:47190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233695AbhDXRFy (ORCPT ); Sat, 24 Apr 2021 13:05:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5846061466; Sat, 24 Apr 2021 17:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619283916; bh=CIr0F/ldmetVzCY7jomzQI+Bkz6vdQinCpWv3hZwks4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V6hwH693ybDOVZgz9EjZzCLrRYSvlKzUj80N0PYizNbVpw7fcC/2FlX4i67ijp3jS ypHJ7QX9/aaIt0QQSc6YEuemsQPRlib0/OjsHfmwEvujXnUsVZrUE7kYnOxBkT1z1w 0UAoI1SmW4URe3FZ+gOvf3YC2dylsIYb78HpQNvHz0HNmBPou0ZXLX6dJpsYZkF719 0MT0TN+MI9z2fbVvE5duA1/+i4/wmY6QOvlBM12/BcAsJuhHbDCL2R0lZRVbEuUmdI Pvpnt9wUVZjdsjnqwugMNTNz+3wbpFVTquLM5yofjrsbNodwPusetzbvAWSkUs0DK3 Wl8abSABNTG1Q== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring Cc: Lars-Peter Clausen , devicetree@vger.kernel.org, Jonathan Cameron , Michael Hennerich , Rob Herring Subject: [PATCH v3 2/2] dt-bindings:iio:adc:adi, ad7474: Add missing binding document Date: Sat, 24 Apr 2021 18:03:46 +0100 Message-Id: <20210424170346.526242-3-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210424170346.526242-1-jic23@kernel.org> References: <20210424170346.526242-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This binding covers class of simple SPI ADCs which only provide data output - they don't have MOSI pin. The only real variation between them is over how many supplies they use and which one is used for the reference. Michael listed as maintainer for this one as it is his driver and falls under the catch all MAINTAINERS entry for ADI devices. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Reviewed-by: Rob Herring --- .../bindings/iio/adc/adi,ad7476.yaml | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) -- 2.31.1 diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml new file mode 100644 index 000000000000..cf711082ad7d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml @@ -0,0 +1,174 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019 Analog Devices Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7476.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AD7476 and similar simple SPI ADCs from multiple manufacturers. + +maintainers: + - Michael Hennerich + +description: | + A lot of simple SPI ADCs have very straight forward interfaces. + They typically don't provide a MOSI pin, simply reading out data + on MISO when the clock toggles. + +properties: + compatible: + enum: + - adi,ad7091 + - adi,ad7091r + - adi,ad7273 + - adi,ad7274 + - adi,ad7276 + - adi,ad7277 + - adi,ad7278 + - adi,ad7466 + - adi,ad7467 + - adi,ad7468 + - adi,ad7475 + - adi,ad7476 + - adi,ad7476a + - adi,ad7477 + - adi,ad7477a + - adi,ad7478 + - adi,ad7478a + - adi,ad7495 + - adi,ad7910 + - adi,ad7920 + - adi,ad7940 + - ti,adc081s + - ti,adc101s + - ti,adc121s + - ti,ads7866 + - ti,ads7867 + - ti,ads7868 + - lltc,ltc2314-14 + + reg: + maxItems: 1 + + vcc-supply: + description: + Main powersupply voltage for the chips, sometimes referred to as VDD on + datasheets. If there is no separate vref-supply, then this is needed + to establish channel scaling. + + vdrive-supply: + description: + Some devices have separate supply for their digital control side. + + vref-supply: + description: + Some devices have a specific reference voltage supplied on a different pin + to the other supplies. Needed to be able to establish channel scaling + unless there is also an internal reference available (e.g. ad7091r) + + spi-max-frequency: true + + adi,conversion-start-gpios: + description: A GPIO used to trigger the start of a conversion + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +allOf: + # Devices where reference is vcc + - if: + properties: + compatible: + contains: + enum: + - adi,ad7091 + - adi,ad7276 + - adi,ad7277 + - adi,ad7278 + - adi,ad7466 + - adi,ad7467 + - adi,ad7468 + - adi,ad7940 + - ti,adc081s + - ti,adc101s + - ti,adc121s + - ti,ads7866 + - ti,ads7868 + required: + - vcc-supply + # Devices with a vref + - if: + properties: + compatible: + contains: + enum: + - adi,ad7091r + - adi,ad7273 + - adi,ad7274 + - adi,ad7475 + - lltc,ltc2314-14 + then: + properties: + vref-supply: true + else: + properties: + vref-supply: false + # Devices with a vref where it is not optional + - if: + properties: + compatible: + contains: + enum: + - adi,ad7273 + - adi,ad7274 + - adi,ad7475 + - lltc,ltc2314-14 + then: + required: + - vref-supply + - if: + properties: + compatible: + contains: + enum: + - adi,ad7475 + - adi,ad7495 + then: + properties: + vdrive-supply: true + else: + properties: + vdrive-supply: false + - if: + properties: + compatible: + contains: + enum: + - adi,ad7091 + - adi,ad7091r + then: + properties: + adi,conversion-start-gpios: true + else: + properties: + adi,conversion-start-gpios: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad7091r"; + reg = <0>; + spi-max-frequency = <5000000>; + vcc-supply = <&adc_vcc>; + vref-supply = <&adc_vref>; + }; + }; +...