xref: /openbmc/linux/Documentation/hwmon/smpro-hwmon.rst (revision 694144b215fc077087d68dfc3d1ef7dae9fec387)
1*694144b2SQuan Nguyen.. SPDX-License-Identifier: GPL-2.0-only
2*694144b2SQuan Nguyen
3*694144b2SQuan NguyenKernel driver Ampere(R)'s Altra(R) SMpro hwmon
4*694144b2SQuan Nguyen==============================================
5*694144b2SQuan Nguyen
6*694144b2SQuan NguyenSupported chips:
7*694144b2SQuan Nguyen
8*694144b2SQuan Nguyen  * Ampere(R) Altra(R)
9*694144b2SQuan Nguyen
10*694144b2SQuan Nguyen    Prefix: 'smpro'
11*694144b2SQuan Nguyen
12*694144b2SQuan Nguyen    Reference: Altra SoC BMC Interface Specification
13*694144b2SQuan Nguyen
14*694144b2SQuan NguyenAuthor: Thu Nguyen <thu@os.amperecomputing.com>
15*694144b2SQuan Nguyen
16*694144b2SQuan NguyenDescription
17*694144b2SQuan Nguyen-----------
18*694144b2SQuan NguyenThis driver supports hardware monitoring for Ampere(R) Altra(R) SoC's based on the
19*694144b2SQuan NguyenSMpro co-processor (SMpro).
20*694144b2SQuan NguyenThe following sensor types are supported by the driver:
21*694144b2SQuan Nguyen
22*694144b2SQuan Nguyen  * temperature
23*694144b2SQuan Nguyen  * voltage
24*694144b2SQuan Nguyen  * current
25*694144b2SQuan Nguyen  * power
26*694144b2SQuan Nguyen
27*694144b2SQuan NguyenThe SMpro interface provides the registers to query the various sensors and
28*694144b2SQuan Nguyentheir values which are then exported to userspace by this driver.
29*694144b2SQuan Nguyen
30*694144b2SQuan NguyenUsage Notes
31*694144b2SQuan Nguyen-----------
32*694144b2SQuan Nguyen
33*694144b2SQuan NguyenSMpro hwmon driver creates at least two sysfs files for each sensor.
34*694144b2SQuan Nguyen
35*694144b2SQuan Nguyen* File ``<sensor_type><idx>_label`` reports the sensor label.
36*694144b2SQuan Nguyen* File ``<sensor_type><idx>_input`` returns the sensor value.
37*694144b2SQuan Nguyen
38*694144b2SQuan NguyenThe sysfs files are allocated in the SMpro root fs folder.
39*694144b2SQuan NguyenThere is one root folder for each SMpro instance.
40*694144b2SQuan Nguyen
41*694144b2SQuan NguyenWhen the SoC is turned off, the driver will fail to read registers
42*694144b2SQuan Nguyenand return -ENXIO.
43*694144b2SQuan Nguyen
44*694144b2SQuan NguyenSysfs entries
45*694144b2SQuan Nguyen-------------
46*694144b2SQuan Nguyen
47*694144b2SQuan NguyenThe following sysfs files are supported:
48*694144b2SQuan Nguyen
49*694144b2SQuan Nguyen* Ampere(R) Altra(R):
50*694144b2SQuan Nguyen
51*694144b2SQuan Nguyen============    =============   ======  ===============================================
52*694144b2SQuan NguyenName            Unit            Perm    Description
53*694144b2SQuan Nguyentemp1_input     milli Celsius   RO      SoC temperature
54*694144b2SQuan Nguyentemp2_input     milli Celsius   RO      Max temperature reported among SoC VRDs
55*694144b2SQuan Nguyentemp2_crit      milli Celsius   RO      SoC VRD HOT Threshold temperature
56*694144b2SQuan Nguyentemp3_input     milli Celsius   RO      Max temperature reported among DIMM VRDs
57*694144b2SQuan Nguyentemp4_input     milli Celsius   RO      Max temperature reported among Core VRDs
58*694144b2SQuan Nguyentemp5_input     milli Celsius   RO      Temperature of DIMM0 on CH0
59*694144b2SQuan Nguyentemp5_crit      milli Celsius   RO      MEM HOT Threshold for all DIMMs
60*694144b2SQuan Nguyentemp6_input     milli Celsius   RO      Temperature of DIMM0 on CH1
61*694144b2SQuan Nguyentemp6_crit      milli Celsius   RO      MEM HOT Threshold for all DIMMs
62*694144b2SQuan Nguyentemp7_input     milli Celsius   RO      Temperature of DIMM0 on CH2
63*694144b2SQuan Nguyentemp7_crit      milli Celsius   RO      MEM HOT Threshold for all DIMMs
64*694144b2SQuan Nguyentemp8_input     milli Celsius   RO      Temperature of DIMM0 on CH3
65*694144b2SQuan Nguyentemp8_crit      milli Celsius   RO      MEM HOT Threshold for all DIMMs
66*694144b2SQuan Nguyentemp9_input     milli Celsius   RO      Temperature of DIMM0 on CH4
67*694144b2SQuan Nguyentemp9_crit      milli Celsius   RO      MEM HOT Threshold for all DIMMs
68*694144b2SQuan Nguyentemp10_input    milli Celsius   RO      Temperature of DIMM0 on CH5
69*694144b2SQuan Nguyentemp10_crit     milli Celsius   RO      MEM HOT Threshold for all DIMMs
70*694144b2SQuan Nguyentemp11_input    milli Celsius   RO      Temperature of DIMM0 on CH6
71*694144b2SQuan Nguyentemp11_crit     milli Celsius   RO      MEM HOT Threshold for all DIMMs
72*694144b2SQuan Nguyentemp12_input    milli Celsius   RO      Temperature of DIMM0 on CH7
73*694144b2SQuan Nguyentemp12_crit     milli Celsius   RO      MEM HOT Threshold for all DIMMs
74*694144b2SQuan Nguyentemp13_input    milli Celsius   RO      Max temperature reported among RCA VRDs
75*694144b2SQuan Nguyenin0_input       milli Volts     RO      Core voltage
76*694144b2SQuan Nguyenin1_input       milli Volts     RO      SoC voltage
77*694144b2SQuan Nguyenin2_input       milli Volts     RO      DIMM VRD1 voltage
78*694144b2SQuan Nguyenin3_input       milli Volts     RO      DIMM VRD2 voltage
79*694144b2SQuan Nguyenin4_input       milli Volts     RO      RCA VRD voltage
80*694144b2SQuan Nguyencur1_input      milli Amperes   RO      Core VRD current
81*694144b2SQuan Nguyencur2_input      milli Amperes   RO      SoC VRD current
82*694144b2SQuan Nguyencur3_input      milli Amperes   RO      DIMM VRD1 current
83*694144b2SQuan Nguyencur4_input      milli Amperes   RO      DIMM VRD2 current
84*694144b2SQuan Nguyencur5_input      milli Amperes   RO      RCA VRD current
85*694144b2SQuan Nguyenpower1_input    micro Watts     RO      Core VRD power
86*694144b2SQuan Nguyenpower2_input    micro Watts     RO      SoC VRD power
87*694144b2SQuan Nguyenpower3_input    micro Watts     RO      DIMM VRD1 power
88*694144b2SQuan Nguyenpower4_input    micro Watts     RO      DIMM VRD2 power
89*694144b2SQuan Nguyenpower5_input    micro Watts     RO      RCA VRD power
90*694144b2SQuan Nguyen============    =============   ======  ===============================================
91*694144b2SQuan Nguyen
92*694144b2SQuan NguyenExample::
93*694144b2SQuan Nguyen
94*694144b2SQuan Nguyen    # cat in0_input
95*694144b2SQuan Nguyen    830
96*694144b2SQuan Nguyen    # cat temp1_input
97*694144b2SQuan Nguyen    37000
98*694144b2SQuan Nguyen    # cat curr1_input
99*694144b2SQuan Nguyen    9000
100*694144b2SQuan Nguyen    # cat power5_input
101*694144b2SQuan Nguyen    19500000
102