<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Hello,

BMC has information in the device tree about which I2C bus goes to which
PCIe slot. I would like the host to get this information from the BMC firmware by sending a IPMI OEM command.<br></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">How I want to do this:
(for example in arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts file, I want to add an extra attribute "slot" for each I2C bus, which indicates which i2c bus goes to which PCIe slot )
&i2c2 {
status = "okay";

/* 0: PCIe Slot 2,
*    Slot 3,
*    Slot 6,
*    Slot 7
*/
<a href="https://lists.ozlabs.org/listinfo/openbmc" target="_blank">i2c-switch at 74</a> {
compatible = "nxp,pca9546";
reg = <0x74>;
#address-cells = <1>;
#size-cells = <0>;
i2c-mux-idle-disconnect;  /* may use <a href="https://lists.ozlabs.org/listinfo/openbmc" target="_blank">mux at 77</a> next. */

i2c_pcie2: <a href="https://lists.ozlabs.org/listinfo/openbmc" target="_blank">i2c at 0</a> {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">----->slot = "PE2";<-----</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><pre style="white-space:pre-wrap">};</pre>
i2c_pcie3: <a href="https://lists.ozlabs.org/listinfo/openbmc" target="_blank">i2c at 1</a> {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><pre style="white-space:pre-wrap">----->slot = "PE2";<-----</pre>};

}

Whenever the host sends the IPMI OEM command to get the I2C bus/PCIe slot
mapping info, the BMC can parse through all the i2c devices under /sys/bus/i2c/ and find all the i2c devices which have a property called slot under of_node. The BMC firmware can then send the I2C bus number and the slot name for all the i2c devices found above, as part of the IPMI command response.

Does anyone have any ideas/suggestions about this ?</pre></div>