You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can scan the I2c-10 SMbus slave address 0x50 from the SpdRead code in the UEFI shell to have a slave device. Methods as below:
UINT32 FindSmBusDev()
{
...
Addr = 0x80000000;
for(Bus = 0x00; Bus < 0xFF; Bus++) {
for(Dev = 0x00; Dev <= 0x1F; Dev++) {
for(Fun = 0x00; Fun <= 0x07; Fun++) {
Addr &= 0xFF000000;//clean the address
Addr |= ((Bus << 16) | (Dev << 11) | (Fun << 8));//set the pci bus dev and fun IoWrite32(PCI_INDEX_IO_PORT, Addr);
if(IoRead32(PCI_DATA_IO_PORT) != 0xFFFFFFFF) {
Addr = Addr + 0x08;//read class code
IoWrite32(PCI_INDEX_IO_PORT, Addr);
if (IoRead32(PCI_DATA_IO_PORT) >> 16 == 0x0C05)//it's Smbus class code
{
return Addr - 0x08;
}
}
}
}
}
return Addr;
}
My question is:
How to switch to I2c-0 bus under UEFI to perform I2C IO operation on the slave device of Synopsys I2C controller?
Any suggestion is greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
My platform information is as follows:
Minnowboard Max.
I use i2cdetect under Linux to detect multiple I2c buses, such as:
I can scan the I2c-10 SMbus slave address 0x50 from the SpdRead code in the UEFI shell to have a slave device. Methods as below:
My question is:
How to switch to I2c-0 bus under UEFI to perform I2C IO operation on the slave device of Synopsys I2C controller?
Any suggestion is greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions