Skip to content

Commit 08ebc9d

Browse files
thom24groeck
authored andcommitted
hwmon: Add Congatec Board Controller monitoring driver
Add support for the Congatec Board Controller. This controller exposes temperature, voltage, current and fan sensors. The available sensors list cannot be predicted. Some sensors can be present or not, depending the system. The driver has an internal list of all possible sensors, for all Congatec boards. The Board Controller gives to the driver its sensors list, and their status (active or not). Signed-off-by: Thomas Richard <[email protected]> Link: https://lore.kernel.org/r/20250203-congatec-board-controller-hwmon-v4-1-ff6c76a4662c@bootlin.com Signed-off-by: Guenter Roeck <[email protected]>
1 parent c1d6afd commit 08ebc9d

File tree

6 files changed

+380
-0
lines changed

6 files changed

+380
-0
lines changed

Documentation/hwmon/cgbc-hwmon.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
Kernel driver cgbc-hwmon
4+
========================
5+
6+
Supported chips:
7+
8+
* Congatec Board Controller.
9+
10+
Prefix: 'cgbc-hwmon'
11+
12+
Author: Thomas Richard <[email protected]>
13+
14+
Description
15+
-----------
16+
17+
This driver enables monitoring support for the Congatec Board Controller.
18+
This controller is embedded on the x86 SoMs of Congatec.
19+
20+
Sysfs entries
21+
-------------
22+
23+
The following sysfs entries list contains all sensors defined in the Board
24+
Controller. The available sensors in sysfs depend on the SoM and the
25+
system.
26+
27+
============= ======================
28+
Name Description
29+
============= ======================
30+
temp1_input CPU temperature
31+
temp2_input Box temperature
32+
temp3_input Ambient temperature
33+
temp4_input Board temperature
34+
temp5_input Carrier temperature
35+
temp6_input Chipset temperature
36+
temp7_input Video temperature
37+
temp8_input Other temperature
38+
temp9_input TOPDIM temperature
39+
temp10_input BOTTOMDIM temperature
40+
in0_input CPU voltage
41+
in1_input DC Runtime voltage
42+
in2_input DC Standby voltage
43+
in3_input CMOS Battery voltage
44+
in4_input Battery voltage
45+
in5_input AC voltage
46+
in6_input Other voltage
47+
in7_input 5V voltage
48+
in8_input 5V Standby voltage
49+
in9_input 3V3 voltage
50+
in10_input 3V3 Standby voltage
51+
in11_input VCore A voltage
52+
in12_input VCore B voltage
53+
in13_input 12V voltage
54+
curr1_input DC current
55+
curr2_input 5V current
56+
curr3_input 12V current
57+
fan1_input CPU fan
58+
fan2_input Box fan
59+
fan3_input Ambient fan
60+
fan4_input Chiptset fan
61+
fan5_input Video fan
62+
fan6_input Other fan
63+
============= ======================

Documentation/hwmon/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Hardware Monitoring Kernel Drivers
5353
bel-pfe
5454
bpa-rs600
5555
bt1-pvt
56+
cgbc-hwmon
5657
chipcap2
5758
coretemp
5859
corsair-cpro

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5874,6 +5874,7 @@ CONGATEC BOARD CONTROLLER MFD DRIVER
58745874
M: Thomas Richard <[email protected]>
58755875
S: Maintained
58765876
F: drivers/gpio/gpio-cgbc.c
5877+
F: drivers/hwmon/cgbc-hwmon.c
58775878
F: drivers/i2c/busses/i2c-cgbc.c
58785879
F: drivers/mfd/cgbc-core.c
58795880
F: drivers/watchdog/cgbc_wdt.c

drivers/hwmon/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,16 @@ config SENSORS_BT1_PVT_ALARMS
463463
the data conversion will be periodically performed and the data will be
464464
saved in the internal driver cache.
465465

466+
config SENSORS_CGBC
467+
tristate "Congatec Board Controller Sensors"
468+
depends on MFD_CGBC
469+
help
470+
Enable sensors support for the Congatec Board Controller. It has
471+
temperature, voltage, current and fan sensors.
472+
473+
This driver can also be built as a module. If so, the module will be
474+
called cgbc-hwmon.
475+
466476
config SENSORS_CHIPCAP2
467477
tristate "Amphenol ChipCap 2 relative humidity and temperature sensor"
468478
depends on I2C

drivers/hwmon/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ obj-$(CONFIG_SENSORS_ASUS_ROG_RYUJIN) += asus_rog_ryujin.o
5959
obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o
6060
obj-$(CONFIG_SENSORS_AXI_FAN_CONTROL) += axi-fan-control.o
6161
obj-$(CONFIG_SENSORS_BT1_PVT) += bt1-pvt.o
62+
obj-$(CONFIG_SENSORS_CGBC) += cgbc-hwmon.o
6263
obj-$(CONFIG_SENSORS_CHIPCAP2) += chipcap2.o
6364
obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o
6465
obj-$(CONFIG_SENSORS_CORSAIR_CPRO) += corsair-cpro.o

0 commit comments

Comments
 (0)