SN65DSI86: The DP display can't output normally

Part Number: SN65DSI86
Other Parts Discussed in Thread: TEST2

Hi TI experts:

We recently debug the DP display with SN65DSI86, but there was some error when enable the chip:
1. The edid of the display is:

                                 EDID: 00000000: 00 ff ff ff ff ff ff 00 10 ac c4 a1 42 4d 34 39
[    7.666303][   T11] EDID: 00000010: 19 20 01 04 a5 35 1e 78 3a 56 25 ab 53 4f 9d 25
[    7.666310][   T11] EDID: 00000020: 10 50 54 a5 4b 00 71 4f 81 80 a9 c0 d1 c0 81 c0
[    7.666316][   T11] EDID: 00000030: 81 cf 01 01 01 01 02 3a 80 18 71 38 2d 40 58 2c
[    7.666322][   T11] EDID: 00000040: 45 00 0f 28 21 00 00 1e 00 00 00 ff 00 4a 44 43
[    7.666328][   T11] EDID: 00000050: 30 46 51 33 0a 20 20 20 20 20 00 00 00 fc 00 44
[    7.666335][   T11] EDID: 00000060: 45 4c 4c 20 50 32 34 32 32 48 0a 20 00 00 00 fd
[    7.666341][   T11] EDID: 00000070: 00 38 4c 1e 53 11 01 0a 20 20 20 20 20 20 00 4f

