hwmon: Add driver for Astera Labs PT5161L retimer

This driver implements support for temperature monitoring of Astera Labs
PT5161L series PCIe retimer chips.

This driver implementation originates from the CSDK available at
Link: https://github.com/facebook/openbmc/tree/helium/common/recipes-lib/retimer-v2.14
The communication protocol utilized is based on the I2C/SMBus standard.

Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com>
Link: https://lore.kernel.org/r/20240206125420.3884300-2-chou.cosmo@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Cosmo Chou
2024-02-25 12:37:37 -08:00
committed by Guenter Roeck
parent 1a793caf6f
commit 1b2ca93cd0
6 changed files with 728 additions and 0 deletions
+1
View File
@@ -190,6 +190,7 @@ Hardware Monitoring Kernel Drivers
pmbus
powerz
powr1220
pt5161l
pxe1610
pwm-fan
q54sj108a2
+42
View File
@@ -0,0 +1,42 @@
.. SPDX-License-Identifier: GPL-2.0-or-later
Kernel driver pt5161l
=====================
Supported chips:
* Astera Labs PT5161L
Prefix: 'pt5161l'
Addresses scanned: I2C 0x20 - 0x27
Datasheet: Not publicly available.
Authors: Cosmo Chou <cosmo.chou@quantatw.com>
Description
-----------
This driver implements support for temperature monitoring of Astera Labs
PT5161L series PCIe retimer chips.
This driver implementation originates from the CSDK available at
https://github.com/facebook/openbmc/tree/helium/common/recipes-lib/retimer-v2.14
The communication protocol utilized is based on the I2C/SMBus standard.
Sysfs entries
----------------
================ ==============================================
temp1_input Measured temperature (in millidegrees Celsius)
================ ==============================================
Debugfs entries
----------------
================ ===============================
fw_load_status Firmware load status
fw_ver Firmware version of the retimer
heartbeat_status Heartbeat status
================ ===============================
+7
View File
@@ -17698,6 +17698,13 @@ F: fs/pstore/
F: include/linux/pstore*
K: \b(pstore|ramoops)
PT5161L HARDWARE MONITOR DRIVER
M: Cosmo Chou <cosmo.chou@quantatw.com>
L: linux-hwmon@vger.kernel.org
S: Maintained
F: Documentation/hwmon/pt5161l.rst
F: drivers/hwmon/pt5161l.c
PTP HARDWARE CLOCK SUPPORT
M: Richard Cochran <richardcochran@gmail.com>
L: netdev@vger.kernel.org
+10
View File
@@ -1755,6 +1755,16 @@ source "drivers/hwmon/peci/Kconfig"
source "drivers/hwmon/pmbus/Kconfig"
config SENSORS_PT5161L
tristate "Astera Labs PT5161L PCIe retimer hardware monitoring"
depends on I2C
help
If you say yes here you get support for temperature monitoring
on the Astera Labs PT5161L PCIe retimer.
This driver can also be built as a module. If so, the module
will be called pt5161l.
config SENSORS_PWM_FAN
tristate "PWM fan"
depends on (PWM && OF) || COMPILE_TEST
+1
View File
@@ -184,6 +184,7 @@ obj-$(CONFIG_SENSORS_PC87427) += pc87427.o
obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
obj-$(CONFIG_SENSORS_POWERZ) += powerz.o
obj-$(CONFIG_SENSORS_POWR1220) += powr1220.o
obj-$(CONFIG_SENSORS_PT5161L) += pt5161l.o
obj-$(CONFIG_SENSORS_PWM_FAN) += pwm-fan.o
obj-$(CONFIG_SENSORS_RASPBERRYPI_HWMON) += raspberrypi-hwmon.o
obj-$(CONFIG_SENSORS_SBTSI) += sbtsi_temp.o
File diff suppressed because it is too large Load Diff