i2c-vr: add support for MPS MP5998 VR firmware update over I2C

This commit introduces support for programming MPS MP5998 VR devices
over the I2C bus.
Support for the MP5998Firmware type in entity-manager was added in [1].

[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/83114

Tested on the Santabarbara platform:

1. Display the fw inventory
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
  "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
  "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
  "Members": [
    {...},
    {
      "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692"
    },
    {...}
  ],
  "Members@odata.count": 13,
  "Name": "Software Inventory Collection"
}
```

2. Query version.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692
```

```
{
  "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692",
  "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
  "Description": "Unknown image",
  "Id": "Santabarbara_PDB2_VR_MP5998_8692",
  "Name": "Software Inventory",
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Enabled"
  },
  "Updateable": true,
  "Version": "508F"
}
```

3. Trigger the fw update via redfish.
```
curl -k ${creds} \
  -H "Content-Type:multipart/form-data" \
  -X POST \
  -F UpdateParameters="{"Targets":["/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692"],"@Redfish.OperationApplyTime":"OnReset"};type=application/json" \
  -F "UpdateFile=@${fwpath};type=application/octet-stream" \
  https://${bmc}/redfish/v1/UpdateService/update-multipart
```

4. Task is returned
```
{
  "@odata.id": "/redfish/v1/TaskService/Tasks/0",
  "@odata.type": "#Task.v1_4_3.Task",
  "HidePayload": false,
  "Id": "0",
  "Messages": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The task with Id '0' has started.",
      "MessageArgs": [
        "0"
      ],
      "MessageId": "TaskEvent.1.0.TaskStarted",
      "MessageSeverity": "OK",
      "Resolution": "None."
    }
  ],
  "Name": "Task 0",
  "Payload": {
    "HttpHeaders": [],
    "HttpOperation": "POST",
    "TargetUri": "/redfish/v1/UpdateService/update-multipart"
  },
  "PercentComplete": 0,
  "StartTime": "2025-08-22T08:41:47+00:00",
  "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
  "TaskState": "Running",
  "TaskStatus": "OK"
}
```

5. Query Task status
```
curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/0
```

```
{
  "@odata.id": "/redfish/v1/TaskService/Tasks/0",
  "@odata.type": "#Task.v1_4_3.Task",
  "EndTime": "2025-08-22T08:41:48+00:00",
  "HidePayload": false,
  "Id": "0",
  "Messages": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The task with Id '0' has started.",
      "MessageArgs": [
        "0"
      ],
      "MessageId": "TaskEvent.1.0.TaskStarted",
      "MessageSeverity": "OK",
      "Resolution": "None."
    },
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The task with Id '0' has changed to progress 80 percent complete.",
      "MessageArgs": [
        "0",
        "80"
      ],
      "MessageId": "TaskEvent.1.0.TaskProgressChanged",
      "MessageSeverity": "OK",
      "Resolution": "None."
    },
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The task with Id '0' has changed to progress 100 percent complete.",
      "MessageArgs": [
        "0",
        "100"
      ],
      "MessageId": "TaskEvent.1.0.TaskProgressChanged",
      "MessageSeverity": "OK",
      "Resolution": "None."
    },
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The task with Id '0' has completed.",
      "MessageArgs": [
        "0"
      ],
      "MessageId": "TaskEvent.1.0.TaskCompletedOK",
      "MessageSeverity": "OK",
      "Resolution": "None."
    }
  ],
  "Name": "Task 0",
  "Payload": {
    "HttpHeaders": [],
    "HttpOperation": "POST",
    "JsonBody": "null",
    "TargetUri": "/redfish/v1/UpdateService/update-multipart"
  },
  "PercentComplete": 100,
  "StartTime": "2025-08-22T08:41:47+00:00",
  "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
  "TaskState": "Completed",
  "TaskStatus": "OK"
}
```

6. Display the fw inventory with newly updated fw.
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
  "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
  "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
  "Members": [
    {...},
    {
      "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612"
    },
    {
      "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_8692"
    },
    {...}
  ],
  "Members@odata.count": 16,
  "Name": "Software Inventory Collection"
}
```

7. Query the new fw version.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612
```

```
{
  "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_5612",
  "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
  "Description": "Unknown image",
  "Id": "Santabarbara_PDB2_VR_MP5998_5612",
  "Name": "Software Inventory",
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Enabled"
  },
  "Updateable": false,
  "Version": "FCFF"
}
```

8. Do AC cycle to make sure the new fw is applied.
```
busctl set-property xyz.openbmc_project.State.Chassis0 /xyz/openbmc_project/state/chassis0 \
xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.PowerCycle
```

9. Display the fw inventory after AC cycle.
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory
```

```
{
  "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
  "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
  "Members": [
    {...},
    {
      "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302"
    },
    {...}
  ],
  "Members@odata.count": 12,
  "Name": "Software Inventory Collection"
}
```

10. Query the fw version after AC cycle.
```
curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302
```

```
{
  "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Santabarbara_PDB2_VR_MP5998_302",
  "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
  "Description": "Unknown image",
  "Id": "Santabarbara_PDB2_VR_MP5998_302",
  "Name": "Software Inventory",
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Enabled"
  },
  "Updateable": true,
  "Version": "FCFF"
}
```

Change-Id: Ia973a142ac04e041989a74a87e7f1fd8bd16ae3d
Signed-off-by: Freddie Jheng <Freddie.Jheng@quantatw.com>
7 files changed
tree: cd48381d1e402c010f24db6d8a94dbb815a9db5e
  1. bios/
  2. bmc/
  3. common/
  4. cpld/
  5. eeprom-device/
  6. i2c-vr/
  7. subprojects/
  8. test/
  9. tpm/
  10. .clang-format
  11. .clang-tidy
  12. .gitignore
  13. .shellcheck
  14. LICENSE
  15. meson.build
  16. meson.options
  17. OWNERS
  18. README.md
README.md

phosphor-bmc-code-mgmt

Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture

To Build

To build this package, do the following steps:

  1. meson build
  2. ninja -C build

To clean the repository run rm -r build.