From patchwork Thu Jun 21 21:08:34 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: 10480769 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 938BE60230 for ; Thu, 21 Jun 2018 21:49:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 796AC28F64 for ; Thu, 21 Jun 2018 21:49:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C13028F97; Thu, 21 Jun 2018 21:49:56 +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 1F49028F64 for ; Thu, 21 Jun 2018 21:49:56 +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=ds7TgCI4adAtENO1SWa6tbSY8qkJdOmiGky2gBio/4g=; b=KVZjNy22YkWbDWkjt83SsshKGi NO03xZq+SDmTnKua2b0qvXfJ+jq5Iqg9h6BQ2DI4q3kFw/YNIpMQNrwGEo3T5Uq9K3fl4igbzEv40 nYTBGfGDQnqRcsEhQnKRtqsYTlKSS9iCpGsbt/bVpAUspm5Pi3szwHSNOTOheUwIdkyANueoe09R0 wiydxbKpIP/QfallxCsa88NlXXETKfdgaHxxPEr0VW1RFW8fN1t2zsGXWHGeID7vQ8ZxmUzhYmcEI byZ7vShETja5rBhvM2ZySpm/ehjDEXOrcx5kjgeVX5fL8TIwKD0d99XxEFiLAV74l7F2F231QRQ0u WfGntm1Q==; 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 1fW7Sk-0001Ng-NN; Thu, 21 Jun 2018 21:49:54 +0000 Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fW6p3-0001BR-GZ for linux-arm-kernel@lists.infradead.org; Thu, 21 Jun 2018 21:09:58 +0000 Received: by mail-yw0-x242.google.com with SMTP id b125-v6so1679599ywe.1 for ; Thu, 21 Jun 2018 14:08:42 -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=BtiNSIqI/RoeMxqgEMRsgrcPVJ6BM+TlUKL1e42nYek=; b=TG7Dfor3ioEr472TeOITMQJXfjlrDDhD7eF6OjPwSme8lxZy3dwC/PcOPFQYsrx9I1 mn77US38clCJysWBkN8mjODLGvBHV7NMpgxHeckbJ/p7MiXmPYdgr2k0+eRslcMKRCvh opLCXA2YSEVeaWdoVycZEDQFzz7/ibbQaOALwc3o6nbZFpJr2rGBmeydUOimSXS1e1tj kLkxZ+huWI+GZbtNs8j4gLfbR4SWT6X9fUj2Y+RzTIe2bde8/mXE6gNvNHGDNIE50jsJ WWwHd8PhiRfU3xeTkccU13qVjys95i2gBifP/D1mFRcYT/yR5jx3jIWm8h9OCTacKIwA 2wJQ== 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=BtiNSIqI/RoeMxqgEMRsgrcPVJ6BM+TlUKL1e42nYek=; b=saaE2cdlw7pPxb3pVQQTKRMY1aX/jI0aDyTDCWpT8leWVxbdUe+VJP4M/LUCHyMXhF aSPytUF7MTWY/CthjLO+mxJ0HIqttvCeOQAMmlZ7hh0o/Iqc4qlZWZigVZenSVPs6iQj vIZ1UU22hs2R8vQ0n5k963+Ebcb6/A4zYHzONrZAKO+aYuuIVkgdRqi/HdQIjyqGhvi6 rmffMgB0W2TRomo98tXoSL+y9Fk69fnu3PH5rxrtJb60ycDOVcP7sDTxDzXgm1XiNO4K MKMZTD0jGNvtrJvDTFD0DRLn7OAgMCZ8prcgJbLyfjxAjV/nliIbcB2jUXiNF4DHZL+l Hi+g== X-Gm-Message-State: APt69E2NtwBYC6X4CBpf0cMphuo3eQnXh8oePNAr/BmPJifj/z3Vbixh ICkqUHXHUypgfj0GdVZ0U/E= X-Google-Smtp-Source: ADUXVKJE0BZty6+aFwh052FJSCJlWU6nRBH0JLxderYUjXVk7KzjsDW32MWDsD9CHdlMJDPq4HEWcA== X-Received: by 2002:a0d:e742:: with SMTP id q63-v6mr13527819ywe.514.1529615321032; Thu, 21 Jun 2018 14:08:41 -0700 (PDT) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id v127-v6sm2102526ywf.101.2018.06.21.14.08.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 14:08:40 -0700 (PDT) From: William Breathitt Gray To: gregkh@linuxfoundation.org Subject: [PATCH v7 07/10] dt-bindings: counter: Document stm32 quadrature encoder Date: Thu, 21 Jun 2018 17:08:34 -0400 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180621_140853_566917_35478C0A X-CRM114-Status: GOOD ( 14.16 ) 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@arm.com, devicetree@vger.kernel.org, lars@metafoo.de, benjamin.gaignard@st.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray , robh+dt@kernel.org, jic23@kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de, 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 quadratic encoder part of the hardware. Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Benjamin Gaignard Signed-off-by: William Breathitt Gray Acked-by: Rob Herring --- .../bindings/counter/stm32-timer-cnt.txt | 31 +++++++++++++++++++ .../devicetree/bindings/mfd/stm32-timers.txt | 7 +++++ 2 files changed, 38 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..c52fcdd4bf6c --- /dev/null +++ b/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt @@ -0,0 +1,31 @@ +STMicroelectronics STM32 Timer quadrature encoder + +STM32 Timer provides quadrature encoder 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 CH1/CH2 pins in mode of operation for STM32 + Timer input on external pin. + +Example: + timers@40010000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "st,stm32-timers"; + reg = <0x40010000 0x400>; + clocks = <&rcc 0 160>; + clock-names = "int"; + + 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>; + }; };