1694144b2SQuan Nguyen.. SPDX-License-Identifier: GPL-2.0-only 2694144b2SQuan Nguyen 3694144b2SQuan NguyenKernel driver Ampere(R)'s Altra(R) SMpro hwmon 4694144b2SQuan Nguyen============================================== 5694144b2SQuan Nguyen 6694144b2SQuan NguyenSupported chips: 7694144b2SQuan Nguyen 8694144b2SQuan Nguyen * Ampere(R) Altra(R) 9694144b2SQuan Nguyen 10*c1cb98c5SQuan Nguyen Prefix: ``smpro`` 11694144b2SQuan Nguyen 12*c1cb98c5SQuan Nguyen Reference: `Altra SoC BMC Interface Specification` 13694144b2SQuan Nguyen 14694144b2SQuan NguyenAuthor: Thu Nguyen <thu@os.amperecomputing.com> 15694144b2SQuan Nguyen 16694144b2SQuan NguyenDescription 17694144b2SQuan Nguyen----------- 18*c1cb98c5SQuan NguyenThe smpro-hwmon driver supports hardware monitoring for Ampere(R) Altra(R) 19*c1cb98c5SQuan NguyenSoCs based on the SMpro co-processor (SMpro). The following sensor metrics 20*c1cb98c5SQuan Nguyenare supported by the driver: 21694144b2SQuan Nguyen 22694144b2SQuan Nguyen * temperature 23694144b2SQuan Nguyen * voltage 24694144b2SQuan Nguyen * current 25694144b2SQuan Nguyen * power 26694144b2SQuan Nguyen 27*c1cb98c5SQuan NguyenThe interface provides the registers to query the various sensors and 28694144b2SQuan Nguyentheir values which are then exported to userspace by this driver. 29694144b2SQuan Nguyen 30694144b2SQuan NguyenUsage Notes 31694144b2SQuan Nguyen----------- 32694144b2SQuan Nguyen 33*c1cb98c5SQuan NguyenThe driver creates at least two sysfs files for each sensor. 34694144b2SQuan Nguyen 35*c1cb98c5SQuan Nguyen* ``<sensor_type><idx>_label`` reports the sensor label. 36*c1cb98c5SQuan Nguyen* ``<sensor_type><idx>_input`` returns the sensor value. 37694144b2SQuan Nguyen 38*c1cb98c5SQuan NguyenThe sysfs files are allocated in the SMpro rootfs folder, with one root 39*c1cb98c5SQuan Nguyendirectory for each instance. 40694144b2SQuan Nguyen 41*c1cb98c5SQuan NguyenWhen the SoC is turned off, the driver will fail to read registers and 42*c1cb98c5SQuan Nguyenreturn ``-ENXIO``. 43694144b2SQuan Nguyen 44694144b2SQuan NguyenSysfs entries 45694144b2SQuan Nguyen------------- 46694144b2SQuan Nguyen 47694144b2SQuan NguyenThe following sysfs files are supported: 48694144b2SQuan Nguyen 49694144b2SQuan Nguyen* Ampere(R) Altra(R): 50694144b2SQuan Nguyen 51694144b2SQuan Nguyen ============ ============= ====== =============================================== 52694144b2SQuan Nguyen Name Unit Perm Description 53*c1cb98c5SQuan Nguyen ============ ============= ====== =============================================== 54*c1cb98c5SQuan Nguyen temp1_input millicelsius RO SoC temperature 55*c1cb98c5SQuan Nguyen temp2_input millicelsius RO Max temperature reported among SoC VRDs 56*c1cb98c5SQuan Nguyen temp2_crit millicelsius RO SoC VRD HOT Threshold temperature 57*c1cb98c5SQuan Nguyen temp3_input millicelsius RO Max temperature reported among DIMM VRDs 58*c1cb98c5SQuan Nguyen temp4_input millicelsius RO Max temperature reported among Core VRDs 59*c1cb98c5SQuan Nguyen temp5_input millicelsius RO Temperature of DIMM0 on CH0 60*c1cb98c5SQuan Nguyen temp5_crit millicelsius RO MEM HOT Threshold for all DIMMs 61*c1cb98c5SQuan Nguyen temp6_input millicelsius RO Temperature of DIMM0 on CH1 62*c1cb98c5SQuan Nguyen temp6_crit millicelsius RO MEM HOT Threshold for all DIMMs 63*c1cb98c5SQuan Nguyen temp7_input millicelsius RO Temperature of DIMM0 on CH2 64*c1cb98c5SQuan Nguyen temp7_crit millicelsius RO MEM HOT Threshold for all DIMMs 65*c1cb98c5SQuan Nguyen temp8_input millicelsius RO Temperature of DIMM0 on CH3 66*c1cb98c5SQuan Nguyen temp8_crit millicelsius RO MEM HOT Threshold for all DIMMs 67*c1cb98c5SQuan Nguyen temp9_input millicelsius RO Temperature of DIMM0 on CH4 68*c1cb98c5SQuan Nguyen temp9_crit millicelsius RO MEM HOT Threshold for all DIMMs 69*c1cb98c5SQuan Nguyen temp10_input millicelsius RO Temperature of DIMM0 on CH5 70*c1cb98c5SQuan Nguyen temp10_crit millicelsius RO MEM HOT Threshold for all DIMMs 71*c1cb98c5SQuan Nguyen temp11_input millicelsius RO Temperature of DIMM0 on CH6 72*c1cb98c5SQuan Nguyen temp11_crit millicelsius RO MEM HOT Threshold for all DIMMs 73*c1cb98c5SQuan Nguyen temp12_input millicelsius RO Temperature of DIMM0 on CH7 74*c1cb98c5SQuan Nguyen temp12_crit millicelsius RO MEM HOT Threshold for all DIMMs 75*c1cb98c5SQuan Nguyen temp13_input millicelsius RO Max temperature reported among RCA VRDs 76*c1cb98c5SQuan Nguyen in0_input millivolts RO Core voltage 77*c1cb98c5SQuan Nguyen in1_input millivolts RO SoC voltage 78*c1cb98c5SQuan Nguyen in2_input millivolts RO DIMM VRD1 voltage 79*c1cb98c5SQuan Nguyen in3_input millivolts RO DIMM VRD2 voltage 80*c1cb98c5SQuan Nguyen in4_input millivolts RO RCA VRD voltage 81*c1cb98c5SQuan Nguyen cur1_input milliamperes RO Core VRD current 82*c1cb98c5SQuan Nguyen cur2_input milliamperes RO SoC VRD current 83*c1cb98c5SQuan Nguyen cur3_input milliamperes RO DIMM VRD1 current 84*c1cb98c5SQuan Nguyen cur4_input milliamperes RO DIMM VRD2 current 85*c1cb98c5SQuan Nguyen cur5_input milliamperes RO RCA VRD current 86*c1cb98c5SQuan Nguyen power1_input microwatts RO Core VRD power 87*c1cb98c5SQuan Nguyen power2_input microwatts RO SoC VRD power 88*c1cb98c5SQuan Nguyen power3_input microwatts RO DIMM VRD1 power 89*c1cb98c5SQuan Nguyen power4_input microwatts RO DIMM VRD2 power 90*c1cb98c5SQuan Nguyen power5_input microwatts RO RCA VRD power 91694144b2SQuan Nguyen ============ ============= ====== =============================================== 92694144b2SQuan Nguyen 93694144b2SQuan Nguyen Example:: 94694144b2SQuan Nguyen 95694144b2SQuan Nguyen # cat in0_input 96694144b2SQuan Nguyen 830 97694144b2SQuan Nguyen # cat temp1_input 98694144b2SQuan Nguyen 37000 99694144b2SQuan Nguyen # cat curr1_input 100694144b2SQuan Nguyen 9000 101694144b2SQuan Nguyen # cat power5_input 102694144b2SQuan Nguyen 19500000 103