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.

SN65DSI86: How to modify the specified register of OLED Panel through i2c over aux

Part Number: SN65DSI86

Hi Ti,

We need to use sn65dsi86 and modify the 0x0320 and 0x0321 registers of OLED Panel through aux to control the brightness.

Which register of sn65dsi86 can control the 0x0320 and 0x0321 registers of Panel?

  • Hi,

    This example will read 16-bytes from sink’s DPCD registers 0x00320.

    <aardvark>
    <configure i2c="1" spi="1" gpio="0" tpower="1" pullups="0" />
    <i2c_bitrate khz="100" />
    ======Clear Status Registers for AUX Request======

    <i2c_write addr="0x2D" count="1" radix="16">F4 FF</i2c_write> />
    ======Send AUX Request for 16 bytes from DPCD 0x00320 ======
    ===========DPCD Address is 0x000320 ======
    <i2c_write addr="0x2D" count="1" radix="16">74 00 </i2c_write> />
    <i2c_write addr="0x2D" count="1" radix="16">75 03 </i2c_write> />
    <i2c_write addr="0x2D" count="1" radix="16">76 20 </i2c_write> />
    ===========Number of Bytes to Read is 16 ======
    <i2c_write addr="0x2D" count="1" radix="16">77 10 </i2c_write> />
    ===========Send AUX Read Request ======
    <i2c_write addr="0x2D" count="1" radix="16">78 91 </i2c_write> <sleep ms="20" />
    ======Read Status of AUX Request======
    ======Make sure SEND_INT is set and no errors======
    <i2c_write addr="0x2D" count="0" radix="16">F4</i2c_write> />
    <i2c_read addr="0x2D" count="1" radix="16">00</i2c_read> />
    ======Clear Status Registers for AUX Request======
    <i2c_write addr="0x2D" count="1" radix="16">F4 FF</i2c_write> />
    ======Read 16 bytes from AUX_RDATA======
    <i2c_write addr="0x2D" count="0" radix="16">79</i2c_write> />
    <i2c_read addr="0x2D" count="16" radix="16">00</i2c_read> />


    </aardvark>

    Thanks

    David

  • Hi David,

    This answer is very helpful to me!

    1. According to the code you gave, and I don't understand the code very well,
    <i2c_write addr="0x2D" count="0" radix="16">F4</i2c_write> />,
    Is 0x0 written to the 0xF4 address?

    2. Through the use of tuning tool, I used the following code to bringup the LCD panel on the quelcoom platform. If I need to get the value 0x0320, is it OK to write the new code that gets 0x0320 after the old code? 

    //bringup the panel, old code
    edp_write_reg(0x09,0x00);
    edp_write_reg(0x0A,0x06);
    edp_write_reg(0x0D,0x00);
    edp_write_reg(0x10,0x80);
    edp_write_reg(0x11,0x00);
    edp_write_reg(0x12,0x2a);
    edp_write_reg(0x13,0x2a);
    edp_write_reg(0x20,0x00);
    edp_write_reg(0x21,0x05);
    edp_write_reg(0x22,0x00);
    edp_write_reg(0x23,0x05);
    edp_write_reg(0x24,0x40);
    edp_write_reg(0x25,0x06);
    edp_write_reg(0x2C,0x20);
    edp_write_reg(0x2D,0x80);
    edp_write_reg(0x30,0x06);
    edp_write_reg(0x31,0x80);
    edp_write_reg(0x34,0x50);
    edp_write_reg(0x36,0x25);
    edp_write_reg(0x38,0x30);
    edp_write_reg(0x3A,0x03);
    edp_write_reg(0x3C,0x00);//normal
    edp_write_reg(0x3D,0x00);
    edp_write_reg(0x3E,0x00);
    edp_write_reg(0x5B,0x00);
    edp_write_reg(0x93,0x3e);//30
    edp_write_reg(0x94,0x80);
    mdelay(20);
    // edp_write_reg(0x3C,0x10);//test
    edp_write_reg(0x5C,0x01);//rm hpd
    edp_write_reg(0x5A,0x05);
    edp_write_reg(0x0d,0x01);
    mdelay(20);
    edp_write_reg(0x64,0x01);
    edp_write_reg(0x74,0x00);
    edp_write_reg(0x75,0x01);
    edp_write_reg(0x76,0x0A);
    edp_write_reg(0x77,0x01);
    edp_write_reg(0x78,0x81);
    edp_write_reg(0x96,0x01);
    edp_write_reg(0x5A,0x0D);

    /*create code to get the value of 0x0320*/
    edp_write_reg(0xF4,0xFF);
    edp_write_reg(0x74,0x00);
    edp_write_reg(0x75,0x03);
    edp_write_reg(0x76,0x20);
    edp_write_reg(0x77,0x10);
    edp_write_reg(0x78,0x91);
    mdelay(20);
    edp_write_reg(0xF4,0x00); //this right??
    edp_read_reg(0x00); //read data
    edp_write_reg(0xF4,0xFF);
    edp_write_reg(0x79,0x00); //this right??
    edp_write_reg(0x00,0x00); //this right??
    edp_read_reg(((0x0320&0xff00) >> 8)); //read 0x0320 LSB
    edp_read_reg((0x0320&0xff)); //read 0x0320 MSB

  • In addition to reading the value 0x0320, we want to write this register, which is used to change the OLED panel brightness via aux.
    How to configure the register of sn65dsi86 to write to register 0x0320 of OLED panel?

  • Hi,

    <i2c_write addr="0x2D" count="1" radix="16">F4 FF</i2c_write> />

    This command write a value of 0xFF to register 0xF4

    <i2c_write addr="0x2D" count="0" radix="16">F4</i2c_write> />
    <i2c_read addr="0x2D" count="1" radix="16">00</i2c_read> />

    This command reads 1 byte data from register 0xF4

    2. Through the use of tuning tool, I used the following code to bringup the LCD panel on the quelcoom platform. If I need to get the value 0x0320, is it OK to write the new code that gets 0x0320 after the old code? 

    Yes

    Below is an example of DCPD write

    This example will write a 0x01 to the Sink’s DPCD 0x0010A register.
    <aardvark>

    <configure i2c="1" spi="1" gpio="0" tpower="1" pullups="0" />
    <i2c_bitrate khz="100" />
    ======Clear Status Registers for AUX Write Request======
    <i2c_write addr="0x2D" count="1" radix="16">F4 FF</i2c_write> />
    ======Write DPCD Register 0x0010A in Sink to Enable ASSR======
    ===========Data to Write is 0x01. ======
    <i2c_write addr="0x2D" count="1" radix="16">64 01</i2c_write> />
    ===========DPCD Register is 0x0010A. ======
    <i2c_write addr="0x2D" count="1" radix="16">74 00</i2c_write> />
    <i2c_write addr="0x2D" count="1" radix="16">75 01</i2c_write> />
    <i2c_write addr="0x2D" count="1" radix="16">76 0A</i2c_write> />
    ===========Number of Bytes to Write is 1 ======
    <i2c_write addr="0x2D" count="1" radix="16">77 01</i2c_write> />
    ===========Send AUX Write Request ======
    <i2c_write addr="0x2D" count="1" radix="16">78 81</i2c_write> <sleep ms="10" />
    ======Read Status of AUX Request======
    ======Make sure SEND_INT is set and no errors======
    <i2c_write addr="0x2D" count="0" radix="16">F4</i2c_write> />

    <i2c_read addr="0x2D" count="1" radix="16">00</i2c_read> />
    ======Clear Status Registers for AUX Request======
    <i2c_write addr="0x2D" count="1" radix="16">F4 FF</i2c_write> />

    </aardvark>

    I also thought the majority of DPCD Addresses 00701h through 0074Fh are assigned to backlight control. EDP_BACKLIGHT_BRIGHTNESS_MSB/LSB registers are DPCD Addresses 00722h and 00723h, respectively, why are you using 0x00320?

    Thanks
    David

  • Hi David,

    1. I will try your code, thank you!

    2. why are you using 0x00320?

    >> We used the OLED panel of Samsung, and the datasheet prompt 0x0320 is the brightness control for AMD, 0x0354 is the brightness control for inter. I checked the source code of inter and AMD. Is to write brightness values for 0x0320 and 0x0354.

    3. I also thought the majority of DPCD Addresses 00701h through 0074Fh are assigned to backlight control. EDP_BACKLIGHT_BRIGHTNESS_MSB/LSB registers are DPCD Addresses 00722h and 00723h

    >> Use 00701h to 0074Fh address to control the brightness. Is it the universal packet address of DPCD? Is there a packet interpretation file for DPCD

  • Hi David,

    <i2c_write addr="0x2D" count="0" radix="16">F4</i2c_write> />
    <i2c_read addr="0x2D" count="1" radix="16">00</i2c_read> />

    This command reads 1 byte data from register 0xF4

    Why do I need to read the F4 address? Does it do anything?

  • Hi David,

    I want to write 0x4076 to the address 0x320
    I successfully wrote 0x40 using i2c_over_aux_set_backlight and read 0x40 using i2c_over_aux_get_backlight
    How do I need to write 0x4076 to 0x320?

    void i2c_over_aux_set_backlight(int level)
    {
    edp_write_reg(0xF4, 0xFF);
    edp_write_reg(0x64,0x40);
    edp_write_reg(0x74, 0x00);
    edp_write_reg(0x75, 0x03);
    edp_write_reg(0x76, 0x20);
    edp_write_reg(0x77, 0x02);
    edp_write_reg(0x78, 0x81);
    mdelay(10);
    pr_info("%s, ret[0xF4]=%X\n", __func__, edp_read_reg(0xF4));
    edp_write_reg(0xF4, 0xFF);
    }

    void i2c_over_aux_get_backlight()
    {
    edp_write_reg(0xF4, 0xFF);
    edp_write_reg(0x74, 0x00);
    edp_write_reg(0x75, 0x03);
    edp_write_reg(0x76, 0x20);
    edp_write_reg(0x77, 0x10);
    edp_write_reg(0x78, 0x91);
    mdelay(20);
    pr_info("%s, ret[0xF4]=%X\n", __func__, edp_read_reg(0xF4));
    edp_write_reg(0xF4, 0xFF);

    pr_err("%s, ret[0x79] = %X\n", __func__, edp_read_reg(0x79));
    }

  • Hi,

    Register 0xF4 is a status register. You can use it to check if the AUX read/write request is successful or not.

    If 0x00320 is the DPCD register, then I don't see how you can write a value of 0x4076 to it since the register is only is 8bits. Are you suppose to write 0x76 to register 0x00321?

    Thanks

    David

  • Hi David,

    1. Write 0x4076 to register 0x0320. 03h is LSB and 20h is MSB. I need to write 0x40 to LSB and 0x76 to MSB. How to configure registers?


    2.EDP_BACKLIGHT_BRIGHTNESS_MSB/LSB registers are DPCD Addresses 00722h and 00723h, Are these DPCD addresses common registers? How do I need to write 0x40 to MSB and 0x76 to LSB?


    3. How to configure the register to read the value of EDP_BACKLIGHT_BRIGHTNESS_MSB/LSB?

  • Hello, Chen,

    I will be filling in for David for the rest of the week. I am reviewing the conversation to get background and will respond to your questions as best I can once I understand the context.

    Thanks,

    Zach