Change PSU json file to support FSC

Add PSU stepwise and PSU Fan class to support fan speed control.

Tested By:
Add PSU LCC and PSU Fan to controllers in baseboard json and add
PSU to Pid.Zone, after heat PSU temperature, fan1_target in sysfs
in both PSU1 and PSU2 are changed to same value by FSC.

Change-Id: If50081e874f2561721025165da81b831b95155c3
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
diff --git a/configurations/Delta DPS-750XB PSU.json b/configurations/Delta DPS-750XB PSU.json
index f915ceb..94fd6d3 100644
--- a/configurations/Delta DPS-750XB PSU.json
+++ b/configurations/Delta DPS-750XB PSU.json
@@ -2,12 +2,6 @@
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Delta DPS-750XB PSU FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x5a",
                 "Bus": "$bus",
                 "Name": "PSU3",
@@ -56,6 +50,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU3 Fan Speed 1"
+                ],
+                "Name": "PSU3 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU3 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU3 Temperature"
+                ],
+                "Name": "PSU3 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Delta DPS-750XB PSU FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Delta DPS-750XB PSU 3",
@@ -71,12 +116,6 @@
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Delta DPS-750XB PSU FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x59",
                 "Bus": "$bus",
                 "Name": "PSU2",
@@ -125,6 +164,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU2 Fan Speed 1"
+                ],
+                "Name": "PSU2 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU2 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU2 Temperature"
+                ],
+                "Name": "PSU2 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Delta DPS-750XB PSU FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Delta DPS-750XB PSU 2",
@@ -140,12 +230,6 @@
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Delta DPS-750XB PSU FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x58",
                 "Bus": "$bus",
                 "Name": "PSU1",
@@ -194,6 +278,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU1 Fan Speed 1"
+                ],
+                "Name": "PSU1 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU1 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU1 Temperature"
+                ],
+                "Name": "PSU1 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Delta DPS-750XB PSU FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Delta DPS-750XB PSU 1",
@@ -206,4 +341,4 @@
             "SerialNumber": "$BOARD_SERIAL_NUMBER"
         }
     }
-]
\ No newline at end of file
+]
diff --git a/configurations/Flextronics S-1100ADU00-201 PSU.json b/configurations/Flextronics S-1100ADU00-201 PSU.json
index 88c1dc4..89da7e1 100644
--- a/configurations/Flextronics S-1100ADU00-201 PSU.json
+++ b/configurations/Flextronics S-1100ADU00-201 PSU.json
@@ -2,12 +2,6 @@
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Flextronics S-1100ADU00-201 PSU FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x5a",
                 "Bus": "$bus",
                 "Name": "PSU3",
@@ -56,6 +50,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU3 Fan Speed 1"
+                ],
+                "Name": "PSU3 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU3 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU3 Temperature"
+                ],
+                "Name": "PSU3 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Flextronics S-1100ADU00-201 PSU FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Flextronics S-1100ADU00-201 PSU 3",
@@ -71,12 +116,6 @@
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Flextronics S-1100ADU00-201 PSU FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x59",
                 "Bus": "$bus",
                 "Name": "PSU2",
@@ -125,6 +164,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU2 Fan Speed 1"
+                ],
+                "Name": "PSU2 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU2 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU2 Temperature"
+                ],
+                "Name": "PSU2 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Flextronics S-1100ADU00-201 PSU FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Flextronics S-1100ADU00-201 PSU 2",
@@ -140,12 +230,6 @@
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Flextronics S-1100ADU00-201 PSU FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x58",
                 "Bus": "$bus",
                 "Name": "PSU1",
@@ -194,6 +278,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU1 Fan Speed 1"
+                ],
+                "Name": "PSU1 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU1 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU1 Temperature"
+                ],
+                "Name": "PSU1 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Flextronics S-1100ADU00-201 PSU FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Flextronics S-1100ADU00-201 PSU 1",
@@ -206,4 +341,4 @@
             "SerialNumber": "$BOARD_SERIAL_NUMBER"
         }
     }
-]
\ No newline at end of file
+]
diff --git a/configurations/PSSF132202A.json b/configurations/PSSF132202A.json
index 0f19b1a..823732b 100644
--- a/configurations/PSSF132202A.json
+++ b/configurations/PSSF132202A.json
@@ -2,12 +2,6 @@
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Solum 1300W PSU 3 FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x5a",
                 "Bus": "$bus",
                 "Name": "PSU3",
@@ -56,6 +50,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU3 Fan Speed 1"
+                ],
+                "Name": "PSU3 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU3 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU3 Temperature"
+                ],
+                "Name": "PSU3 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Solum 1300W PSU 3 FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Solum 1300W PSU 3",
@@ -68,15 +113,10 @@
             "SerialNumber": "$PRODUCT_SERIAL_NUMBER"
         }
     },
