1 # SPDX-License-Identifier: (GPL-2.0-only OR BS 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/mfd/st,stm3 4 $id: http://devicetree.org/schemas/mfd/st,stm32-timers.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: STMicroelectronics STM32 Timers 7 title: STMicroelectronics STM32 Timers 8 8 9 description: | 9 description: | 10 This hardware block provides 3 types of time 10 This hardware block provides 3 types of timer along with PWM functionality: 11 - advanced-control timers consist of a 16- 11 - advanced-control timers consist of a 16-bit auto-reload counter driven 12 by a programmable prescaler, break input 12 by a programmable prescaler, break input feature, PWM outputs and 13 complementary PWM outputs channels. 13 complementary PWM outputs channels. 14 - general-purpose timers consist of a 16-b 14 - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter 15 driven by a programmable prescaler and P 15 driven by a programmable prescaler and PWM outputs. 16 - basic timers consist of a 16-bit auto-re 16 - basic timers consist of a 16-bit auto-reload counter driven by a 17 programmable prescaler. 17 programmable prescaler. 18 18 19 maintainers: 19 maintainers: 20 - Fabrice Gasnier <fabrice.gasnier@foss.st.co 20 - Fabrice Gasnier <fabrice.gasnier@foss.st.com> 21 21 22 properties: 22 properties: 23 compatible: 23 compatible: 24 const: st,stm32-timers 24 const: st,stm32-timers 25 25 26 reg: 26 reg: 27 maxItems: 1 27 maxItems: 1 28 28 29 clocks: 29 clocks: 30 maxItems: 1 30 maxItems: 1 31 31 32 clock-names: 32 clock-names: 33 items: 33 items: 34 - const: int 34 - const: int 35 35 36 resets: 36 resets: 37 maxItems: 1 37 maxItems: 1 38 38 39 dmas: 39 dmas: 40 minItems: 1 40 minItems: 1 41 maxItems: 7 41 maxItems: 7 42 42 43 dma-names: 43 dma-names: 44 items: 44 items: 45 enum: [ ch1, ch2, ch3, ch4, up, trig, co 45 enum: [ ch1, ch2, ch3, ch4, up, trig, com ] 46 minItems: 1 46 minItems: 1 47 maxItems: 7 47 maxItems: 7 48 48 49 interrupts: 49 interrupts: 50 oneOf: 50 oneOf: 51 - maxItems: 1 51 - maxItems: 1 52 - maxItems: 4 52 - maxItems: 4 53 53 54 interrupt-names: 54 interrupt-names: 55 oneOf: 55 oneOf: 56 - items: 56 - items: 57 - const: global 57 - const: global 58 - items: 58 - items: 59 - const: brk 59 - const: brk 60 - const: up 60 - const: up 61 - const: trg-com 61 - const: trg-com 62 - const: cc 62 - const: cc 63 63 64 "#address-cells": 64 "#address-cells": 65 const: 1 65 const: 1 66 66 67 "#size-cells": 67 "#size-cells": 68 const: 0 68 const: 0 69 69 70 access-controllers: << 71 minItems: 1 << 72 maxItems: 2 << 73 << 74 pwm: 70 pwm: 75 type: object 71 type: object 76 additionalProperties: false 72 additionalProperties: false 77 73 78 properties: 74 properties: 79 compatible: 75 compatible: 80 const: st,stm32-pwm 76 const: st,stm32-pwm 81 77 82 "#pwm-cells": 78 "#pwm-cells": 83 const: 3 79 const: 3 84 80 85 st,breakinput: 81 st,breakinput: 86 description: 82 description: 87 One or two <index level filter> to d 83 One or two <index level filter> to describe break input 88 configurations. 84 configurations. 89 $ref: /schemas/types.yaml#/definitions 85 $ref: /schemas/types.yaml#/definitions/uint32-matrix 90 items: 86 items: 91 items: 87 items: 92 - description: | 88 - description: | 93 "index" indicates on which bre 89 "index" indicates on which break input (0 or 1) the 94 configuration should be applie 90 configuration should be applied. 95 enum: [0, 1] 91 enum: [0, 1] 96 - description: | 92 - description: | 97 "level" gives the active level 93 "level" gives the active level (0=low or 1=high) of the 98 input signal for this configur 94 input signal for this configuration 99 enum: [0, 1] 95 enum: [0, 1] 100 - description: | 96 - description: | 101 "filter" gives the filtering v 97 "filter" gives the filtering value (up to 15) to be applied. 102 maximum: 15 98 maximum: 15 103 minItems: 1 99 minItems: 1 104 maxItems: 2 100 maxItems: 2 105 101 106 required: 102 required: 107 - "#pwm-cells" 103 - "#pwm-cells" 108 - compatible 104 - compatible 109 105 110 counter: 106 counter: 111 type: object 107 type: object 112 additionalProperties: false 108 additionalProperties: false 113 109 114 properties: 110 properties: 115 compatible: 111 compatible: 116 const: st,stm32-timer-counter 112 const: st,stm32-timer-counter 117 113 118 required: 114 required: 119 - compatible 115 - compatible 120 116 121 patternProperties: 117 patternProperties: 122 "^timer@[0-9]+$": 118 "^timer@[0-9]+$": 123 type: object 119 type: object 124 additionalProperties: false 120 additionalProperties: false 125 121 126 properties: 122 properties: 127 compatible: 123 compatible: 128 enum: 124 enum: 129 - st,stm32-timer-trigger 125 - st,stm32-timer-trigger 130 - st,stm32h7-timer-trigger 126 - st,stm32h7-timer-trigger 131 127 132 reg: 128 reg: 133 description: Identify trigger hardware 129 description: Identify trigger hardware block. 134 items: 130 items: 135 minimum: 0 131 minimum: 0 136 maximum: 16 132 maximum: 16 137 133 138 required: 134 required: 139 - compatible 135 - compatible 140 - reg 136 - reg 141 137 142 required: 138 required: 143 - compatible 139 - compatible 144 - reg 140 - reg 145 - clocks 141 - clocks 146 - clock-names 142 - clock-names 147 143 148 additionalProperties: false 144 additionalProperties: false 149 145 150 examples: 146 examples: 151 - | 147 - | 152 #include <dt-bindings/clock/stm32mp1-clks. 148 #include <dt-bindings/clock/stm32mp1-clks.h> 153 timers2: timer@40000000 { 149 timers2: timer@40000000 { 154 #address-cells = <1>; 150 #address-cells = <1>; 155 #size-cells = <0>; 151 #size-cells = <0>; 156 compatible = "st,stm32-timers"; 152 compatible = "st,stm32-timers"; 157 reg = <0x40000000 0x400>; 153 reg = <0x40000000 0x400>; 158 clocks = <&rcc TIM2_K>; 154 clocks = <&rcc TIM2_K>; 159 clock-names = "int"; 155 clock-names = "int"; 160 dmas = <&dmamux1 18 0x400 0x1>, 156 dmas = <&dmamux1 18 0x400 0x1>, 161 <&dmamux1 19 0x400 0x1>, 157 <&dmamux1 19 0x400 0x1>, 162 <&dmamux1 20 0x400 0x1>, 158 <&dmamux1 20 0x400 0x1>, 163 <&dmamux1 21 0x400 0x1>, 159 <&dmamux1 21 0x400 0x1>, 164 <&dmamux1 22 0x400 0x1>; 160 <&dmamux1 22 0x400 0x1>; 165 dma-names = "ch1", "ch2", "ch3", "ch4", 161 dma-names = "ch1", "ch2", "ch3", "ch4", "up"; 166 pwm { 162 pwm { 167 compatible = "st,stm32-pwm"; 163 compatible = "st,stm32-pwm"; 168 #pwm-cells = <3>; 164 #pwm-cells = <3>; 169 st,breakinput = <0 1 5>; 165 st,breakinput = <0 1 5>; 170 }; 166 }; 171 timer@1 { 167 timer@1 { 172 compatible = "st,stm32-timer-trigger"; 168 compatible = "st,stm32-timer-trigger"; 173 reg = <1>; 169 reg = <1>; 174 }; 170 }; 175 counter { 171 counter { 176 compatible = "st,stm32-timer-counter"; 172 compatible = "st,stm32-timer-counter"; 177 }; 173 }; 178 }; 174 }; 179 175 180 ... 176 ...
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.