1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mfd/st,stm32-lptimer.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: STMicroelectronics STM32 Low-Power Timers 8 9description: | 10 The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several 11 functions 12 - PWM output (with programmable prescaler, configurable polarity) 13 - Trigger source for STM32 ADC/DAC (LPTIM_OUT) 14 - Several counter modes: 15 - quadrature encoder to detect angular position and direction of rotary 16 elements, from IN1 and IN2 input signals. 17 - simple counter from IN1 input signal. 18 19maintainers: 20 - Fabrice Gasnier <fabrice.gasnier@foss.st.com> 21 22properties: 23 compatible: 24 const: st,stm32-lptimer 25 26 reg: 27 maxItems: 1 28 29 clocks: 30 maxItems: 1 31 32 clock-names: 33 items: 34 - const: mux 35 36 interrupts: 37 maxItems: 1 38 39 "#address-cells": 40 const: 1 41 42 "#size-cells": 43 const: 0 44 45 wakeup-source: true 46 47 access-controllers: 48 minItems: 1 49 maxItems: 2 50 51 pwm: 52 type: object 53 additionalProperties: false 54 55 properties: 56 compatible: 57 const: st,stm32-pwm-lp 58 59 "#pwm-cells": 60 const: 3 61 62 required: 63 - "#pwm-cells" 64 - compatible 65 66 counter: 67 type: object 68 additionalProperties: false 69 70 properties: 71 compatible: 72 const: st,stm32-lptimer-counter 73 74 required: 75 - compatible 76 77 timer: 78 type: object 79 additionalProperties: false 80 81 properties: 82 compatible: 83 const: st,stm32-lptimer-timer 84 85 required: 86 - compatible 87 88patternProperties: 89 "^trigger@[0-9]+$": 90 type: object 91 additionalProperties: false 92 93 properties: 94 compatible: 95 const: st,stm32-lptimer-trigger 96 97 reg: 98 description: Identify trigger hardware block. 99 items: 100 minimum: 0 101 maximum: 2 102 103 required: 104 - compatible 105 - reg 106 107required: 108 - "#address-cells" 109 - "#size-cells" 110 - compatible 111 - reg 112 - clocks 113 - clock-names 114 115additionalProperties: false 116 117examples: 118 - | 119 #include <dt-bindings/clock/stm32mp1-clks.h> 120 #include <dt-bindings/interrupt-controller/arm-gic.h> 121 timer@40002400 { 122 compatible = "st,stm32-lptimer"; 123 reg = <0x40002400 0x400>; 124 clocks = <&timer_clk>; 125 clock-names = "mux"; 126 interrupts-extended = <&exti 47 IRQ_TYPE_LEVEL_HIGH>; 127 #address-cells = <1>; 128 #size-cells = <0>; 129 130 pwm { 131 compatible = "st,stm32-pwm-lp"; 132 #pwm-cells = <3>; 133 }; 134 135 trigger@0 { 136 compatible = "st,stm32-lptimer-trigger"; 137 reg = <0>; 138 }; 139 140 counter { 141 compatible = "st,stm32-lptimer-counter"; 142 }; 143 144 timer { 145 compatible = "st,stm32-lptimer-timer"; 146 }; 147 }; 148 149... 150