Skip to content

Commit 230880c

Browse files
device: netberg: Add sensors.conf and update platform modules package
Now hardware monitoring platform driver implements lm-sensors compatible sysfs ABI we can add sensors.conf file to describe various platforms features with their subfeatures to sensord(8) running in pmon container. Now both sensors(1) and "show environment" work well from SONiC cmdline. Note that hardware_monitor platform driver is in change of controlling FAN speed and implements thermal policy: there is no need in fancontrol configuration for platforms handled by this driver. Adjust platform modules package version and update submodules reference. Signed-off-by: Sergey Popovich <[email protected]>
1 parent 81436c3 commit 230880c

File tree

7 files changed

+709
-99
lines changed

7 files changed

+709
-99
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# This is lm-sensors configuration file for Netberg Aurora 420 switch.
2+
#
3+
# Label names are taken from "Specification of Hardware Monitoring
4+
# Driver for Open Network Linux" guide (filename: HW_monitoring_ONL.pdf).
5+
#
6+
# Assume following hardware monitoring modules loaded:
7+
#
8+
# hardware_monitor - implements HURACAN (w83795adg based) sensor,
9+
# fan control, watchdog and SFP control.
10+
# jc42 - DIMM temperature sensor (?)
11+
# coretemp - Processor cores temperature sensor
12+
#
13+
14+
bus "i2c-1" "SMBus iSMT adapter at dff38000"
15+
bus "i2c-0" "SMBus I801 adapter at f000"
16+
17+
chip "jc42-i2c-0-*"
18+
label temp1 "DIMM Temp"
19+
set temp1_max 50
20+
set temp1_crit 85
21+
22+
chip "HURACAN-i2c-0-2f"
23+
# 6.1.2. For Aurora 420 platform, p.31
24+
label in1 "ROV"
25+
label in4 "1V"
26+
label in5 "1.8V"
27+
label in7 "1.25V"
28+
29+
# 2.1. Temperature, p.7
30+
label temp1 "After MAC"
31+
label temp2 "Before MAC"
32+
# MAC Temp is set by application
33+
label temp10 "MAC"
34+
35+
chip "HURACAN-i2c-1-70"
36+
# 2.3.4. VOUT, p.11
37+
label in12 "PSU1_VOUT"
38+
label in22 "PSU2_VOUT"
39+
40+
# 2.3.5. IOUT, p.11
41+
label curr12 "PSU1_IOUT"
42+
label curr22 "PSU2_IOUT"
43+
44+
# 2.3.9. PIN, p.12
45+
label power11 "PSU1_PIN"
46+
label power21 "PSU2_PIN"
47+
48+
# 2.3.8. POUT, p.12
49+
label power12 "PSU1_POUT"
50+
label power22 "PSU2_POUT"
51+
52+
# 2.3.6. TEMPERATURE, p.11
53+
label temp11 "PSU1_TEMP1"
54+
label temp12 "PSU1_TEMP2"
55+
label temp21 "PSU2_TEMP1"
56+
label temp22 "PSU2_TEMP2"
57+
58+
# 2.3.7. FAN SPEED, p.11
59+
label fan11 "PSU1_FAN"
60+
label fan21 "PSU2_FAN"

platform/broadcom/platform-modules-netberg.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Netberg Platform modules
22

3-
NETBERG_PLATFORM_MODULE_VERSION = 0.5
3+
NETBERG_PLATFORM_MODULE_VERSION = 0.6
44

55
export NETBERG_PLATFORM_MODULE_VERSION
66

platform/broadcom/sonic-platform-modules-netberg/debian/changelog

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
sonic-platform-netberg (0.6) unstable; urgency=low
2+
3+
* Support lm-sensors compatible sysfs ABI.
4+
* Make sure coretemp and jc42 kernel drivers loaded.
5+
* Bump version to 0.6.
6+
7+
-- Sergey Popovich <[email protected]> Sat, 22 Dec 2018 17:18:52 +0200
8+
19
sonic-platform-netberg (0.5) unstable; urgency=low
210

311
* Fix dependency on linux-image after switching from jessie to stretch

platform/broadcom/sonic-platform-modules-netberg/debian/platform-modules-netberg.postinst

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# postinst script for Netberg devices
22

33
# Unload hardware monitoring module, if any
4+
modprobe -q -r jc42 ||:
45
modprobe -q -r hardware_monitor ||:
56

67
# Unload modules required for hardware monitoring
@@ -18,6 +19,8 @@ modprobe -q -r i2c-dev ||:
1819
#DEBHELPER#
1920

2021
# Load hardware monitoring module
22+
modprobe -q coretemp ||:
23+
modprobe -q jc42 ||:
2124
modprobe -q hardware_monitor ||:
2225

2326
# Make sure modprobe.d(5) is in initramfs

platform/broadcom/sonic-platform-modules-netberg/netberg/cfg/netberg-modprobe.conf

+1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ softdep i2c-isch pre: i2c-i801
99
# they are depend on it anyway.
1010

1111
# Hardware monitoring devices reside on i2c bus.
12+
softdep jc42 pre: i2c-dev i2c-i801
1213
softdep hardware_monitor pre: i2c-dev i2c-i801 i2c-ismt i2c-isch i2c-mux-gpio i2c-mux-pca954x

platform/broadcom/sonic-platform-modules-netberg/netberg/cfg/netberg-modules-load.conf

+2
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
# This file contains the names of kernel modules that should be loaded
44
# at boot time, one per line. Lines beginning with "#" are ignored.
55

6+
coretemp
7+
jc42
68
hardware_monitor

0 commit comments

Comments
 (0)