Konrad Knitter
4da71a77fc
ice: read internal temperature sensor
Since 4.30 firmware exposes internal thermal sensor reading via admin
queue commands. Expose those readouts via hwmon API when supported.
Datasheet:
Get Sensor Reading Command (Opcode: 0x0632)
+--------------------+--------+--------------------+-------------------------+
| Name | Bytes | Value | Remarks |
+--------------------+--------+--------------------+-------------------------+
| Flags | 1-0 | | |
| Opcode | 2-3 | 0x0632 | Command opcode |
| Datalen | 4-5 | 0 | No external buffer. |
| Return value | 6-7 | | Return value. |
| Cookie High | 8-11 | Cookie | |
| Cookie Low | 12-15 | Cookie | |
| Sensor | 16 | | 0x00: Internal temp |
| | | | 0x01-0xFF: Reserved. |
| Format | 17 | Requested response | Only 0x00 is supported. |
| | | format | 0x01-0xFF: Reserved. |
| Reserved | 18-23 | | |
| Data Address high | 24-27 | Response buffer | |
| | | address | |
| Data Address low | 28-31 | Response buffer | |
| | | address | |
+--------------------+--------+--------------------+-------------------------+
Get Sensor Reading Response (Opcode: 0x0632)
+--------------------+--------+--------------------+-------------------------+
| Name | Bytes | Value | Remarks |
+--------------------+--------+--------------------+-------------------------+
| Flags | 1-0 | | |
| Opcode | 2-3 | 0x0632 | Command opcode |
| Datalen | 4-5 | 0 | No external buffer |
| Return value | 6-7 | | Return value. |
| | | | EINVAL: Invalid |
| | | | parameters |
| | | | ENOENT: Unsupported |
| | | | sensor |
| | | | EIO: Sensor access |
| | | | error |
| Cookie High | 8-11 | Cookie | |
| Cookie Low | 12-15 | Cookie | |
| Sensor Reading | 16-23 | | Format of the reading |
| | | | is dependent on request |
| Data Address high | 24-27 | Response buffer | |
| | | address | |
| Data Address low | 28-31 | Response buffer | |
| | | address | |
+--------------------+--------+--------------------+-------------------------+
Sensor Reading for Sensor 0x00 (Internal Chip Temperature):
+--------------------+--------+--------------------+-------------------------+
| Name | Bytes | Value | Remarks |
+--------------------+--------+--------------------+-------------------------+
| Thermal Sensor | 0 | | Reading in degrees |
| reading | | | Celsius. Signed int8 |
| Warning High | 1 | | Warning High threshold |
| threshold | | | in degrees Celsius. |
| | | | Unsigned int8. |
| | | | 0xFF when unsupported |
| Critical High | 2 | | Critical High threshold |
| threshold | | | in degrees Celsius. |
| | | | Unsigned int8. |
| | | | 0xFF when unsupported |
| Fatal High | 3 | | Fatal High threshold |
| threshold | | | in degrees Celsius. |
| | | | Unsigned int8. |
| | | | 0xFF when unsupported |
| Reserved | 4-7 | | |
+--------------------+--------+--------------------+-------------------------+
Driver provides current reading from HW as well as device specific
thresholds for thermal alarm (Warning, Critical, Fatal) events.
$ sensors
Output
=========================================================
ice-pci-b100
Adapter: PCI adapter
temp1: +62.0°C (high = +95.0°C, crit = +105.0°C)
(emerg = +115.0°C)
Tested on Intel Corporation Ethernet Controller E810-C for SFP
Co-developed-by: Marcin Domagala <marcinx.domagala@intel.com>
Signed-off-by: Marcin Domagala <marcinx.domagala@intel.com>
Co-developed-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Konrad Knitter <konrad.knitter@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-12-05 11:40:12 +01:00
..
2023-11-21 09:20:25 +01:00
2023-11-24 19:16:22 +01:00
2023-10-17 13:37:35 -05:00
2023-11-03 14:51:08 -10:00
2023-11-20 09:22:26 +09:00
2023-11-02 14:05:18 -10:00
2023-11-24 18:09:19 -08:00
2023-11-21 07:42:04 -07:00
2023-10-23 11:04:51 -07:00
2023-11-01 14:46:51 -10:00
2023-10-26 09:42:37 +02:00
2023-11-03 14:51:08 -10:00
2023-11-03 14:51:08 -10:00
2023-11-01 14:46:51 -10:00
2023-11-10 09:23:17 -08:00
2023-10-24 10:53:45 +02:00
2023-11-07 20:45:12 +01:00
2023-10-27 18:04:29 +08:00
2023-11-02 14:09:01 -07:00
2023-11-02 19:38:47 -10:00
2023-10-19 21:21:16 +09:00
2023-11-03 18:56:51 -10:00
2023-11-02 20:53:31 -10:00
2023-11-21 17:41:20 -08:00
2023-10-30 19:09:55 -10:00
2023-10-17 17:38:57 +09:00
2023-11-05 21:15:17 +09:00
2023-11-28 12:49:21 +01:00
2023-11-03 14:51:08 -10:00
2023-11-09 13:47:52 -08:00
2023-11-24 11:18:29 +10:00
2023-10-27 13:19:04 +02:00
2023-11-23 17:31:53 -08:00
2023-10-31 18:32:51 -10:00
2023-11-03 15:44:25 -10:00
2023-10-31 17:44:17 -10:00
2023-11-13 12:43:42 -05:00
2023-11-04 16:25:36 -10:00
2023-11-03 14:51:08 -10:00
2023-11-02 15:20:30 -10:00
2023-11-09 14:18:42 -08:00
2023-10-19 00:50:03 +03:00
2023-11-09 13:37:28 -08:00
2023-11-19 13:49:32 -08:00
2023-10-30 19:09:55 -10:00
2023-11-22 11:46:03 +00:00
2023-11-03 10:07:39 -10:00
2023-11-05 18:45:32 -08:00
2023-10-21 23:04:02 +02:00
2023-11-23 17:40:15 -08:00
2023-11-16 14:28:44 +01:00
2023-11-09 13:37:28 -08:00
2023-10-24 22:36:39 -04:00
2023-11-02 14:40:51 -10:00
2023-11-08 09:21:18 -08:00
2023-11-23 18:04:17 +01:00
2023-11-10 09:19:46 -08:00
2023-12-05 11:40:12 +01:00
2023-11-22 10:55:48 +00:00
2023-10-18 09:48:05 -07:00
2023-11-22 18:41:14 -07:00
2023-11-03 14:51:08 -10:00
2023-11-10 09:23:17 -08:00
2023-10-17 11:11:28 +05:30
2023-11-18 18:59:30 +01:00
2023-11-10 08:41:23 +01:00
2023-11-18 17:38:50 +00:00
2023-11-07 16:40:42 -08:00
2023-11-10 12:22:14 -08:00
2023-11-06 14:47:36 +01:00
2023-11-24 10:39:20 +01:00
2023-11-21 10:09:04 +02:00
2023-11-27 16:28:20 +01:00
2023-10-20 19:50:40 +02:00
2023-11-03 16:00:42 -10:00
2023-10-24 22:07:07 +02:00
2023-11-18 14:52:56 +00:00
2023-11-10 09:20:48 +01:00
2023-10-30 13:14:27 +00:00
2023-10-16 11:24:34 -06:00
2023-10-24 14:10:04 -07:00
2023-10-23 13:11:07 -06:00
2023-11-05 18:49:40 -08:00
2023-11-23 17:40:15 -08:00
2023-11-14 11:40:40 -05:00
2023-10-25 16:50:11 +02:00
2023-11-03 10:07:39 -10:00
2023-11-03 19:10:41 -10:00
2023-11-10 11:44:38 -08:00
2023-11-01 10:02:18 +00:00
2023-10-19 10:26:26 +03:00
2023-11-09 13:47:52 -08:00
2023-11-02 15:13:50 -10:00
2023-10-18 10:01:34 +02:00
2023-10-31 15:28:37 -10:00
2023-11-17 13:05:57 +02:00
2023-11-10 09:19:46 -08:00
2023-11-14 11:40:40 -05:00
2023-11-24 16:30:38 +00:00
2023-11-01 09:31:16 -04:00
2023-11-03 14:51:08 -10:00
2023-11-16 07:39:37 -05:00
2023-11-10 09:16:02 +01:00
2023-11-04 15:58:13 -10:00
2023-11-16 07:39:37 -05:00
2023-10-21 19:19:06 +02:00
2023-11-10 09:19:46 -08:00
2023-11-17 10:47:19 +01:00
2023-11-10 09:19:46 -08:00
2023-11-10 09:19:46 -08:00