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