mctpreactor: support for AST2700 USB MCTP Reactor Add SoC mapping for AST2700 and AST2750. Add usb root hub positions for the AST2700 and AST2750. Tested: Tested basic mctp over usb with ast2700-evb and ast2750-evb with RootHubPositions: /sys/devices/platform/soc@14000000/14123000.usb Change-Id: I95410416ee1a4a7cb1e40320a26eaa889507f2a8 Signed-off-by: Mayank Metha <mayank.metha@intel.com>
diff --git a/src/mctp/MCTPEndpoint.cpp b/src/mctp/MCTPEndpoint.cpp index 70efb36..8a939b1 100644 --- a/src/mctp/MCTPEndpoint.cpp +++ b/src/mctp/MCTPEndpoint.cpp
@@ -581,11 +581,24 @@ "/sys/devices/platform/ahb/1e6a1000.usb", "/sys/devices/platform/ahb/1e6a3000.usb"}; + // The AST2750 is the AST2700 with the same controller addresses. + static constexpr std::array<std::string_view, 4> ast2700RootHubs = { + "/sys/devices/platform/soc@10000000/12061000.usb", + "/sys/devices/platform/soc@10000000/12063000.usb", + "/sys/devices/platform/soc@14000000/14121000.usb", + "/sys/devices/platform/soc@14000000/14123000.usb", + }; + if (socFamily.find("AST2600") != std::string::npos || socFamily.find("AST2620") != std::string::npos) { return ast2600RootHubs; } + if (socFamily.find("AST2700") != std::string::npos || + socFamily.find("AST2750") != std::string::npos) + { + return ast2700RootHubs; + } return {}; }