1# Copyright (c) 2023 STMicroelectronics 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 When setting the accel-range, accel-odr, gyro-range, gyro-odr properties in 6 a .dts or .dtsi file you may include lsm6dso16is.h and use the macros 7 defined there. 8 9 Example: 10 #include <zephyr/dt-bindings/sensor/lsm6dso16is.h> 11 12 lsm6dso16is: lsm6dso16is@0 { 13 ... 14 15 accel-range = <LSM6DSO16IS_DT_FS_8G>; 16 accel-odr = <LSM6DSO16IS_DT_ODR_104Hz_LP>; 17 gyro-range = <LSM6DSO16IS_DT_FS_2000DPS>; 18 gyro-odr = <LSM6DSO16IS_DT_ODR_104Hz_LP>; 19 }; 20 21include: sensor-device.yaml 22 23properties: 24 irq-gpios: 25 type: phandle-array 26 description: | 27 DRDY pin 28 29 This pin defaults to active high when produced by the sensor. 30 The property value should ensure the flags properly describe 31 the signal that is presented to the driver. 32 33 drdy-pin: 34 type: int 35 default: 1 36 enum: 37 - 1 # drdy is generated from INT1 38 - 2 # drdy is generated from INT2 39 description: | 40 Select DRDY pin number (1 or 2). 41 42 This number represents which of the two interrupt pins 43 (INT1 or INT2) the drdy line is attached to. This property is not 44 mandatory and if not present it defaults to 1 which is the 45 configuration at power-up. 46 47 accel-range: 48 type: int 49 default: 0 50 description: | 51 Range in g. Default is power-up configuration. 52 53 - 0 # LSM6DSO16IS_DT_FS_2G (0.061 mg/LSB) 54 - 1 # LSM6DSO16IS_DT_FS_16G (0.488 mg/LSB) 55 - 2 # LSM6DSO16IS_DT_FS_4G (0.122 mg/LSB) 56 - 3 # LSM6DSO16IS_DT_FS_8G (0.244 mg/LSB) 57 58 enum: [0, 1, 2, 3] 59 60 accel-odr: 61 type: int 62 default: 0x0 63 description: | 64 Specify the default accelerometer output data rate expressed in samples per second (Hz). 65 The values are taken in accordance to lsm6dso16is_xl_data_rate_t enumerative in hal/st 66 module. 67 Default is power-up configuration. 68 69 - 0x00 # LSM6DSO16IS_DT_ODR_OFF 70 - 0x01 # LSM6DSO16IS_DT_ODR_12Hz5_HP 71 - 0x02 # LSM6DSO16IS_DT_ODR_26H_HP 72 - 0x03 # LSM6DSO16IS_DT_ODR_52Hz_HP 73 - 0x04 # LSM6DSO16IS_DT_ODR_104Hz_HP 74 - 0x05 # LSM6DSO16IS_DT_ODR_208Hz_HP 75 - 0x06 # LSM6DSO16IS_DT_ODR_416Hz_HP 76 - 0x07 # LSM6DSO16IS_DT_ODR_833Hz_HP 77 - 0x08 # LSM6DSO16IS_DT_ODR_1667Hz_HP 78 - 0x09 # LSM6DSO16IS_DT_ODR_3333Hz_HP 79 - 0x0a # LSM6DSO16IS_DT_ODR_6667Hz_HP 80 - 0x11 # LSM6DSO16IS_DT_ODR_12Hz5_LP 81 - 0x12 # LSM6DSO16IS_DT_ODR_26H_LP 82 - 0x13 # LSM6DSO16IS_DT_ODR_52Hz_LP 83 - 0x14 # LSM6DSO16IS_DT_ODR_104Hz_LP 84 - 0x15 # LSM6DSO16IS_DT_ODR_208Hz_LP 85 - 0x16 # LSM6DSO16IS_DT_ODR_416Hz_LP 86 - 0x17 # LSM6DSO16IS_DT_ODR_833Hz_LP 87 - 0x18 # LSM6DSO16IS_DT_ODR_1667Hz_LP 88 - 0x19 # LSM6DSO16IS_DT_ODR_3333Hz_LP 89 - 0x1a # LSM6DSO16IS_DT_ODR_6667Hz_LP 90 - 0x1b # LSM6DSO16IS_DT_ODR_1Hz6_LP 91 92 enum: [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 93 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b] 94 95 gyro-range: 96 type: int 97 default: 0 98 description: | 99 Range in dps. Default is power-up configuration. 100 101 - 0x0 # LSM6DSO16IS_DT_FS_250DPS (8.75 mdps/LSB) 102 - 0x1 # LSM6DSO16IS_DT_FS_500DPS (17.50 mdps/LSB) 103 - 0x2 # LSM6DSO16IS_DT_FS_1000DPS (35 mdps/LSB) 104 - 0x3 # LSM6DSO16IS_DT_FS_2000DPS (70 mdps/LSB) 105 - 0x10 # LSM6DSO16IS_DT_FS_125DPS (4.375 mdps/LSB) 106 107 enum: [0x0, 0x1, 0x2, 0x3, 0x10] 108 109 gyro-odr: 110 type: int 111 default: 0x0 112 description: | 113 Specify the default gyro output data rate expressed in samples per second (Hz). 114 The values are taken in accordance to lsm6dso16is_gy_data_rate_t enumerative in hal/st 115 module. 116 Default is power-up configuration. 117 118 - 0x00 # LSM6DSO16IS_DT_ODR_OFF 119 - 0x01 # LSM6DSO16IS_DT_ODR_12Hz5_HP 120 - 0x02 # LSM6DSO16IS_DT_ODR_26H_HP 121 - 0x03 # LSM6DSO16IS_DT_ODR_52Hz_HP 122 - 0x04 # LSM6DSO16IS_DT_ODR_104Hz_HP 123 - 0x05 # LSM6DSO16IS_DT_ODR_208Hz_HP 124 - 0x06 # LSM6DSO16IS_DT_ODR_416Hz_HP 125 - 0x07 # LSM6DSO16IS_DT_ODR_833Hz_HP 126 - 0x08 # LSM6DSO16IS_DT_ODR_1667Hz_HP 127 - 0x09 # LSM6DSO16IS_DT_ODR_3333Hz_HP 128 - 0x0a # LSM6DSO16IS_DT_ODR_6667Hz_HP 129 - 0x11 # LSM6DSO16IS_DT_ODR_12Hz5_LP 130 - 0x12 # LSM6DSO16IS_DT_ODR_26H_LP 131 - 0x13 # LSM6DSO16IS_DT_ODR_52Hz_LP 132 - 0x14 # LSM6DSO16IS_DT_ODR_104Hz_LP 133 - 0x15 # LSM6DSO16IS_DT_ODR_208Hz_LP 134 - 0x16 # LSM6DSO16IS_DT_ODR_416Hz_LP 135 - 0x17 # LSM6DSO16IS_DT_ODR_833Hz_LP 136 - 0x18 # LSM6DSO16IS_DT_ODR_1667Hz_LP 137 - 0x19 # LSM6DSO16IS_DT_ODR_3333Hz_LP 138 - 0x1a # LSM6DSO16IS_DT_ODR_6667Hz_LP 139 140 enum: [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 141 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a] 142 143 drdy-pulsed: 144 type: boolean 145 description: | 146 Selects the pulsed mode for data-ready interrupt when enabled, 147 and the latched mode when disabled. 148