Home
last modified time | relevance | path

Searched +full:stm32 +full:- +full:timer +full:- +full:counter (Results 1 – 25 of 46) sorted by relevance

12

/kernel/linux/linux-5.10/Documentation/devicetree/bindings/mfd/
Dst,stm32-lptimer.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/mfd/st,stm32-lptimer.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 Low-Power Timers bindings
10 The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several
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
[all …]
Dst,stm32-timers.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/mfd/st,stm32-timers.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 Timers bindings
10 This hardware block provides 3 types of timer along with PWM functionality:
11 - advanced-control timers consist of a 16-bit auto-reload counter driven
14 - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter
16 - basic timers consist of a 16-bit auto-reload counter driven by a
20 - Benjamin Gaignard <benjamin.gaignard@st.com>
[all …]
/kernel/linux/linux-5.10/drivers/counter/
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
3 # Counter devices
6 menuconfig COUNTER config
7 tristate "Counter support"
9 This enables counter device support through the Generic Counter
11 one or more of the counter device drivers below.
13 if COUNTER
16 tristate "ACCES 104-QUAD-8 driver"
20 Say yes here to build support for the ACCES 104-QUAD-8 quadrature
21 encoder counter/interface device family (104-QUAD-8, 104-QUAD-4).
[all …]
Dstm32-timer-cnt.c1 // SPDX-License-Identifier: GPL-2.0
3 * STM32 Timer Encoder and Counter driver
10 #include <linux/counter.h>
11 #include <linux/mfd/stm32-timers.h>
31 struct counter_device counter; member
40 * enum stm32_count_function - enumerates stm32 timer counter encoder modes
60 static int stm32_count_read(struct counter_device *counter, in stm32_count_read() argument
63 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_read()
66 regmap_read(priv->regmap, TIM_CNT, &cnt); in stm32_count_read()
72 static int stm32_count_write(struct counter_device *counter, in stm32_count_write() argument
[all …]
Dstm32-lptimer-cnt.c1 // SPDX-License-Identifier: GPL-2.0
3 * STM32 Low-Power Timer Encoder and Counter driver
9 * Inspired by 104-quad-8 and stm32-timer-trigger drivers.
14 #include <linux/counter.h>
16 #include <linux/mfd/stm32-lptimer.h>
22 struct counter_device counter; member
37 ret = regmap_read(priv->regmap, STM32_LPTIM_CR, &val); in stm32_lptim_is_enabled()
51 ret = regmap_write(priv->regmap, STM32_LPTIM_CR, val); in stm32_lptim_set_enable_state()
56 clk_disable(priv->clk); in stm32_lptim_set_enable_state()
57 priv->enabled = false; in stm32_lptim_set_enable_state()
[all …]
DMakefile1 # SPDX-License-Identifier: GPL-2.0-only
3 # Makefile for Counter devices
6 obj-$(CONFIG_COUNTER) += counter.o
8 obj-$(CONFIG_104_QUAD_8) += 104-quad-8.o
9 obj-$(CONFIG_STM32_TIMER_CNT) += stm32-timer-cnt.o
10 obj-$(CONFIG_STM32_LPTIMER_CNT) += stm32-lptimer-cnt.o
11 obj-$(CONFIG_TI_EQEP) += ti-eqep.o
12 obj-$(CONFIG_FTM_QUADDEC) += ftm-quaddec.o
13 obj-$(CONFIG_MICROCHIP_TCB_CAPTURE) += microchip-tcb-capture.o
/kernel/linux/linux-4.19/Documentation/devicetree/bindings/mfd/
Dstm32-lptimer.txt1 STMicroelectronics STM32 Low-Power Timer
3 The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several
5 - PWM output (with programmable prescaler, configurable polarity)
6 - Quadrature encoder, counter
7 - Trigger source for STM32 ADC/DAC (LPTIM_OUT)
10 - compatible: Must be "st,stm32-lptimer".
11 - reg: Offset and length of the device's register set.
12 - clocks: Phandle to the clock used by the LP Timer module.
13 - clock-names: Must be "mux".
14 - #address-cells: Should be '<1>'.
[all …]
Dstm32-timers.txt1 STM32 Timers driver bindings
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
6 - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter driven by a
8 - basic timers consist of a 16-bit auto-reload counter driven by a programmable prescaler.
11 - compatible: must be "st,stm32-timers"
13 - reg: Physical base address and length of the controller's
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
[all …]
/kernel/linux/linux-4.19/Documentation/devicetree/bindings/iio/counter/
Dstm32-lptimer-cnt.txt1 STMicroelectronics STM32 Low-Power Timer quadrature encoder and counter
3 STM32 Low-Power Timer provides several counter modes. It can be used as:
4 - quadrature encoder to detect angular position and direction of rotary
6 - simple counter from IN1 input signal.
8 Must be a sub-node of an STM32 Low-Power Timer device tree node.
9 See ../mfd/stm32-lptimer.txt for details about the parent node.
12 - compatible: Must be "st,stm32-lptimer-counter".
13 - pinctrl-names: Set to "default".
14 - pinctrl-0: List of phandles pointing to pin configuration nodes,
15 to set IN1/IN2 pins in mode of operation for Low-Power
[all …]
/kernel/linux/linux-5.10/arch/arm/boot/dts/
Dstm32mp151.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
6 #include <dt-bindings/interrupt-controller/arm-gic.h>
7 #include <dt-bindings/clock/stm32mp1-clks.h>
8 #include <dt-bindings/reset/stm32mp1-resets.h>
11 #address-cells = <1>;
12 #size-cells = <1>;
15 #address-cells = <1>;
16 #size-cells = <0>;
19 compatible = "arm,cortex-a7";
[all …]
Dstm32h743.dtsi2 * Copyright 2017 - Alexandre Torgue <alexandre.torgue@st.com>
4 * This file is dual-licensed: you can use it either under the terms
43 #include "armv7-m.dtsi"
44 #include <dt-bindings/clock/stm32h7-clks.h>
45 #include <dt-bindings/mfd/stm32h7-rcc.h>
46 #include <dt-bindings/interrupt-controller/irq.h>
49 #address-cells = <1>;
50 #size-cells = <1>;
53 clk_hse: clk-hse {
54 #clock-cells = <0>;
[all …]
/kernel/linux/linux-4.19/drivers/iio/counter/
DKconfig2 # Counter devices
9 tristate "ACCES 104-QUAD-8 driver"
13 Say yes here to build support for the ACCES 104-QUAD-8 quadrature
14 encoder counter/interface device family (104-QUAD-8, 104-QUAD-4).
16 Performing a write to a counter's IIO_CHAN_INFO_RAW sets the counter and
17 also clears the counter's respective error flag. Although the counters
18 have a 25-bit range, only the lower 24 bits may be set, either directly
19 or via a counter's preset attribute. Interrupts are not supported by
26 tristate "STM32 LP Timer encoder counter driver"
29 Select this option to enable STM32 Low-Power Timer quadrature encoder
[all …]
Dstm32-lptimer-cnt.c1 // SPDX-License-Identifier: GPL-2.0
3 * STM32 Low-Power Timer Encoder and Counter driver
9 * Inspired by 104-quad-8 and stm32-timer-trigger drivers.
15 #include <linux/mfd/stm32-lptimer.h>
33 ret = regmap_read(priv->regmap, STM32_LPTIM_CR, &val); in stm32_lptim_is_enabled()
47 ret = regmap_write(priv->regmap, STM32_LPTIM_CR, val); in stm32_lptim_set_enable_state()
52 clk_disable(priv->clk); in stm32_lptim_set_enable_state()
56 /* LP timer must be enabled before writing CMP & ARR */ in stm32_lptim_set_enable_state()
57 ret = regmap_write(priv->regmap, STM32_LPTIM_ARR, priv->preset); in stm32_lptim_set_enable_state()
61 ret = regmap_write(priv->regmap, STM32_LPTIM_CMP, 0); in stm32_lptim_set_enable_state()
[all …]
/kernel/linux/linux-5.10/drivers/clocksource/
Dtimer-stm32.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Author: Maxime Coquelin <mcoquelin.stm32@gmail.com>
6 * Inspired by time-efm32.c from Uwe Kleine-Koenig
23 #include "timer-of.h"
54 * stm32_timer_of_bits_set - set accessor helper
58 * Accessor helper to set the number of bits in the timer-of private
64 struct stm32_timer_private *pd = to->private_data; in stm32_timer_of_bits_set()
66 pd->bits = bits; in stm32_timer_of_bits_set()
70 * stm32_timer_of_bits_get - get accessor helper
73 * Accessor helper to get the number of bits in the timer-of private
[all …]
Dtimer-stm32-lp.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
11 #include <linux/mfd/stm32-lptimer.h>
40 regmap_write(priv->reg, STM32_LPTIM_CR, 0); in stm32_clkevent_lp_shutdown()
41 regmap_write(priv->reg, STM32_LPTIM_IER, 0); in stm32_clkevent_lp_shutdown()
43 regmap_write(priv->reg, STM32_LPTIM_ICR, STM32_LPTIM_ARRMCF); in stm32_clkevent_lp_shutdown()
55 regmap_write(priv->reg, STM32_LPTIM_CR, 0); in stm32_clkevent_lp_set_timer()
57 regmap_write(priv->reg, STM32_LPTIM_IER, STM32_LPTIM_ARRMIE); in stm32_clkevent_lp_set_timer()
59 regmap_write(priv->reg, STM32_LPTIM_CR, STM32_LPTIM_ENABLE); in stm32_clkevent_lp_set_timer()
60 /* set next event counter */ in stm32_clkevent_lp_set_timer()
[all …]
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
35 bool "BCM2835 timer driver" if COMPILE_TEST
38 Enables the support for the BCM2835 timer driver.
41 bool "BCM mobile timer driver" if COMPILE_TEST
44 Enables the support for the BCM Kona mobile timer driver.
47 bool "Texas Instruments DaVinci timer driver" if COMPILE_TEST
49 Enables the support for the TI DaVinci timer driver.
52 bool "Digicolor timer driver" if COMPILE_TEST
56 Enables the support for the digicolor timer driver.
59 bool "DW APB timer driver" if COMPILE_TEST
[all …]
/kernel/linux/linux-4.19/drivers/clocksource/
Dtimer-stm32.c3 * Author: Maxime Coquelin <mcoquelin.stm32@gmail.com>
6 * Inspired by time-efm32.c from Uwe Kleine-Koenig
23 #include "timer-of.h"
54 * stm32_timer_of_bits_set - set accessor helper
58 * Accessor helper to set the number of bits in the timer-of private
64 struct stm32_timer_private *pd = to->private_data; in stm32_timer_of_bits_set()
66 pd->bits = bits; in stm32_timer_of_bits_set()
70 * stm32_timer_of_bits_get - get accessor helper
73 * Accessor helper to get the number of bits in the timer-of private
80 struct stm32_timer_private *pd = to->private_data; in stm32_timer_of_bits_get()
[all …]
/kernel/linux/linux-4.19/drivers/pwm/
Dpwm-stm32-lp.c1 // SPDX-License-Identifier: GPL-2.0
3 * STM32 Low-Power Timer PWM driver
9 * Inspired by Gerald Baeza's pwm-stm32 driver
13 #include <linux/mfd/stm32-lptimer.h>
30 /* STM32 Low-Power Timer is preceded by a configurable power-of-2 prescaler */
46 if (!state->enabled) { in stm32_pwm_lp_apply()
48 /* Disable LP timer */ in stm32_pwm_lp_apply()
49 ret = regmap_write(priv->regmap, STM32_LPTIM_CR, 0); in stm32_pwm_lp_apply()
52 /* disable clock to PWM counter */ in stm32_pwm_lp_apply()
53 clk_disable(priv->clk); in stm32_pwm_lp_apply()
[all …]
DKconfig2 bool "Pulse-Width Modulation (PWM) Support"
4 Generic Pulse-Width Modulation (PWM) support.
6 In Pulse-Width Modulation, a variation of the width of pulses
42 will be called pwm-ab8500.
51 will be called pwm-atmel.
59 (Atmel High-end LCD Controller). This PWM output is mainly used
63 will be called pwm-atmel-hlcdc.
69 Generic PWM framework driver for Atmel Timer Counter Block.
71 A Timer Counter Block provides 6 PWM devices grouped by 2.
75 will be called pwm-atmel-tcb.
[all …]
/kernel/linux/linux-4.19/arch/arm/boot/dts/
Dstm32mp157c.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
6 #include <dt-bindings/interrupt-controller/arm-gic.h>
7 #include <dt-bindings/clock/stm32mp1-clks.h>
8 #include <dt-bindings/reset/stm32mp1-resets.h>
11 #address-cells = <1>;
12 #size-cells = <1>;
15 #address-cells = <1>;
16 #size-cells = <0>;
19 compatible = "arm,cortex-a7";
[all …]
Dstm32h743.dtsi2 * Copyright 2017 - Alexandre Torgue <alexandre.torgue@st.com>
4 * This file is dual-licensed: you can use it either under the terms
44 #include "armv7-m.dtsi"
45 #include <dt-bindings/clock/stm32h7-clks.h>
46 #include <dt-bindings/mfd/stm32h7-rcc.h>
47 #include <dt-bindings/interrupt-controller/irq.h>
51 clk_hse: clk-hse {
52 #clock-cells = <0>;
53 compatible = "fixed-clock";
54 clock-frequency = <0>;
[all …]
/kernel/linux/linux-5.10/drivers/pwm/
Dpwm-stm32-lp.c1 // SPDX-License-Identifier: GPL-2.0
3 * STM32 Low-Power Timer PWM driver
9 * Inspired by Gerald Baeza's pwm-stm32 driver
13 #include <linux/mfd/stm32-lptimer.h>
31 /* STM32 Low-Power Timer is preceded by a configurable power-of-2 prescaler */
47 if (!state->enabled) { in stm32_pwm_lp_apply()
49 /* Disable LP timer */ in stm32_pwm_lp_apply()
50 ret = regmap_write(priv->regmap, STM32_LPTIM_CR, 0); in stm32_pwm_lp_apply()
53 /* disable clock to PWM counter */ in stm32_pwm_lp_apply()
54 clk_disable(priv->clk); in stm32_pwm_lp_apply()
[all …]
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
3 bool "Pulse-Width Modulation (PWM) Support"
5 Generic Pulse-Width Modulation (PWM) support.
7 In Pulse-Width Modulation, a variation of the width of pulses
52 will be called pwm-ab8500.
62 will be called pwm-atmel.
70 (Atmel High-end LCD Controller). This PWM output is mainly used
74 will be called pwm-atmel-hlcdc.
80 Generic PWM framework driver for Atmel Timer Counter Block.
82 A Timer Counter Block provides 6 PWM devices grouped by 2.
[all …]
/kernel/linux/linux-4.19/include/linux/mfd/
Dstm32-lptimer.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * STM32 Low-Power Timer parent driver.
6 * Inspired by Benjamin Gaignard's stm32-timers driver
22 #define STM32_LPTIM_CNT 0x1C /* Counter Reg */
24 /* STM32_LPTIM_ISR - bit fields */
29 /* STM32_LPTIM_ICR - bit fields */
32 /* STM32_LPTIM_CR - bit fields */
36 /* STM32_LPTIM_CFGR - bit fields */
47 * struct stm32_lptimer - STM32 Low-Power Timer data assigned by parent device
50 * @has_encoder: indicates this Low-Power Timer supports encoder mode
/kernel/linux/linux-5.10/include/linux/mfd/
Dstm32-lptimer.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * STM32 Low-Power Timer parent driver.
6 * Inspired by Benjamin Gaignard's stm32-timers driver
22 #define STM32_LPTIM_CNT 0x1C /* Counter Reg */
24 /* STM32_LPTIM_ISR - bit fields */
29 /* STM32_LPTIM_ICR - bit fields */
33 /* STM32_LPTIM_IER - bit flieds */
36 /* STM32_LPTIM_CR - bit fields */
41 /* STM32_LPTIM_CFGR - bit fields */
52 * struct stm32_lptimer - STM32 Low-Power Timer data assigned by parent device
[all …]

12