diff --git a/phosphor-power-sequencer/src/meson.build b/phosphor-power-sequencer/src/meson.build
index 02084c9..1f6c04c 100644
--- a/phosphor-power-sequencer/src/meson.build
+++ b/phosphor-power-sequencer/src/meson.build
@@ -10,6 +10,7 @@
     'rail.cpp',
     'services.cpp',
     'standard_device.cpp',
+    'ucd90320_device.cpp',
     'ucd90x_device.cpp',
     implicit_include_directories: false,
     dependencies: [
diff --git a/phosphor-power-sequencer/src/ucd90320_device.cpp b/phosphor-power-sequencer/src/ucd90320_device.cpp
new file mode 100644
index 0000000..2d91797
--- /dev/null
+++ b/phosphor-power-sequencer/src/ucd90320_device.cpp
@@ -0,0 +1,82 @@
+/**
+ * Copyright © 2024 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ucd90320_device.hpp"
+
+#include "format_utils.hpp"
+#include "standard_device.hpp"
+
+#include <array>
+#include <format>
+#include <span>
+
+namespace phosphor::power::sequencer
+{
+
+/**
+ * Group of GPIO values that should be formatted together.
+ */
+struct GPIOGroup
+{
+    std::string additionalDataName;
+    std::string journalName;
+    unsigned int offset;
+    unsigned int count;
+};
+
+/**
+ * UCD90320-specific groups of GPIO values.
+ *
+ * The offsets correspond to the Pin IDs defined in the UCD90320 PMBus interface
+ * documentation.  These Pin IDs are the same as the libgpiod line offsets used
+ * to obtain the GPIO values.
+ */
+static const std::array<GPIOGroup, 5> gpioGroups = {
+    GPIOGroup{"MAR01_24_GPIO_VALUES", "MAR01-24", 0, 24},
+    GPIOGroup{"EN1_32_GPIO_VALUES", "EN1-32", 24, 32},
+    GPIOGroup{"LGP01_16_GPIO_VALUES", "LGP01-16", 56, 16},
+    GPIOGroup{"DMON1_8_GPIO_VALUES", "DMON1-8", 72, 8},
+    GPIOGroup{"GPIO1_4_GPIO_VALUES", "GPIO1-4", 80, 4}};
+
+void UCD90320Device::storeGPIOValues(
+    Services& services, const std::vector<int>& values,
+    std::map<std::string, std::string>& additionalData)
+{
+    // Verify the expected number of GPIO values were passed in
+    unsigned int expectedCount = gpioGroups.back().offset +
+                                 gpioGroups.back().count;
+    if (values.size() != expectedCount)
+    {
+        // Unexpected number of values; store as a plain list of integers
+        StandardDevice::storeGPIOValues(services, values, additionalData);
+        return;
+    }
+
+    // Store GPIO groups in additional data and journal
+    services.logInfoMsg(std::format("Device {} GPIO values:", name));
+    auto span = std::span{values};
+    std::string valuesStr;
+    for (const GPIOGroup& group : gpioGroups)
+    {
+        valuesStr =
+            format_utils::toString(span.subspan(group.offset, group.count));
+        additionalData.emplace(group.additionalDataName, valuesStr);
+        services.logInfoMsg(
+            std::format("{}: {}", group.journalName, valuesStr));
+    }
+}
+
+} // namespace phosphor::power::sequencer
diff --git a/phosphor-power-sequencer/src/ucd90320_device.hpp b/phosphor-power-sequencer/src/ucd90320_device.hpp
new file mode 100644
index 0000000..c52c6ce
--- /dev/null
+++ b/phosphor-power-sequencer/src/ucd90320_device.hpp
@@ -0,0 +1,70 @@
+/**
+ * Copyright © 2024 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+#include "rail.hpp"
+#include "services.hpp"
+#include "ucd90x_device.hpp"
+
+#include <cstdint>
+#include <map>
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
+
+namespace phosphor::power::sequencer
+{
+
+/**
+ * @class UCD90320Device
+ *
+ * Class representing the UCD90320 power sequencer device.
+ */
+class UCD90320Device : public UCD90xDevice
+{
+  public:
+    // Specify which compiler-generated methods we want
+    UCD90320Device() = delete;
+    UCD90320Device(const UCD90320Device&) = delete;
+    UCD90320Device(UCD90320Device&&) = delete;
+    UCD90320Device& operator=(const UCD90320Device&) = delete;
+    UCD90320Device& operator=(UCD90320Device&&) = delete;
+    virtual ~UCD90320Device() = default;
+
+    /**
+     * Constructor.
+     *
+     * @param rails Voltage rails that are enabled and monitored by this device
+     * @param services System services like hardware presence and the journal
+     * @param bus I2C bus for the device
+     * @param address I2C address for the device
+     */
+    explicit UCD90320Device(std::vector<std::unique_ptr<Rail>> rails,
+                            Services& services, uint8_t bus, uint16_t address) :
+        UCD90xDevice(deviceName, std::move(rails), services, bus, address)
+    {}
+
+    constexpr static std::string deviceName{"UCD90320"};
+
+  protected:
+    /** @copydoc UCD90xDevice::storeGPIOValues() */
+    virtual void storeGPIOValues(
+        Services& services, const std::vector<int>& values,
+        std::map<std::string, std::string>& additionalData) override;
+};
+
+} // namespace phosphor::power::sequencer
diff --git a/phosphor-power-sequencer/test/meson.build b/phosphor-power-sequencer/test/meson.build
index b915859..21a4bb2 100644
--- a/phosphor-power-sequencer/test/meson.build
+++ b/phosphor-power-sequencer/test/meson.build
@@ -6,6 +6,7 @@
                 'pmbus_driver_device_tests.cpp',
                 'rail_tests.cpp',
                 'standard_device_tests.cpp',
