xref: /linux/Documentation/hwmon/ltc4283.rst (revision a9d4dd742466cab468a950441447c614a3920aad)
1.. SPDX-License-Identifier: GPL-2.0-only
2
3Kernel drivers ltc4283
4==========================================
5
6Supported chips:
7
8  * Analog Devices LTC4283
9
10    Prefix: 'ltc4283'
11
12    Addresses scanned: -
13
14    Datasheet:
15
16        https://www.analog.com/media/en/technical-documentation/data-sheets/ltc4283.pdf
17
18Author: Nuno Sá <nuno.sa@analog.com>
19
20Description
21___________
22
23The LTC4283 negative voltage hot swap controller drives an external N-channel
24MOSFET to allow a board to be safely inserted and removed from a live backplane.
25The device features programmable current limit with foldback and independently
26adjustable inrush current to optimize the MOSFET safe operating area (SOA). The
27SOA timer limits MOSFET temperature rise for reliable protection against
28overstresses. An I2C interface and onboard gear-shift ADC allow monitoring of
29board current, voltage, power, energy, and fault status.  Additional features
30respond to input UV/OV, interrupt the host when a fault has occurred, notify
31when output power is good, detect insertion of a board, turn off the MOSFET
32if an external supply monitor fails to indicate power good within a timeout
33period, and auto-reboot after a programmable delay following a host commanded
34turn-off.
35
36Sysfs entries
37_____________
38
39The following attributes are supported. Limits are read-write and all the other
40attributes are read-only. Note that the VADIOx channels might not be available
41if the ADIO pins are used as GPIOs (naturally also affects the respective
42differential channels).
43
44======================= ==========================================
45in0_lcrit_alarm         Critical Undervoltage alarm
46in0_crit_alarm          Critical Overvoltage alarm
47in0_reset_history       Clears Under and Overvoltage fault logs.
48in0_label		Channel label (VIN)
49
50in1_input		Output voltage (mV).
51in1_min			Undervoltage threshold
52in1_max			Overvoltage threshold
53in1_lowest		Lowest measured voltage
54in1_highest		Highest measured voltage
55in1_reset_history	Write 1 to reset history.
56in1_min_alarm		Undervoltage alarm
57in1_max_alarm		Overvoltage alarm
58in1_label		Channel label (VPWR)
59
60in2_input		Output voltage (mV).
61in2_min			Undervoltage threshold
62in2_max			Overvoltage threshold
63in2_lowest		Lowest measured voltage
64in2_highest		Highest measured voltage
65in2_reset_history	Write 1 to reset history.
66in2_min_alarm		Undervoltage alarm
67in2_max_alarm		Overvoltage alarm
68in2_enable		Enable/Disable monitoring.
69in2_label		Channel label (VADI1)
70
71in3_input		Output voltage (mV).
72in3_min			Undervoltage threshold
73in3_max			Overvoltage threshold
74in3_lowest		Lowest measured voltage
75in3_highest		Highest measured voltage
76in3_reset_history	Write 1 to reset history.
77in3_min_alarm		Undervoltage alarm
78in3_max_alarm		Overvoltage alarm
79in3_enable		Enable/Disable monitoring.
80in3_label		Channel label (VADI2)
81
82in4_input		Output voltage (mV).
83in4_min			Undervoltage threshold
84in4_max			Overvoltage threshold
85in4_lowest		Lowest measured voltage
86in4_highest		Highest measured voltage
87in4_reset_history	Write 1 to reset history.
88in4_min_alarm		Undervoltage alarm
89in4_max_alarm		Overvoltage alarm
90in4_enable		Enable/Disable monitoring.
91in4_label		Channel label (VADI3)
92
93in5_input		Output voltage (mV).
94in5_min			Undervoltage threshold
95in5_max			Overvoltage threshold
96in5_lowest		Lowest measured voltage
97in5_highest		Highest measured voltage
98in5_reset_history	Write 1 to reset history.
99in5_min_alarm		Undervoltage alarm
100in5_max_alarm		Overvoltage alarm
101in5_enable		Enable/Disable monitoring.
102in5_label		Channel label (VADI4)
103
104in6_input		Output voltage (mV).
105in6_min			Undervoltage threshold
106in6_max			Overvoltage threshold
107in6_lowest		Lowest measured voltage
108in6_highest		Highest measured voltage
109in6_reset_history	Write 1 to reset history.
110in6_min_alarm		Undervoltage alarm
111in6_max_alarm		Overvoltage alarm
112in6_enable		Enable/Disable monitoring.
113in6_label		Channel label (VADIO1)
114
115in7_input		Output voltage (mV).
116in7_min			Undervoltage threshold
117in7_max			Overvoltage threshold
118in7_lowest		Lowest measured voltage
119in7_highest		Highest measured voltage
120in7_reset_history	Write 1 to reset history.
121in7_min_alarm		Undervoltage alarm
122in7_max_alarm		Overvoltage alarm
123in7_enable		Enable/Disable monitoring.
124in7_label		Channel label (VADIO2)
125
126in8_input		Output voltage (mV).
127in8_min			Undervoltage threshold
128in8_max			Overvoltage threshold
129in8_lowest		Lowest measured voltage
130in8_highest		Highest measured voltage
131in8_reset_history	Write 1 to reset history.
132in8_min_alarm		Undervoltage alarm
133in8_max_alarm		Overvoltage alarm
134in8_enable		Enable/Disable monitoring.
135in8_label		Channel label (VADIO3)
136
137in9_input		Output voltage (mV).
138in9_min			Undervoltage threshold
139in9_max			Overvoltage threshold
140in9_lowest		Lowest measured voltage
141in9_highest		Highest measured voltage
142in9_reset_history	Write 1 to reset history.
143in9_min_alarm		Undervoltage alarm
144in9_max_alarm		Overvoltage alarm
145in9_enable		Enable/Disable monitoring.
146in9_label		Channel label (VADIO4)
147
148in10_input		Output voltage (mV).
149in10_min		Undervoltage threshold
150in10_max		Overvoltage threshold
151in10_lowest		Lowest measured voltage
152in10_highest		Highest measured voltage
153in10_reset_history	Write 1 to reset history.
154in10_min_alarm		Undervoltage alarm
155in10_max_alarm		Overvoltage alarm
156in10_enable		Enable/Disable monitoring.
157in10_label		Channel label (DRNS)
158
159in11_input		Output voltage (mV).
160in11_min		Undervoltage threshold
161in11_max		Overvoltage threshold
162in11_lowest		Lowest measured voltage
163in11_highest		Highest measured voltage
164in11_reset_history	Write 1 to reset history.
165			Also clears fet bad and short fault logs.
166in11_min_alarm		Undervoltage alarm
167in11_max_alarm		Overvoltage alarm
168in11_enable		Enable/Disable monitoring
169in11_fault		Failure in the MOSFET. Either bad or shorted FET.
170in11_label		Channel label (DRAIN)
171
172in12_input		Output voltage (mV).
173in12_min		Undervoltage threshold
174in12_max		Overvoltage threshold
175in12_lowest		Lowest measured voltage
176in12_highest		Highest measured voltage
177in12_reset_history	Write 1 to reset history.
178in12_min_alarm		Undervoltage alarm
179in12_max_alarm		Overvoltage alarm
180in12_enable		Enable/Disable monitoring.
181in12_label		Channel label (ADIN2-ADIN1)
182
183in13_input		Output voltage (mV).
184in13_min		Undervoltage threshold
185in13_max		Overvoltage threshold
186in13_lowest		Lowest measured voltage
187in13_highest		Highest measured voltage
188in13_reset_history	Write 1 to reset history.
189in13_min_alarm		Undervoltage alarm
190in13_max_alarm		Overvoltage alarm
191in13_enable		Enable/Disable monitoring.
192in13_label		Channel label (ADIN4-ADIN3)
193
194in14_input		Output voltage (mV).
195in14_min		Undervoltage threshold
196in14_max		Overvoltage threshold
197in14_lowest		Lowest measured voltage
198in14_highest		Highest measured voltage
199in14_reset_history	Write 1 to reset history.
200in14_min_alarm		Undervoltage alarm
201in14_max_alarm		Overvoltage alarm
202in14_enable		Enable/Disable monitoring.
203in14_label		Channel label (ADIO2-ADIO1)
204
205in15_input		Output voltage (mV).
206in15_min		Undervoltage threshold
207in15_max		Overvoltage threshold
208in15_lowest		Lowest measured voltage
209in15_highest		Highest measured voltage
210in15_reset_history	Write 1 to reset history.
211in15_min_alarm		Undervoltage alarm
212in15_max_alarm		Overvoltage alarm
213in15_enable		Enable/Disable monitoring.
214in15_label		Channel label (ADIO4-ADIO3)
215
216curr1_input		Sense current (mA)
217curr1_min		Undercurrent threshold
218curr1_max		Overcurrent threshold
219curr1_lowest		Lowest measured current
220curr1_highest		Highest measured current
221curr1_reset_history	Write 1 to reset curr1 history.
222			Also clears overcurrent fault logs.
223curr1_min_alarm		Undercurrent alarm
224curr1_max_alarm		Overcurrent alarm
225curr1_crit_alarm        Critical Overcurrent alarm
226curr1_label		Channel label (ISENSE)
227
228power1_input		Power (in uW)
229power1_min		Low power threshold
230power1_max		High power threshold
231power1_input_lowest	Historical minimum power use
232power1_input_highest	Historical maximum power use
233power1_reset_history	Write 1 to reset power1 history.
234			Also clears power fault logs.
235power1_min_alarm	Low power alarm
236power1_max_alarm	High power alarm
237power1_label		Channel label (Power)
238
239energy1_input		Measured energy over time (in microJoule)
240energy1_enable		Enable/Disable Energy accumulation
241======================= ==========================================
242
243DebugFs entries
244_______________
245
246The chip also has a fault log register where failures can be logged. Hence,
247as these are logging events, we give access to them in debugfs. Note that
248even if some failure is detected in these logs, it does necessarily mean
249that the failure is still present. As mentioned in the proper Sysfs entries,
250these logs can be cleared by writing in the proper reset_history attribute.
251
252.. warning:: The debugfs interface is subject to change without notice
253             and is only available when the kernel is compiled with
254             ``CONFIG_DEBUG_FS`` defined.
255
256``/sys/kernel/debug/i2c/i2c-[X]/[X]-addr/``
257contains the following attributes:
258
259==============================  ==========================================================
260power1_failed_fault_log		Set to 1 by a power1 fault occurring.
261power1_good_input_fault_log	Set to 1 by a power1 good input fault occurring at PGIO3.
262in11_fet_short_fault_log	Set to 1 when a FET-short fault occurs.
263in11_fet_bad_fault_log		Set to 1 when a FET-BAD fault occurs.
264in0_lcrit_fault_log		Set to 1 by a VIN undervoltage fault occurring.
265in0_crit_fault_log		Set to 1 by a VIN overvoltage fault occurring.
266curr1_crit_fault_log		Set to 1 by an overcurrent fault occurring.
267==============================  ==========================================================
268