Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1640177pxt; Sat, 7 Aug 2021 19:03:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFMg6FTHWoWZNx14oM/Z0YLGk9SJm9K9mNq/lkB6kNyQN08T9dd2nVqqlm7XnEdPOOEhxS X-Received: by 2002:a05:6402:4245:: with SMTP id g5mr10735964edb.222.1628388196617; Sat, 07 Aug 2021 19:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628388196; cv=none; d=google.com; s=arc-20160816; b=ejwkzkJKQNmo3qvBMNvkK7GIfGCzQmKoElkkq6AWknX7gg9ESl89mKy5xvmtcZZRvB OPhuQpUgKMnoKEU+31TjMILRtDwzRBSxQchfs3EGwtuTze54K8tscWGkmelrln68Suq/ W40Y6XQ5Kxn/DwmRwcDRfxsvgV70yG3LSPBJOFUhd0L73NrCfJ2RE9arorziijpg7dSF rWLYS8o5N1WfZjyc3npmBSX9qjz6YBN2LLo0GtC/+LW4tIrvmUOOqpsD8uRaGfECkO6+ fkaHHG5YsYClJZ7vouxfTjyBpUPF/f5LTOOqc+E+feuZE06ZFS8FW4b1C4Oxk7DAr/gx lhIg== 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=615kMpMCOocH22xvYuBl/egorml5TWflMxM6T2l3ME4=; b=Ek740y3RTBNbTtw5TgkRfpub512i4g5Wrokvi85C+m1QlscI5pH03QcdeWAIMk8BGE hT1E/Whkp99A1MhWeKBnaUB7cvEchoj+SLChHXxe6OHiixc0POKdF9w5sYGnnydkNFsX Xv5OLVOHKoqM+TvPvFn9WBdOcVmjIHGiY7DTezA4lO/bEQLdiPd5PY6KTb+KV3YJ3TBg RFDGW1NFFky0wJBJ3DHYslIwrWmAN8sZUmbqJbdwMOqPFxfwvm3Cavj7AgIx6RptESHn 5CO8P6R2VcW2uFFoOVwkXNcyuuIA4iOG/j0uy85YhVGQN2qfqFZFteX9utIHGSCBiFE1 +K/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RZpZDh5N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h20si12284242ejc.747.2021.08.07.19.02.54; Sat, 07 Aug 2021 19:03:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=RZpZDh5N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230332AbhHHB56 (ORCPT + 99 others); Sat, 7 Aug 2021 21:57:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhHHB5y (ORCPT ); Sat, 7 Aug 2021 21:57:54 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD466C0613CF; Sat, 7 Aug 2021 18:57:34 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id em4so7219276qvb.0; Sat, 07 Aug 2021 18:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=615kMpMCOocH22xvYuBl/egorml5TWflMxM6T2l3ME4=; b=RZpZDh5Nf9S1QhoBOJRE8JjpsRm34WH+ogmJ+Ec9B+JOVOmXpaGCu1340y7cvwxq3j PnzjiIiivp45gBNCXI41aIWGGEfy/3FBQgM4uwc6EIPLbcx+bkBt4f4mYk0zP8giEbYP 9TmrNFvhfi61h6tT5YwBAMU5IxOv+eyh399hLa63qWY6FWwmItvffpHOvghR4E0ecBvF 7TiRLzBlc8vapDoZIk4uhZ54TReoLhQBxWjbHCSFfIH/Ek/qEDfd24En0H2XAf3/drQi qtz2RsCWb7lQ5yTl9z+/jNvwT9QmimqxjneZRT4yWqWa11aTZsbDpVSg+YBF3kr8a4of cw7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=615kMpMCOocH22xvYuBl/egorml5TWflMxM6T2l3ME4=; b=aBgbz1O0p3mN8thGLd6+3P/YjgAWdLqrRWeIDTBoixQEAbFqavyyNX3xu4pSyQOQwJ lb4K/UyIMiMo+MREWYWtvrvGkD2gCE+ziamUIKXVYK7fGuDH5ybnl/+7e/g6pIU8oqeX Nxay9OBF0IqjM9xIE1qHFQCDCXs7HOpT4hvwwDbboFPoDz9t/ipKo0BQNNEtFhKGeTmW KrDYESMRmmWURLIThqtFzMsI2v6VY0IP+E+1OL1LlSxw0JHflmQy9GZ0mw/XLP9T2Sjn dLmBl+Utjdaf1Jaiz5NQrDvVCtAym8F+EDyAb5We9WluvUJUFJsMvpWVQvqkIywGSbXf AtKg== X-Gm-Message-State: AOAM533ktrOiD8ZiN3f4Wpx5eZpila/kzLgGOJ13wzEqq6E5oRuwlHDb m1j7AHTc5tu6aWjjfirfTVo= X-Received: by 2002:a05:6214:1933:: with SMTP id es19mr170063qvb.42.1628387854101; Sat, 07 Aug 2021 18:57:34 -0700 (PDT) Received: from shaak.xiphos.ca (198-48-202-89.cpe.pppoe.ca. [198.48.202.89]) by smtp.gmail.com with ESMTPSA id k24sm1569612qki.11.2021.08.07.18.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 18:57:33 -0700 (PDT) From: Liam Beguin To: liambeguin@gmail.com, lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, charles-antoine.couret@essensium.com, Nuno.Sa@analog.com Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org Subject: [PATCH v5 4/5] dt-bindings: iio: adc: ad7949: add per channel reference Date: Sat, 7 Aug 2021 21:56:58 -0400 Message-Id: <20210808015659.2955443-5-liambeguin@gmail.com> X-Mailer: git-send-email 2.32.0.452.g940fe202adcb In-Reply-To: <20210808015659.2955443-1-liambeguin@gmail.com> References: <20210808015659.2955443-1-liambeguin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liam Beguin Add bindings documentation describing per channel reference voltage selection. This adds the adi,internal-ref-microvolt property, and child nodes for each channel. This is required to properly configure the ADC sample request based on which reference source should be used for the calculation. Signed-off-by: Liam Beguin Reviewed-by: Rob Herring --- .../bindings/iio/adc/adi,ad7949.yaml | 69 +++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml index 9b56bd4d5510..893f72b8081e 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml @@ -26,19 +26,63 @@ properties: reg: maxItems: 1 + vrefin-supply: + description: + Buffered ADC reference voltage supply. + vref-supply: description: - ADC reference voltage supply + Unbuffered ADC reference voltage supply. spi-max-frequency: true - "#io-channel-cells": + '#io-channel-cells': const: 1 + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + required: - compatible - reg - - vref-supply + +patternProperties: + '^channel@([0-7])$': + type: object + description: | + Represents the external channels which are connected to the ADC. + + properties: + reg: + description: | + The channel number. + Up to 4 channels, numbered from 0 to 3 for adi,ad7682. + Up to 8 channels, numbered from 0 to 7 for adi,ad7689 and adi,ad7949. + items: + minimum: 0 + maximum: 7 + + adi,internal-ref-microvolt: + description: | + Internal reference voltage selection in microvolts. + + If no internal reference is specified, the channel will default to the + external reference defined by vrefin-supply (or vref-supply). + vrefin-supply will take precedence over vref-supply if both are defined. + + If no supplies are defined, the reference selection will default to + 4096mV internal reference. + + enum: [2500000, 4096000] + default: 4096000 + + required: + - reg + + additionalProperties: false additionalProperties: false @@ -49,9 +93,26 @@ examples: #size-cells = <0>; adc@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "adi,ad7949"; reg = <0>; - vref-supply = <&vdd_supply>; + vrefin-supply = <&vdd_supply>; + + channel@0 { + adi,internal-ref-microvolt = <4096000>; + reg = <0>; + }; + + channel@1 { + adi,internal-ref-microvolt = <2500000>; + reg = <1>; + }; + + channel@2 { + reg = <2>; + }; }; }; ... -- 2.32.0.452.g940fe202adcb