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: 914841 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="k0dD9Qff"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40mMTX4dvhz9s3G for ; Thu, 17 May 2018 03:52:32 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752276AbeEPRwE (ORCPT ); Wed, 16 May 2018 13:52:04 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:40799 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752267AbeEPRwC (ORCPT ); Wed, 16 May 2018 13:52:02 -0400 Received: by mail-yb0-f194.google.com with SMTP id o80-v6so555173ybc.7; 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=FUByiKBzrzl6jU04y3p/S9XRuwq6wedY6+/zMhJTfB05QWJ4D84xePb5d+Oc8a2GXJ WzH6wYWdYjPyIcWrVB6z3nYYsXvKnikJ/83XsfbJ8fAt6oAS1+TAF7nhBTFKlYRWQZf3 mD7axazOo/BcRR6ODeWFLCoSj/go5U4nfLMpRUfhjMMnqfHT3mol4AMprYQVCv2w+7An O0/m4jxC8N9JRlUunow6YV71nhjMFBnaOPZsJnmzoU2WxBQAoFypCfAErzd92HBn695f yMjFG4T7YJ7DAdjfMNWLHjRKIRiF5UHx9hEQv4rXDmTfLdekhJUjpQKN7HWRrtST0hu5 UoJQ== X-Gm-Message-State: ALKqPwelYvnxqM5t3vtAgn5ciFh1zHjdiQxx25qfmudyiHzw95va+niO msJfIq3K6PuEkEtFhabbPCE= 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 Cc: benjamin.gaignard@st.com, fabrice.gasnier@st.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Mark Rutland , William Breathitt Gray 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: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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>; + }; };