xref: /openbmc/linux/Documentation/hwmon/sht3x.rst (revision 2612e3bbc0386368a850140a6c9b990cd496a5ec)
17ebd8b66SMauro Carvalho ChehabKernel driver sht3x
27ebd8b66SMauro Carvalho Chehab===================
37ebd8b66SMauro Carvalho Chehab
47ebd8b66SMauro Carvalho ChehabSupported chips:
57ebd8b66SMauro Carvalho Chehab
67ebd8b66SMauro Carvalho Chehab  * Sensirion SHT3x-DIS
77ebd8b66SMauro Carvalho Chehab
87ebd8b66SMauro Carvalho Chehab    Prefix: 'sht3x'
97ebd8b66SMauro Carvalho Chehab
107ebd8b66SMauro Carvalho Chehab    Addresses scanned: none
117ebd8b66SMauro Carvalho Chehab
127ebd8b66SMauro Carvalho Chehab    Datasheet: https://www.sensirion.com/file/datasheet_sht3x_digital
137ebd8b66SMauro Carvalho Chehab
147ebd8b66SMauro Carvalho ChehabAuthor:
157ebd8b66SMauro Carvalho Chehab
167ebd8b66SMauro Carvalho Chehab  - David Frey <david.frey@sensirion.com>
177ebd8b66SMauro Carvalho Chehab  - Pascal Sachs <pascal.sachs@sensirion.com>
187ebd8b66SMauro Carvalho Chehab
197ebd8b66SMauro Carvalho ChehabDescription
207ebd8b66SMauro Carvalho Chehab-----------
217ebd8b66SMauro Carvalho Chehab
227ebd8b66SMauro Carvalho ChehabThis driver implements support for the Sensirion SHT3x-DIS chip, a humidity
237ebd8b66SMauro Carvalho Chehaband temperature sensor. Temperature is measured in degrees celsius, relative
247ebd8b66SMauro Carvalho Chehabhumidity is expressed as a percentage. In the sysfs interface, all values are
257ebd8b66SMauro Carvalho Chehabscaled by 1000, i.e. the value for 31.5 degrees celsius is 31500.
267ebd8b66SMauro Carvalho Chehab
277ebd8b66SMauro Carvalho ChehabThe device communicates with the I2C protocol. Sensors can have the I2C
287ebd8b66SMauro Carvalho Chehabaddresses 0x44 or 0x45, depending on the wiring. See
29ccf988b6SMauro Carvalho ChehabDocumentation/i2c/instantiating-devices.rst for methods to instantiate the device.
307ebd8b66SMauro Carvalho Chehab
315bca68acSJuenKit YipEven if sht3x sensor supports clock-strech(blocking mode) and non-strench
325bca68acSJuenKit Yip(non-blocking mode) in single-shot mode, this driver only supports the latter.
335bca68acSJuenKit Yip
347ebd8b66SMauro Carvalho ChehabThe sht3x sensor supports a single shot mode as well as 5 periodic measure
357ebd8b66SMauro Carvalho Chehabmodes, which can be controlled with the update_interval sysfs interface.
367ebd8b66SMauro Carvalho ChehabThe allowed update_interval in milliseconds are as follows:
377ebd8b66SMauro Carvalho Chehab
387ebd8b66SMauro Carvalho Chehab    ===== ======= ====================
397ebd8b66SMauro Carvalho Chehab       0          single shot mode
407ebd8b66SMauro Carvalho Chehab    2000   0.5 Hz periodic measurement
417ebd8b66SMauro Carvalho Chehab    1000   1   Hz periodic measurement
427ebd8b66SMauro Carvalho Chehab     500   2   Hz periodic measurement
437ebd8b66SMauro Carvalho Chehab     250   4   Hz periodic measurement
447ebd8b66SMauro Carvalho Chehab     100  10   Hz periodic measurement
457ebd8b66SMauro Carvalho Chehab    ===== ======= ====================
467ebd8b66SMauro Carvalho Chehab
477ebd8b66SMauro Carvalho ChehabIn the periodic measure mode, the sensor automatically triggers a measurement
487ebd8b66SMauro Carvalho Chehabwith the configured update interval on the chip. When a temperature or humidity
497ebd8b66SMauro Carvalho Chehabreading exceeds the configured limits, the alert attribute is set to 1 and
507ebd8b66SMauro Carvalho Chehabthe alert pin on the sensor is set to high.
517ebd8b66SMauro Carvalho ChehabWhen the temperature and humidity readings move back between the hysteresis
527ebd8b66SMauro Carvalho Chehabvalues, the alert bit is set to 0 and the alert pin on the sensor is set to
537ebd8b66SMauro Carvalho Chehablow.
547ebd8b66SMauro Carvalho Chehab
557ebd8b66SMauro Carvalho Chehabsysfs-Interface
567ebd8b66SMauro Carvalho Chehab---------------
577ebd8b66SMauro Carvalho Chehab
587ebd8b66SMauro Carvalho Chehab=================== ============================================================
597ebd8b66SMauro Carvalho Chehabtemp1_input:        temperature input
607ebd8b66SMauro Carvalho Chehabhumidity1_input:    humidity input
617ebd8b66SMauro Carvalho Chehabtemp1_max:          temperature max value
627ebd8b66SMauro Carvalho Chehabtemp1_max_hyst:     temperature hysteresis value for max limit
637ebd8b66SMauro Carvalho Chehabhumidity1_max:      humidity max value
647ebd8b66SMauro Carvalho Chehabhumidity1_max_hyst: humidity hysteresis value for max limit
657ebd8b66SMauro Carvalho Chehabtemp1_min:          temperature min value
667ebd8b66SMauro Carvalho Chehabtemp1_min_hyst:     temperature hysteresis value for min limit
677ebd8b66SMauro Carvalho Chehabhumidity1_min:      humidity min value
687ebd8b66SMauro Carvalho Chehabhumidity1_min_hyst: humidity hysteresis value for min limit
697ebd8b66SMauro Carvalho Chehabtemp1_alarm:        alarm flag is set to 1 if the temperature is outside the
707ebd8b66SMauro Carvalho Chehab		    configured limits. Alarm only works in periodic measure mode
717ebd8b66SMauro Carvalho Chehabhumidity1_alarm:    alarm flag is set to 1 if the humidity is outside the
727ebd8b66SMauro Carvalho Chehab		    configured limits. Alarm only works in periodic measure mode
737ebd8b66SMauro Carvalho Chehabheater_enable:      heater enable, heating element removes excess humidity from
747ebd8b66SMauro Carvalho Chehab		    sensor:
757ebd8b66SMauro Carvalho Chehab
767ebd8b66SMauro Carvalho Chehab			- 0: turned off
777ebd8b66SMauro Carvalho Chehab			- 1: turned on
787ebd8b66SMauro Carvalho Chehabupdate_interval:    update interval, 0 for single shot, interval in msec
797ebd8b66SMauro Carvalho Chehab		    for periodic measurement. If the interval is not supported
807ebd8b66SMauro Carvalho Chehab		    by the sensor, the next faster interval is chosen
81*af5ab550SJuenKit Yiprepeatability:      write or read repeatability, higher repeatability means
82*af5ab550SJuenKit Yip                    longer measurement duration, lower noise level and
83*af5ab550SJuenKit Yip                    larger energy consumption:
84*af5ab550SJuenKit Yip
85*af5ab550SJuenKit Yip                        - 0: low repeatability
86*af5ab550SJuenKit Yip                        - 1: medium repeatability
87*af5ab550SJuenKit Yip                        - 2: high repeatability
887ebd8b66SMauro Carvalho Chehab=================== ============================================================
89