diff --git a/compatible_system_types_finder.cpp b/compatible_system_types_finder.cpp
new file mode 100644
index 0000000..4306942
--- /dev/null
+++ b/compatible_system_types_finder.cpp
@@ -0,0 +1,87 @@
+/**
+ * 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 "compatible_system_types_finder.hpp"
+
+#include <phosphor-logging/lg2.hpp>
+
+#include <algorithm>
+#include <exception>
+#include <format>
+#include <ranges>
+#include <regex>
+#include <stdexcept>
+#include <utility>
+#include <variant>
+
+namespace phosphor::power::util
+{
+
+const std::string compatibleInterfaceService =
+    "xyz.openbmc_project.EntityManager";
+
+const std::string compatibleInterface =
+    "xyz.openbmc_project.Inventory.Decorator.Compatible";
+
+const std::string namesProperty = "Names";
+
+CompatibleSystemTypesFinder::CompatibleSystemTypesFinder(sdbusplus::bus_t& bus,
+                                                         Callback callback) :
+    callback{std::move(callback)},
+    interfaceFinder{
+        bus, compatibleInterfaceService,
+        std::vector<std::string>{compatibleInterface},
+        std::bind_front(&CompatibleSystemTypesFinder::interfaceFoundCallback,
+                        this)}
+{}
+
+void CompatibleSystemTypesFinder::interfaceFoundCallback(
+    [[maybe_unused]] const std::string& path,
+    [[maybe_unused]] const std::string& interface,
+    const DbusPropertyMap& properties)
+{
+    try
+    {
+        // Get the property containing the list of compatible names
+        auto it = properties.find(namesProperty);
+        if (it == properties.end())
+        {
+            throw std::runtime_error{
+                std::format("{} property not found", namesProperty)};
+        }
+        auto names = std::get<std::vector<std::string>>(it->second);
+        if (!names.empty())
+        {
+            // If all the compatible names are system or chassis types
+            std::regex pattern{"\\.(system|chassis)\\.", std::regex::icase};
+            if (std::ranges::all_of(names, [&pattern](auto&& name) {
+                return std::regex_search(name, pattern);
+            }))
+            {
+                // Call callback with compatible system type names
+                callback(names);
+            }
+        }
+    }
+    catch (const std::exception& e)
+    {
+        lg2::error(
+            "Unable to obtain properties of Compatible interface: {ERROR}",
+            "ERROR", e);
+    }
+}
+
+} // namespace phosphor::power::util
diff --git a/compatible_system_types_finder.hpp b/compatible_system_types_finder.hpp
new file mode 100644
index 0000000..e365679
--- /dev/null
+++ b/compatible_system_types_finder.hpp
@@ -0,0 +1,104 @@
+/**
+ * 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 "dbus_interfaces_finder.hpp"
+#include "utility.hpp"
+
+#include <sdbusplus/bus.hpp>
+
+#include <functional>
+#include <string>
+#include <vector>
+
+namespace phosphor::power::util
+{
+
+/**
+ * @class CompatibleSystemTypesFinder
+ *
+ * Class that finds the compatible system types for the current system.
+ *
+ * The compatible system types are in a list ordered from most to least
+ * specific.
+ *
+ * Example:
+ *   - com.acme.Hardware.Chassis.Model.MegaServer4CPU
+ *   - com.acme.Hardware.Chassis.Model.MegaServer
+ *   - com.acme.Hardware.Chassis.Model.Server
+ *
+ * When a list of compatible system types is found, the callback function
+ * specified in the constructor is called.  This function will be called
+ * multiple times if multiple lists of compatible system types are found.
+ */
+class CompatibleSystemTypesFinder
+{
+  public:
+    // Specify which compiler-generated methods we want
+    CompatibleSystemTypesFinder() = delete;
+    CompatibleSystemTypesFinder(const CompatibleSystemTypesFinder&) = delete;
+    CompatibleSystemTypesFinder(CompatibleSystemTypesFinder&&) = delete;
+    CompatibleSystemTypesFinder&
+        operator=(const CompatibleSystemTypesFinder&) = delete;
+    CompatibleSystemTypesFinder&
+        operator=(CompatibleSystemTypesFinder&&) = delete;
+    ~CompatibleSystemTypesFinder() = default;
+
+    /**
+     * Callback function that is called when a list of compatible system types
+     * is found.
+     *
+     * @param compatibleSystemTypes Compatible system types for the current
+     *                              system ordered from most to least specific
+     */
+    using Callback = std::function<void(
+        const std::vector<std::string>& compatibleSystemTypes)>;
+
+    /**
+     * Constructor.
+     *
+     * @param bus D-Bus bus object
+     * @param callback Callback function that is called each time a list of
+     *                 compatible system types is found
+     */
+    explicit CompatibleSystemTypesFinder(sdbusplus::bus_t& bus,
+                                         Callback callback);
+
+    /**
+     * Callback function that is called when a Compatible interface is found.
+     *
+     * @param path D-Bus object path that implements the interface
+     * @param interface D-Bus interface that was found
+     * @param properties Properties of the D-Bus interface
+     */
+    void interfaceFoundCallback(const std::string& path,
+                                const std::string& interface,
+                                const DbusPropertyMap& properties);
+
+  private:
+    /**
+     * Callback function that is called each time a list of compatible system
+     * types is found.
+     */
+    Callback callback;
+
+    /**
+     * Class used to find instances of the D-Bus Compatible interface.
+     */
+    DBusInterfacesFinder interfaceFinder;
+};
+
+} // namespace phosphor::power::util
diff --git a/meson.build b/meson.build
index bc0f16f..eef72a3 100644
--- a/meson.build
+++ b/meson.build
@@ -154,6 +154,7 @@
     'power',
     error_cpp,
     error_hpp,
+    'compatible_system_types_finder.cpp',
     'dbus_interfaces_finder.cpp',
     'gpio.cpp',
     'pmbus.cpp',
diff --git a/utility.hpp b/utility.hpp
index ad6be99..e721b9b 100644
--- a/utility.hpp
+++ b/utility.hpp
@@ -31,7 +31,8 @@
 using DbusSubtree =
     std::map<DbusPath, std::map<DbusService, DbusInterfaceList>>;
 using DbusVariant =
-    std::variant<bool, uint64_t, std::string, std::vector<uint64_t>>;
+    std::variant<bool, uint64_t, std::string, std::vector<uint64_t>,
+                 std::vector<std::string>>;
 using DbusPropertyMap = std::map<DbusProperty, DbusVariant>;
 /**
  * @brief Get the service name from the mapper for the
