We should not define the I2C devices of the RTM card in the AFC I2C mapping table, otherwise it will be necessary to generate a new port for every combination of AFC and RTM cards.
One way to solve this is to create different i2c_chip_mapping_t arrays and reserve chip_id numbers between 0 and 63 to AFC devices and between 64 and 127 to the RTM devices. > 128 should be reserved for now (we could use them for the FMC cards in the future).
We should not define the I2C devices of the RTM card in the AFC I2C mapping table, otherwise it will be necessary to generate a new port for every combination of AFC and RTM cards.
One way to solve this is to create different
i2c_chip_mapping_t
arrays and reservechip_id
numbers between 0 and 63 to AFC devices and between 64 and 127 to the RTM devices. > 128 should be reserved for now (we could use them for the FMC cards in the future).I2C mapping table of the AFCv3.1: https://github.com/lnls-dig/openMMC/blob/7a91948975f87f6613b28fc1ea562a2a7bb3c475/port/board/afc-v3/i2c_mapping.c#L20-L55
Function responsible for getting the I2C device bus and address: https://github.com/lnls-dig/openMMC/blob/7a91948975f87f6613b28fc1ea562a2a7bb3c475/modules/i2c.c#L86-L98