Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: counter: Document stm32 quadrature encoder

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 <mark.rutland@arm.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Benjamin Gaignard and committed by
Greg Kroah-Hartman
ec63e2a4 ad29937e

+38
+31
Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt
··· 1 + STMicroelectronics STM32 Timer quadrature encoder 2 + 3 + STM32 Timer provides quadrature encoder to detect 4 + angular position and direction of rotary elements, 5 + from IN1 and IN2 input signals. 6 + 7 + Must be a sub-node of an STM32 Timer device tree node. 8 + See ../mfd/stm32-timers.txt for details about the parent node. 9 + 10 + Required properties: 11 + - compatible: Must be "st,stm32-timer-counter". 12 + - pinctrl-names: Set to "default". 13 + - pinctrl-0: List of phandles pointing to pin configuration nodes, 14 + to set CH1/CH2 pins in mode of operation for STM32 15 + Timer input on external pin. 16 + 17 + Example: 18 + timers@40010000 { 19 + #address-cells = <1>; 20 + #size-cells = <0>; 21 + compatible = "st,stm32-timers"; 22 + reg = <0x40010000 0x400>; 23 + clocks = <&rcc 0 160>; 24 + clock-names = "int"; 25 + 26 + counter { 27 + compatible = "st,stm32-timer-counter"; 28 + pinctrl-names = "default"; 29 + pinctrl-0 = <&tim1_in_pins>; 30 + }; 31 + };
+7
Documentation/devicetree/bindings/mfd/stm32-timers.txt
··· 28 28 Optional subnodes: 29 29 - pwm: See ../pwm/pwm-stm32.txt 30 30 - timer: See ../iio/timer/stm32-timer-trigger.txt 31 + - counter: See ../counter/stm32-timer-cnt.txt 31 32 32 33 Example: 33 34 timers@40010000 { ··· 48 47 timer@0 { 49 48 compatible = "st,stm32-timer-trigger"; 50 49 reg = <0>; 50 + }; 51 + 52 + counter { 53 + compatible = "st,stm32-timer-counter"; 54 + pinctrl-names = "default"; 55 + pinctrl-0 = <&tim1_in_pins>; 51 56 }; 52 57 }; 53 58