Fail to transfer MIPI DCS cmd on imx8mn platform

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fail to transfer MIPI DCS cmd on imx8mn platform

3,468 Views
cs_lin
Contributor II

hi all:

now we are porting a 5 inch LCM onto our imx8mn EVK, and we refer to "panel-raydium-rm67191.c" to develop our panel driver, which is verified on imx8mq platform. Now we move it onto imx8mn EVK. per DTS file, we refer to "fsl-imx8mn-ddr4-evk-rm67191.dts" to add the config of our panel (you refer to 2 dts files for detail). 

But porting it onto imx8mn, the result is we failed to turn on the panel, and below is the log message:

[ 1.156169] imx_sec_dsim_drv 32e10000.mipi_dsi: sec-dsim bridge bind end
[ 1.162898] imx_sec_dsim_drv 32e10000.mipi_dsi: imx_sec_dsim_bind: dsim bind end
[ 1.170322] imx-drm display-subsystem: bound 32e10000.mipi_dsi (ops imx_sec_dsim_ops)
[ 1.182218] imx_sec_dsim_drv 32e10000.mipi_dsi: p: min = 1, max = 13, m: min = 64, max = 1012, s: min = 0, max = 5
[ 1.182416] imx_sec_dsim_drv 32e10000.mipi_dsi: fout = 492000, fin = 27000, m = 656, p = 9, s = 2, best_delta = 0
[ 1.182422] imx_sec_dsim_drv 32e10000.mipi_dsi: no pre-exist hpar can be used
[ 1.186364] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_prepare] hm_panel_prepare()!
[ 1.236374] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_prepare] pull reset pin to high!
[ 1.236381] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_init_proc] hm_panel_init_proc begin(), array size = 21!
[ 1.489782] imx_sec_dsim_drv 32e10000.mipi_dsi: wait payload tx done time out
[ 1.489790] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hx8394f_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -16
[ 1.745782] imx_sec_dsim_drv 32e10000.mipi_dsi: wait payload tx done time out
[ 1.745788] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hx8394f_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -16
[ 2.001774] imx_sec_dsim_drv 32e10000.mipi_dsi: wait payload tx done time out
[ 2.001780] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hx8394f_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -16
[ 2.257778] imx_sec_dsim_drv 32e10000.mipi_dsi: wait payload tx done time out
[ 2.257784] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hx8394f_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -16
[ 2.257791] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_init_proc] hm_panel_init_proc() end!

from log, every mipi cmd I send to panel is failed, and error code is -16 (EBUSY). is there anything wrong in my DTS config? imx8mn use Samsung MIPI DSIM displays as mipi host driver, and it should be OK to send mipi cmd to my panel. Can someone check my DTS files, to see it any wrong config, which occupies MIPI resource?

thanks in advance!

0 Kudos
8 Replies

3,304 Views
Noel_V
Contributor III

Hello, 

Im facing the same issue... anyone found out what goes wrong/why ? and how to solve ?

Best regards.

[ 1.674532] ili9881c_prepare - going to reset !
[ 1.740346] ili9881c_prepare - going to send commands ! !
[ 1.740349] ili9881c_switch_page !! [03]
[ 1.740352] sec_mipi_dsim_host_transfer ! ! ! !
[ 1.740356] sec_mipi_dsim_write_ph_to_sfr_fifo !!!
[ 1.740363] sec_mipi_dsim_irq_handler-1 sr=0x30000000 - st=0x8010010F
[ 1.740366] sec_mipi_dsim_irq_handler-2 sr=0x30000000 - st=0x8010010F
[ 1.740369] sec_mipi_dsim_irq_clear CLEAR - intsrc=0x20000000
[ 1.740372] sec_mipi_dsim_irq_clear CLEAR - intsrc=0x10000000
[ 1.740383] ili9881c_switch_page - EXIT OK
[ 1.740386] ili9881c_send_cmd_data !! [ 01 , 00 ] !
[ 1.740388] sec_mipi_dsim_host_transfer ! ! ! !
[ 1.740390] sec_mipi_dsim_write_ph_to_sfr_fifo !!!
[ 1.740396] sec_mipi_dsim_irq_handler-1 sr=0x10000000 - st=0x8010010F
[ 1.740398] sec_mipi_dsim_irq_handler-2 sr=0x10000000 - st=0x8010010F
[ 1.740401] sec_mipi_dsim_irq_clear CLEAR - intsrc=0x10000000
[ 1.740409] ili9881c_send_cmd_data - EXIT OK
[ 1.740411] ili9881c_send_cmd_data !! [ 02 , 00 ] !
[ 1.740413] sec_mipi_dsim_host_transfer ! ! ! !
[ 1.740415] sec_mipi_dsim_write_ph_to_sfr_fifo !!!
[ 1.740421] sec_mipi_dsim_irq_handler-1 sr=0x10000000 - st=0x8010010F
[ 1.740424] sec_mipi_dsim_irq_handler-2 sr=0x10000000 - st=0x8010010F
[ 1.740426] sec_mipi_dsim_irq_clear CLEAR - intsrc=0x10000000
[ 1.740435] ili9881c_send_cmd_data - EXIT OK
[ 1.740440] ili9881c_send_cmd_data !! [ 03 , 55 ] !
[ 1.740442] sec_mipi_dsim_host_transfer ! ! ! !
[ 1.740444] sec_mipi_dsim_write_ph_to_sfr_fifo !!!
[ 1.740450] sec_mipi_dsim_irq_handler-1 sr=0x10000000 - st=0x8010010F
[ 1.740452] sec_mipi_dsim_irq_handler-2 sr=0x10000000 - st=0x8010010F
[ 1.740454] sec_mipi_dsim_irq_clear CLEAR - intsrc=0x10000000
[ 1.740465] ili9881c_send_cmd_data - EXIT OK

