Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/st,stm32-lptimer.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: STMicroelectronics STM32 Low-Power Timers bindings
0008 
0009 description: |
0010   The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several
0011   functions
0012    - PWM output (with programmable prescaler, configurable polarity)
0013    - Trigger source for STM32 ADC/DAC (LPTIM_OUT)
0014    - Several counter modes:
0015      - quadrature encoder to detect angular position and direction of rotary
0016        elements, from IN1 and IN2 input signals.
0017      - simple counter from IN1 input signal.
0018 
0019 maintainers:
0020   - Fabrice Gasnier <fabrice.gasnier@foss.st.com>
0021 
0022 properties:
0023   compatible:
0024     const: st,stm32-lptimer
0025 
0026   reg:
0027     maxItems: 1
0028 
0029   clocks:
0030     maxItems: 1
0031 
0032   clock-names:
0033     items:
0034       - const: mux
0035 
0036   interrupts:
0037     maxItems: 1
0038 
0039   "#address-cells":
0040     const: 1
0041 
0042   "#size-cells":
0043     const: 0
0044 
0045   wakeup-source: true
0046 
0047   pwm:
0048     type: object
0049 
0050     properties:
0051       compatible:
0052         const: st,stm32-pwm-lp
0053 
0054       "#pwm-cells":
0055         const: 3
0056 
0057     required:
0058       - "#pwm-cells"
0059       - compatible
0060 
0061   counter:
0062     type: object
0063 
0064     properties:
0065       compatible:
0066         const: st,stm32-lptimer-counter
0067 
0068     required:
0069       - compatible
0070 
0071   timer:
0072     type: object
0073 
0074     properties:
0075       compatible:
0076         const: st,stm32-lptimer-timer
0077 
0078     required:
0079       - compatible
0080 
0081 patternProperties:
0082   "^trigger@[0-9]+$":
0083     type: object
0084 
0085     properties:
0086       compatible:
0087         const: st,stm32-lptimer-trigger
0088 
0089       reg:
0090         description: Identify trigger hardware block.
0091         items:
0092           minimum: 0
0093           maximum: 2
0094 
0095     required:
0096       - compatible
0097       - reg
0098 
0099 required:
0100   - "#address-cells"
0101   - "#size-cells"
0102   - compatible
0103   - reg
0104   - clocks
0105   - clock-names
0106 
0107 additionalProperties: false
0108 
0109 examples:
0110   - |
0111     #include <dt-bindings/clock/stm32mp1-clks.h>
0112     #include <dt-bindings/interrupt-controller/arm-gic.h>
0113     timer@40002400 {
0114       compatible = "st,stm32-lptimer";
0115       reg = <0x40002400 0x400>;
0116       clocks = <&timer_clk>;
0117       clock-names = "mux";
0118       interrupts-extended = <&exti 47 IRQ_TYPE_LEVEL_HIGH>;
0119       #address-cells = <1>;
0120       #size-cells = <0>;
0121 
0122       pwm {
0123         compatible = "st,stm32-pwm-lp";
0124         #pwm-cells = <3>;
0125       };
0126 
0127       trigger@0 {
0128         compatible = "st,stm32-lptimer-trigger";
0129         reg = <0>;
0130       };
0131 
0132       counter {
0133         compatible = "st,stm32-lptimer-counter";
0134       };
0135 
0136       timer {
0137         compatible = "st,stm32-lptimer-timer";
0138       };
0139     };
0140 
0141 ...