| commit | 3638c243ec185766e2db2498e9593a0c1649fde7 | [log] [tgz] |
|---|---|---|
| author | Kevin Tung <kevin.tung@quantatw.com> | Tue Oct 07 13:48:13 2025 +0800 |
| committer | Kevin Tung <kevin.tung.openbmc@gmail.com> | Wed Nov 12 12:27:03 2025 +0800 |
| tree | 4a764e12f45ead509c2d4f65c9fb8f280a0a59b6 | |
| parent | c1b36628298d7799677680e70d455f85acf83650 [diff] |
i2c-vr: add support for MPS MP994X VR firmware update over I2C This commit introduces support for programming MPS MP994X VR devices over the I2C bus. It enables firmware updates for VR models such as MP9945 and MP9946. Support for the MP994XFirmware type in EM was added in [1]. [1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/84276 Tested on the Yosemite5 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/Yosemite5_MB_VR_18_S5_3671" }, {...} ], "Members@odata.count": 12, "Name": "Software Inventory Collection" } ``` 2. Query version. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_MB_VR_18_S5_3671 ``` ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_MB_VR_18_S5_3671", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Other image", "Id": "Yosemite5_MB_VR_18_S5_3671", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "61A5F378" } ``` 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/Yosemite5_MB_VR_18_S5_3671\"],\"@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/7", "@odata.type": "#Task.v1_4_3.Task", "HidePayload": false, "Id": "7", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '7' has started.", "MessageArgs": [ "7" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 7", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "TargetUri": "/redfish/v1/UpdateService/update-multipart" }, "PercentComplete": 0, "StartTime": "2025-10-07T07:27:09+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/7", "TaskState": "Running", "TaskStatus": "OK" } ``` 5. Query Task status ``` curl --silent $creds https://$bmc/redfish/v1/TaskService/Tasks/7 ``` ``` { "@odata.id": "/redfish/v1/TaskService/Tasks/7", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2025-10-07T07:27:19+00:00", "HidePayload": false, "Id": "7", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '7' has started.", "MessageArgs": [ "7" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '7' has changed to progress 20 percent complete.", "MessageArgs": [ "7", "20" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '7' has changed to progress 50 percent complete.", "MessageArgs": [ "7", "50" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '7' has changed to progress 100 percent complete.", "MessageArgs": [ "7", "100" ], "MessageId": "TaskEvent.1.0.TaskProgressChanged", "MessageSeverity": "OK", "Resolution": "None." }, { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '7' has completed.", "MessageArgs": [ "7" ], "MessageId": "TaskEvent.1.0.TaskCompletedOK", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 7", "Payload": { "HttpHeaders": [], "HttpOperation": "POST", "JsonBody": "null", "TargetUri": "/redfish/v1/UpdateService/update-multipart" }, "PercentComplete": 100, "StartTime": "2025-10-07T07:27:09+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/7", "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/Yosemite5_MB_VR_18_S5_2390" }, { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_MB_VR_18_S5_3671" }, {...} ], "Members@odata.count": 13, "Name": "Software Inventory Collection" } ``` 7. Query the new fw version. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_MB_VR_18_S5_2390 ``` ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_MB_VR_18_S5_2390", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Other image", "Id": "Yosemite5_MB_VR_18_S5_2390", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": false, "Version": "61A561EB" } ``` 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 ``` ``` kevin@meta-device:~$ 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/Yosemite5_MB_VR_18_S5_2870" }, {...} ], "Members@odata.count": 12, "Name": "Software Inventory Collection" } ``` 10. Query the fw version after AC cycle. ``` curl $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_MB_VR_18_S5_2870 ``` ``` { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Yosemite5_MB_VR_18_S5_2870", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "Other image", "Id": "Yosemite5_MB_VR_18_S5_2870", "Name": "Software Inventory", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "61A561EB" } ``` Change-Id: Ib4a589870cbcb1989f17e74feb8d638d9362f9ec Signed-off-by: Kevin Tung <kevin.tung.openbmc@gmail.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps:
meson buildninja -C buildTo clean the repository run rm -r build.