Configuring device with I2C mux

James Feist james.feist at linux.intel.com
Thu Jan 9 05:02:29 AEDT 2020


On 1/8/20 9:54 AM, Alex Qiu wrote:
> Hi James,
> 
> Yes, we have multiple devices sitting behind the mux, and they're 
> onboard devices instead of standalone FRUs. The parent bus is described 
> as the FRU for each PCIe card.
> 
> After naming the mux channels, can these names be used somehow to config 
> I2C devices? For example, {"Bus": "$bus", "ChannelNames": 
> ["C0", "C1", "C2", "C3"]} for the mux, and {"Bus": "$bus.C1"} for 
> devices behind the mux on channel 1.

This syntax doesn't exist today.. On all our systems things behind the 
mux are again detectable, so we haven't hit this problem. Right now the 
template replacement is purely based on the found device on d-bus. So 
$bus is the bus property from the xyz.openbmc_project.FruDevice 
interface, there's no way to trace that to a mux channel, as it's just a 
d-bus property.

The code you're looking for is here: 
https://github.com/openbmc/entity-manager/blob/01542d2af1b1f45335cc8813fffcd3ed07f22989/src/Utils.cpp#L144 


Along with the channel identification logic here: 
https://github.com/openbmc/entity-manager/blob/01542d2af1b1f45335cc8813fffcd3ed07f22989/src/Overlay.cpp#L112

You could probably add some special syntax to make this work. Luckily 
this is the one part of entity-manager that is unit-tested, so that 
should help you 
https://github.com/openbmc/entity-manager/blob/master/test/test_entity-manager.cpp


-James






More information about the openbmc mailing list