Merge tag 'mips_5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / mfd / stm32-timers.txt
1 STM32 Timers driver bindings
2
3 This IP provides 3 types of timer along with PWM functionality:
4 - advanced-control timers consist of a 16-bit auto-reload counter driven by a programmable
5   prescaler, break input feature, PWM outputs and complementary PWM ouputs channels.
6 - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter driven by a
7   programmable prescaler and PWM outputs.
8 - basic timers consist of a 16-bit auto-reload counter driven by a programmable prescaler.
9
10 Required parameters:
11 - compatible: must be "st,stm32-timers"
12
13 - reg:                  Physical base address and length of the controller's
14                         registers.
15 - clock-names:          Set to "int".
16 - clocks:               Phandle to the clock used by the timer module.
17                         For Clk properties, please refer to ../clock/clock-bindings.txt
18
19 Optional parameters:
20 - resets:               Phandle to the parent reset controller.
21                         See ../reset/st,stm32-rcc.txt
22 - dmas:                 List of phandle to dma channels that can be used for
23                         this timer instance. There may be up to 7 dma channels.
24 - dma-names:            List of dma names. Must match 'dmas' property. Valid
25                         names are: "ch1", "ch2", "ch3", "ch4", "up", "trig",
26                         "com".
27
28 Optional subnodes:
29 - pwm:                  See ../pwm/pwm-stm32.txt
30 - timer:                See ../iio/timer/stm32-timer-trigger.txt
31 - counter:              See ../counter/stm32-timer-cnt.txt
32
33 Example:
34         timers@40010000 {
35                 #address-cells = <1>;
36                 #size-cells = <0>;
37                 compatible = "st,stm32-timers";
38                 reg = <0x40010000 0x400>;
39                 clocks = <&rcc 0 160>;
40                 clock-names = "int";
41
42                 pwm {
43                         compatible = "st,stm32-pwm";
44                         pinctrl-0       = <&pwm1_pins>;
45                         pinctrl-names   = "default";
46                 };
47
48                 timer@0 {
49                         compatible = "st,stm32-timer-trigger";
50                         reg = <0>;
51                 };
52
53                 counter {
54                         compatible = "st,stm32-timer-counter";
55                         pinctrl-names = "default";
56                         pinctrl-0 = <&tim1_in_pins>;
57                 };
58         };
59
60 Example with all dmas:
61         timer@40010000 {
62                 ...
63                 dmas = <&dmamux1 11 0x400 0x0>,
64                        <&dmamux1 12 0x400 0x0>,
65                        <&dmamux1 13 0x400 0x0>,
66                        <&dmamux1 14 0x400 0x0>,
67                        <&dmamux1 15 0x400 0x0>,
68                        <&dmamux1 16 0x400 0x0>,
69                        <&dmamux1 17 0x400 0x0>;
70                 dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig", "com";
71                 ...
72                 child nodes...
73         };