Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5196461imm; Sun, 22 Jul 2018 15:53:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeukexVUPP6ItjkO73LFD3+syNjlKgwg4bC0zj0lHtCJhyeOB4snQ8mHPFAlHAFsL4UmpJf X-Received: by 2002:a17:902:d88d:: with SMTP id b13-v6mr10595232plz.314.1532300021769; Sun, 22 Jul 2018 15:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532300021; cv=none; d=google.com; s=arc-20160816; b=SNZuz4Lr7JHB4aoEnGnZw8VRXOFAT2JdwDYiyqZ28LiffYfzXijzHyGGlrc+KnkB0C 6ybEzGz2MHDT7BtsD/BXjj0bAZjZFoLXlqis3XgPzEFMufFrvx0PhzE8qw/GCk0qYJYE gaNL6JnC1GhJMDrCkMdkfGGA67eeqNQeElhNCH5VEcroR7NAj9yRhLpLsmNraitG0PtZ jdN3nIu8mYMxRFMNqyLVJvMKTzLYQJ0OuaFsY4jmqEr5Z5/waJhcbFRzCovyc7aWDozT Jf0Y4U0FkKQli7UPu6CwUzEnv8mpaXkcwXh1gyBdqv18aBs/3I3zDTU79mepx1VZgSl+ sOvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=MaXwu3UiExrAZ5ralFaJKzkH6lxMbT4Gv5yXmL2FJ2o=; b=Njt/W57PyqiFUyU6xaCrMzJVa5sEmqe86jW+1/o84+nCo/kPHsO+VrZHP8LYltpfYx fZkWUQkLmwIZqJvtZufMF/D9puEmWnTF9WlhAuQzYOP0NsN5K55ncIz/wOb4cmZUXe5E VDKIb1251BVtVSuRobcnVKFP7wcybdxzaLdB+/xkk/CtPksH4kwiaVw/IcEw63awKpWk k+B+B3CHIat/2yrDnq+iTVkWRkQDs0ijSq0pTT/6JFUe2uObycjg8ts+M3mfFVrwanLo EJ2Ybu1yK2z9Vs/tv2SRAMTJRUhpm0q67wCO+/6w5ajUMIaZtVsN1kIzF1hvY7I3Zn6g jwWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UdaNvdjA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9-v6si7135769pff.30.2018.07.22.15.53.27; Sun, 22 Jul 2018 15:53:41 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UdaNvdjA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387811AbeGVXt7 (ORCPT + 99 others); Sun, 22 Jul 2018 19:49:59 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:44246 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387732AbeGVXt7 (ORCPT ); Sun, 22 Jul 2018 19:49:59 -0400 Received: by mail-yw0-f194.google.com with SMTP id k18-v6so6214652ywm.11; Sun, 22 Jul 2018 15:51:40 -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=UdaNvdjApjw+V6ajjzIQVmCVphWhC/WfTPFm5IO0a0xXjz7QH5IHol7w+v18HREywy o7vKJe77ITvZB4WAJBfcyM2UzNI2Q32TJ8N7Oo9CwFyF9LiwG1S95v8wr3x2MuZ3mQ7R kQGRwncHV45lZEJAeXq6cHR6Fiy78OLMEqQ+Psdi9xW/f3z/cJax0hwINChN19p1+Ma4 k3RnX2b/RBfCIjjYJyVA0QJSm5Kz+LsBkaQ4qoh3mLkEbo64Gkwj19rn68f3F/qvIzyM Lk3Wz8ufBQBTrK5/ag74sVv11l/Hb0uVL0wGPW0WYdq2nq9WsOi7PeFlhGLlFGwrmaVi cezQ== 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=tjcuYhDkWZ6aTdU90M4ywpRTZus2VV+WTEv2ss80TQpe8d8VNeuwpXcBNx7AlYaAVU LIZzRb7Os0Fxj6j4Tse1GzGMbLB2sXrFlwkuZC7MzLX3waI0pfJcneC1w2j3kpZlcrGS MgDnomqxFiFoMuro7GUZ7oOxzKpVGvUBBwztW3oPRk8AHjDc5qHxNLXn2XhrmWbIWhas uUY+8OawKg45UpGAOEWBt2iV5FCWsFpOlJ4/DZTMNvic94Z3Yz3TBhM3/gHDQas8rw48 39ii7rRYMyIJH7DdvdUT4f4tATVCIucok2ckW52UUQRfQSfkcPgEbTmH8a1EBpoLxYPa pjYA== X-Gm-Message-State: AOUpUlFD2HtktRPaBVyk3kyFDZHatRcTBhmQzXdWFcxmJUkAcoarhkcv h5sLPFTiNUsS9ON1+q2jWb4= X-Received: by 2002:a81:7050:: with SMTP id l77-v6mr5660933ywc.226.1532299900328; Sun, 22 Jul 2018 15:51:40 -0700 (PDT) Received: from localhost ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id 139-v6sm933716ywk.41.2018.07.22.15.51.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jul 2018 15:51:39 -0700 (PDT) From: William Breathitt Gray To: gregkh@linuxfoundation.org Cc: jic23@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, fabrice.gasnier@st.com, benjamin.gaignard@st.com, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, akpm@linux-foundation.org, Mark Rutland , William Breathitt Gray Subject: [PATCH v9 08/11] dt-bindings: counter: Document stm32 quadrature encoder Date: Sun, 22 Jul 2018 18:51:34 -0400 Message-Id: <7e5b0d84eb64a9f11770bb9734f8303ebf6f7178.1532298882.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: -- 2.18.0