1# Copyright (c) 2023 STMicroelectronics
2# Copyright (c) 2023 PHYTEC Messtechnik GmbH
3# SPDX-License-Identifier: Apache-2.0
4
5description: |
6    When setting the odr, lpf, avg properties in a .dts or .dtsi file
7    you may include lps22df.h and use the macros defined there.
8
9    Example:
10    #include <zephyr/dt-bindings/sensor/lps22df.h>
11
12    lps22df@5d {
13      ...
14
15      odr = <LPS2xDF_DT_ODR_10HZ>;
16      lpf = <LPS2xDF_DT_LP_FILTER_ODR_4>;
17      avg = <LPS2xDF_DT_AVG_128_SAMPLES>;
18    };
19
20include: sensor-device.yaml
21
22properties:
23  drdy-gpios:
24    type: phandle-array
25    description: |
26      DRDY pin
27
28      This pin defaults to active high when produced by the sensor.
29      The property value should ensure the flags properly describe
30      the signal that is presented to the driver.
31
32  drdy-pulsed:
33    type: boolean
34    description: |
35      Selects the pulsed mode for data-ready interrupt when enabled,
36      and the latched mode when disabled.
37
38  odr:
39    type: int
40    default: 0
41    description: |
42        Specify the output data rate expressed in samples per second (Hz).
43        The default is the power-on reset value.
44
45        - 0 # LPS2xDF_DT_ODR_POWER_DOWN
46        - 1 # LPS2xDF_DT_ODR_1HZ
47        - 2 # LPS2xDF_DT_ODR_4HZ
48        - 3 # LPS2xDF_DT_ODR_10HZ
49        - 4 # LPS2xDF_DT_ODR_25HZ
50        - 5 # LPS2xDF_DT_ODR_50HZ
51        - 6 # LPS2xDF_DT_ODR_75HZ
52        - 7 # LPS2xDF_DT_ODR_100HZ
53        - 8 # LPS2xDF_DT_ODR_200HZ
54
55    enum: [0, 1, 2, 3, 4, 5, 6, 7, 8]
56
57  lpf:
58    type: int
59    default: 0
60    description: |
61        Specify the low pass filter value to be applied to pressure data.
62        The default is the power-on reset value.
63
64        - 0 # LPS2xDF_DT_LP_FILTER_OFF
65        - 1 # LPS2xDF_DT_LP_FILTER_ODR_4
66        - 3 # LPS2xDF_DT_LP_FILTER_ODR_9
67
68    enum: [0, 1, 3]
69
70  avg:
71    type: int
72    default: 0
73    description: |
74        Specify the average filter value (i.e. number of samples) to be applied
75        to pressure and temperature data.
76        The default is the power-on reset value.
77
78        - 0 # LPS2xDF_DT_AVG_4_SAMPLES
79        - 1 # LPS2xDF_DT_AVG_8_SAMPLES
80        - 2 # LPS2xDF_DT_AVG_16_SAMPLES
81        - 3 # LPS2xDF_DT_AVG_32_SAMPLES
82        - 4 # LPS2xDF_DT_AVG_64_SAMPLES
83        - 5 # LPS2xDF_DT_AVG_128_SAMPLES
84        - 6 # LPS2xDF_DT_AVG_256_SAMPLES
85        - 7 # LPS2xDF_DT_AVG_512_SAMPLES
86
87    enum: [0, 1, 2, 3, 4, 5, 6, 7]
88