IMX8MQ + DSI host controller support at U-boot

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX8MQ + DSI host controller support at U-boot

1,649 Views
jemish_1990
Contributor IV

Hi All,

We are working product based on IMX8MQ (MIMX8MQ6DVAJZAA) processor. 

  • We have LCD working fine at kernel level.  In our system LCD is driven by eLCDIF controller via MIPI DSI controller.
  • Now we want to make LCD working u-boot level. But unfortunately I see that till now NXP hasn't provide DSI host controller support at U-boot.
  • Is there any limitation for that ?
  • I have already started development for it. But not able to read/write any DSI host controller registers at u-boot level.
  • Can anyone provide me minimum clock configuration at u-boot level so atleast I can read/write DSI host controller registers.
  • Any suggestion or hint in this regard will appreciated.

Thanks,

Jemish

0 Kudos
19 Replies

243 Views
sd05
Contributor III

Also taking the above approach i have some clk_enable, clk_get_rate and clk_set_rate apis which i enable by adding the CONFIG_CLK and CONFIG_IMX_CLK but after that the board is getting reboot

so I have explicitly enabled the mipi dsi and lcdif clock from board file

 

0 Kudos

222 Views
jemish_1990
Contributor IV

Hi,

I am attaching unofficial patch shared by NXP which has been verified on RM67191. By taking reference of this commit we managed to make uboot logo work on our unit. Hope it will help!!

Thanks,

Jemish

181 Views
sd05
Contributor III

Hello @jemish_1990 and @nxp 

having a few question:

1. Which version of u-boot you were using?

2. And are there other changes that you did to get the display in uboot other that in patch? if you can also share if any that will be really helpful..

3. we are working on imx8mm based processor so do you see any challenge in this and a st7703 based panel

4. What do you think which are the changes we need to do considering that we are using imx8mm

====================================================================

We really need urgent help on this as we already had missed the deadline for the task and not getting any proper reference for the same other than the one you shared so that will be very helpful if you can guide us with this.

thanks!

0 Kudos

162 Views
jemish_1990
Contributor IV

Hi,

  1. We are using U-boot version "U-Boot SPL 2018.03"
  2. Our display is 1280x800 and it also included LVDS to MIPI converter chip so for that I need to add correct power sequence via GPIO, driver for converter chip and did some changes related to eLCDIF clock value. I didn't add those changes in commit I provided as it will create confusion rather than helping you.
  3. I have no idea what is difference between IMX8MQ vs IMX8MM processor. So for that you need to map this code do relevant changes if requires.

Good luck!

Thanks,

Jemish

0 Kudos

210 Views
sd05
Contributor III

Thanks @jemish_1990

Tags (1)
0 Kudos

257 Views
sd05
Contributor III

Hello @jemish_1990 and The NXP community

We are working on a product based on IMX8MM processor.

I am also facing the same issue and similar requirement (we need to show the battery status at u-boot on LCD )

I tried to port the driver taking reference of kernel but unable to read/write from panel through driver.
I followed following steps:

Step-1 Added the dsi_host user class which is not in present u-boot version( U-Boot 2019.04-lf-5.4.y_v2019.04_var01+gbf77d94114)

https://elixir.bootlin.com/u-boot/latest/source/drivers/video/dsi-host-uclass.c#L37

https://elixir.bootlin.com/u-boot/latest/C/ident/UCLASS_DSI_HOST

Step-2 Added the MIPI DSI host controller driver
https://elixir.bootlin.com/u-boot/latest/source/drivers/video/dw_mipi_dsi.c#L846

Step-3 Added the mipi_display.c that contains a set of dsi helpers function

https://elixir.bootlin.com/u-boot/latest/source/drivers/video/mipi_dsi.c

Step-4 Added the panel driver taking reference of the following
https://elixir.bootlin.com/u-boot/latest/source/drivers/video/raydium-rm68200.c

Step-5 We added videobridge that can connect/bind the dsi-host controller and the panel driver

https://elixir.bootlin.com/u-boot/latest/source/drivers/video/stm32/stm32_dsi.c#L509

Step-6 added Lcdif support taking some reference from this

https://elixir.bootlin.com/u-boot/latest/source/drivers/video/stm32/stm32_ltdc.c#L469

Step-7 done changes in dtsi taking this reference dtsi

https://elixir.bootlin.com/u-boot/latest/source/arch/arm/dts/stm32f769-disco-u-boot.dtsi#L80

Step-8 Tried to probe UCLASS_VIDEO from board file using the uboot_probe_all

After all this getting timeout while reading from register @jemish_1990  were you able to get the logo on the LCD please share your knowledge with us.

