1.. SPDX-License-Identifier: GPL-2.0
2
3Kernel driver max31827
4======================
5
6Supported chips:
7
8  * Maxim MAX31827
9
10    Prefix: 'max31827'
11
12    Addresses scanned: I2C 0x40 - 0x5f
13
14    Datasheet: Publicly available at the Analog Devices website
15
16  * Maxim MAX31828
17
18    Prefix: 'max31828'
19
20    Addresses scanned: I2C 0x40 - 0x5f
21
22    Datasheet: Publicly available at the Analog Devices website
23
24  * Maxim MAX31829
25
26    Prefix: 'max31829'
27
28    Addresses scanned: I2C 0x40 - 0x5f
29
30    Datasheet: Publicly available at the Analog Devices website
31
32
33Authors:
34	- Daniel Matyas <daniel.matyas@analog.com>
35
36Description
37-----------
38
39The chips supported by this driver are quite similar. The only difference
40between them is found in the default power-on behaviour of the chips. While the
41MAX31827's fault queue is set to 1, the other two chip's fault queue is set to
424. Besides this, the MAX31829's alarm active state is high, while the other two
43chip's alarms are active on low. It is important to note that the chips can be
44configured to operate in the same manner with 1 write operation to the
45configuration register. From here on, we will refer to all these chips as
46MAX31827.
47
48MAX31827 implements a temperature sensor with a 6 WLP packaging scheme. This
49sensor measures the temperature of the chip itself.
50
51MAX31827 has low and over temperature alarms with an effective value and a
52hysteresis value: -40 and -30 degrees for under temperature alarm and +100 and
53+90 degrees for over temperature alarm.
54
55The alarm can be configured in comparator and interrupt mode. Currently only
56comparator mode is implemented. In Comparator mode, the OT/UT status bits have a
57value of 1 when the temperature rises above the TH value or falls below TL,
58which is also subject to the Fault Queue selection. OT status returns to 0 when
59the temperature drops below the TH_HYST value or when shutdown mode is entered.
60Similarly, UT status returns to 0 when the temperature rises above TL_HYST value
61or when shutdown mode is entered.
62
63Putting the MAX31827 into shutdown mode also resets the OT/UT status bits. Note
64that if the mode is changed while OT/UT status bits are set, an OT/UT status
65reset may be required before it begins to behave normally. To prevent this,
66it is recommended to perform a read of the configuration/status register to
67clear the status bits before changing the operating mode.
68
69The conversions can be manual with the one-shot functionality and automatic with
70a set frequency. When powered on, the chip measures temperatures with 1 conv/s.
71Enabling the device when it is already enabled has the side effect of setting
72the conversion frequency to 1 conv/s. The conversion time varies depending on
73the resolution. The conversion time doubles with every bit of increased
74resolution. For 10 bit resolution 35ms are needed, while for 12 bit resolution
75(default) 140ms. When chip is in shutdown mode and a read operation is
76requested, one-shot is triggered, the device waits for 140 (conversion time) + 1
77(error) ms, and only after that is the temperature value register read.
78
79The LSB of the temperature values is 0.0625 degrees Celsius, but the values of
80the temperatures are displayed in milli-degrees. This means, that some data is
81lost. The step between 2 consecutive values is 62 or 63. This effect can be seen
82in the writing of alarm values too. For positive numbers the user-input value
83will always be rounded down to the nearest possible value, for negative numbers
84the user-input will always be rounded up to the nearest possible value.
85
86Notes
87-----
88
89Currently fault queue, alarm polarity and resolution cannot be modified.
90PEC is not implemented either.
91