[ 1.740467] ili9881c_send_cmd_data !! [ 05 , 00 ] !
[ 1.740469] sec_mipi_dsim_host_transfer ! ! ! !
[ 1.740471] sec_mipi_dsim_write_ph_to_sfr_fifo !!!

[ 1.996374] imx_sec_dsim_drv 32e10000.mipi_dsi: wait pkthdr tx done time out

IRQ MISSING HERE !!!!!!!!!!!!!!!!!!!!!!!!!!!!


[ 1.996377] ili9881c_send_cmd_data - EXIT EARLY ! ! 1
[ 1.996379] ili9881c_prepare - EXIT EARLY ! ! 1

0 Kudos

3,304 Views
igorpadykov
NXP Employee
NXP Employee

Hi CS Lin

for new LCM panel it is necessary to create specific driver, like

mxcfb_hx8369_wvga.c\mxc\fbdev\video\drivers - linux-imx - i.MX Linux kernel 

and perform specific for this lcd initialization (found from its datasheet) like

mipid_hx8369_lcd_setup(). Driver details can be found in sect.6.4.2 MIPI DSI Interface

Linux Manual in Linux 5.4.3_1.0.0 Documentation

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

3,304 Views
cs_lin
Contributor II

hi igorpadykov:

I am using imx8mq and imx8mn for panel driver development, and I already got panel on imx8mq platform. So I have panel driver ready. 

The current problem is on imx8mn. From the DTS of reference code we got from NXP, the mipi dsi use "compatible = "fsl,imx8mn-mipi-dsim";" to load mipi dsi host driver of "sec_mipi_dsim-imx.c", then it will load bridge driver of "sec-dsim.c". Besides, I can't find the compatible property in DTS of "fsl,imx8mn-mipi-dsim" in "\drivers\video" folder. The case of mxcfb_hx8369_wvga.cis for imx7d-mipi-dsi/fsl,imx7ulp-mipi-dsi/fsl,imx8mq-mipi-dsi.

What I need is:

1. Per imx8mn EVK, the panel OLED with raydium RM67191 can work on it, right?

2. We can find "fsl-imx8mn-ddr4-evk-rm67191.dts", supposely we can use it to develop our own DTS to enable our panel?

3. From the log we saw, it's MIPI DSI cmd transfer (sec_mipi_dsim_host_transfer()) timeout. We send payload and header, but no response until timout. So we are not sure we config the MIPI resource and LCDIF correctly, please help check it.

thanks

CS

0 Kudos

3,304 Views
igorpadykov
NXP Employee
NXP Employee

Hi CS

I think you are right. In general one can also check

MIPI DSI DPHY PLL, PMS settings (similar to i.MX7D),

sect.13.6.8.18.4 DPHY PLL i.MX 8M Nano Applications Processor Reference Manual

Best regards
igor

0 Kudos

3,304 Views
cs_lin
Contributor II

hi igorpadykov:

I add more logs, and want to check with for why we sent mipi cmd to panel failed. from the log we can see 2 times of ISR, one is for PLL config, which is no relation to Panel, the other one is mipi cmd sent to panel (one payload and one header). When it sent out the payload and header, it will wait for cmd transferring complete. my question is

1. does instrution = 0x20000000, status = 0x8010010f means mipi cmd (0xB9,0xFF,0x83,0x94) sent to panel successfully?

2. why don't we receive any mipi isr after 1st cmd? The 2nd mipi cmd to panel is (0xB1,0x48,0x12,0x72,0x09,0x33,0x24,0x51,0x51,0x30, 0x43), we use same function to send mipi cmd to panel, but got no mipi interrupt triggered?

please help check log, and figure out possible cause, thanks!!