Thanks in advance!

 

0 Kudos

966 Views
Dio_HUI
Contributor I

Hi Jemish:

Our products also use IMx8MQ, and we hope to display the LOGO in the Uboot stage. Do you currently solve the output function of IMx8MQ in the Uboot stage?

 

Thanks,

Dio

0 Kudos

1,039 Views
jemish_1990
Contributor IV

Hi All,

Any update on this?

Thanks,

Jemish

0 Kudos

1,039 Views
joanxie
NXP TechSupport
NXP TechSupport

yes, uboot don't configure lcd panel, why do you need configure this in the uboot level? you can refer to the board file in the uboot, maybe you can add your panel in the uboot file, I don't test this

imx8mq_evk.c\imx8mq_evk\freescale\board - uboot-imx - i.MX U-Boot 

0 Kudos

1,039 Views
jemish_1990
Contributor IV

Hi Joan,

>> 

maybe you can add your panel in the uboot file, I don't test this

imx8mq_evk.c\imx8mq_evk\freescale\board - uboot-imx - i.MX U-Boot   <<

It's not that simple that we will add structure for panel in existing board file and it will work. As I said in our system LCD is driven by eLCDIF controller via MIPI DSI controller. We must need to add DSI host controller support at uboot level. 

Do you any suggestion for that?

Thanks,

Jemish

0 Kudos

1,039 Views
joanxie
NXP TechSupport
NXP TechSupport

imx8M use LCDIF, maybe you can refer to the link as below, but this link is for IPU, you couldn't apply them directly, but you can refer to it

https://community.nxp.com/docs/DOC-98109 

0 Kudos

1,039 Views
jemish_1990
Contributor IV

Hi Joan,

I already have the patch you suggested but it won't help as it is for IPU.

Let's make my question simple. Can you provide me DSI clock/power initialization sequence at U-boot so atleast I can read/write DSI registers.

Thanks,

Jemish

0 Kudos

1,039 Views
joanxie
NXP TechSupport
NXP TechSupport

yes, imx8mq uses lcdif, this patch is for IPU, just for reference, we don't have specific source code for imx8mq, for mipi dsi init, you can refer to the dts file:

fsl-imx8mq.dtsi\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel 

if you need keep the logo in the kernel, when kernel load lcdif driver, try to keep the lcdif settings, like clock from changing

0 Kudos

1,039 Views
jemish_1990
Contributor IV
Hi Joan,
Yes I checked but we are already using this device tree file in kernel. And by taking reference of that device tree I started development of DSI host controller on u-boot level. But we need clear initialization sequence because kernel clock architecture  and u-boot clock architecture are different in terms of implementation.
As we have section of  LCDIF clock in uboot:
File :  arch/arm/mach-imx/imx8m/clock_imx8mq.c
void mxs_set_lcdclk(u32 base_addr, u32 freq)
{
        /*
         * LCDIF_PIXEL_CLK: select 800MHz root clock,
         * select pre divider 8, output is 100 MHz
         */
        clock_set_target_val(LCDIF_PIXEL_CLK_ROOT, CLK_ROOT_ON |
                             CLK_ROOT_SOURCE_SEL(4) |
                             CLK_ROOT_PRE_DIV(CLK_ROOT_PRE_DIV8));
}
It will be good if NXP can provide similar code for DSI host controller. I have already tried as per my understanding but it didn't help.
Thanks,
Jemish
0 Kudos

1,039 Views
joanxie
NXP TechSupport
NXP TechSupport

you can find clock file in the driver:

clk\drivers - linux-imx - i.MX Linux kernel 

you also can refer to the document about how to calculate dsi clock

https://community.nxp.com/docs/DOC-345307 

0 Kudos

1,039 Views
jemish_1990
Contributor IV

Hi Joan,

I have all the clock values and I printed those clock values in kernel.

But still I am missing something critical and that's why I need help of NXP to provide me clock/power initialization of DSI at u-boot level.

Thanks,

Jemish

0 Kudos

1,039 Views
jemish_1990
Contributor IV

Hi All,

Any update on this? May I know why NXP has not added support of DSI host on u-boot yet?

Thanks,

Jemish

0 Kudos

1,039 Views
joanxie
NXP TechSupport
NXP TechSupport
0 Kudos

1,039 Views
jemish_1990
Contributor IV

Hi Joan,

We want to configure LCD panel at u-boot because we want to display our product LOGO on LCD at u-boot level which will give indication to user that product is power on at early stage. Currently kernel logo is working but it almost take 5 to 6 seconds to get displayed. As product perspective it's not good sign.  Do you have any suggestion for that?

Thanks,

Jemish

0 Kudos