Skip to content

Commit 1b2ca93

Browse files
cchouxgroeck
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 1a793ca commit 1b2ca93

File tree

6 files changed

+728
-0
lines changed

6 files changed

+728
-0
lines changed

Documentation/hwmon/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ Hardware Monitoring Kernel Drivers
190190
pmbus
191191
powerz
192192
powr1220
193+
pt5161l
193194
pxe1610
194195
pwm-fan
195196
q54sj108a2

Documentation/hwmon/pt5161l.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
Kernel driver pt5161l
4+
=====================
5+
6+
Supported chips:
7+
8+
* Astera Labs PT5161L
9+
10+
Prefix: 'pt5161l'
11+
12+
Addresses scanned: I2C 0x20 - 0x27
13+
14+
Datasheet: Not publicly available.
15+
16+
Authors: Cosmo Chou <[email protected]>
17+
18+
Description
19+
-----------
20+
21+
This driver implements support for temperature monitoring of Astera Labs
22+
PT5161L series PCIe retimer chips.
23+
24+
This driver implementation originates from the CSDK available at
25+
https://github.com/facebook/openbmc/tree/helium/common/recipes-lib/retimer-v2.14
26+
The communication protocol utilized is based on the I2C/SMBus standard.
27+
28+
Sysfs entries
29+
----------------
30+
31+
================ ==============================================
32+
temp1_input Measured temperature (in millidegrees Celsius)
33+
================ ==============================================
34+
35+
Debugfs entries
36+
----------------
37+
38+
================ ===============================
39+
fw_load_status Firmware load status
40+
fw_ver Firmware version of the retimer
41+
heartbeat_status Heartbeat status
42+
================ ===============================

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17698,6 +17698,13 @@ F: fs/pstore/
1769817698
F: include/linux/pstore*
1769917699
K: \b(pstore|ramoops)
1770017700

17701+
PT5161L HARDWARE MONITOR DRIVER
17702+
M: Cosmo Chou <[email protected]>
17703+
17704+
S: Maintained
17705+
F: Documentation/hwmon/pt5161l.rst
17706+
F: drivers/hwmon/pt5161l.c
17707+
1770117708
PTP HARDWARE CLOCK SUPPORT
1770217709
M: Richard Cochran <[email protected]>
1770317710

drivers/hwmon/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,6 +1755,16 @@ source "drivers/hwmon/peci/Kconfig"
17551755

17561756
source "drivers/hwmon/pmbus/Kconfig"
17571757

1758+
config SENSORS_PT5161L
1759+
tristate "Astera Labs PT5161L PCIe retimer hardware monitoring"
1760+
depends on I2C
1761+
help
1762+
If you say yes here you get support for temperature monitoring
1763+
on the Astera Labs PT5161L PCIe retimer.
1764+
1765+
This driver can also be built as a module. If so, the module
1766+
will be called pt5161l.
1767+
17581768
config SENSORS_PWM_FAN
17591769
tristate "PWM fan"
17601770
depends on (PWM && OF) || COMPILE_TEST

drivers/hwmon/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ obj-$(CONFIG_SENSORS_PC87427) += pc87427.o
184184
obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
185185
obj-$(CONFIG_SENSORS_POWERZ) += powerz.o
186186
obj-$(CONFIG_SENSORS_POWR1220) += powr1220.o
187+
obj-$(CONFIG_SENSORS_PT5161L) += pt5161l.o
187188
obj-$(CONFIG_SENSORS_PWM_FAN) += pwm-fan.o
188189
obj-$(CONFIG_SENSORS_RASPBERRYPI_HWMON) += raspberrypi-hwmon.o
189190
obj-$(CONFIG_SENSORS_SBTSI) += sbtsi_temp.o

0 commit comments

Comments
 (0)