Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: hwmon: (smpro-hwmon) Add documentation

Add documentation for the Ampere(R)'s Altra(R) SMpro hwmon driver.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Signed-off-by: Quan Nguyen <quan@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20220929094321.770125-3-quan@os.amperecomputing.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Quan Nguyen and committed by
Guenter Roeck
694144b2 7bce8981

+102
+1
Documentation/hwmon/index.rst
··· 187 187 sis5595 188 188 sl28cpld 189 189 smm665 190 + smpro-hwmon 190 191 smsc47b397 191 192 smsc47m192 192 193 smsc47m1
+101
Documentation/hwmon/smpro-hwmon.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0-only 2 + 3 + Kernel driver Ampere(R)'s Altra(R) SMpro hwmon 4 + ============================================== 5 + 6 + Supported chips: 7 + 8 + * Ampere(R) Altra(R) 9 + 10 + Prefix: 'smpro' 11 + 12 + Reference: Altra SoC BMC Interface Specification 13 + 14 + Author: Thu Nguyen <thu@os.amperecomputing.com> 15 + 16 + Description 17 + ----------- 18 + This driver supports hardware monitoring for Ampere(R) Altra(R) SoC's based on the 19 + SMpro co-processor (SMpro). 20 + The following sensor types are supported by the driver: 21 + 22 + * temperature 23 + * voltage 24 + * current 25 + * power 26 + 27 + The SMpro interface provides the registers to query the various sensors and 28 + their values which are then exported to userspace by this driver. 29 + 30 + Usage Notes 31 + ----------- 32 + 33 + SMpro hwmon driver creates at least two sysfs files for each sensor. 34 + 35 + * File ``<sensor_type><idx>_label`` reports the sensor label. 36 + * File ``<sensor_type><idx>_input`` returns the sensor value. 37 + 38 + The sysfs files are allocated in the SMpro root fs folder. 39 + There is one root folder for each SMpro instance. 40 + 41 + When the SoC is turned off, the driver will fail to read registers 42 + and return -ENXIO. 43 + 44 + Sysfs entries 45 + ------------- 46 + 47 + The following sysfs files are supported: 48 + 49 + * Ampere(R) Altra(R): 50 + 51 + ============ ============= ====== =============================================== 52 + Name Unit Perm Description 53 + temp1_input milli Celsius RO SoC temperature 54 + temp2_input milli Celsius RO Max temperature reported among SoC VRDs 55 + temp2_crit milli Celsius RO SoC VRD HOT Threshold temperature 56 + temp3_input milli Celsius RO Max temperature reported among DIMM VRDs 57 + temp4_input milli Celsius RO Max temperature reported among Core VRDs 58 + temp5_input milli Celsius RO Temperature of DIMM0 on CH0 59 + temp5_crit milli Celsius RO MEM HOT Threshold for all DIMMs 60 + temp6_input milli Celsius RO Temperature of DIMM0 on CH1 61 + temp6_crit milli Celsius RO MEM HOT Threshold for all DIMMs 62 + temp7_input milli Celsius RO Temperature of DIMM0 on CH2 63 + temp7_crit milli Celsius RO MEM HOT Threshold for all DIMMs 64 + temp8_input milli Celsius RO Temperature of DIMM0 on CH3 65 + temp8_crit milli Celsius RO MEM HOT Threshold for all DIMMs 66 + temp9_input milli Celsius RO Temperature of DIMM0 on CH4 67 + temp9_crit milli Celsius RO MEM HOT Threshold for all DIMMs 68 + temp10_input milli Celsius RO Temperature of DIMM0 on CH5 69 + temp10_crit milli Celsius RO MEM HOT Threshold for all DIMMs 70 + temp11_input milli Celsius RO Temperature of DIMM0 on CH6 71 + temp11_crit milli Celsius RO MEM HOT Threshold for all DIMMs 72 + temp12_input milli Celsius RO Temperature of DIMM0 on CH7 73 + temp12_crit milli Celsius RO MEM HOT Threshold for all DIMMs 74 + temp13_input milli Celsius RO Max temperature reported among RCA VRDs 75 + in0_input milli Volts RO Core voltage 76 + in1_input milli Volts RO SoC voltage 77 + in2_input milli Volts RO DIMM VRD1 voltage 78 + in3_input milli Volts RO DIMM VRD2 voltage 79 + in4_input milli Volts RO RCA VRD voltage 80 + cur1_input milli Amperes RO Core VRD current 81 + cur2_input milli Amperes RO SoC VRD current 82 + cur3_input milli Amperes RO DIMM VRD1 current 83 + cur4_input milli Amperes RO DIMM VRD2 current 84 + cur5_input milli Amperes RO RCA VRD current 85 + power1_input micro Watts RO Core VRD power 86 + power2_input micro Watts RO SoC VRD power 87 + power3_input micro Watts RO DIMM VRD1 power 88 + power4_input micro Watts RO DIMM VRD2 power 89 + power5_input micro Watts RO RCA VRD power 90 + ============ ============= ====== =============================================== 91 + 92 + Example:: 93 + 94 + # cat in0_input 95 + 830 96 + # cat temp1_input 97 + 37000 98 + # cat curr1_input 99 + 9000 100 + # cat power5_input 101 + 19500000