From patchwork Wed May 16 17:51:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 10404567 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 09F8B601F7 for ; Wed, 16 May 2018 17:56:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECA6B285EB for ; Wed, 16 May 2018 17:56:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1793285F9; Wed, 16 May 2018 17:56:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2B605285EB for ; Wed, 16 May 2018 17:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=g+BV9EaetqucHErWaCM1s5LMqgU+wuC9Br11aVpTrjg=; b=YGcEDub4V6eOLCAoycGUlvspDh C2NRXq2jBhgEG3TxZ3bRn54ZcevTcF2liDQyeildSAkOt94/zK/qjhcbC28IidmrUiTtOla2c523W /KEFAmcgsJXynGz0sI60sAPwRcTaqtqngHmGuD6oekc4DObm0NWIJ7vF1gKIxJhkYVWrmzJV1/2Sk B4cKfk9F7/9VtFwgdP21vIJFwYblAndkL6MCI0YAqk+QuDhSdk9vK9hmcGFZv8yNM9yv8ehetYJV7 74RAwiC1FhEFxRmARwQCPWWomay/FhqbczFquWjPEUq1HflvIwaWPbbW3sV2P8vP4jkd/nyryc1AM htz+9ghA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJ0fR-0000d8-PY; Wed, 16 May 2018 17:56:49 +0000 Received: from mail-yb0-x242.google.com ([2607:f8b0:4002:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJ0az-0005NS-31 for linux-arm-kernel@lists.infradead.org; Wed, 16 May 2018 17:52:24 +0000 Received: by mail-yb0-x242.google.com with SMTP id o14-v6so558401ybq.3 for ; Wed, 16 May 2018 10:52:02 -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; bh=UnpcblY91fwi06ZQzea3dG/BYp8xan+NU3z/6Idzi9o=; b=k0dD9QffjqHrAN5Fr806E/kTTUOPrJBW93TLqexWXrga5V8zcVlDw0MnjnZEoF6KjK HFB50qbp9HsGC4oARwdr5GB5knQJjZHRGFjbTkx1H13SqHvyFuENt9jbZFUi4jKjqJy7 UFVbopXy3N1wMpz/xeXu60aUw97VynyvWZW9LKpt0rjGGNlYrqnkt91p8FLs9KGf+EDd kIVcYarPiAowOcXF03p7q27H1Gywnn2zT/rmxrs6FyxbpG61bl+Qm5m0pfuEBXpIQV65 ZQASxdBO+HGns1lUYpkBfqfomPrCTO7fJ7cxjMNt4Q1kCt50o+/HkE/nijTThMlgU7ml NNmg== 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; bh=UnpcblY91fwi06ZQzea3dG/BYp8xan+NU3z/6Idzi9o=; b=OU8LvagAPydUsRtj/CDLkP6gE4UWr5K7kg/9Mjz3xUxB9BRPyw/vTVjsaiulgeY3Z6 RR5cRsp2ndgz+r4blMMgrVPzjBkaD41lRmZoxgq6jjUBgtRGtrJWcoGTTcio5479maoU d7f60cXm14XCScVkp+5C8uQqbd5P/bOjWY7xqG2z4Igq19XU8E0JlNIUGJobSv4wXaOQ JNPad6H73QTYo8vCChHMpABYXDVekZfKaVXA7MbUhV2VP9jQhofRcsdP5UlDAuGC2yOD 7DvTwL05tMVSk8/PBgWdA9302n/qC9WIuM68LlbmSw/sVl7SIdj5jy2RR8UIVY7J5KDO VFRg== X-Gm-Message-State: ALKqPwdZ8PkL4lkrx4Y2wVUsuMPxYGLcNRgx9SlpivfNrey41RbsNXMD L8cKedVjFlPyl6RsjVI+dTs= X-Google-Smtp-Source: AB8JxZokqClxRLV9CLChWh5cCLnV7grs4pHPAbCJ+Kfs0sUsThmRlpYRTOhxKBujoCpHemtzM1IxXw== X-Received: by 2002:a25:e08:: with SMTP id 8-v6mr1080743ybo.71.1526493121644; Wed, 16 May 2018 10:52:01 -0700 (PDT) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id r12-v6sm1088714ywl.59.2018.05.16.10.52.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 May 2018 10:52:01 -0700 (PDT) From: William Breathitt Gray To: jic23@kernel.org Subject: [PATCH v6 6/9] dt-bindings: counter: Document stm32 quadrature encoder Date: Wed, 16 May 2018 13:51:55 -0400 Message-Id: X-Mailer: git-send-email 2.17.0 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180516_105213_181731_B165FD5F X-CRM114-Status: GOOD ( 14.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, benjamin.gaignard@st.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray , Rob Herring , fabrice.gasnier@st.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Benjamin Gaignard Add bindings for STM32 Timer quadrature encoder. It is a sub-node of STM32 Timer which implement the counter part of the hardware. Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Benjamin Gaignard Signed-off-by: William Breathitt Gray --- .../bindings/counter/stm32-timer-cnt.txt | 26 +++++++++++++++++++ .../devicetree/bindings/mfd/stm32-timers.txt | 7 +++++ 2 files changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt diff --git a/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt b/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt new file mode 100644 index 000000000000..377728128bef --- /dev/null +++ b/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt @@ -0,0 +1,26 @@ +STMicroelectronics STM32 Timer quadrature encoder + +STM32 Timer provides quadrature encoder counter mode to detect +angular position and direction of rotary elements, +from IN1 and IN2 input signals. + +Must be a sub-node of an STM32 Timer device tree node. +See ../mfd/stm32-timers.txt for details about the parent node. + +Required properties: +- compatible: Must be "st,stm32-timer-counter". +- pinctrl-names: Set to "default". +- pinctrl-0: List of phandles pointing to pin configuration nodes, + to set IN1/IN2 pins in mode of operation for Low-Power + Timer input on external pin. + +Example: + timers@40010000 { + compatible = "st,stm32-timers"; + ... + counter { + compatible = "st,stm32-timer-counter"; + pinctrl-names = "default"; + pinctrl-0 = <&tim1_in_pins>; + }; + }; diff --git a/Documentation/devicetree/bindings/mfd/stm32-timers.txt b/Documentation/devicetree/bindings/mfd/stm32-timers.txt index 1db6e0057a63..ff9c14ada30b 100644 --- a/Documentation/devicetree/bindings/mfd/stm32-timers.txt +++ b/Documentation/devicetree/bindings/mfd/stm32-timers.txt @@ -23,6 +23,7 @@ Optional parameters: Optional subnodes: - pwm: See ../pwm/pwm-stm32.txt - timer: See ../iio/timer/stm32-timer-trigger.txt +- counter: See ../counter/stm32-timer-cnt.txt Example: timers@40010000 { @@ -43,4 +44,10 @@ Example: compatible = "st,stm32-timer-trigger"; reg = <0>; }; + + counter { + compatible = "st,stm32-timer-counter"; + pinctrl-names = "default"; + pinctrl-0 = <&tim1_in_pins>; + }; };