facebook / fboss

Facebook Open Switching System Software for controlling network switches.
Other
860 stars 295 forks source link

Problem of connecting transceivers with I2C bus #41

Closed redrattus closed 8 years ago

redrattus commented 8 years ago

Hi,

I am now playing with Wedge and making a simple utility that checks status of transceivers through i2c-dev. To this end, I am using the CP2112 device driver which is supported from kernel v3.19. You can check this at http://lxr.free-electrons.com/source/drivers/hid/hid-cp2112.c?v=3.19. Of course, I am using kernel v3.19.

Then, using I2C-tools I can find devices that connected with I2C bus (i.e., i2c-1). The message is as below: 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- 2a -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- 74 -- 76 --

0x51 for FRU_EEPROM 0x74 for I2C Mux1 0x76 for I2C Mux2

As you might know, to establish the channel connecting to the transceiver#1, you first write a proper value (i.e., 0x02 for the mux1, 0x00 for the mux2) to the control register in I2C Muxes with the i2c_smbus_write_byte() defined in SMBus spec. However, this might not work for me. The transceiver is not presented at I2C bus (i.e., 0x50).

Anyone who tries this?