1# Copyright (c) 2024 STMicroelectronics
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5    When setting the odr, power-mode, and range properties in a .dts or .dtsi file you may include
6    st_lis2dux12.h and use the macros defined there.
7    Example:
8    #include <zephyr/dt-bindings/sensor/st_lis2dux12.h>
9    lis2dux12: lis2dux12@0 {
10      ...
11      power-mode = <LIS2DUX12_OPER_MODE_LOW_POWER>;
12      odr = <LIS2DUX12_DT_ODR_12Hz5>;
13      range = <LIS2DUX12_DT_FS_16G>;
14    };
15
16include: sensor-device.yaml
17
18properties:
19  int1-gpios:
20    type: phandle-array
21    description: |
22      INT1 pin
23
24      This pin defaults to active high when produced by the sensor.
25      The property value should ensure the flags properly describe
26      the signal that is presented to the driver.
27  int2-gpios:
28    type: phandle-array
29    description: |
30      INT2 pin
31
32      This pin defaults to active high when produced by the sensor.
33      The property value should ensure the flags properly describe
34      the signal that is presented to the driver.
35
36  drdy-pin:
37    type: int
38    default: 1
39    enum:
40      - 1 # drdy is generated from INT1
41      - 2 # drdy is generated from INT2
42    description: |
43      Select DRDY pin number (1 or 2).
44      This number represents which of the two interrupt pins
45      (INT1 or INT2) the drdy line is attached to. This property is not
46      mandatory and if not present it defaults to 1 which is the
47      configuration at power-up.
48
49
50  range:
51    type: int
52    default: 0
53    description: |
54      Range in g. Default is power-up configuration.
55
56      - 3  # LIS2DUX12_DT_FS_16G
57      - 2  # LIS2DUX12_DT_FS_8G
58      - 1  # LIS2DUX12_DT_FS_4G
59      - 0  # LIS2DUX12_DT_FS_2G
60
61    enum: [0, 1, 2, 3]
62
63  power-mode:
64    type: int
65    default: 0
66    description: |
67      Specify the sensor power mode. Default is power-down mode
68
69      - 0 # LIS2DUX12_OPER_MODE_POWER_DOWN
70      - 1 # LIS2DUX12_OPER_MODE_LOW_POWER
71      - 2 # LIS2DUX12_OPER_MODE_HIGH_RESOLUTION
72      - 3 # LIS2DUX12_OPER_MODE_HIGH_FREQUENCY
73
74    enum: [0, 1, 2, 3]
75
76  odr:
77    type: int
78    default: 0
79    description: |
80      Specify the default output data rate expressed in samples per second (Hz).
81      Default is power-down mode
82      - 0  # LIS2DUX12_DT_ODR_OFF
83      - 1  # LIS2DUX12_DT_ODR_1Hz_ULP
84      - 2  # LIS2DUX12_DT_ODR_3Hz_ULP
85      - 3  # LIS2DUX12_DT_ODR_25Hz_ULP
86      - 4  # LIS2DUX12_DT_ODR_6Hz
87      - 5  # LIS2DUX12_DT_ODR_12Hz5
88      - 6  # LIS2DUX12_DT_ODR_25Hz
89      - 7  # LIS2DUX12_DT_ODR_50Hz
90      - 8  # LIS2DUX12_DT_ODR_100Hz
91      - 9  # LIS2DUX12_DT_ODR_200Hz
92      - 10 # LIS2DUX12_DT_ODR_400Hz
93      - 11 # LIS2DUX12_DT_ODR_800Hz
94
95    enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
96