1# Copyright (c) 2024 STMicroelectronics 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 STMicroelectronics STTS22H temperature sensor connected to I2C bus 6 When setting the sampling-rate property in a .dts or .dtsi file you 7 may include stts22h.h and use the macros defined there. 8 9 Example: 10 #include <zephyr/dt-bindings/sensor/stts22h.h> 11 12 stts22h: stts22h@0 { 13 ... 14 15 sampling-rate = <STTS22H_100Hz>; 16 }; 17 18compatible: "st,stts22h" 19 20include: [sensor-device.yaml, i2c-device.yaml] 21 22properties: 23 int-gpios: 24 type: phandle-array 25 description: interrupt pin 26 27 This pin defaults to active high when produced by the sensor. 28 The property value should ensure the flags properly describe 29 the signal that is presented to the driver. 30 31 temperature-hi-threshold: 32 type: int 33 default: 0 34 description: | 35 HIGH temperature threshold above which an alarm is triggered. 36 Valid range is 0 to 255. It defaults to 0 (alarm off) which is 37 the configuration at power-up. This threshold must be calculated 38 from a temperature T in Celsius using the formula 39 temperature-hi-threshold = 63 + T/0.64 C. 40 41 42 temperature-lo-threshold: 43 type: int 44 default: 0 45 description: | 46 LOW temperature threshold below which an alarm is triggered. 47 Valid range is 0 to 255. It defaults to 0 (alarm off) which is 48 the configuration at power-up. This threshold must be calculated 49 from a temperature T in Celsius using the formula 50 temperature-lo-threshold = 63 + T/0.64 C. 51 52 sampling-rate: 53 type: int 54 default: 0x0 55 description: | 56 Specify the default output data rate expressed in samples per second (Hz). 57 The values are taken in accordance to stts22h_odr_temp_t enumerative in hal/st 58 module. Default 0x0 (power down) matches the power-up configuration. 59 60 - 0x00 # STTS22H_POWER_DOWN 61 - 0x01 # STTS22H_ONE_SHOT 62 - 0x04 # STTS22H_1Hz 63 - 0x02 # STTS22H_25Hz 64 - 0x12 # STTS22H_50Hz 65 - 0x22 # STTS22H_100Hz 66 - 0x32 # STTS22H_200Hz 67 68 enum: [0x00, 0x01, 0x02, 0x04, 0x12, 0x22, 0x32] 69