This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BEAGLEBK: I2C Driver and Bus Recovery

Part Number: BEAGLEBK

Hello,

I am working on optimising a system which employs a Beaglebone Black and a number of slaves connected via I2C. 

I was having some problems with slaves rarely (once every 24 hours or so) holding onto the I2C lines, causing the entire board to crash. I believe this can be overcome by a better linux I2C driver, which properly implements the I2C standard's recovery protocol (toggling CLK a number of times to get the slave to release the line). 

To fix this this I have upgraded from the board's initial Debian 8/Linux 3.16 system to Debian 10/Linux 4.19, (provided here) hoping that the later version would have a better implementation of the I2C driver. I have been running this for a few hours now, and have yet to see a crash.

However, ideally I want to ensure that the recovery function is implemented correctly, so I've spent a lot of time reading manuals/forums (so far to no avail) to figure out where this particular driver is located. In the related thread on this forum (here), and in a number of other places, people were pointed to /i2c/busses/i2c-omap.c, however I cannot find this file anywhere (on either the standard Debian 8 OS, or Debian 10). 

Would somebody be able to tell me A) Where I can find the main I2C driver? (I previously found some guidance, but not the answer, here) and B) Whether Linux 4.19 should have an effective I2C recovery implementation (better than that in Linux 3.16). I suspect that it does based on updates such as this

Thank you

  • Hello,

    This forum support AM335x TI PSDK Linux (latest version is 6.00, kernel 4.19.38), link below.

    If you can switch to this Linux (Arago Linux), we can be in better help.

    Regarding Debian Linux, it is supported by  BeagleBone Black Support Community:


    For Arago Linux, I2C driver is located at:

    linux-4.19.38/drivers/i2c/busses/i2c-omap.c

    I can find we have the below known issue for Arago Linux AM335x I2C:

    LCPD-14855 - omap_i2c_prepare_recovery() function can Lock System

     


    Check also below wiki:

    Regards,
    Pavel

  • Dear Pavel, 

    Thank you for your swift reply and for clarifying those points.

    I will investigate the installation of  Arago Linux today as you suggest. In the meantime I have a couple of questions about the other links you posted:

    a) In your link to the Processor SDK LInux Documentation the problem you are referring to ( LCPD-14855) has a patch in the E2E community thread you posted. Am I to assume this patch exists (as outlined in that thread), but has not been included in the latest version of your SDK?

    b) If the answer to (a) is that this patch isn't included in PSDK 6.0, Kernel 4.19.38, then when will an updated SDK be released that includes this patch?

    Thanks again

  • H S1 said:
    a) In your link to the Processor SDK LInux Documentation the problem you are referring to ( LCPD-14855) has a patch in the E2E community thread you posted. Am I to assume this patch exists (as outlined in that thread), but has not been included in the latest version of your SDK?

    In latest AM335x PSDK Linux v6.00 (kernel v4.19.38), the below patches are NOT included:

    H S1 said:
    b) If the answer to (a) is that this patch isn't included in PSDK 6.0, Kernel 4.19.38, then when will an updated SDK be released that includes this patch?

    I am not aware of the PSDK roadmap, thus I can say that probably these patches will be included in the next PSDK Linux v6.01.

    Regards,
    Pavel