meta-romulus: Add fan monitor config
1. Enable fan monitor;
2. Add FanPwm interface;
3. Set the factor, offset for calculation from pwm to rpm
Tested: Verifid fan monitor works fine;
Manually change pwm, fan monitor will set fan non-functional
after a while; change pwm back, it will set fan functional
again, as expected.
Change-Id: Ic56cbe291959368218b60c4a5b8e305f39ff7edb
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/meta-romulus/recipes-phosphor/fans/phosphor-fan-monitor-config-native.bbappend b/meta-romulus/recipes-phosphor/fans/phosphor-fan-monitor-config-native.bbappend
new file mode 100644
index 0000000..72d991c
--- /dev/null
+++ b/meta-romulus/recipes-phosphor/fans/phosphor-fan-monitor-config-native.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/meta-romulus/recipes-phosphor/fans/phosphor-fan-monitor-config-native/monitor.yaml b/meta-romulus/recipes-phosphor/fans/phosphor-fan-monitor-config-native/monitor.yaml
new file mode 100644
index 0000000..445a111
--- /dev/null
+++ b/meta-romulus/recipes-phosphor/fans/phosphor-fan-monitor-config-native/monitor.yaml
@@ -0,0 +1,33 @@
+fans:
+ - inventory: /system/chassis/motherboard/fan0
+ allowed_out_of_range_time: 30
+ deviation: 15
+ num_sensors_nonfunc_for_fan_nonfunc: 1
+ sensors:
+ - name: fan0
+ has_target: true
+ target_interface: xyz.openbmc_project.Control.FanPwm
+ factor: 21
+ offset: 1600
+
+ - inventory: /system/chassis/motherboard/fan1
+ allowed_out_of_range_time: 30
+ deviation: 15
+ num_sensors_nonfunc_for_fan_nonfunc: 1
+ sensors:
+ - name: fan1
+ has_target: true
+ target_interface: xyz.openbmc_project.Control.FanPwm
+ factor: 21
+ offset: 1600
+
+ - inventory: /system/chassis/motherboard/fan2
+ allowed_out_of_range_time: 30
+ deviation: 15
+ num_sensors_nonfunc_for_fan_nonfunc: 1
+ sensors:
+ - name: fan2
+ has_target: true
+ target_interface: xyz.openbmc_project.Control.FanPwm
+ factor: 21
+ offset: 1600