Skip to content

Commit

Permalink
device: netberg: Add sensors.conf and update platform modules package
Browse files Browse the repository at this point in the history
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 <sergey.popovich@ordnance.co>
  • Loading branch information
sergeypopovich-ord committed Dec 26, 2018
1 parent 81436c3 commit 230880c
Show file tree
Hide file tree
Showing 7 changed files with 709 additions and 99 deletions.
60 changes: 60 additions & 0 deletions device/netberg/x86_64-netberg_aurora_420_rangeley-r0/sensors.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This is lm-sensors configuration file for Netberg Aurora 420 switch.
#
# Label names are taken from "Specification of Hardware Monitoring
# Driver for Open Network Linux" guide (filename: HW_monitoring_ONL.pdf).
#
# Assume following hardware monitoring modules loaded:
#
# hardware_monitor - implements HURACAN (w83795adg based) sensor,
# fan control, watchdog and SFP control.
# jc42 - DIMM temperature sensor (?)
# coretemp - Processor cores temperature sensor
#

bus "i2c-1" "SMBus iSMT adapter at dff38000"
bus "i2c-0" "SMBus I801 adapter at f000"

chip "jc42-i2c-0-*"
label temp1 "DIMM Temp"
set temp1_max 50
set temp1_crit 85

chip "HURACAN-i2c-0-2f"
# 6.1.2. For Aurora 420 platform, p.31
label in1 "ROV"
label in4 "1V"
label in5 "1.8V"
label in7 "1.25V"

# 2.1. Temperature, p.7
label temp1 "After MAC"
label temp2 "Before MAC"
# MAC Temp is set by application
label temp10 "MAC"

chip "HURACAN-i2c-1-70"
# 2.3.4. VOUT, p.11
label in12 "PSU1_VOUT"
label in22 "PSU2_VOUT"

# 2.3.5. IOUT, p.11
label curr12 "PSU1_IOUT"
label curr22 "PSU2_IOUT"

# 2.3.9. PIN, p.12
label power11 "PSU1_PIN"
label power21 "PSU2_PIN"

# 2.3.8. POUT, p.12
label power12 "PSU1_POUT"
label power22 "PSU2_POUT"

# 2.3.6. TEMPERATURE, p.11
label temp11 "PSU1_TEMP1"
label temp12 "PSU1_TEMP2"
label temp21 "PSU2_TEMP1"
label temp22 "PSU2_TEMP2"

# 2.3.7. FAN SPEED, p.11
label fan11 "PSU1_FAN"
label fan21 "PSU2_FAN"
2 changes: 1 addition & 1 deletion platform/broadcom/platform-modules-netberg.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Netberg Platform modules

NETBERG_PLATFORM_MODULE_VERSION = 0.5
NETBERG_PLATFORM_MODULE_VERSION = 0.6

export NETBERG_PLATFORM_MODULE_VERSION

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
sonic-platform-netberg (0.6) unstable; urgency=low

* Support lm-sensors compatible sysfs ABI.
* Make sure coretemp and jc42 kernel drivers loaded.
* Bump version to 0.6.

-- Sergey Popovich <sergey.popovich@ordnance.co> Sat, 22 Dec 2018 17:18:52 +0200

sonic-platform-netberg (0.5) unstable; urgency=low

* Fix dependency on linux-image after switching from jessie to stretch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# postinst script for Netberg devices

# Unload hardware monitoring module, if any
modprobe -q -r jc42 ||:
modprobe -q -r hardware_monitor ||:

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

# Load hardware monitoring module
modprobe -q coretemp ||:
modprobe -q jc42 ||:
modprobe -q hardware_monitor ||:

# Make sure modprobe.d(5) is in initramfs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ softdep i2c-isch pre: i2c-i801
# they are depend on it anyway.

# Hardware monitoring devices reside on i2c bus.
softdep jc42 pre: i2c-dev i2c-i801
softdep hardware_monitor pre: i2c-dev i2c-i801 i2c-ismt i2c-isch i2c-mux-gpio i2c-mux-pca954x
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

coretemp
jc42
hardware_monitor
Loading

0 comments on commit 230880c

Please sign in to comment.