Back to home page

OSCL-LXR

 
 

    


0001 Kernel driver occ-hwmon
0002 =======================
0003 
0004 Supported chips:
0005 
0006   * POWER8
0007   * POWER9
0008 
0009 Author: Eddie James <eajames@linux.ibm.com>
0010 
0011 Description
0012 -----------
0013 
0014 This driver supports hardware monitoring for the On-Chip Controller (OCC)
0015 embedded on POWER processors. The OCC is a device that collects and aggregates
0016 sensor data from the processor and the system. The OCC can provide the raw
0017 sensor data as well as perform thermal and power management on the system.
0018 
0019 The P8 version of this driver is a client driver of I2C. It may be probed
0020 manually if an "ibm,p8-occ-hwmon" compatible device is found under the
0021 appropriate I2C bus node in the device-tree.
0022 
0023 The P9 version of this driver is a client driver of the FSI-based OCC driver.
0024 It will be probed automatically by the FSI-based OCC driver.
0025 
0026 Sysfs entries
0027 -------------
0028 
0029 The following attributes are supported. All attributes are read-only unless
0030 specified.
0031 
0032 The OCC sensor ID is an integer that represents the unique identifier of the
0033 sensor with respect to the OCC. For example, a temperature sensor for the third
0034 DIMM slot in the system may have a sensor ID of 7. This mapping is unavailable
0035 to the device driver, which must therefore export the sensor ID as-is.
0036 
0037 Some entries are only present with certain OCC sensor versions or only on
0038 certain OCCs in the system. The version number is not exported to the user
0039 but can be inferred.
0040 
0041 temp[1-n]_label
0042         OCC sensor ID.
0043 
0044 [with temperature sensor version 1]
0045 
0046     temp[1-n]_input
0047                         Measured temperature of the component in millidegrees
0048                         Celsius.
0049 
0050 [with temperature sensor version >= 2]
0051 
0052     temp[1-n]_type
0053                                 The FRU (Field Replaceable Unit) type
0054                                 (represented by an integer) for the component
0055                                 that this sensor measures.
0056     temp[1-n]_fault
0057                                 Temperature sensor fault boolean; 1 to indicate
0058                                 that a fault is present or 0 to indicate that
0059                                 no fault is present.
0060 
0061     [with type == 3 (FRU type is VRM)]
0062 
0063         temp[1-n]_alarm
0064                                 VRM temperature alarm boolean; 1 to indicate
0065                                 alarm, 0 to indicate no alarm
0066 
0067     [else]
0068 
0069         temp[1-n]_input
0070                                 Measured temperature of the component in
0071                                 millidegrees Celsius.
0072 
0073 freq[1-n]_label
0074                         OCC sensor ID.
0075 freq[1-n]_input
0076                         Measured frequency of the component in MHz.
0077 power[1-n]_input
0078                         Latest measured power reading of the component in
0079                         microwatts.
0080 power[1-n]_average
0081                         Average power of the component in microwatts.
0082 power[1-n]_average_interval
0083                                 The amount of time over which the power average
0084                                 was taken in microseconds.
0085 
0086 [with power sensor version < 2]
0087 
0088     power[1-n]_label
0089                         OCC sensor ID.
0090 
0091 [with power sensor version >= 2]
0092 
0093     power[1-n]_label
0094                         OCC sensor ID + function ID + channel in the form
0095                         of a string, delimited by underscores, i.e. "0_15_1".
0096                         Both the function ID and channel are integers that
0097                         further identify the power sensor.
0098 
0099 [with power sensor version 0xa0]
0100 
0101     power[1-n]_label
0102                         OCC sensor ID + sensor type in the form of a string,
0103                         delimited by an underscore, i.e. "0_system". Sensor
0104                         type will be one of "system", "proc", "vdd" or "vdn".
0105                         For this sensor version, OCC sensor ID will be the same
0106                         for all power sensors.
0107 
0108 [present only on "master" OCC; represents the whole system power; only one of
0109 this type of power sensor will be present]
0110 
0111     power[1-n]_label
0112                                 "system"
0113     power[1-n]_input
0114                                 Latest system output power in microwatts.
0115     power[1-n]_cap
0116                                 Current system power cap in microwatts.
0117     power[1-n]_cap_not_redundant
0118                                 System power cap in microwatts when
0119                                 there is not redundant power.
0120     power[1-n]_cap_max
0121                                 Maximum power cap that the OCC can enforce in
0122                                 microwatts.
0123     power[1-n]_cap_min          Minimum power cap that the OCC can enforce in
0124                                 microwatts.
0125     power[1-n]_cap_user         The power cap set by the user, in microwatts.
0126                                 This attribute will return 0 if no user power
0127                                 cap has been set. This attribute is read-write,
0128                                 but writing any precision below watts will be
0129                                 ignored, i.e. requesting a power cap of
0130                                 500900000 microwatts will result in a power cap
0131                                 request of 500 watts.
0132 
0133     [with caps sensor version > 1]
0134 
0135         power[1-n]_cap_user_source
0136                                         Indicates how the user power cap was
0137                                         set. This is an integer that maps to
0138                                         system or firmware components that can
0139                                         set the user power cap.
0140 
0141 The following "extn" sensors are exported as a way for the OCC to provide data
0142 that doesn't fit anywhere else. The meaning of these sensors is entirely
0143 dependent on their data, and cannot be statically defined.
0144 
0145 extn[1-n]_label
0146                         ASCII ID or OCC sensor ID.
0147 extn[1-n]_flags
0148                         This is one byte hexadecimal value. Bit 7 indicates the
0149                         type of the label attribute; 1 for sensor ID, 0 for
0150                         ASCII ID. Other bits are reserved.
0151 extn[1-n]_input
0152                         6 bytes of hexadecimal data, with a meaning defined by
0153                         the sensor ID.