configurations: santabarbara: Add fan configuration on MB and PDB2

Add fan configuration for speed control and RPM monitoring.
Fan0–Fan3 are handled by MB CPLD emulating a fan controller IC,
sharing a single PWM channel.
Fan4–Fan7 are controlled individually by fan controller IC on PDB2.

Change-Id: I7294bb25ea7a9bd1ec4b8165780b3cdcfb45efa1
Signed-off-by: Fred Chen <Fred.Chen@quantatw.com>
diff --git a/configurations/meta/santabarbara_mb.json b/configurations/meta/santabarbara_mb.json
index 8de40e2..22abb82 100644
--- a/configurations/meta/santabarbara_mb.json
+++ b/configurations/meta/santabarbara_mb.json
@@ -106,6 +106,246 @@
             "Type": "EEPROM"
         },
         {
+            "Address": "0x21",
+            "Bus": 1,
+            "Connector": {
+                "Name": "MB_FAN0_TACH_IL",
+                "Pwm": 2,
+                "PwmName": "MB_FAN_PWM_PCT",
+                "Tachs": [
+                    0
+                ]
+            },
+            "Index": 0,
+            "Name": "MB_FAN0_TACH_IL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 40000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 1,
+            "Connector": {
+                "Name": "MB_FAN0_TACH_OL",
+                "Pwm": 2,
+                "PwmName": "MB_FAN_PWM_PCT",
+                "Tachs": [
+                    1
+                ]
+            },
+            "Index": 1,
+            "Name": "MB_FAN0_TACH_OL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 35000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 1,
+            "Connector": {
+                "Name": "MB_FAN1_TACH_IL",
+                "Pwm": 2,
+                "PwmName": "MB_FAN_PWM_PCT",
+                "Tachs": [
+                    2
+                ]
+            },
+            "Index": 2,
+            "Name": "MB_FAN1_TACH_IL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 40000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 1,
+            "Connector": {
+                "Name": "MB_FAN1_TACH_OL",
+                "Pwm": 2,
+                "PwmName": "MB_FAN_PWM_PCT",
+                "Tachs": [
+                    3
+                ]
+            },
+            "Index": 3,
+            "Name": "MB_FAN1_TACH_OL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 35000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 1,
+            "Connector": {
+                "Name": "MB_FAN2_TACH_IL",
+                "Pwm": 2,
+                "PwmName": "MB_FAN_PWM_PCT",
+                "Tachs": [
+                    4
+                ]
+            },
+            "Index": 4,
+            "Name": "MB_FAN2_TACH_IL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 40000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 1,
+            "Connector": {
+                "Name": "MB_FAN2_TACH_OL",
+                "Pwm": 2,
+                "PwmName": "MB_FAN_PWM_PCT",
+                "Tachs": [
+                    5
+                ]
+            },
+            "Index": 5,
+            "Name": "MB_FAN2_TACH_OL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 35000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 1,
+            "Connector": {
+                "Name": "MB_FAN3_TACH_IL",
+                "Pwm": 2,
+                "PwmName": "MB_FAN_PWM_PCT",
+                "Tachs": [
+                    6
+                ]
+            },
+            "Index": 6,
+            "Name": "MB_FAN3_TACH_IL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 40000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 1,
+            "Connector": {
+                "Name": "MB_FAN3_TACH_OL",
+                "Pwm": 2,
+                "PwmName": "MB_FAN_PWM_PCT",
+                "Tachs": [
+                    7
+                ]
+            },
+            "Index": 7,
+            "Name": "MB_FAN3_TACH_OL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 35000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
             "Address": "0x40",
             "Bus": 19,
             "Labels": [
diff --git a/configurations/meta/santabarbara_pdb2.json b/configurations/meta/santabarbara_pdb2.json
index c2c9db5..84d3d1a 100644
--- a/configurations/meta/santabarbara_pdb2.json
+++ b/configurations/meta/santabarbara_pdb2.json
@@ -7,6 +7,246 @@
             "Type": "EEPROM"
         },
         {
+            "Address": "0x21",
+            "Bus": 43,
+            "Connector": {
+                "Name": "PDB2_FAN4_TACH_IL",
+                "Pwm": 5,
+                "PwmName": "PDB2_FAN4_PWM_PCT",
+                "Tachs": [
+                    4
+                ]
+            },
+            "Index": 4,
+            "Name": "PDB2_FAN4_TACH_IL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 40000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 43,
+            "Connector": {
+                "Name": "PDB2_FAN4_TACH_OL",
+                "Pwm": 5,
+                "PwmName": "PDB2_FAN4_PWM_PCT",
+                "Tachs": [
+                    5
+                ]
+            },
+            "Index": 5,
+            "Name": "PDB2_FAN4_TACH_OL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 35000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 43,
+            "Connector": {
+                "Name": "PDB2_FAN5_TACH_IL",
+                "Pwm": 3,
+                "PwmName": "PDB2_FAN5_PWM_PCT",
+                "Tachs": [
+                    3
+                ]
+            },
+            "Index": 3,
+            "Name": "PDB2_FAN5_TACH_IL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 40000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 43,
+            "Connector": {
+                "Name": "PDB2_FAN5_TACH_OL",
+                "Pwm": 3,
+                "PwmName": "PDB2_FAN5_PWM_PCT",
+                "Tachs": [
+                    10
+                ]
+            },
+            "Index": 10,
+            "Name": "PDB2_FAN5_TACH_OL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 35000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 43,
+            "Connector": {
+                "Name": "PDB2_FAN6_TACH_IL",
+                "Pwm": 2,
+                "PwmName": "PDB2_FAN6_PWM_PCT",
+                "Tachs": [
+                    1
+                ]
+            },
+            "Index": 1,
+            "Name": "PDB2_FAN6_TACH_IL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 40000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 43,
+            "Connector": {
+                "Name": "PDB2_FAN6_TACH_OL",
+                "Pwm": 2,
+                "PwmName": "PDB2_FAN6_PWM_PCT",
+                "Tachs": [
+                    2
+                ]
+            },
+            "Index": 2,
+            "Name": "PDB2_FAN6_TACH_OL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 35000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 43,
+            "Connector": {
+                "Name": "PDB2_FAN7_TACH_IL",
+                "Pwm": 0,
+                "PwmName": "PDB2_FAN7_PWM_PCT",
+                "Tachs": [
+                    0
+                ]
+            },
+            "Index": 0,
+            "Name": "PDB2_FAN7_TACH_IL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 40000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
+            "Address": "0x21",
+            "Bus": 43,
+            "Connector": {
+                "Name": "PDB2_FAN7_TACH_OL",
+                "Pwm": 0,
+                "PwmName": "PDB2_FAN7_PWM_PCT",
+                "Tachs": [
+                    7
+                ]
+            },
+            "Index": 7,
+            "Name": "PDB2_FAN7_TACH_OL_SPEED_RPM",
+            "PowerState": "Always",
+            "Thresholds": [
+                {
+                    "Direction": "greater than",
+                    "Name": "upper critical",
+                    "Severity": 1,
+                    "Value": 35000
+                },
+                {
+                    "Direction": "less than",
+                    "Name": "lower critical",
+                    "Severity": 1,
+                    "Value": 1000
+                }
+            ],
+            "Type": "I2CFan"
+        },
+        {
             "Address": "0x40",
             "Bus": 41,
             "Labels": [