I2c slave IC control from UEFI

Hello Nvidia Firmware team,

  • we are using OrinNano with custom carrier board with 36.3 L4T.
    we stuck in a situation where in which we wanted to control a i2c-slave(maxim7313 IO expander) device from UEFI,
    we already have a running ticket here for this issue Accessing I2C salve IC in UEFI bootloader - #4 by bharath.gk, but while debugging that we got another doubt w.r.t i2c transmission in UEFI.

writing below points to explain the problem statement.

  • While we were trying to understand the i2c control from uefi to read/write some I2c slave device seeing the transaction signals only in i2c-0 device in oscilloscope, but not seeing any signals in other i2c devices i2c-1, i2c-2 and i2c-3.
  • we wounder how only in i2c-0 signals are coming but not in other i2c buses
  • we are expecting some support here to understand/enable enable the prints to get more debug logs
  • and also please let us know how we can make sure from logs that where the i2c-0 transmission is happening

FYI: we already followed this topic Need Uefi to send commands to an I2C device - #5 by KevinFFF and enabled logs in those files to see any transmission happens- no logs coming from there, helping us to customize for our requirement

Hi bharath.gk,

Which I2C interface you are using for your I2C device (IO-expander)?

Sorry that we can’t support you with the detailed steps for the customization since we don’t have your module and the environment to verify them.

We can analyze the log for the errors, so please provide them for further check.
It seems you’ve referred to some topics about using I2C device in UEFI.

Please share what you’ve done and where you get stuck.
You may also ask your vendor for the UEFI driver of this module.

we are using IO expnader in I2C-1.

In Drivers section we duplicate the existing I2cIoBmssifDxe code for Maxim7313 as in below screenshot.


but inside we are not able to put GUID for maxim7313,
how we can get GUID, and even in case if we have right GUID how we can invoke the drvier function from UEFI flow?

Yes we will ask vendor for UEFI driver.

@KevinFFF do we have any example/suggestion for using the i2c-1 bus for controlling slaves?

Is your current issue about GUID for I2C-1?

yeah we need a GUID to use MAXIM7313 ic 0x20 avaliable in i2c-1

There are examples where we are talking to eeprom over i2c. (edk2-nvidia/Silicon/NVIDIA/Drivers/EepromDxe
/Eeprom.c)
You can write a similar driver for your module.

yeah @KevinFFF ,
Thank you for the reply,
we thought of that trying that too, but we stuck at guid part as in below screenshot. and we connected with the IC vendor also, there is no UEFI driver for that IC.

in driver we need this kind of GUID values for maxim7313 too.

and also its in AutoGen.c, do we get help how we can configure UEFI to generate this GUIDs

do we know how this GUID’s are created?

GUID for Eeprom is defined in the following line:
edk2-nvidia/Silicon/NVIDIA/NVIDIA.dec at r36.3.0-updates · NVIDIA/edk2-nvidia · GitHub

GUID is used to identify clients.
You can generate your own GUID for your MAXIM7313.
You may use uuidgen command to generate it.

yes @KevinFFF , GUID is for EEPROM is defined, similarly we need GUID for Maxim7313 also, can you please provide link for the uuidgen command usage or any examples,
in our case we need guid for i2c-1-> 0x20

one one more thing we observed is the same GUID is compared here with read DeviceGUId

image

You can just run uuidgen to generate a random uuid for your use case.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.