Other Parts Discussed in Thread: TEST2
Hello,
ich created a carrier board for the Raspberry PI CM4 with the SN65DSI86 as bridge from DSI (4-lane) to EDP (2 lane) for driving a 1920x1080 display.
The backlighting works, I2C communications looks ok, even the link training seems to be ok. But the display stays just black.
Display modelines are taken from the display running on an HDMI adapter board (from EDID and xrandr --verbose).
In order to pinpoint the issue, I added lot's of debug lines into the SN65DSI86 driver from the linux kernel.
I already found out that the CM4 cannot produce the desired clock on the DSI needed for running the DSI86 without external RefClk (the CM4 has an integer only divider for generating DSI clock frequency).
So I gently pulled-up the RefClock pin and attached an external Clock Oscillator Chip for testing.
I added the RefClk to the linux driver overlay and the driver logs indicate the the refclock registers are set and the RefClock signal is detected. Also link training works now.
After that, I tried to display the color test patterns by setting register 0x3C, but no luck. The display still stays back :-(
Any ideas what could be the issue?
The chip generating the RefClk signal for testing is an DSC1001DE2-027.0000 from MicroChip. Should this work?
(unfortunately, the DSN86 data sheet is a bit shy about details how the refclock signal should look like)
I know that the reference design uses a relatively complicated setup around an CDCEL913PW chip. Unfortunately a bit too complicated to setup for testing without a PCB (at least for me).
So I hoped the DSC1001DE2-027.0000 would work too ...
Can you help me with this? What could be the reason for the test pattern not being shown?
Best regards,
Thomas
PS1: I also tried with ASSR disabled (with TEST2 high and setting the appropriate registers)
PS2: For reference, here is my current kernel log at booting:
[ 4.998385] vc4_dsi fe700000.dsi: vc4_dsi_bind ...
[ 4.998605] vc4_dsi fe700000.dsi: vc4_dsi_bind => pll_phy_clock: rate: 11718751
[ 4.998876] vc4_dsi fe700000.dsi: vc4_dsi_init_phy_clocks, parent_name: plld_dsi1 ...
[ 4.999719] vc4_dsi fe700000.dsi: vc4_dsi_bind: attach bridge ...
[ 4.999738] ti_sn65dsi86 10-002c: ti_sn_bridge_attach: start ...
[ 4.999775] vc4_dsi fe700000.dsi: mipi_dsi_device_register_full: with channel 0
[ 4.999790] mipi-dsi (null): mipi_dsi_device_alloc ...
[ 4.999950] vc4_dsi fe700000.dsi: mipi_dsi_device_register_full, done, dsi channel 0, name: ti_sn_bridge
[ 4.999965] ti_sn65dsi86 10-002c: ti_sn_bridge_attach: set dsi->lanes to 4
[ 4.999985] ti_sn65dsi86 10-002c: ti_sn_bridge_resume: start ...
[ 5.009550] ti_sn65dsi86 10-002c: ti_sn_bridge_resume: call gpiod_set_value with 1 (EN)
[ 5.021785] ti_sn65dsi86 10-002c: ti_sn_bridge_resume: done!
[ 5.022313] ti_sn65dsi86 10-002c: ti_sn_bridge_attach: clk_src is: 0 (0:= REFCLK, 1: DSI-PHY)
[ 5.022333] vc4_dsi fe700000.dsi: vc4_dsi_host_attach, channel: 0, lanes: 4 ...
[ 5.022346] ti_sn65dsi86 10-002c: ti_sn_bridge_attach: done! Attached DSI!
[ 5.022422] vc4-drm gpu: bound fe700000.dsi (ops vc4_dsi_ops [vc4])
[ 5.022781] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[ 5.023320] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 5.023605] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 5.023856] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 5.024055] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 5.024305] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 5.025319] ti_sn65dsi86 10-002c: ti_sn_bridge_suspend: start & call gpiod_set_value with 0 (EN)
[ 5.025353] ti_sn65dsi86 10-002c: ti_sn_bridge_suspend: done!
[ 5.047533] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0
[ 5.053470] vc4_dsi fe700000.dsi: vc4_dsi_encoder_mode_fixup, inputs: parent_rate: 3000000091, dsi->divider: 6, mode->clock: 148500
[ 5.053489] vc4_dsi fe700000.dsi: vc4_dsi_encoder_mode_fixup => pixel_clock_hz: 148500000, pll_clock: 891000000 => divider: 3
[ 5.053503] vc4_dsi fe700000.dsi: vc4_dsi_encoder_mode_fixup => pixel_clock_hz: 166666671, mode->htotal: 2200, adjusted_mode->htotal: 2469 => adjusted_mode->clock: 166666
[ 5.053753] vc4_dsi fe700000.dsi: vc4_dsi_encoder_enable ...
[ 5.053785] vc4_dsi fe700000.dsi: vc4_dsi_encoder_enable: phy_clock: 1000002000 (pixel_clock_hz: 166666000, divider: 6)
[ 5.054894] vc4_dsi fe700000.dsi: vc4_dsi_encoder_enable: hs_clock: 1000000031 (of pll_phy_clock)
[ 5.054984] ti_sn65dsi86 10-002c: ti_sn_bridge_pre_enable: start ...
[ 5.055000] ti_sn65dsi86 10-002c: ti_sn_bridge_resume: start ...
[ 5.055106] ti_sn65dsi86 10-002c: ti_sn_bridge_resume: call gpiod_set_value with 1 (EN)
[ 5.067317] ti_sn65dsi86 10-002c: ti_sn_bridge_resume: done!
[ 5.067347] ti_sn65dsi86 10-002c: ti_sn_bridge_set_refclk_freq => use refclk lut
[ 5.067370] ti_sn65dsi86 10-002c: ti_sn_bridge_set_refclk_freq: refclk_rate: 27000000, refclk_lut[i], i: 3, found: 1
[ 5.067382] ti_sn65dsi86 10-002c: ti_sn_bridge_set_refclk_freq: set refclk_rate set reg 0x0a to 0x06 (with bitmask 14)
[ 5.092015] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: status of reg 95 (gpio configuration ): 0
[ 5.092493] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: status of reg 94 (current gpio values): 176
[ 5.125374] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: pdata->dp_lanes: 2 (max: 2)
[ 5.125395] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: set dsi lanes: set reg 0x10 to 0x00 (with bitmask 24)
[ 5.126217] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: lane assign (default 0xe4): set reg 0x59 to 0xe4
[ 5.126578] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: enhanced framing and ASSR: set reg 0x5a to 0x05
[ 5.127387] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: ASSR on/off status (bit01): 1 (0: Standard, 1: ASSR)
[ 5.127403] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: set lane polaristaion: set reg 0x5a to 0x00 (with bitmask 0xf0)
[ 5.127869] ti_sn65dsi86 10-002c: ti_sn_bridge_set_dsi_rate: bit_rate_mhz: 3984, clk_freq_mhz: 498
[ 5.128219] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: enable ASSR (driver way)
[ 5.131832] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: set DP data format: set reg 0x5b to 0x00 (0: 24bpp, 1: 18bpp)
[ 5.132308] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: set DP lane count: set reg 0x93 to 0x20 (val: 32) (2 lanes)
[ 5.141899] ti_sn65dsi86 10-002c: ti_sn_bridge_read_valid_rates: received EDP version byte: 0x2
[ 5.150891] ti_sn65dsi86 10-002c: ti_sn_bridge_calc_min_dp_rate_idx: clock: 166666 kHz, bit_rate_khz: 3999984 kHz, dp_rate_mhz: 2500 mHz => i: 4 (DP_DATA_RATE: 2700)
[ 5.150910] ti_sn65dsi86 10-002c: ti_sn_link_training: DP rate: set reg 0x94 to 0x80 (dp_rate_idx: 4)
[ 5.151707] ti_sn65dsi86 10-002c: ti_sn_link_training: enable PPL: set reg 0x0d to 0x01
[ 5.152493] ti_sn65dsi86 10-002c: ti_sn_link_training: Cursor2 0dB: set reg 0x95 to 0x00
[ 5.152838] ti_sn65dsi86 10-002c: ti_sn_link_training: start try: 0 ...
[ 5.153613] ti_sn65dsi86 10-002c: ti_sn_link_training was successfull
[ 5.153624] ti_sn65dsi86 10-002c: STATUS REGISTERS:
[ 5.154081] ti_sn65dsi86 10-002c: Status Register [0xf0] = 0x00000000
[ 5.154536] ti_sn65dsi86 10-002c: Status Register [0xf1] = 0x00000002
[ 5.154998] ti_sn65dsi86 10-002c: Status Register [0xf2] = 0x00000000
[ 5.155453] ti_sn65dsi86 10-002c: Status Register [0xf3] = 0x00000000
[ 5.155903] ti_sn65dsi86 10-002c: Status Register [0xf4] = 0x00000001
[ 5.156353] ti_sn65dsi86 10-002c: Status Register [0xf5] = 0x00000000
[ 5.156812] ti_sn65dsi86 10-002c: Status Register [0xf6] = 0x00000000
[ 5.157264] ti_sn65dsi86 10-002c: Status Register [0xf7] = 0x00000000
[ 5.157715] ti_sn65dsi86 10-002c: Status Register [0xf8] = 0x00000000
[ 5.157731] ti_sn65dsi86 10-002c: ti_sn_bridge_set_video_timings: clock: 166666, hdisplay: 1920, vdisplay: 1080, hsync_start: 2277, hsync_end: 2321, vsync_start: 1082, vsync_end: 1087
[ 5.159739] ti_sn65dsi86 10-002c: ti_sn_bridge_set_video_timings: HSYNC_PULSE_WIDTH => (val: 44) reg 2c => 2c 0
[ 5.160443] ti_sn65dsi86 10-002c: ti_sn_bridge_set_video_timings: VSYNC_PULSE_WIDTH => (val: 5) reg 30 => 5 0
[ 5.160807] ti_sn65dsi86 10-002c: ti_sn_bridge_set_video_timings: HORIZONTAL_BACK_PORCH => (val: 148) reg 34 => 0x94
[ 5.161170] ti_sn65dsi86 10-002c: ti_sn_bridge_set_video_timings: VERTICAL_BACK_PORCH => (val: 38) reg 36 => 0x26
[ 5.161524] ti_sn65dsi86 10-002c: ti_sn_bridge_set_video_timings: HORIZONTAL_FRONT_PORCH => (val: 101) reg 38 => 0x65
[ 5.161877] ti_sn65dsi86 10-002c: ti_sn_bridge_set_video_timings: VERTICAL_FRONT_PORCH => (val: 2) reg 3a => 0x2
[ 5.172427] ti_sn65dsi86 10-002c: ti_sn_bridge_test_pattern_enable: Enable Test Pattern: 0, en bits: 16
[ 5.173225] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: check refclk before enable: reg 0x0a has value 134 (refclk bits: 3, rfclk src: 0)
[ 5.173237] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: now enable video stream, update reg 0x5a with 0x0d (15 bitmask)
[ 5.174005] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: now enable the panel ...
[ 5.174017] ti_sn65dsi86 10-002c: STATUS REGISTERS:
[ 5.174470] ti_sn65dsi86 10-002c: Status Register [0xf0] = 0x00000000
[ 5.174928] ti_sn65dsi86 10-002c: Status Register [0xf1] = 0x00000002
[ 5.175379] ti_sn65dsi86 10-002c: Status Register [0xf2] = 0x00000000
[ 5.175824] ti_sn65dsi86 10-002c: Status Register [0xf3] = 0x00000000
[ 5.176271] ti_sn65dsi86 10-002c: Status Register [0xf4] = 0x00000001
[ 5.176720] ti_sn65dsi86 10-002c: Status Register [0xf5] = 0x00000000
[ 5.177165] ti_sn65dsi86 10-002c: Status Register [0xf6] = 0x00000000
[ 5.177610] ti_sn65dsi86 10-002c: Status Register [0xf7] = 0x00000000
[ 5.178057] ti_sn65dsi86 10-002c: Status Register [0xf8] = 0x00000000
[ 5.178507] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: test pattern check: reg 0x3c has value 16
[ 5.178517] ti_sn65dsi86 10-002c: ti_sn_bridge_enable: all done!