diff --git a/Redfish.md b/Redfish.md
index a7b3445..f2fb141 100644
--- a/Redfish.md
+++ b/Redfish.md
@@ -861,6 +861,8 @@
 - PCIeInterface
   - DeviceType
   - LanesInUse
+  - MaxLanes
+  - MaxPCIeType
   - PCIeType
 - SerialNumber
 - Slot
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index f5c5303..195ec87 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -418,12 +418,14 @@
 {
     const std::string* deviceType = nullptr;
     const std::string* generationInUse = nullptr;
+    const std::string* generationSupported = nullptr;
     const size_t* lanesInUse = nullptr;
+    const size_t* maxLanes = nullptr;
 
     const bool success = sdbusplus::unpackPropertiesNoThrow(
         dbus_utils::UnpackErrorPrinter(), pcieDevProperties, "DeviceType",
-        deviceType, "GenerationInUse", generationInUse, "LanesInUse",
-        lanesInUse);
+        deviceType, "GenerationInUse", generationInUse, "GenerationSupported",
+        generationSupported, "LanesInUse", lanesInUse, "MaxLanes", maxLanes);
 
     if (!success)
     {
@@ -460,12 +462,42 @@
         }
     }
 
+    if (generationSupported != nullptr)
+    {
+        std::optional<pcie_device::PCIeTypes> redfishGenerationSupported =
+            pcie_util::redfishPcieGenerationFromDbus(*generationSupported);
+
+        if (!redfishGenerationSupported)
+        {
+            BMCWEB_LOG_WARNING << "Unknown PCIe Device Generation: "
+                               << *generationSupported;
+        }
+        else
+        {
+            if (*redfishGenerationSupported == pcie_device::PCIeTypes::Invalid)
+            {
+                BMCWEB_LOG_ERROR << "Invalid PCIe Device Generation: "
+                                 << *generationSupported;
+                messages::internalError(asyncResp->res);
+                return;
+            }
+            asyncResp->res.jsonValue["PCIeInterface"]["MaxPCIeType"] =
+                *redfishGenerationSupported;
+        }
+    }
+
     // The default value of LanesInUse is 0, and the field will be
     // left as off if it is a default value.
     if (lanesInUse != nullptr && *lanesInUse != 0)
     {
         asyncResp->res.jsonValue["PCIeInterface"]["LanesInUse"] = *lanesInUse;
     }
+    // The default value of MaxLanes is 0, and the field will be
+    // left as off if it is a default value.
+    if (maxLanes != nullptr && *maxLanes != 0)
+    {
+        asyncResp->res.jsonValue["PCIeInterface"]["MaxLanes"] = *maxLanes;
+    }
 
     asyncResp->res.jsonValue["PCIeFunctions"]["@odata.id"] =
         boost::urls::format(
