1.. SPDX-License-Identifier: GPL-2.0-only 2 3Kernel driver tsc1641 4===================== 5 6Supported chips: 7 8 * ST TSC1641 9 10 Prefix: 'tsc1641' 11 12 Addresses scanned: - 13 14 Datasheet: 15 https://www.st.com/resource/en/datasheet/tsc1641.pdf 16 17Author: 18 - Igor Reznichenko <igor@reznichenko.net> 19 20 21Description 22----------- 23 24The TSC1641 is a high-precision current, voltage, power, and temperature 25monitoring analog front-end (AFE). It monitors bidirectional current into a 26shunt resistor and load voltage up to 60 V in a synchronized way. Digital bus 27interface is I2C/SMbus. The TSC1641 allows the assertion of several alerts 28regarding the voltage, current, power and temperature. 29 30Usage Notes 31----------- 32 33The TSC1641 driver requires the value of the external shunt resistor to 34correctly compute current and power measurements. The resistor value, in 35micro-ohms, should be provided either through the device tree property 36"shunt-resistor-micro-ohms" or via writable sysfs attribute "shunt_resistor". 37Please refer to the Documentation/devicetree/bindings/hwmon/st,tsc1641.yaml 38for bindings if the device tree is used. 39 40Supported range of shunt resistor values is from 100 uOhm to 655.35 mOhm, in 4110 uOhm steps. 42When selecting the value keep in mind device maximum DC power measurement is 431600W. See datasheet p.22 for ST recommendations on selecting shunt value. 44 45If the shunt resistor value is not specified in the device tree, the driver 46initializes it to 1000 uOhm by default. Users may configure the correct shunt 47resistor value at runtime by writing to the "shunt_resistor" sysfs attribute. 48 49The driver only supports continuous operating mode. 50Measurement ranges: 51 52================ =============================================================== 53Current Bidirectional, dependent on shunt 54Bus voltage 0-60V 55Maximum DC power 1600W 56Temperature -40C to +125C 57================ =============================================================== 58 59Sysfs entries 60------------- 61 62==================== =========================================================== 63in0_input bus voltage (mV) 64in0_max bus voltage max alarm limit (mV) 65in0_max_alarm bus voltage max alarm limit exceeded 66in0_min bus voltage min alarm limit (mV) 67in0_min_alarm bus voltage min alarm limit exceeded 68 69curr1_input current measurement (mA) 70curr1_max current max alarm limit (mA) 71curr1_max_alarm current max alarm limit exceeded 72curr1_min current min alarm limit (mA) 73curr1_min_alarm current min alarm limit exceeded 74 75power1_input power measurement (uW) 76power1_max power max alarm limit (uW) 77power1_max_alarm power max alarm limit exceeded 78 79shunt_resistor shunt resistor value (uOhms) 80 81temp1_input temperature measurement (mdegC) 82temp1_max temperature max alarm limit (mdegC) 83temp1_max_alarm temperature max alarm limit exceeded 84 85update_interval data conversion time (1 - 33ms), longer conversion time 86 corresponds to higher effective resolution in bits 87==================== ===========================================================