From patchwork Sun Jul 15 20:46:43 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: 10525243 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 DFCF5602B3 for ; Sun, 15 Jul 2018 20:47:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF851286D1 for ; Sun, 15 Jul 2018 20:47:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C32E428707; Sun, 15 Jul 2018 20:47:20 +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 787B5286D1 for ; Sun, 15 Jul 2018 20:47:20 +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=XrtHwSUmSsVX22V8V7XqLJnLjkXdMAinSvC7Ksa3CgE=; b=caWy5iVpFETB8yurxFMdqbAVVA U6ltyL6jDhR6ljHEra/YdVEDBfouW2/ehvJOLV0CJ7qTlT2nvrgLt0o0+M0GQ/arIMxI2MyaRf0sy 6MQI477RzYMN3HE1VYu5PxCPzLk0/xs2Ea+R6wrfHVjrM5uFOrWHWvZ44D3aqbWu96MV1Oct7xTs7 /55HsIe+HcdXCTC9mCGBzh7ukWSVdP0DGO2eOoAbFZ4TF9NxnILbb4JKg9Qgw0xIB0csnXyIrPOyz kGyC7atNfXxUI3qFNkj3glv0WNrBW2EtucR/ImHPJjlIdKwQsZN17mb2A7FYcqAsw74WkaUhTI5kI JrizEalg==; 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 1fenvJ-0004Jk-E8; Sun, 15 Jul 2018 20:47:17 +0000 Received: from mail-yb0-x244.google.com ([2607:f8b0:4002:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fenvF-0004IA-St for linux-arm-kernel@lists.infradead.org; Sun, 15 Jul 2018 20:47:15 +0000 Received: by mail-yb0-x244.google.com with SMTP id e84-v6so14714679ybb.0 for ; Sun, 15 Jul 2018 13:47:03 -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=MaXwu3UiExrAZ5ralFaJKzkH6lxMbT4Gv5yXmL2FJ2o=; b=P2nNEXdKoVV7P9uzH3VIEpU81V23RKwzqTF5Js6JpIBE04udwC2r8auDzI+E5M3RdJ LkUse9vXxQTXtFYmO/em0eOWtcUCITyKBZFmlfdMc7XwYIdaP2Ahhu5TZHZSfwvOfL1M ZwgIo3HdfNGkB3Rmz7ar5jfKCv8c8xBwa+Z9GiRgse51Qfe8Ar5FTwNmohnI4/S0rvAa kK2CChqAuK2jxPig2sTiysY9kxwaGlexOB7HdV9i8SQTmDnmZmDdMNNP/NwTUvufkY8L 5HZAoA1LKN9O2ZeEwQj970WYcLzHbBnmlzUS0PYGW7GCgj+MedCpURJjmmB3o/foGLSj KUnw== 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=MaXwu3UiExrAZ5ralFaJKzkH6lxMbT4Gv5yXmL2FJ2o=; b=ClKriIoDkBcFLVbq5z84T/FOebA/9/oksqwQNoPA1hpGQn86EAxHv9pb5p6erMLQYs XP//fyzvGLmuCXu/5K1khxFDVndTUQ8Uy6sWzVqOB/moTTF2EGg49vKi3OD+4wZ8ozes 37vm1y4fVp82f4MTdHnYM7SBKDAKO3kmWHW9o2GqXwx65TQo2j4ywrWwSBzK2muDXTe9 asjK+7lUw8EwMoEFNIIKSGZ7z+Hz/qHLN/TYYkAwMV84ezT792OWfyy4+IrR+FYNAjgk LNxVqasx9HHAbvQpvAFxnhNn0LOMNLQ9zsGoPKDFROspw7Pj+rrO6sZJ8vJjEF9zsQFO I2qA== X-Gm-Message-State: AOUpUlHSJol86h6/Bco/rx0naeDgUubsAIN9paDn9pRwIL2gAXaRQrMX NBnqMqHD3D8GbzCkz5Br1jg= X-Google-Smtp-Source: AAOMgpcgZtv05p7yfduIaVQsGzwO+4jId7kMrlUsUNaccxC0xjPMx5Py/nsIRpYV2j+uMiP8ETWhUQ== X-Received: by 2002:a25:a383:: with SMTP id e3-v6mr7309724ybi.325.1531687623010; Sun, 15 Jul 2018 13:47:03 -0700 (PDT) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id h126-v6sm14265450ywf.73.2018.07.15.13.47.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Jul 2018 13:47:02 -0700 (PDT) From: William Breathitt Gray To: gregkh@linuxfoundation.org, jic23@kernel.org Subject: [PATCH v8 08/11] dt-bindings: counter: Document stm32 quadrature encoder Date: Sun, 15 Jul 2018 16:46:43 -0400 Message-Id: <9724df348c488ed5c1b92738c3ef2ee12665bd05.1531685025.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180715_134713_928572_8A7F84E5 X-CRM114-Status: GOOD ( 13.91 ) 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, lars@metafoo.de, benjamin.gaignard@st.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray , 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: Mark Rutland Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Signed-off-by: William Breathitt Gray --- .../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 0e900b52e895..15c3b87f51d9 100644 --- a/Documentation/devicetree/bindings/mfd/stm32-timers.txt +++ b/Documentation/devicetree/bindings/mfd/stm32-timers.txt @@ -28,6 +28,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 { @@ -48,6 +49,12 @@ Example: compatible = "st,stm32-timer-trigger"; reg = <0>; }; + + counter { + compatible = "st,stm32-timer-counter"; + pinctrl-names = "default"; + pinctrl-0 = <&tim1_in_pins>; + }; }; Example with all dmas: