1# Copyright (c) 2020, STMicroelectronics
2# SPDX-License-Identifier: Apache-2.0
3
4description: STM32 lptim
5
6compatible: "st,stm32-lptim"
7
8include:
9  - name: st,stm32-timers.yaml
10    property-blocklist:
11      # 'resets' property is not supported yet
12      - resets
13      - st,prescaler
14      - st,countermode
15
16properties:
17  st,prescaler:
18    type: int
19    default: 1
20    description: |
21        Clock divider at the input of the lptimer clock, default reset value is 'not divided'.
22
23        Prescaler allows to achieve higher LPTIM timeout (up to 256s when lptim clocked by LSE)
24        and consequently higher core sleep durations, but impacts the tick precision.
25        To be used with caution.
26        CONFIG_SYS_CLOCK_TICKS_PER_SEC could be used to tune tick duration and gain precision,
27        at kernel timing granularity cost.
28
29        For example, when LPTIM is clocked by the LSE (32768Hz) and st,prescaler = <32>:
30        LPTIM global timeout is 64 seconds with an increment of 0.97 ms.
31        Using CONFIG_SYS_CLOCK_TICKS_PER_SEC = 4096, tick = 0.24 ms, LPTIM precision is 4 ticks.
32        Using CONFIG_SYS_CLOCK_TICKS_PER_SEC = 1024, tick = 0.97 ms, LPTIM precision is 1 ticks.
33    enum:
34      - 1
35      - 2
36      - 4
37      - 8
38      - 16
39      - 32
40      - 64
41      - 128
42
43  st,static-prescaler:
44    type: boolean
45    description: |
46        Clock x2 factor at the input of the LPTIM,
47        depending on the serie.
48        For example, stm32U5x have a x2-factor for LPTIM1,3,4.
49        To be adapted once the value is selectable.
50