1.. SPDX-License-Identifier: GPL-2.0-only 2 3Kernel drivers ltc4282 4========================================== 5 6Supported chips: 7 8 * Analog Devices LTC4282 9 10 Prefix: 'ltc4282' 11 12 Addresses scanned: - 13 14 Datasheet: 15 16 https://www.analog.com/media/en/technical-documentation/data-sheets/ltc4282.pdf 17 18Author: Nuno Sá <nuno.sa@analog.com> 19 20Description 21___________ 22 23The LTC4282 hot swap controller allows a board to be safely inserted and removed 24from a live backplane. Using one or more external N-channel pass transistors, 25board supply voltage and inrush current are ramped up at an adjustable rate. An 26I2C interface and onboard ADC allows for monitoring of board current, voltage, 27power, energy and fault status. The device features analog foldback current 28limiting and supply monitoring for applications from 2.9V to 33V. Dual 12V gate 29drive allows high power applications to either share safe operating area across 30parallel MOSFETs or support a 2-stage start-up that first charges the load 31capacitance followed by enabling a low on-resistance path to the load. The 32LTC4282 is well suited to high power applications because the precise monitoring 33capability and accurate current limiting reduce the extremes in which both loads 34and power supplies must safely operate. Non-volatile configuration allows for 35flexibility in the autonomous generation of alerts and response to faults. 36 37Sysfs entries 38_____________ 39 40The following attributes are supported. Limits are read-write and all the other 41attributes are read-only. Note that in0 and in1 are mutually exclusive. Enabling 42one disables the other and disabling one enables the other. 43 44======================= ========================================== 45in0_input Output voltage (mV). 46in0_min Undervoltage threshold 47in0_max Overvoltage threshold 48in0_lowest Lowest measured voltage 49in0_highest Highest measured voltage 50in0_reset_history Write 1 to reset in0 history. 51 Also clears fet bad and short fault logs. 52in0_min_alarm Undervoltage alarm 53in0_max_alarm Overvoltage alarm 54in0_enable Enable/Disable VSOURCE monitoring 55in0_fault Failure in the MOSFETs. Either bad or shorted FET. 56in0_label Channel label (VSOURCE) 57 58in1_input Input voltage (mV). 59in1_min Undervoltage threshold 60in1_max Overvoltage threshold 61in1_lowest Lowest measured voltage 62in1_highest Highest measured voltage 63in1_reset_history Write 1 to reset in1 history. 64 Also clears over/undervoltage fault logs. 65in1_min_alarm Undervoltage alarm 66in1_max_alarm Overvoltage alarm 67in1_lcrit_alarm Critical Undervoltage alarm 68in1_crit_alarm Critical Overvoltage alarm 69in1_enable Enable/Disable VDD monitoring 70in1_label Channel label (VDD) 71 72in2_input GPIO voltage (mV) 73in2_min Undervoltage threshold 74in2_max Overvoltage threshold 75in2_lowest Lowest measured voltage 76in2_highest Highest measured voltage 77in2_reset_history Write 1 to reset in2 history 78in2_min_alarm Undervoltage alarm 79in2_max_alarm Overvoltage alarm 80in2_label Channel label (VGPIO) 81 82curr1_input Sense current (mA) 83curr1_min Undercurrent threshold 84curr1_max Overcurrent threshold 85curr1_lowest Lowest measured current 86curr1_highest Highest measured current 87curr1_reset_history Write 1 to reset curr1 history. 88 Also clears overcurrent fault logs. 89curr1_min_alarm Undercurrent alarm 90curr1_max_alarm Overcurrent alarm 91curr1_crit_alarm Critical Overcurrent alarm 92curr1_label Channel label (ISENSE) 93 94power1_input Power (in uW) 95power1_min Low power threshold 96power1_max High power threshold 97power1_input_lowest Historical minimum power use 98power1_input_highest Historical maximum power use 99power1_reset_history Write 1 to reset power1 history. 100 Also clears power bad fault logs. 101power1_min_alarm Low power alarm 102power1_max_alarm High power alarm 103power1_label Channel label (Power) 104 105energy1_input Measured energy over time (in microJoule) 106energy1_enable Enable/Disable Energy accumulation 107======================= ========================================== 108 109DebugFs entries 110_______________ 111 112The chip also has a fault log register where failures can be logged. Hence, 113as these are logging events, we give access to them in debugfs. Note that 114even if some failure is detected in these logs, it does necessarily mean 115that the failure is still present. As mentioned in the proper Sysfs entries, 116these logs can be cleared by writing in the proper reset_history attribute. 117 118.. warning:: The debugfs interface is subject to change without notice 119 and is only available when the kernel is compiled with 120 ``CONFIG_DEBUG_FS`` defined. 121 122``/sys/kernel/debug/ltc4282-hwmon[X]/`` 123contains the following attributes: 124 125======================= ========================================== 126power1_bad_fault_log Set to 1 by a power1 bad fault occurring. 127in0_fet_short_fault_log Set to 1 when the ADC detects a FET-short fault. 128in0_fet_bad_fault_log Set to 1 when a FET-BAD fault occurs. 129in1_crit_fault_log Set to 1 by a VDD overvoltage fault occurring. 130in1_lcrit_fault_log Set to 1 by a VDD undervoltage fault occurring. 131curr1_crit_fault_log Set to 1 by an overcurrent fault occurring. 132======================= ========================================== 133