[ 1.087135] imx_sec_dsim_drv 32e10000.mipi_dsi: no valid rate assigned for pref clock
[ 1.095471] imx_sec_dsim_drv 32e10000.mipi_dsi: sec_mipi_dsim_resume()
[ 1.102103] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_probe] hm_panel_probe() video mode =2, lanes = 4!
[ 1.112683] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_probe] hm_panel_probe() end!
[ 1.121506] imx_sec_dsim_drv 32e10000.mipi_dsi: sec-dsim bridge bind end
[ 1.128230] imx_sec_dsim_drv 32e10000.mipi_dsi: imx_sec_dsim_bind: dsim bind end
[ 1.135650] imx-drm display-subsystem: bound 32e10000.mipi_dsi (ops imx_sec_dsim_ops)
[ 1.147493] imx_sec_dsim_drv 32e10000.mipi_dsi: p: min = 1, max = 13, m: min = 64, max = 1012, s: min = 0, max = 5
[ 1.147693] imx_sec_dsim_drv 32e10000.mipi_dsi: fout = 492000, fin = 27000, m = 656, p = 9, s = 2, best_delta = 0
[ 1.147699] imx_sec_dsim_drv 32e10000.mipi_dsi: no pre-exist hpar can be used
[ 1.149416] imx_sec_dsim_drv 32e10000.mipi_dsi: sec_mipi_dsim_resume()
[ 1.149451] imx_sec_dsim_drv 32e10000.mipi_dsi: sec_mipi_dsim_config_pll(), pllctrl = 0x826904
[ 1.149620] imx_sec_dsim_drv 32e10000.mipi_dsi: mipi irq handler, instrution = 0x80000000, status = 0x8010010f
[ 1.149625] imx_sec_dsim_drv 32e10000.mipi_dsi: sec_mipi_dsim_irq_clear(), irq_idx=0x1, intsrc=0x80000000
[ 1.149636] imx_sec_dsim_drv 32e10000.mipi_dsi: mipi irq handler end(), dsim->rx_done = 0x0, pl_tx_done = 0x0, ph_tx_done = 0x0
[ 1.151659] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_prepare] hm_panel_prepare()!
[ 1.201668] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_prepare] pull reset pin to high!
[ 1.201676] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hm_panel_init_proc] hm_panel_init_proc begin(), array size = 21!
[ 1.201682] imx_sec_dsim_drv 32e10000.mipi_dsi: PL write, check base = 0x8071000
[ 1.201687] imx_sec_dsim_drv 32e10000.mipi_dsi: PL length =4, data = 0x9483ffb9
[ 1.201691] imx_sec_dsim_drv 32e10000.mipi_dsi: PH write, check base = 0x8071000
[ 1.201695] imx_sec_dsim_drv 32e10000.mipi_dsi: PK data = 0x439
[ 1.201703] imx_sec_dsim_drv 32e10000.mipi_dsi: mipi irq handler, instrution = 0x20000000, status = 0x8010010f
[ 1.201710] imx_sec_dsim_drv 32e10000.mipi_dsi: sec_mipi_dsim_irq_clear(), irq_idx=0x3, intsrc=0x20000000
[ 1.201716] imx_sec_dsim_drv 32e10000.mipi_dsi: mipi irq handler end(), dsim->rx_done = 0x0, pl_tx_done = 0x1, ph_tx_done = 0x0
[ 1.201726] imx_sec_dsim_drv 32e10000.mipi_dsi: PL write, check base = 0x8071000
[ 1.201731] imx_sec_dsim_drv 32e10000.mipi_dsi: PL length =11, data = 0x721248b1
[ 1.201738] imx_sec_dsim_drv 32e10000.mipi_dsi: PL length =7, data = 0x51243309
[ 1.201745] imx_sec_dsim_drv 32e10000.mipi_dsi: PL length =3, data = 0x433051
[ 1.201749] imx_sec_dsim_drv 32e10000.mipi_dsi: PH write, check base = 0x8071000
[ 1.201754] imx_sec_dsim_drv 32e10000.mipi_dsi: PK data = 0xb39
[ 1.455403] imx_sec_dsim_drv 32e10000.mipi_dsi: wait payload tx done time out
[ 1.455409] panel-himax-hx8394f 32e10000.mipi_dsi.0: [drm:hx8394f_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -16

best regards,

CS

0 Kudos

3,304 Views
igorpadykov
NXP Employee
NXP Employee

Hi CS

 

you should debug it using logic analyzer and mipi specification to
find where wrong communication happens. What is about rm67191
panel with that board, does it work fine. Is it possible to test any other panels,
probably issue happens only with that specific panel.

 

Best regards
igor

0 Kudos

3,304 Views
cs_lin
Contributor II

hi igorpadykov:

I think not only me has this mipi dsi cmd transfer timeout issue, please refer to below

i.MX8Mmini mipi dsi Problem with ILI9806E  

there are several developers encountered same issue as me. Do you have any idea of the solution?

Also, we check it with scope, and confirm that mipi send continuous cmds to panel, but no mipi interrupt be triggered. I also change the PLL reference clock from 24MHz to 54Mhz, but also same results. please help advise and debug suggestions.

Thank you!

CS

0 Kudos

2,453 Views
nben386
Contributor I

Hi CS,

I know this is 1 year old but we are facing similar issues on imx8m nano.
Any news about this problem. Could you solve it?

Thanks for your help.

nben

0 Kudos