I'm working on a carrier board for the MX8M Series and need to know the I2C addresses already reserved for RTC, EEPROM and Secure Authenticator. I guess they are on I2C_D. Any other I2C devices on the module?
I2C Addresses on Module
-
-
The i.MX8MP CPU offers enough dedicated I2C ports that we could use an own port for all internal I2C handling. This means all four I2C ports that are available on the B2B connector can be used freely and are not shared with other I2C devices.
Your F&S Support Team
-
Ok, but this is not the answer on my question. The module contains an RTC and EEPROM on a I2C bus. On what I2C bus and on what addresses?
We only have two I2C available as I2C_A is used for the second CAN bus and I2C_B is used for the MIPI-CSI.
-
Actually it is the answer, but maybe it was too short.
The i.MX8MP CPU provides six hardware I2C devices. So we use four of them for the external ports, and the fifth and sixth are used as internal I2C buses. So yes, there are such I2C devices like RTC and EEPROM on the module, but you do not see them on any I2C bus that is available and visible from the outside. All four external buses are completely empty. So if you use I2C_C and I2C_D, you will only have those devices that you connect yourself.
This is different to the PicoCoreMX8MM and PicoCoreMX8MN. There the CPU only provides four hardware I2C devices. We need two ports internally, but for slow devices we can use a bit-banging I2C. This leaves three dedicated I2C ports for the outside. And to be able to provide a fourth I2C port, we make one of the internal buses (the bit-banging one) also available as I2C_D. This is why you will see internal devices on I2C_D there. But this is not the case with PicoCoreMX8MP. There you will see no internal devices from the outside as they are on two additional, completely separate I2C buses.
Your F&S Support Team
-
Thanks for explanation! What are the RTC and EEPROM I2C addresses and how can I use it?
-
You just use the device behind it. All I2C handling is done automatically.
For example the RTC is available as /dev/rtc and you'll access it as always with the hwclock command line tool. The RTC value is automatically read when Linux boots, so the time will be loaded without having to do anything. You just have to set the RTC once. Maybe there is more than one rtc device visible in /dev (e.g. the CPU-internal RTC). So the best way to set the time is:
EEPROM is a hardware option. So it may not be available on your device. But if it is, then it is using the regular way of Linux. As far as I remember, this is some sysfs file for reading/writing the data.
Your F&S Support Team