Skip to content

Commit

Permalink
hwmon: (gxp-fan-ctrl) Add GXP fan controller
Browse files Browse the repository at this point in the history
The GXP SoC can support up to 16 fans through the interface provided by
the CPLD. The fans speeds are controlled via a pwm value 0-255. The fans
are also capable of reporting if they have failed to the CPLD which in
turn reports the status to the GXP SoC. There are no tachometers so fan
speeds are reported as a percent of the pwm value.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
  • Loading branch information
nhawkins48 authored and intel-lab-lkp committed Nov 4, 2022
1 parent 52a7ce8 commit bd3528b
Show file tree
Hide file tree
Showing 4 changed files with 407 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Documentation/hwmon/gxp-fan-ctrl.rst
@@ -0,0 +1,36 @@
.. SPDX-License-Identifier: GPL-2.0
Kernel driver gxp-fan-ctrl
==========================

Supported chips:

* HPE GXP SOC

Author: Nick Hawkins <nick.hawkins@hpe.com>


Description
-----------

gxp-fan-ctrl is a driver which provides fan control for the hpe gxp soc.
The driver allows the gathering of fan status and the use of fan
pwm control.


Usage Notes
-----------

Traditionally fanY_input returns an RPM value, on HPE GXP systems it is
the pwm value [0-255] due to the fan speeds being reported as
percentages.


Sysfs attributes
----------------

======================= =================================================
pwm[0-15] Fan 0 to 15 respective pwm value
fan[0-15]_input Fan 0 to 15 respective input value: pwm value
fan[0-15]_fault Fan 0 to 15 respective fault status: 1 fail, 0 ok
======================= =================================================
8 changes: 8 additions & 0 deletions drivers/hwmon/Kconfig
Expand Up @@ -2339,6 +2339,14 @@ config SENSORS_INTEL_M10_BMC_HWMON
sensors monitor various telemetry data of different components on the
card, e.g. board temperature, FPGA core temperature/voltage/current.

config SENSORS_GXP_FAN_CTRL
tristate "GXP Fan Control driver"
depends on ARCH_HPE_GXP || COMPILE_TEST
help
If you say yes here you get support for GXP fan control functionality.
The GXP controls fan function via the CPLD through the use of PWM
registers. This driver reports status and pwm setting of the fans.

if ACPI

comment "ACPI drivers"
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Makefile
Expand Up @@ -83,6 +83,7 @@ obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o
obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o
obj-$(CONFIG_SENSORS_GSC) += gsc-hwmon.o
obj-$(CONFIG_SENSORS_GPIO_FAN) += gpio-fan.o
obj-$(CONFIG_SENSORS_GXP_FAN_CTRL) += gxp-fan-ctrl.o
obj-$(CONFIG_SENSORS_HIH6130) += hih6130.o
obj-$(CONFIG_SENSORS_ULTRA45) += ultra45_env.o
obj-$(CONFIG_SENSORS_I5500) += i5500_temp.o
Expand Down

0 comments on commit bd3528b

Please sign in to comment.