Received: by 10.223.164.221 with SMTP id h29csp1554997wrb; Wed, 25 Oct 2017 02:29:57 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SR/bIHVVrq74GId6HklZRa503m7n7+OlCsll/XPIIJ1poMXQRECS3EBqTFEJiSvQ5ixn3u X-Received: by 10.101.78.207 with SMTP id w15mr1477335pgq.347.1508923797116; Wed, 25 Oct 2017 02:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508923797; cv=none; d=google.com; s=arc-20160816; b=QfI8F2H+OYgx1EeJEMcQ9W7/Od0DxHcL+fjRSVFv+Ct0CibP3HmiK7sGRPEAIJBE5q wUwnKgJJH4VwzLS6fbtUxG2+5xb37I3awk1dQyPfvuE4z9ST8+dFV9AsTKBsu/WrAKZB IAamBqzt49UtO0idhpRC+DH+XPvpFVJxhMurloxpdzfS5/mphqJSyqblvsVjUVEklYzh IFZT92UfUTnTyzlpw8be/G+ocNLZzsoT58S6Ihf+3lHHoFUtfSbzPRX8zA8TgNn96qn1 CLNQij95JNgG9qaqntbq/jkMNDsiHRXVllNUC3QErSdvzfaVV3MbPq3IKpf2b5dAoYlr QFhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=SbqJOA1vguyxCCgbrglaK6Y2zLPnbjouYs6ugaMI7ZM=; b=f/Xx5mB5esLIST9xrZeLmZXjcHHVLwQ4GxrKCeqsPeUdHZ5DLXfbY2GiyaubGJ4CxZ vtYJcDPi4qvMxgQ2Jn/lMdI8MC2S58dbXXjkuOhnAVAFjsg9r7MZ/CgdPE+xJIsSvDGt EtvcJcfxaYqT+iWO6iAbt+We7kZQl8g0ZJyLPYVjoPuDcsnhAD71OCe9YOwiawYjBpqL 8Ya7snY/ob3ffRQK3OwyXEfwbskwLs/NbmnwWehJwn73/TnVac+2ZmsE9kn5cYvWUTRr hTdXCp1soZzXE1lSPKhL4LHqzXq/mGIC5SD+PbYM0u+8nVlNNlciHUgXMxDMHbFK2f7u o8fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c41si1382967plj.279.2017.10.25.02.29.43; Wed, 25 Oct 2017 02:29:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932438AbdJYJ3B (ORCPT + 99 others); Wed, 25 Oct 2017 05:29:01 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:15815 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932315AbdJYJ25 (ORCPT ); Wed, 25 Oct 2017 05:28:57 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9P9ORfZ011811; Wed, 25 Oct 2017 11:28:05 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2dtg42jmxp-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 25 Oct 2017 11:28:05 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 94A9734; Wed, 25 Oct 2017 09:28:04 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6ABC215B9; Wed, 25 Oct 2017 09:28:04 +0000 (GMT) Received: from localhost (10.75.127.48) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 25 Oct 2017 11:28:03 +0200 From: Fabrice Gasnier To: , CC: , , , , , , , , , , , , , Subject: [PATCH v2 1/3] dt-bindings: iio: adc: stm32: add support for diff channels Date: Wed, 25 Oct 2017 11:27:43 +0200 Message-ID: <1508923665-2274-2-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508923665-2274-1-git-send-email-fabrice.gasnier@st.com> References: <1508923665-2274-1-git-send-email-fabrice.gasnier@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-25_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org STM32H7 ADC channels may be configured either as single-ended or differential. Add 'st,adc-diff-channels' property to support differential channels. Differential channels are defined as a pair of positive and negative inputs: vinp & vinn. Signed-off-by: Fabrice Gasnier --- Changes in v2: - Add differential channels example - Add a note on mixed single-ended / differential channels --- .../devicetree/bindings/iio/adc/st,stm32-adc.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt index 48bfcaa3..e8bb824 100644 --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt @@ -62,6 +62,15 @@ Required properties: - st,adc-channels: List of single-ended channels muxed for this ADC. It can have up to 16 channels on stm32f4 or 20 channels on stm32h7, numbered from 0 to 15 or 19 (resp. for in0..in15 or in0..in19). +- st,adc-diff-channels: List of differential channels muxed for this ADC. + Depending on part used, some channels can be configured as differential + instead of single-ended (e.g. stm32h7). List here positive and negative + inputs pairs as , ,... vinp and vinn are numbered + from 0 to 19 on stm32h7) + Note: At least one of "st,adc-channels" or "st,adc-diff-channels" is required. + Both properties can be used together. Some channels can be used as + single-ended and some other ones as differential (mixed). But channels + can't be configured both as single-ended and differential (invalid). - #io-channel-cells = <1>: See the IIO bindings section "IIO consumers" in Documentation/devicetree/bindings/iio/iio-bindings.txt @@ -111,3 +120,18 @@ Example: ... other adc child nodes follow... }; + +Example to setup: +- channel 1 as single-ended +- channels 2 & 3 as differential (with resp. 6 & 7 negative inputs) + + adc: adc@40022000 { + compatible = "st,stm32h7-adc-core"; + ... + adc1: adc@0 { + compatible = "st,stm32h7-adc"; + ... + st,adc-channels = <1>; + st,adc-diff-channels = <2 6>, <3 7>; + }; + }; -- 1.9.1 From 1582216067293735494@xxx Wed Oct 25 08:07:06 +0000 2017 X-GM-THRID: 1581553715797412419 X-Gmail-Labels: Inbox,Category Forums