configurations: ventura: Add OCP config for fan board

Because the new fan board has updated Over Current Protection
values, we determine whether to apply the modified OCP values
based on the AM4 field in the FRU and add add manufacturer to
all ventura board config.

Change-Id: Ieb067f3840c1d570df4b1a322a5ba1f0ff5b95a6
Signed-off-by: Jason Hsu <Jason-Hsu@quantatw.com>
diff --git a/configurations/meson.build b/configurations/meson.build
index fd2ae05..dd27d53 100644
--- a/configurations/meson.build
+++ b/configurations/meson.build
@@ -120,6 +120,8 @@
     'meta/twinlake.json',
     'meta/ventura_cable.json',
     'meta/ventura_fanboard_adc_max.json',
+    'meta/ventura_fanboard_adc_ocp_max.json',
+    'meta/ventura_fanboard_adc_ocp_tic.json',
     'meta/ventura_fanboard_adc_tic.json',
     'meta/ventura_ioboard.json',
     'meta/ventura_ledboard.json',
diff --git a/configurations/meta/ventura_fanboard_adc_ocp_max.json b/configurations/meta/ventura_fanboard_adc_ocp_max.json
new file mode 100644
index 0000000..d25757c
--- /dev/null
+++ b/configurations/meta/ventura_fanboard_adc_ocp_max.json
@@ -0,0 +1,79 @@
+[
+    {
+        "Exposes": [
+            {
+                "Address": "0x35",
+                "Bus": "$bus",
+                "Labels": [
+                    "in_voltage0",
+                    "in_voltage1",
+                    "in_voltage2",
+                    "in_voltage3"
+                ],
+                "Name": "FAN_ADC",
+                "Thresholds": [
+                    {
+                        "Direction": "greater than",
+                        "Hysteresis": 0.272,
+                        "Label": "in_voltage0",
+                        "Name": "upper critical",
+                        "Severity": 1,
+                        "Value": 13.6
+                    },
+                    {
+                        "Direction": "less than",
+                        "Hysteresis": 0.21,
+                        "Label": "in_voltage0",
+                        "Name": "lower critical",
+                        "Severity": 1,
+                        "Value": 10.5
+                    },
+                    {
+                        "Direction": "greater than",
+                        "Hysteresis": 0.272,
+                        "Label": "in_voltage2",
+                        "Name": "upper critical",
+                        "Severity": 1,
+                        "Value": 13.6
+                    },
+                    {
+                        "Direction": "less than",
+                        "Hysteresis": 0.21,
+                        "Label": "in_voltage2",
+                        "Name": "lower critical",
+                        "Severity": 1,
+                        "Value": 10.5
+                    }
+                ],
+                "Type": "MAX11617",
+                "in_voltage0_Max": 18,
+                "in_voltage0_Name": "FCB_$bus % 2 FAN_$bus % 2 * 2 VOLT_V",
+                "in_voltage0_Scale": 266.525,
+                "in_voltage1_Name": "FCB_$bus % 2 FAN_$bus % 2 * 2 IMON_VOLT_V",
+                "in_voltage1_Scale": 0.4,
+                "in_voltage2_Max": 18,
+                "in_voltage2_Name": "FCB_$bus % 2 FAN_$bus % 2 * 2 + 1 VOLT_V",
+                "in_voltage2_Scale": 266.525,
+                "in_voltage3_Name": "FCB_$bus % 2 FAN_$bus % 2 * 2 + 1 IMON_VOLT_V",
+                "in_voltage3_Scale": 0.4
+            }
+        ],
+        "Name": "Ventura Fan Board $bus % 2",
+        "Probe": "xyz.openbmc_project.FruDevice({'BOARD_MANUFACTURER': 'Quanta', 'BOARD_PRODUCT_NAME': 'Ventura FAN Board', 'BOARD_INFO_AM4': 'adc-ocp-max'})",
+        "Type": "Board",
+        "xyz.openbmc_project.Inventory.Decorator.Asset": {
+            "BuildDate": "$BOARD_MANUFACTURE_DATE",
+            "Manufacturer": "$BOARD_MANUFACTURER",
+            "Model": "$BOARD_PRODUCT_NAME",
+            "PartNumber": "$BOARD_PART_NUMBER",
+            "SerialNumber": "$BOARD_SERIAL_NUMBER",
+            "SparePartNumber": "$BOARD_INFO_AM1"
+        },
+        "xyz.openbmc_project.Inventory.Decorator.AssetTag": {
+            "AssetTag": "$PRODUCT_ASSET_TAG"
+        },
+        "xyz.openbmc_project.Inventory.Decorator.Revision": {
+            "Version": "$PRODUCT_VERSION"
+        }
+    }
+]
diff --git a/configurations/meta/ventura_fanboard_adc_ocp_tic.json b/configurations/meta/ventura_fanboard_adc_ocp_tic.json
new file mode 100644
index 0000000..587a632
--- /dev/null
+++ b/configurations/meta/ventura_fanboard_adc_ocp_tic.json
@@ -0,0 +1,79 @@
+[
+    {
+        "Exposes": [
+            {
+                "Address": "0x1f",
+                "Bus": "$bus",
+                "Labels": [
+                    "in0",
+                    "in1",
+                    "in2",
+                    "in3"
+                ],
+                "Name": "FAN_ADC",
+                "Thresholds": [
+                    {
+                        "Direction": "greater than",
+                        "Hysteresis": 0.272,
+                        "Label": "in0",
+                        "Name": "upper critical",
+                        "Severity": 1,
+                        "Value": 13.6
+                    },
+                    {
+                        "Direction": "less than",
+                        "Hysteresis": 0.21,
+                        "Label": "in0",
+                        "Name": "lower critical",
+                        "Severity": 1,
+                        "Value": 10.5
+                    },
+                    {
+                        "Direction": "greater than",
+                        "Hysteresis": 0.272,
+                        "Label": "in2",
+                        "Name": "upper critical",
+                        "Severity": 1,
+                        "Value": 13.6
+                    },
+                    {
+                        "Direction": "less than",
+                        "Hysteresis": 0.21,
+                        "Label": "in2",
+                        "Name": "lower critical",
+                        "Severity": 1,
+                        "Value": 10.5
+                    }
+                ],
+                "Type": "ADC128D818",
+                "in0_Max": 18,
+                "in0_Name": "FCB_$bus % 2 FAN_$bus % 2 * 2 VOLT_V",
+                "in0_Scale": 133.262,
+                "in1_Name": "FCB_$bus % 2 FAN_$bus % 2 * 2 IMON_VOLT_V",
+                "in1_Scale": 0.2,
+                "in2_Max": 18,
+                "in2_Name": "FCB_$bus % 2 FAN_$bus % 2 * 2 + 1 VOLT_V",
+                "in2_Scale": 133.262,
+                "in3_Name": "FCB_$bus % 2 FAN_$bus % 2 * 2 + 1 IMON_VOLT_V",
+                "in3_Scale": 0.2
+            }
+        ],
+        "Name": "Ventura Fan Board $bus % 2",
+        "Probe": "xyz.openbmc_project.FruDevice({'BOARD_MANUFACTURER': 'Quanta', 'BOARD_PRODUCT_NAME': 'Ventura FAN Board', 'BOARD_INFO_AM4': 'adc-ocp-tic'})",
+        "Type": "Board",
+        "xyz.openbmc_project.Inventory.Decorator.Asset": {
+            "BuildDate": "$BOARD_MANUFACTURE_DATE",
+            "Manufacturer": "$BOARD_MANUFACTURER",
+            "Model": "$BOARD_PRODUCT_NAME",
+            "PartNumber": "$BOARD_PART_NUMBER",
+            "SerialNumber": "$BOARD_SERIAL_NUMBER",
+            "SparePartNumber": "$BOARD_INFO_AM1"
+        },
+        "xyz.openbmc_project.Inventory.Decorator.AssetTag": {
+            "AssetTag": "$PRODUCT_ASSET_TAG"
+        },
+        "xyz.openbmc_project.Inventory.Decorator.Revision": {
+            "Version": "$PRODUCT_VERSION"
+        }
+    }
+]