When debug this with SN65DSI86 kernel driver, the SN65DSI86 chip reports some error, the i2c registers are dumped here:
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 36 38 49 53 44 20 20 20 02 00 83 00 00 01 00 00 68ISD ?.?..?..
10: 26 00 4c 4c 00 00 00 00 00 00 00 00 00 00 00 00 &.LL............
20: 80 07 00 00 38 04 00 00 00 00 00 00 2c 00 00 00 ??..8?......,...
30: 05 00 00 00 94 00 24 00 58 00 04 00 00 00 00 00 ?...?.$.X.?.....
40: 1d 67 00 00 80 00 98 08 65 04 c0 00 29 00 2c 00 ?g..?.??e??.).,.
50: 05 00 80 07 38 04 20 00 40 e4 0d 00 10 00 f0 00 ?.??8? .@??.?.?.
60: a0 60 a4 00 20 06 06 06 00 00 00 00 00 00 00 00 ?`?. ???........
70: 00 00 00 00 00 01 02 01 80 01 77 00 00 00 00 00 .....?????w.....
80: 00 00 00 00 00 00 00 00 00 1f 7c f0 c1 07 1f 7c .........?|????|
90: f0 c1 07 34 22 10 01 04 01 00 00 00 00 00 00 00 ???4"????.......
a0: 01 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 ?...............
b0: 04 78 ac ac 08 6c 9c 9c 0c 5c 5c 5c 0c 0c 0c 0c ?x???l???\\\????
c0: 3f 3f 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 ???.............
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 03 00 00 21 23 40 00 03 00 00 00 00 00 00 00 .?..!#@.?.......


Could you give me some help on this? Thank you !

Another question is we don't have a refclk, the refclk is connected to GND, if we can test color bar with this design?

Best regards
Snow

  •  Hi Snow,

    Please check the initialization sequence shared in the datasheet and whether it matches the sequence used in this system. 0xF0 - 0xF8 are error checking registers, and it shows ECC errors, and loss of sync in this register readout. Are these registers cleared at the start, and showing these errors during runtime?

    Please clear the registers and check which errors are reported in these registers.

    In this system since REFCLK is not used, DPHY HS clock is used. Is the input DSI clock in HS state continuously? 

    Test pattern can also be used with the DSI clock as input instead of the REFCLK. To generate the register settings and enable over I2C, you can use the calculator tool here: [FAQ] SN65DSI86: How do I programming the SN65DSI86 registers?

    Could you also give us some information about your system, such as whether this is a custom board and how the SoC/source is connected to the device?

    Best regards,
    Ikram

  • Hi Ikram

    Thank you for your help, I have already reset the SN65DSI86  chip and got these errors. Also I found a strange problem, the 0x12  register can't be set to the correct value, since the display mode we use is 1080p, the value of 0x12 we have set it to 0x58 using the command:

    i2cset -f -y 4 0x2c 0x12 0x58

    But after set this register, we read it again, the value of this register was still 0x4c, and I don't know why?
    We use imx8mp mipi dsi, the connection is as following:


    The test script I used as following:
    ```
    # ======REFCLK Frequency: Use DSI clk  ======
    i2cset -f -y 4 0x2c 0x0A 0x03

    # ======DSI Mode  ======
    i2cset -f -y 4 0x2c 0x10 0x26

    # =====DSIA Clock  ======
    i2cset -f -y 4 0x2c 0x12 0x59

    # =====DSIB Clock  ======
    i2cset -f -y 4 0x2c 0x13 0x59

    # ======DP Datarate  ======
    i2cset -f -y 4 0x2c 0x94 0x20

    # ======Enable PLL  ======
    i2cset -f -y 4 0x2c 0x0D 0x01

    # ======Enable ASSR in Panel  ======
    i2cset -f -y 4 0x2c 0x64 0x01
    i2ctransfer -f -y 4 w6@0x2c 0x74 0x00 0x01 0x0A 0x01 0x81
    sleep 0.01

    # ======Enable enhanced frame  in DSI86  ======
    i2cset -f -y 4 0x2c 0x5A 0x04

    # ======Number of DP lanes  ======
    i2cset -f -y 4 0x2c 0x93 0x30

    # ======Start Semi-Auto Link Training  ======
    i2cset -f -y 4 0x2c 0x96 0x0A
    sleep 0.02

    # ======CHA Active Line Length  ======
    i2cset -f -y 4 0x2c 0x20 0x0780 w

    # ======CHB Active Line Length  ======
    i2cset -f -y 4 0x2c 0x22 0x0000 w

    # ======Vertical Active Size   ======
    i2cset -f -y 4 0x2c 0x24 0x0438 w

    # ======Horizontal Pulse Width   ======
    i2cset -f -y 4 0x2c 0x2C 0x002C w

    # ======Vertical Pulse Width   ======
    i2cset -f -y 4 0x2c 0x30 0x0005 w

    # ======HBP   ======
    i2cset -f -y 4 0x2c 0x34 0x94

    # ======VBP   ======
    i2cset -f -y 4 0x2c 0x36 0x24

    # ===== HFP  ======
    i2cset -f -y 4 0x2c 0x38 0x58

    # ===== VFP  ======
    i2cset -f -y 4 0x2c 0x3A 0x04

    # ===== DP-18BPP Disable  ======
    i2cset -f -y 4 0x2c 0x5B 0x00

    # ===== Color Bar Enable  ======
    i2cset -f -y 4 0x2c 0x3C 0x13

    # ===== Enhanced Frame, and Vstream Enable  ======
    i2cset -f -y 4 0x2c 0x5A 0x0D
    ```
    Also I saw a description in the datasheet:
    In this example, the clock source for the SN65DSI86 is the REFCLK pin. When using the REFCLK as the clock source, any DSI Clock frequency is supported. But if the clock source was instead the DSI A clock, then the required DSI Clock frequency would need to change to a frequency supported by the SN65DSI86. When operating in this mode, any one of the following DSI A clock frequencies can be used: 384 MHz, 416 MHz, 460.8 MHz, 468 MHz, or 486 MHz. In most cases, a eDP panel would support some variation from the ideal pixel clock frequency.

    Does this means if we don't use the refclk, the DSI clock must exactly match the options of: 384 MHz, 416 MHz, 460.8 MHz, 468 MHz, or 486 MHz?



    Thank you very much!
    Snow 
    Best regards

      

  • Hi Snow, thank you for sharing the details about this. Please give me 2 days to check and get back to you.

    Best regards,
    Ikram

  • Hi Ikram

    As we discussed before, we will use this bridge connect to the full DisplayPort monitor, But  as the datasheet described, this bridge is used for eDP, so is there will some issue when we use this bridge for full DisplayPort monitor?

    Snow 
    Best regards

     

  • Hi Snow,

    To use this device with DP instead of eDP, please use the settings shared in this previous E2E: SN65DSI86: Using the Bridge as DSI to DisplayPort (not eDP)

    Best regards,
    Ikram

  • Hi Ikram

    Thank you for you information, I saw there is SCRAMBLE_DISABLE bit in register 0x95, I want to know what is the relationship with the ASSR_CONTROL in register 0x5A?

    If I set SCRAMBLE_DISABLE to 1, does that mean the bridge disables both the Standard DP Scrambler Seed and the Alternative Scrambler Seed Reset (ASSR)?

    Snow 
    Best regards
  • Hi Snow,

    You can see on register 0x5A that there are options. Setting the bits 1:0 to 0 will select  Standard DP Scrambler Seed instead of ASSR. This is done because most DP monitors do not support ASSR.

    If you do the register writes and hardware settings mentioned in the E2E thread, it should help to set up this device with DP configuration.

    Best regards,
    Ikram

  • Hi Ikram

    Got it, I check the sn65dsi86 driver in https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/gpu/drm/bridge/ti-sn65dsi86.c
    There are some codes related to the ASSR:

    /*
    	 * The SN65DSI86 only supports ASSR Display Authentication method and
    	 * this method is enabled for eDP panels. An eDP panel must support this
    	 * authentication method. We need to enable this method in the eDP panel
    	 * at DisplayPort address 0x0010A prior to link training.
    	 *
    	 * As only ASSR is supported by SN65DSI86, for full DisplayPort displays
    	 * we need to disable the scrambler.
    	 */
    	if (pdata->bridge.type == DRM_MODE_CONNECTOR_eDP) {
    		drm_dp_dpcd_writeb(&pdata->aux, DP_EDP_CONFIGURATION_SET,
    				   DP_ALTERNATE_SCRAMBLER_RESET_ENABLE);
    
    		regmap_update_bits(pdata->regmap, SN_TRAINING_SETTING_REG,
    				   SCRAMBLE_DISABLE, 0);
    	} else {
    		regmap_update_bits(pdata->regmap, SN_TRAINING_SETTING_REG,
    				   SCRAMBLE_DISABLE, SCRAMBLE_DISABLE);
    	}


    I don't understand why it disable the SCRAMBLE for full DisplayPort displays, should not we use Standard DP Scrambler Seed for full DisplayPort display?

    Best regards,
    Ikram

  • Hi Snow,

    Since the DSI86 only support ASSR, the scrambler should be disabled for using the DisplayPort displays.

    Is there any issue you are facing with these settings?

    Best regards,
    Ikram

  • Hi Ikram

    Yes, I found it is not stable when using this driver to test my DisplayPort monitor. 
    I mean if we use DisplayPort, shouldn't we enable the scrambler, and set the bits 1:0 of 0x5A to 0, so that the bridge will select  Standard DP Scrambler Seed instead of ASSR. But the driver disable the scrambler, so that it will not select ASSR, and also not use  Standard DP Scrambler Seed, is this a correct solution?

    Best regards,
    Snow

  • Hi Snow,

    In that case, you could try with 0x95 set for scrambling enabled and 0x5A set to Standard DP scrambler. Please let us know whether that corrects the issue.

    With the scrambler not enabled, is there correct display or is there an issue such as flickering? When the issue occurs, please also check whether any errors are reported.

    Best regards,
    Ikram

  • Hi Ikram

    Sorry for the late reply due to some busy business, We can't test DP mode because the hardware limit, we need to change the hardware layout to fix this.

    BTW, there is a description in the datasheet:
    ASSR_CONTROL.This field controls the scrambler seed used. Standard DP scrambler seed value is 0xFFFF. The ASSR seed value is 0xFFFF. This field is R/W if TEST2 pin is sampled high on rising edge of EN and bit 0 of offset 0x16 in Page 7 is set. Otherwise this field is readonly. 00 = Standard DP Scrambler Seed. 01 = Alternative Scrambler Seed Reset (Default). 10 = Reserved. 11 = Reserved.

    Why the ASSR seed and  Standard DP scrambler seed value are the same value 0xFFFF?

    Best regards,
    Snow

  • Hi Snow, 

    I will check this value for the scrambler seed and get back to you with an update by Tuesday.

    Best regards,
    Ikram