+                'ucd90320_device_tests.cpp',
                 'ucd90x_device_tests.cpp',
                 dependencies: [
                     gmock,
diff --git a/phosphor-power-sequencer/test/ucd90320_device_tests.cpp b/phosphor-power-sequencer/test/ucd90320_device_tests.cpp
new file mode 100644
index 0000000..980b960
--- /dev/null
+++ b/phosphor-power-sequencer/test/ucd90320_device_tests.cpp
@@ -0,0 +1,268 @@
+/**
+ * Copyright © 2024 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "mock_pmbus.hpp"
+#include "mock_services.hpp"
+#include "pmbus.hpp"
+#include "rail.hpp"
+#include "services.hpp"
+#include "ucd90320_device.hpp"
+
+#include <cstdint>
+#include <map>
+#include <memory>
+#include <optional>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+using namespace phosphor::power::sequencer;
+using namespace phosphor::pmbus;
+
+using ::testing::Return;
+
+/**
+ * Creates a Rail object that checks for a pgood fault using a GPIO.
+ *
+ * @param name Unique name for the rail
+ * @param gpio GPIO line to read to determine the pgood status of the rail
+ * @return Rail object
+ */
+static std::unique_ptr<Rail> createRail(const std::string& name,
+                                        unsigned int gpioLine)
+{
+    std::optional<std::string> presence{};
+    std::optional<uint8_t> page{};
+    bool isPowerSupplyRail{false};
+    bool checkStatusVout{false};
+    bool compareVoltageToLimit{false};
+    bool activeLow{false};
+    std::optional<GPIO> gpio{GPIO{gpioLine, activeLow}};
+    return std::make_unique<Rail>(name, presence, page, isPowerSupplyRail,
+                                  checkStatusVout, compareVoltageToLimit, gpio);
+}
+
+TEST(UCD90320DeviceTests, Constructor)
+{
+    MockServices services;
+
+    std::vector<std::unique_ptr<Rail>> rails;
+    rails.emplace_back(createRail("VDD", 5));
+    rails.emplace_back(createRail("VIO", 7));
+    uint8_t bus{3};
+    uint16_t address{0x72};
+    UCD90320Device device{std::move(rails), services, bus, address};
+
+    EXPECT_EQ(device.getName(), "UCD90320");
+    EXPECT_EQ(device.getRails().size(), 2);
+    EXPECT_EQ(device.getRails()[0]->getName(), "VDD");
+    EXPECT_EQ(device.getRails()[1]->getName(), "VIO");
+    EXPECT_EQ(device.getBus(), bus);
+    EXPECT_EQ(device.getAddress(), address);
+    EXPECT_EQ(device.getDriverName(), "ucd9000");
+    EXPECT_EQ(device.getInstance(), 0);
+    EXPECT_NE(&(device.getPMBusInterface()), nullptr);
+}
+
+TEST(UCD90320DeviceTests, StoreGPIOValues)
+{
+    // This is a protected method and cannot be called directly from a gtest.
+    // Call findPgoodFault() which calls storeGPIOValues().
+
+    // Test where works
+    {
+        std::vector<int> gpioValues{
+            1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, // MAR01-12
+            1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, // MAR13-24
+            1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, // EN1-12
+            1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, // EN13-24
+            1, 1, 0, 0, 1, 1, 1, 0,             // EN25-32
+            1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, // LGP01-12
+            1, 1, 0, 0,                         // LGP13-16
+            1, 0, 0, 1, 1, 1, 0, 0,             // DMON1-8
+            1, 0, 0, 1                          // GPIO1-4
+        };
+
+        MockServices services;
+        EXPECT_CALL(services, getGPIOValues("ucd90320"))
+            .Times(1)
+            .WillOnce(Return(gpioValues));
+        EXPECT_CALL(services, logInfoMsg("Device UCD90320 GPIO values:"))
+            .Times(1);
+        EXPECT_CALL(services, logInfoMsg("MAR01-24: ["
+                                         "1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                                         "1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0]"))
+            .Times(1);
+        EXPECT_CALL(services, logInfoMsg("EN1-32: ["
+                                         "1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                                         "1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, "
+                                         "1, 1, 0, 0, 1, 1, 1, 0]"))
+            .Times(1);
+        EXPECT_CALL(services, logInfoMsg("LGP01-16: ["
+                                         "1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                                         "1, 1, 0, 0]"))
+            .Times(1);
+        EXPECT_CALL(services, logInfoMsg("DMON1-8: ["
+                                         "1, 0, 0, 1, 1, 1, 0, 0]"))
+            .Times(1);
+        EXPECT_CALL(services, logInfoMsg("GPIO1-4: ["
+                                         "1, 0, 0, 1]"))
+            .Times(1);
+        EXPECT_CALL(services,
+                    logInfoMsg("Device UCD90320 MFR_STATUS: 0x123456789abc"))
+            .Times(1);
+        EXPECT_CALL(
+            services,
+            logErrorMsg(
+                "Pgood fault found in rail monitored by device UCD90320"))
+            .Times(1);
+        EXPECT_CALL(services, logErrorMsg("Pgood fault detected in rail VDD"))
+            .Times(1);
+        EXPECT_CALL(
+            services,
+            logErrorMsg(
+                "Rail VDD pgood GPIO line offset 2 has inactive value 0"))
+            .Times(1);
+
+        std::vector<std::unique_ptr<Rail>> rails;
+        rails.emplace_back(createRail("VDD", 2));
+        uint8_t bus{3};
+        uint16_t address{0x72};
+        UCD90320Device device{std::move(rails), services, bus, address};
+
+        MockPMBus& pmbus = static_cast<MockPMBus&>(device.getPMBusInterface());
+        EXPECT_CALL(pmbus, getPath(Type::Hwmon))
+            .Times(1)
+            .WillOnce(Return("/tmp"));
+        EXPECT_CALL(pmbus, read("mfr_status", Type::HwmonDeviceDebug, true))
+            .Times(1)
+            .WillOnce(Return(0x123456789abcull));
+
+        // Call findPgoodFault() which calls storeGPIOValues()
+        std::string powerSupplyError{};
+        std::map<std::string, std::string> additionalData{};
+        std::string error = device.findPgoodFault(services, powerSupplyError,
+                                                  additionalData);
+        EXPECT_EQ(error,
+                  "xyz.openbmc_project.Power.Error.PowerSequencerVoltageFault");
+        EXPECT_EQ(additionalData.size(), 10);
+        EXPECT_EQ(additionalData["MFR_STATUS"], "0x123456789abc");
+        EXPECT_EQ(additionalData["DEVICE_NAME"], "UCD90320");
+        EXPECT_EQ(additionalData["MAR01_24_GPIO_VALUES"],
+                  "[1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                  "1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0]");
+        EXPECT_EQ(additionalData["EN1_32_GPIO_VALUES"],
+                  "[1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                  "1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, "
+                  "1, 1, 0, 0, 1, 1, 1, 0]");
+        EXPECT_EQ(additionalData["LGP01_16_GPIO_VALUES"],
+                  "[1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                  "1, 1, 0, 0]");
+        EXPECT_EQ(additionalData["DMON1_8_GPIO_VALUES"],
+                  "[1, 0, 0, 1, 1, 1, 0, 0]");
+        EXPECT_EQ(additionalData["GPIO1_4_GPIO_VALUES"], "[1, 0, 0, 1]");
+        EXPECT_EQ(additionalData["RAIL_NAME"], "VDD");
+        EXPECT_EQ(additionalData["GPIO_LINE"], "2");
+        EXPECT_EQ(additionalData["GPIO_VALUE"], "0");
+    }
+
+    // Test where there are the wrong number of GPIOs (83 instead of 84)
+    {
+        std::vector<int> gpioValues{
+            1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, // MAR01-12
+            1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, // MAR13-24
+            1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, // EN1-12
+            1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, // EN13-24
+            1, 1, 0, 0, 1, 1, 1, 0,             // EN25-32
+            1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, // LGP01-12
+            1, 1, 0, 0,                         // LGP13-16
+            1, 0, 0, 1, 1, 1, 0, 0,             // DMON1-8
+            1, 0, 0                             // GPIO1-4 (1 missing)
+        };
+
+        MockServices services;
+        EXPECT_CALL(services, getGPIOValues("ucd90320"))
+            .Times(1)
+            .WillOnce(Return(gpioValues));
+        EXPECT_CALL(services, logInfoMsg("Device UCD90320 GPIO values: ["
+                                         "1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                                         "1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, "
+                                         "1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                                         "1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, "
+                                         "1, 1, 0, 0, 1, 1, 1, 0, "
+                                         "1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                                         "1, 1, 0, 0, "
+                                         "1, 0, 0, 1, 1, 1, 0, 0, "
+                                         "1, 0, 0]"))
+            .Times(1);
+        EXPECT_CALL(services,
+                    logInfoMsg("Device UCD90320 MFR_STATUS: 0x123456789abc"))
+            .Times(1);
+        EXPECT_CALL(
+            services,
+            logErrorMsg(
+                "Pgood fault found in rail monitored by device UCD90320"))
+            .Times(1);
+        EXPECT_CALL(services, logErrorMsg("Pgood fault detected in rail VDD"))
+            .Times(1);
+        EXPECT_CALL(
+            services,
+            logErrorMsg(
+                "Rail VDD pgood GPIO line offset 2 has inactive value 0"))
+            .Times(1);
+
+        std::vector<std::unique_ptr<Rail>> rails;
+        rails.emplace_back(createRail("VDD", 2));
+        uint8_t bus{3};
+        uint16_t address{0x72};
+        UCD90320Device device{std::move(rails), services, bus, address};
+
+        MockPMBus& pmbus = static_cast<MockPMBus&>(device.getPMBusInterface());
+        EXPECT_CALL(pmbus, getPath(Type::Hwmon))
+            .Times(1)
+            .WillOnce(Return("/tmp"));
+        EXPECT_CALL(pmbus, read("mfr_status", Type::HwmonDeviceDebug, true))
+            .Times(1)
+            .WillOnce(Return(0x123456789abcull));
+
+        // Call findPgoodFault() which calls storeGPIOValues()
+        std::string powerSupplyError{};
+        std::map<std::string, std::string> additionalData{};
+        std::string error = device.findPgoodFault(services, powerSupplyError,
+                                                  additionalData);
+        EXPECT_EQ(error,
+                  "xyz.openbmc_project.Power.Error.PowerSequencerVoltageFault");
+        EXPECT_EQ(additionalData.size(), 6);
+        EXPECT_EQ(additionalData["MFR_STATUS"], "0x123456789abc");
+        EXPECT_EQ(additionalData["DEVICE_NAME"], "UCD90320");
+        EXPECT_EQ(additionalData["GPIO_VALUES"],
+                  "[1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                  "1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, "
+                  "1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                  "1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, "
+                  "1, 1, 0, 0, 1, 1, 1, 0, "
+                  "1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, "
+                  "1, 1, 0, 0, "
+                  "1, 0, 0, 1, 1, 1, 0, 0, "
+                  "1, 0, 0]");
+        EXPECT_EQ(additionalData["RAIL_NAME"], "VDD");
+        EXPECT_EQ(additionalData["GPIO_LINE"], "2");
+        EXPECT_EQ(additionalData["GPIO_VALUE"], "0");
+    }
+}
diff --git a/phosphor-power-sequencer/test/ucd90x_device_tests.cpp b/phosphor-power-sequencer/test/ucd90x_device_tests.cpp
index 2ec8b2e..3ab5369 100644
--- a/phosphor-power-sequencer/test/ucd90x_device_tests.cpp
+++ b/phosphor-power-sequencer/test/ucd90x_device_tests.cpp
@@ -46,7 +46,8 @@
  * @param gpio GPIO line to read to determine the pgood status of the rail
  * @return Rail object
  */
-std::unique_ptr<Rail> createRail(const std::string& name, unsigned int gpioLine)
+static std::unique_ptr<Rail> createRail(const std::string& name,
+                                        unsigned int gpioLine)
 {
     std::optional<std::string> presence{};
     std::optional<uint8_t> page{};