+
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Solum 1300W PSU 2 FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x59",
                 "Bus": "$bus",
                 "Name": "PSU2",
@@ -125,6 +165,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU2 Fan Speed 1"
+                ],
+                "Name": "PSU2 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU2 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU2 Temperature"
+                ],
+                "Name": "PSU2 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Solum 1300W PSU 2 FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Solum 1300W PSU 2",
@@ -140,12 +231,6 @@
     {
         "Exposes": [
             {
-                "Address": "$address",
-                "Bus": "$bus",
-                "Name": "Solum 1300W PSU 1 FRU",
-                "Type": "EEPROM"
-            },
-            {
                 "Address": "0x58",
                 "Bus": "$bus",
                 "Name": "PSU1",
@@ -194,6 +279,57 @@
                     }
                 ],
                 "Type": "pmbus"
+            },
+            {
+                "Class": "fan",
+                "FFGainCoefficient": 0.01,
+                "FFOffCoefficient": 0.0,
+                "ICoefficient": 0.0,
+                "ILimitMax": 0.0,
+                "ILimitMin": 0.0,
+                "Inputs": [
+                    "PSU1 Fan Speed 1"
+                ],
+                "Name": "PSU1 Fan 1",
+                "NegativeHysteresis": 2.0,
+                "OutLimitMax": 100.0,
+                "OutLimitMin": 30.0,
+                "Outputs": [
+                    "Pwm PSU1 Fan 1"
+                ],
+                "PCoefficient": 0.0,
+                "PositiveHysteresis": 0.0,
+                "SlewNeg": 0.0,
+                "SlewPos": 0.0,
+                "Type": "Pid",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Class": "Floor",
+                "Inputs": [
+                    "PSU1 Temperature"
+                ],
+                "Name": "PSU1 LCC",
+                "NegativeHysteresis": 2,
+                "Output": [
+                    40.0, 100.0
+                ],
+                "PositiveHysteresis": 0,
+                "Reading": [
+                    30.0, 65.0
+                ],
+                "Type": "Stepwise",
+                "Zones": [
+                    "PSU"
+                ]
+            },
+            {
+                "Address": "$address",
+                "Bus": "$bus",
+                "Name": "Solum 1300W PSU 1 FRU",
+                "Type": "EEPROM"
             }
         ],
         "Name": "Solum 1300W PSU 1",
@@ -206,4 +342,4 @@
             "SerialNumber": "$PRODUCT_SERIAL_NUMBER"
         }
     }
-]
\ No newline at end of file
+]
diff --git a/configurations/R1000 Chassis.json b/configurations/R1000 Chassis.json
index 902402e..5bb9fc7 100644
--- a/configurations/R1000 Chassis.json
+++ b/configurations/R1000 Chassis.json
@@ -283,7 +283,9 @@
         {
             "Controllers": [
                 "Front Panel LCC",
-                "CPU\\d"
+                "CPU\\d",
+                "PSU1 LCC",
+                "PSU2 LCC"
             ],
             "Name": "Performance",
             "Type": "FanProfile"
@@ -494,6 +496,12 @@
             "Type": "Pid.Zone"
         },
         {
+            "FailSafePercent": 100,
+            "MinThermalOutput": 30,
+            "Name": "PSU",
+            "Type": "Pid.Zone"
+        },
+        {
             "Name": "Pwm 1",
             "Type": "Pwm"
         },
@@ -576,4 +584,4 @@
         "PartNumber": "R1208",
         "SerialNumber": "23165"
     }
-}
\ No newline at end of file
+}
diff --git a/configurations/R2000 Chassis.json b/configurations/R2000 Chassis.json
index 3c5693e..12b613d 100644
--- a/configurations/R2000 Chassis.json
+++ b/configurations/R2000 Chassis.json
@@ -169,7 +169,9 @@
         {
             "Controllers": [
                 "Front Panel LCC",
-                "CPU\\d"
+                "CPU\\d",
+                "PSU1 LCC",
+                "PSU2 LCC"
             ],
             "Name": "Performance",
             "Type": "FanProfile"
@@ -374,6 +376,12 @@
             "Type": "Pid.Zone"
         },
         {
+            "FailSafePercent": 100,
+            "MinThermalOutput": 30,
+            "Name": "PSU",
+            "Type": "Pid.Zone"
+        },
+        {
             "Name": "Pwm 1",
             "Type": "Pwm"
         },
@@ -456,4 +464,4 @@
         "PartNumber": "R2104",
         "SerialNumber": "23165"
     }
-}
\ No newline at end of file
+}