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.

kernel: change LCD control from i2c 0 to i2c 2

Other Parts Discussed in Thread: DA8XX, TMDXEVM3358, TLC59108

Hi guys, I have a hardware based on am335x. Originaly, the backlight (on/off) and other configuration commands are send to display board by i2c 0 bus. The driver implemented in drivers/video/da-8xx-fb.c read/write in an DMA area as shows:

static inline void lcdc_write(unsigned int val, unsigned int addr)
{
        writel(val, da8xx_fb_reg_base + (addr));

}

The da8xx_fb_reg_base is getting from a function inside the same archive, but I cannot find how to change da8xx_fb_reg_base to read/write in i2c 2 instead i2c 0.

any idea? thanks in advanced.

  • Hi Daniel,

    Please elaborate further what are you trying to do. I'm afraid I'm not able to understand you completely. The da8xx-fb driver isn't related to the I2C interface in any way.

    Also, which version of the Sitara SDK are you using?

    Best regards,
    Miroslav

  • Sorry Miroslav. The AM335x Evaluation Module (ACTIVE) TMDXEVM3358 has display connected via i2c-0 bus to control backlight on/off, display orientation, etc.

    note: it isn't  about pinmux and display databus. That is connected right.

    My hardware has this control connected to i2c-2. I am try to change this in kernel. The driver da8xx-fb was only the path that I took to change the configuration  of display control bus from i2c-0 to i2c-2.

    the software package revision is: ti-sdk-am335x-evm-06.00.00.00

  • The lcdc driver (drivers/video/da8xx-fb.c) for basic lcd panels doesn't use i2c.  Are you referring to the lcdc/hdmi transmitter driver (drivers/video/da8xx-tda998x-hdmi.c)?

  • Hello Jelliott, I found in the file board-am335xevm.c the structs:

    static struct i2c_board_info am335x_i2c1_boardinfo[] 

    static struct i2c_board_info am335x_i2c2_boardinfo[] 

    The functions 

    static void i2c1_init(int evm_id, int profile)

    static void i2c2_init(int evm_id, int profile)

    and the place where they are called.. in my case:

    static struct evm_dev_cfg ind_auto_mtrl_evm_dev_cfg[]

    I changed 

     {
            I2C_BOARD_INFO("tlc59108", 0x70), //0x40
     },

    from am335x_i2c1_boardinfo to am335x_i2c2_boardinfo

    I'm still working on. Maybe we have an hardware problem.

  • The modifications described above in file: board-am335xevm.c, resolved my problem.

    every thing is ok.

    df.