1# Copyright (c) 2021 STMicroelectronics 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 When setting the accel-pm, accel-range, accel-odr, gyro-pm, gyro-range, 6 gyro-odr properties in a .dts or .dtsi file you may include lsm6dso.h 7 and use the macros defined there. 8 9 Example: 10 #include <zephyr/dt-bindings/sensor/lsm6dso.h> 11 12 lsm6dso: lsm6dso@0 { 13 ... 14 15 accel-pm = <LSM6DSO_DT_XL_ULP_MODE>; 16 accel-range = <LSM6DSO_DT_FS_8G>; 17 accel-odr = <LSM6DSO_DT_ODR_1Hz6>; 18 gyro-pm = <LSM6DSO_DT_GY_NORMAL_MODE>; 19 gyro-range = <LSM6DSO_DT_FS_2000DPS>; 20 gyro-odr = <LSM6DSO_DT_ODR_6667Hz>; 21 }; 22 23include: sensor-device.yaml 24 25properties: 26 irq-gpios: 27 type: phandle-array 28 description: | 29 DRDY pin 30 31 This pin defaults to active high when produced by the sensor. 32 The property value should ensure the flags properly describe 33 the signal that is presented to the driver. 34 35 int-pin: 36 type: int 37 default: 1 38 enum: 39 - 1 # drdy is generated from INT1 40 - 2 # drdy is generated from INT2 41 description: | 42 Select DRDY pin number (1 or 2). 43 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 accel-pm: 50 type: int 51 default: 0 52 description: | 53 Specify the accelerometer power mode. 54 Default is power-up configuration. 55 56 - 0 # LSM6DSO_DT_XL_HP_MODE 57 - 1 # LSM6DSO_DT_XL_LP_NORMAL_MODE 58 - 2 # LSM6DSO_DT_XL_ULP_MODE 59 60 enum: [0, 1, 2] 61 62 accel-range: 63 type: int 64 default: 0 65 description: | 66 Range in g. Default is power-up configuration. 67 68 - 0 # LSM6DSO_DT_FS_2G (0.061 mg/LSB) (LSM6DSO32 will be double these values) 69 - 1 # LSM6DSO_DT_FS_16G (0.488 mg/LSB) 70 - 2 # LSM6DSO_DT_FS_4G (0.122 mg/LSB) 71 - 3 # LSM6DSO_DT_FS_8G (0.244 mg/LSB) 72 73 enum: [0, 1, 2, 3] 74 75 accel-odr: 76 type: int 77 default: 0 78 description: | 79 Specify the default accelerometer output data rate expressed in samples per second (Hz). 80 Default is power-up configuration. 81 82 - 0 # LSM6DSO_DT_ODR_OFF 83 - 1 # LSM6DSO_DT_ODR_12Hz5 84 - 2 # LSM6DSO_DT_ODR_26H 85 - 3 # LSM6DSO_DT_ODR_52Hz 86 - 4 # LSM6DSO_DT_ODR_104Hz 87 - 5 # LSM6DSO_DT_ODR_208Hz 88 - 6 # LSM6DSO_DT_ODR_417Hz 89 - 7 # LSM6DSO_DT_ODR_833Hz 90 - 8 # LSM6DSO_DT_ODR_1667Hz 91 - 9 # LSM6DSO_DT_ODR_3333Hz 92 - 10 # LSM6DSO_DT_ODR_6667Hz 93 - 11 # LSM6DSO_DT_ODR_1Hz6 94 95 enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] 96 97 gyro-pm: 98 type: int 99 default: 0 100 description: | 101 Specify the gyrometer power mode. 102 Default is power-up configuration. 103 104 - 0 # LSM6DSO_DT_GY_HP_MODE 105 - 1 # LSM6DSO_DT_GY_NORMAL_MODE 106 107 enum: [0, 1] 108 109 gyro-range: 110 type: int 111 default: 0 112 description: | 113 Range in dps. Default is power-up configuration. 114 115 - 0 # LSM6DSO_DT_FS_250DPS (8.75 mdps/LSB) 116 - 1 # LSM6DSO_DT_FS_125DPS (4.375 mdps/LSB) 117 - 2 # LSM6DSO_DT_FS_500DPS (17.50 mdps/LSB) 118 - 4 # LSM6DSO_DT_FS_1000DPS (35 mdps/LSB) 119 - 6 # LSM6DSO_DT_FS_2000DPS (70 mdps/LSB) 120 121 enum: [0, 1, 2, 4, 6] 122 123 gyro-odr: 124 type: int 125 default: 0 126 description: | 127 Specify the default gyro output data rate expressed in samples per second (Hz). 128 Default is power-up configuration. 129 130 - 0 # LSM6DSO_DT_ODR_OFF 131 - 1 # LSM6DSO_DT_ODR_12Hz5 132 - 2 # LSM6DSO_DT_ODR_26H 133 - 3 # LSM6DSO_DT_ODR_52Hz 134 - 4 # LSM6DSO_DT_ODR_104Hz 135 - 5 # LSM6DSO_DT_ODR_208Hz 136 - 6 # LSM6DSO_DT_ODR_417Hz 137 - 7 # LSM6DSO_DT_ODR_833Hz 138 - 8 # LSM6DSO_DT_ODR_1667Hz 139 - 9 # LSM6DSO_DT_ODR_3333Hz 140 - 10 # LSM6DSO_DT_ODR_6667Hz 141 142 enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 143 144 drdy-pulsed: 145 type: boolean 146 description: | 147 Selects the pulsed mode for data-ready interrupt when enabled, 148 and the latched mode when disabled. 149