xref: /linux/Documentation/hwmon/ltc2947.rst (revision c95baf12f5077419db01313ab61c2aac007d40cd)
1*9f90fd65SNuno SáKernel drivers ltc2947-i2c and ltc2947-spi
2*9f90fd65SNuno Sá==========================================
3*9f90fd65SNuno Sá
4*9f90fd65SNuno SáSupported chips:
5*9f90fd65SNuno Sá
6*9f90fd65SNuno Sá  * Analog Devices LTC2947
7*9f90fd65SNuno Sá
8*9f90fd65SNuno Sá    Prefix: 'ltc2947'
9*9f90fd65SNuno Sá
10*9f90fd65SNuno Sá    Addresses scanned: -
11*9f90fd65SNuno Sá
12*9f90fd65SNuno Sá    Datasheet:
13*9f90fd65SNuno Sá
14*9f90fd65SNuno Sá        https://www.analog.com/media/en/technical-documentation/data-sheets/LTC2947.pdf
15*9f90fd65SNuno Sá
16*9f90fd65SNuno SáAuthor: Nuno Sá <nuno.sa@analog.com>
17*9f90fd65SNuno Sá
18*9f90fd65SNuno SáDescription
19*9f90fd65SNuno Sá___________
20*9f90fd65SNuno Sá
21*9f90fd65SNuno SáThe LTC2947 is a high precision power and energy monitor that measures current,
22*9f90fd65SNuno Sávoltage, power, temperature, charge and energy. The device supports both SPI
23*9f90fd65SNuno Sáand I2C depending on the chip configuration.
24*9f90fd65SNuno SáThe device also measures accumulated quantities as energy. It has two banks of
25*9f90fd65SNuno Sáregister's to read/set energy related values. These banks can be configured
26*9f90fd65SNuno Sáindependently to have setups like: energy1 accumulates always and enrgy2 only
27*9f90fd65SNuno Sáaccumulates if current is positive (to check battery charging efficiency for
28*9f90fd65SNuno Sáexample). The device also supports a GPIO pin that can be configured as output
29*9f90fd65SNuno Sáto control a fan as a function of measured temperature. Then, the GPIO becomes
30*9f90fd65SNuno Sáactive as soon as a temperature reading is higher than a defined threshold. The
31*9f90fd65SNuno Sátemp2 channel is used to control this thresholds and to read the respective
32*9f90fd65SNuno Sáalarms.
33*9f90fd65SNuno Sá
34*9f90fd65SNuno SáSysfs entries
35*9f90fd65SNuno Sá_____________
36*9f90fd65SNuno Sá
37*9f90fd65SNuno SáThe following attributes are supported. Limits are read-write, reset_history
38*9f90fd65SNuno Sáis write-only and all the other attributes are read-only.
39*9f90fd65SNuno Sá
40*9f90fd65SNuno Sá======================= ==========================================
41*9f90fd65SNuno Sáin0_input		VP-VM voltage (mV).
42*9f90fd65SNuno Sáin0_min			Undervoltage threshold
43*9f90fd65SNuno Sáin0_max			Overvoltage threshold
44*9f90fd65SNuno Sáin0_lowest		Lowest measured voltage
45*9f90fd65SNuno Sáin0_highest		Highest measured voltage
46*9f90fd65SNuno Sáin0_reset_history	Write 1 to reset in1 history
47*9f90fd65SNuno Sáin0_min_alarm		Undervoltage alarm
48*9f90fd65SNuno Sáin0_max_alarm		Overvoltage alarm
49*9f90fd65SNuno Sáin0_label		Channel label (VP-VM)
50*9f90fd65SNuno Sá
51*9f90fd65SNuno Sáin1_input		DVCC voltage (mV)
52*9f90fd65SNuno Sáin1_min			Undervoltage threshold
53*9f90fd65SNuno Sáin1_max			Overvoltage threshold
54*9f90fd65SNuno Sáin1_lowest		Lowest measured voltage
55*9f90fd65SNuno Sáin1_highest		Highest measured voltage
56*9f90fd65SNuno Sáin1_reset_history	Write 1 to reset in2 history
57*9f90fd65SNuno Sáin1_min_alarm		Undervoltage alarm
58*9f90fd65SNuno Sáin1_max_alarm		Overvoltage alarm
59*9f90fd65SNuno Sáin1_label		Channel label (DVCC)
60*9f90fd65SNuno Sá
61*9f90fd65SNuno Sácurr1_input		IP-IM Sense current (mA)
62*9f90fd65SNuno Sácurr1_min		Undercurrent threshold
63*9f90fd65SNuno Sácurr1_max		Overcurrent threshold
64*9f90fd65SNuno Sácurr1_lowest		Lowest measured current
65*9f90fd65SNuno Sácurr1_highest		Highest measured current
66*9f90fd65SNuno Sácurr1_reset_history	Write 1 to reset curr1 history
67*9f90fd65SNuno Sácurr1_min_alarm		Undercurrent alarm
68*9f90fd65SNuno Sácurr1_max_alarm		Overcurrent alarm
69*9f90fd65SNuno Sácurr1_label		Channel label (IP-IM)
70*9f90fd65SNuno Sá
71*9f90fd65SNuno Sápower1_input		Power (in uW)
72*9f90fd65SNuno Sápower1_min		Low power threshold
73*9f90fd65SNuno Sápower1_max		High power threshold
74*9f90fd65SNuno Sápower1_input_lowest	Historical minimum power use
75*9f90fd65SNuno Sápower1_input_highest	Historical maximum power use
76*9f90fd65SNuno Sápower1_reset_history	Write 1 to reset power1 history
77*9f90fd65SNuno Sápower1_min_alarm	Low power alarm
78*9f90fd65SNuno Sápower1_max_alarm	High power alarm
79*9f90fd65SNuno Sápower1_label		Channel label (Power)
80*9f90fd65SNuno Sá
81*9f90fd65SNuno Sátemp1_input		Chip Temperature (in milliC)
82*9f90fd65SNuno Sátemp1_min		Low temperature threshold
83*9f90fd65SNuno Sátemp1_max		High temperature threshold
84*9f90fd65SNuno Sátemp1_input_lowest	Historical minimum temperature use
85*9f90fd65SNuno Sátemp1_input_highest	Historical maximum temperature use
86*9f90fd65SNuno Sátemp1_reset_history	Write 1 to reset temp1 history
87*9f90fd65SNuno Sátemp1_min_alarm		Low temperature alarm
88*9f90fd65SNuno Sátemp1_max_alarm		High temperature alarm
89*9f90fd65SNuno Sátemp1_label		Channel label (Ambient)
90*9f90fd65SNuno Sá
91*9f90fd65SNuno Sátemp2_min		Low temperature threshold for fan control
92*9f90fd65SNuno Sátemp2_max		High temperature threshold for fan control
93*9f90fd65SNuno Sátemp2_min_alarm		Low temperature fan control alarm
94*9f90fd65SNuno Sátemp2_max_alarm		High temperature fan control alarm
95*9f90fd65SNuno Sátemp2_label		Channel label (TEMPFAN)
96*9f90fd65SNuno Sá
97*9f90fd65SNuno Sáenergy1_input		Measured energy over time (in microJoule)
98*9f90fd65SNuno Sá
99*9f90fd65SNuno Sáenergy2_input		Measured energy over time (in microJoule)
100*9f90fd65SNuno Sá======================= ==========================================
101