configurations: yosemite4: Adjust fan speed UNC setting and fan duty

Summary:
1. Set UNC value based on the fan speed at PWM 85% and add 5%
hysteresis mechanism for them.
 - Adjust UNC of inlet fan speed from 15730 to 13825 rpm.
 - Update 691 rpm for inlet UNC fan speed.
 - Adjust UNC of outlet fan speed from 15840 to 12400 rpm.
 - Update 620 rpm for outlet UNC fan speed.
2. When one fan failed, fan duty is set to 100%.
3. When one slot is unplugged during service time, fan duty
is set to 100%.
(based on thermal team's requirements)

To prevent continuous UNC assertion/deassertion
when the PWM is at 100% due to fan speed fluctuation.

Tested:
- Check the WarningHigh threshold of the fan boards
- Check if many assert/deassert SEL when pwm 100%

Change-Id: I2540cc54069620cbcdacfabb03d09f149352fe54
Signed-off-by: Zoey YJ Chung <zoey.yj.chung.wiwynn@gmail.com>
diff --git a/configurations/meta/yosemite4.json b/configurations/meta/yosemite4.json
index 79efd8b..8b90d8a 100644
--- a/configurations/meta/yosemite4.json
+++ b/configurations/meta/yosemite4.json
@@ -494,7 +494,7 @@
             "Class": "fan",
             "FFGainCoefficient": 1.0,
             "FFOffCoefficient": 0.0,
-            "FailSafePercent": 90.0,
+            "FailSafePercent": 100.0,
             "ICoefficient": 0.0,
             "ILimitMax": 0.0,
             "ILimitMin": 0.0,
@@ -673,7 +673,7 @@
                 100.0,
                 100.0,
                 100.0,
-                90.0,
+                100.0,
                 10.0
             ],
             "PositiveHysteresis": 0,
diff --git a/configurations/meta/yosemite4_fanboard_fsc_max_adc_ti_led_nxp_efuse_max.json b/configurations/meta/yosemite4_fanboard_fsc_max_adc_ti_led_nxp_efuse_max.json
index b9ecc2d..f7cdd84 100644
--- a/configurations/meta/yosemite4_fanboard_fsc_max_adc_ti_led_nxp_efuse_max.json
+++ b/configurations/meta/yosemite4_fanboard_fsc_max_adc_ti_led_nxp_efuse_max.json
@@ -310,10 +310,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -349,10 +349,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -388,10 +388,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -427,10 +427,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -466,10 +466,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -505,10 +505,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -544,10 +544,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -583,10 +583,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -622,10 +622,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -661,10 +661,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -700,10 +700,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -739,10 +739,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
diff --git a/configurations/meta/yosemite4_fanboard_fsc_max_adc_ti_led_nxp_efuse_mps.json b/configurations/meta/yosemite4_fanboard_fsc_max_adc_ti_led_nxp_efuse_mps.json
index a68dfdb..d740754 100644
--- a/configurations/meta/yosemite4_fanboard_fsc_max_adc_ti_led_nxp_efuse_mps.json
+++ b/configurations/meta/yosemite4_fanboard_fsc_max_adc_ti_led_nxp_efuse_mps.json
@@ -310,10 +310,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -349,10 +349,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -388,10 +388,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -427,10 +427,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -466,10 +466,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -505,10 +505,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -544,10 +544,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -583,10 +583,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -622,10 +622,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -661,10 +661,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -700,10 +700,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -739,10 +739,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
diff --git a/configurations/meta/yosemite4_fanboard_fsc_nct_adc_max_led_ons_efuse_max.json b/configurations/meta/yosemite4_fanboard_fsc_nct_adc_max_led_ons_efuse_max.json
index 72d6bf4..c3d4a1a 100644
--- a/configurations/meta/yosemite4_fanboard_fsc_nct_adc_max_led_ons_efuse_max.json
+++ b/configurations/meta/yosemite4_fanboard_fsc_nct_adc_max_led_ons_efuse_max.json
@@ -30,10 +30,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -69,10 +69,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -108,10 +108,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -147,10 +147,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -186,10 +186,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -225,10 +225,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -264,10 +264,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -303,10 +303,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -342,10 +342,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -381,10 +381,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -420,10 +420,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -459,10 +459,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
diff --git a/configurations/meta/yosemite4_fanboard_fsc_nct_adc_max_led_ons_efuse_mps.json b/configurations/meta/yosemite4_fanboard_fsc_nct_adc_max_led_ons_efuse_mps.json
index 04530d6..a910f33 100644
--- a/configurations/meta/yosemite4_fanboard_fsc_nct_adc_max_led_ons_efuse_mps.json
+++ b/configurations/meta/yosemite4_fanboard_fsc_nct_adc_max_led_ons_efuse_mps.json
@@ -30,10 +30,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -69,10 +69,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -108,10 +108,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -147,10 +147,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -186,10 +186,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -225,10 +225,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -264,10 +264,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -303,10 +303,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -342,10 +342,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -381,10 +381,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
@@ -420,10 +420,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 691,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15730
+                    "Value": 13825
                 },
                 {
                     "Direction": "less than",
@@ -459,10 +459,10 @@
                 },
                 {
                     "Direction": "greater than",
-                    "Hysteresis": 0,
+                    "Hysteresis": 620,
                     "Name": "upper non critical",
                     "Severity": 0,
-                    "Value": 15840
+                    "Value": 12400
                 },
                 {
                     "Direction": "less than",
diff --git a/configurations/meta/yosemite4n.json b/configurations/meta/yosemite4n.json
index 5faee46..e5d3229 100644
--- a/configurations/meta/yosemite4n.json
+++ b/configurations/meta/yosemite4n.json
@@ -462,7 +462,7 @@
             "Class": "fan",
             "FFGainCoefficient": 1.0,
             "FFOffCoefficient": 0.0,
-            "FailSafePercent": 90.0,
+            "FailSafePercent": 100.0,
             "ICoefficient": 0.0,
             "ILimitMax": 0.0,
             "ILimitMin": 0.0,
@@ -641,7 +641,7 @@
                 100.0,
                 100.0,
                 100.0,
-                90.0,
+                100.0,
                 10.0
             ],
             "PositiveHysteresis": 0,