1# Copyright (c) 2021 STMicroelectronics 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 When setting the accel-odr and gyro-odr properties in a .dts or .dtsi file you may include 6 ism330dhcx.h and use the macros defined there. 7 8 Example: 9 #include <zephyr/dt-bindings/sensor/ism330dhcx.h> 10 11 ism330dhcx: ism330dhcx@0 { 12 ... 13 14 accel-odr = <ISM330DHCX_DT_ODR_104Hz>; 15 gyro-odr = <ISM330DHCX_DT_ODR_104Hz>; 16 }; 17 18include: sensor-device.yaml 19 20properties: 21 drdy-gpios: 22 type: phandle-array 23 description: | 24 DRDY gpio pin 25 26 This pin defaults to active high when produced by the sensor. 27 The property value should ensure the flags properly describe 28 the signal that is presented to the driver. 29 30 int-pin: 31 type: int 32 default: 1 33 description: | 34 Select DRDY pin number (1 or 2). 35 36 Selection 37 1 drdy is generated from INT1 38 2 drdy is generated from INT2 39 40 This number represents which of the two interrupt pins 41 (INT1 or INT2) the drdy line is attached to. This property is not 42 mandatory and if not present it defaults to 1 which is the 43 configuration at power-up. 44 enum: [1, 2] 45 46 accel-odr: 47 type: int 48 default: 0 49 description: | 50 Specify the default accelerometer output data rate expressed in samples per second (Hz). 51 Default is power-up configuration. 52 53 - 0 # ISM330DHCX_DT_ODR_OFF 54 - 1 # ISM330DHCX_DT_ODR_12Hz5 55 - 2 # ISM330DHCX_DT_ODR_26H 56 - 3 # ISM330DHCX_DT_ODR_52Hz 57 - 4 # ISM330DHCX_DT_ODR_104Hz 58 - 5 # ISM330DHCX_DT_ODR_208Hz 59 - 6 # ISM330DHCX_DT_ODR_416Hz 60 - 7 # ISM330DHCX_DT_ODR_833Hz 61 - 8 # ISM330DHCX_DT_ODR_1666Hz 62 - 9 # ISM330DHCX_DT_ODR_3332Hz 63 - 10 # ISM330DHCX_DT_ODR_6667Hz 64 - 11 # ISM330DHCX_DT_ODR_1Hz6 65 66 enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] 67 68 accel-range: 69 type: int 70 default: 2 71 description: | 72 Range in g. Default is power-up configuration. 73 74 - 16 # 16g (0.488 mg/LSB) 75 - 8 # 8g (0.244 mg/LSB) 76 - 4 # 4g (0.122 mg/LSB) 77 - 2 # 2g (0.061 mg/LSB) 78 79 enum: [16, 8, 4, 2] 80 81 gyro-odr: 82 type: int 83 default: 0 84 description: | 85 Specify the default gyro output data rate expressed in samples per second (Hz). 86 Default is power-up configuration. 87 88 - 0 # ISM330DHCX_DT_ODR_OFF 89 - 1 # ISM330DHCX_DT_ODR_12Hz5 90 - 2 # ISM330DHCX_DT_ODR_26H 91 - 3 # ISM330DHCX_DT_ODR_52Hz 92 - 4 # ISM330DHCX_DT_ODR_104Hz 93 - 5 # ISM330DHCX_DT_ODR_208Hz 94 - 6 # ISM330DHCX_DT_ODR_416Hz 95 - 7 # ISM330DHCX_DT_ODR_833Hz 96 - 8 # ISM330DHCX_DT_ODR_1666Hz 97 - 9 # ISM330DHCX_DT_ODR_3332Hz 98 - 10 # ISM330DHCX_DT_ODR_6667Hz 99 100 enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 101 102 gyro-range: 103 type: int 104 default: 125 105 description: | 106 Range in dps. Default is power-up configuration. 107 108 - 125 # +/- 125dps 109 - 250 # +/- 250dps 110 - 500 # +/- 500dps 111 - 1000 # +/- 1000dps 112 - 2000 # +/- 2000dps 113 114 enum: [125, 250, 500, 1000, 2000] 115