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.

DRA726: TI-RTOS question

Part Number: DRA726

I am working on TI-RTOS support for our analog cameras.

The I2C port used is I2C6.

There are some definitions missing since TI official code doesn't support it.

We've had no issue so far on Linux since we do not use uart7

On a new design we will change to something else but that isn't going to happen until later next year.

In tda2xx/cslr_soc_defines.h how do I set CSL_INTC_EVENTID_I2CINT5

It is used in drivers/pdk_01_08_01_06/packages/ti/drv/vps/src/boards/src/bsp_boardTda2xx.c

#ifndef BSP_DISABLE_I2C5
    {
        BSP_DEVICE_I2C_INST_ID_5,           /* instId */
        SOC_I2C6_BASE,                      /* baseAddr */
        CSL_INTC_EVENTID_I2CINT6,           /* intNum */
        400U                                /* busClkKHz */
    }
#endif

Michel Catudal

ACTIA Corp

  • Hi Michel,

    CSL_INTC_EVENTID_I2CINT5 is the interrupt number or IRQ number.

    Please refer to TRM Chapter 17 for details how to map interrupt.

    From Table 17-4, you can find the default IPU1 IRQ mapping for I2C1/2/3/4 as IRQ 41/42/43/44.

    I2C5/6 are not mapped to any IRQ by default.

    You just need to pick a free one to map it, i.e. IRQ 48/49.

    You then have to configure IRQ_CROSSBAR register accordingly to route I2C interrupt to the mapped IPU1 IRQ.

    Regards,
    Stanley

     

  • Stanley,

    Thank you, I was confused as I didn't see any mention of the IPU1 IRQ for I2C6 in the user manual.

    There are a few defines that are missing in csl section. There are a few defines but most of them are missing.

    One of the C file has a part to enable I2C5, I probably have to do something similar for I2C6. Since it shares clock with another I2C which I believe is used by the PMIC, what is the best way to no mess that I2C port up. Since the clock is enabled in u-boot I shouldn't have to touch the clock, is that right?

    In Linux I had to add code in the kernel to enable I2C6 since an addition in the devicetree was not good enough.

    It took a bit to figure out how to get I2C6 to work on Linux.

    Michel Catudal

    ACTIA Corp

  • It should be similar change as you have done for I2C6.

    The clock will be enabled on Linux side and make sure it is not disabled by Linux.