How to support the i80 MPU interface LCD on iMX50 Linux platform -blog archive

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

How to support the i80 MPU interface LCD on iMX50 Linux platform -blog archive

8,414 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

BSP version: L2.6.35_11.04.01_ER

Board: iMX50 EVK RevC and RevD

Panel: T15DDS15, 128*128 262k Color 1.44 inch TFT LCD, based on ST7735R controller.

 

Hardware connection:

 

T15DDS15iMX50 EVK board
1. GND
2. RESET#DISP_RESET
3. RSDISP_RS
4. WR#DISP_WR
5. RD#DISP_RD
6. DB0DISP_DATA0
7. DB1DISP_DATA1
8. DB2DISP_DATA2
9. DB3DISP_DATA3
10. DB4DISP_DATA4
11. DB5DISP_DATA5
12. DB6DISP_DATA6
13. DB7DISP_DATA7
14. CS#DISP_CS
15. VCCIO1.8V_SW5
16. IC_ID
17. VDDDCDC_3V15
18. VLED+5V_MAIN
19. VLED-DISP_PWM
20. GND

 

1. Description

This is a system 80 interface LCDIF patch and sample driver for panel gz2401 and t15dds15, it is based on L2.6.35_11.04.01_ER_source.tar.gz release. Gz2410 panel was not tested.


2. File list
  -- fb_test.zip: It's a sample code which was used to fill the screen. From it you can know how to refresh the LCD panel.
  -- mx50_mpu_lcd_support.patch: System 80 interface LCD driver kernel patch.
  -- uboot_i80_ER1104.patch: System 80 interface LCD uboot patch. Enabled splash screen in Uboot.

3. Usage Follow the following process to build firmware image.
  3.1 Follow user guide finish a build use ./ltib and leave source codes.
  3.2 Apply the patch to kernel and Uboot

    $ cd ltib

    $ ./ltib -p kernel -m prep

    $ cd rpm/BUILDS/linux-2.6.35.3/

    $ patch -p1 < ~/mx50_mpu_lcd_support.patch

    $ cd ../../../

    $ ./ltib -p u-boot -m prep

    $ cd rpm/BUILD/u-boot-2009.08/

    $ patch -p1 < ~/uboot_i80_ER1104.patch

    $ cd ../../../


  3.3 The sample driver is gz2401 and t15dds15, so select the panel in kernel config:

Device Drivers -->

    Graphics support -->

        <*> Support MXC ELCDIF framebuffer MPU Panel Type -->

                <*> Support MXC T15DDS15 frame buffer
                <*> Support MXC GZ2401 frame buffer


  3.4 Run command in /ltib directory to re-build kernel.
  3.5 Boot command for new lcd: T15DDS15:
      setenv bootargs_mmc 'setenv bootargs ${bootargs} console=ttymxc0 root=/dev/mmcblk0p1 rootwait rw ip=none lcd=3'
      GZ2401: (This panel was not tested)
      setenv bootargs_mmc 'setenv bootargs ${bootargs} console=ttymxc0 root=/dev/mmcblk0p1 rootwait rw ip=none lcd=4'


4. Test program This test program is important and you'd better run it first. From it you will know how to refresh the panel when frame buffer was change.
  4.1 Change Makefile a little to meet your environment.
  4.2 Make the program.
  4.3 Copy it to your board and run it, you will see some white and black on screen.

 

Attached the files again.

Original Attachment has been moved to: fb_test.zip

Original Attachment has been moved to: uboot_i80_ER1104.patch.zip

Original Attachment has been moved to: mx50_mpu_lcd_support.patch.zip

Labels (4)
Tags (1)
0 Kudos
Reply
13 Replies

4,226 Views
jaspernuytten
Contributor I

Hi all, I have a 8-bit interfaced TFT LCD and a IMX6ul, should it be possible to make it work with this patch?

0 Kudos
Reply

4,226 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

The i80 display pacth for iMX6UL is here: https://community.nxp.com/docs/DOC-331754

0 Kudos
Reply

4,226 Views
kshitij_shah
NXP Employee
NXP Employee

I need to make the MPU interface working on imx7d platform with current BSP (3.14.52). Can someone please guide me how to port this patch to latest kernel for imx7d platform ?

I looked into Qiang's patch and noticed that almost all of the .c and .h files mentioned in the patch are not present in current BSP(3.14.52) or if the files are present the c functions modified in the patch are not present in the 3.14.52 kernel.

Please guide me how to achieve the same on current BSP(3.14.52) for imx7d platform.

0 Kudos
Reply

4,226 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Hi Kshitij Shah, the IMX7D used ELCDIF as the LCD controller, so the driver file is "drivers\video\mxsfb.c"

So you can add the i80 display support into this file. The hardware operation codes on ELCDIF are same for iMX50 and iMX7D.

0 Kudos
Reply

4,226 Views
djcatter
Contributor I

I am trying to do something similar on a IMX28 would you be able to resubmit those links?

Thanks,


Derek

0 Kudos
Reply

4,226 Views
etienneancelin
Contributor I

Hi Derek,

I try to do the same things. Did you succeed?

Thanks

Etienne

0 Kudos
Reply

4,226 Views
djcatter
Contributor I

Yes works great. The reference code works fine. It took us some time to get this to work well.

We are running an 18bit MPU LCD running RGB666, being feed by RGB888.

Derek

0 Kudos
Reply

4,226 Views
etienneancelin
Contributor I

Hi, thanks to reply. I'm glad to know you succeed. Which reference code do you talk about? Is it possible to get your code? or can you explain what you do to apply the Qiang_FSL code for the iMx28?

Thanks

Etienne

0 Kudos
Reply

4,226 Views
djcatter
Contributor I

The link I posted which looks like it is dead:

Use qtopia on i.MX233 LQFP version? - Freescale Forums

The key is the mxc_elcdif_mpu_access in Qiang's code and the setup panel register here:

static void mpulcd_setup_pannel_register(char data, u32 val)

{

    unsigned int val = 0;

    //Wait to finish if running

    do

    {

        val = __raw_readl(REGS_LCDIF_BASE + HW_LCDIF_CTRL);

    }

    while(val & BM_LCDIF_CTRL_RUN);

    // Master off and RUN off (i.e. kill current )

    __raw_writel(BM_LCDIF_CTRL_LCDIF_MASTER |

        BM_LCDIF_CTRL_RUN, REGS_LCDIF_BASE + HW_LCDIF_CTRL_CLR);

    // Setup to transfer one byte

    __raw_writel(BF_LCDIF_TRANSFER_COUNT_V_COUNT(1) |

                BF_LCDIF_TRANSFER_COUNT_H_COUNT(1),

  REGS_LCDIF_BASE + HW_LCDIF_TRANSFER_COUNT);

    // If data set control line

    if(data)

        __raw_writel(BM_LCDIF_CTRL_DATA_SELECT,REGS_LCDIF_BASE + HW_LCDIF_CTRL_SET);

    else

  __raw_writel(BM_LCDIF_CTRL_DATA_SELECT,REGS_LCDIF_BASE + HW_LCDIF_CTRL_CLR);

    // Kick off LCDIF

    __raw_writel(BM_LCDIF_CTRL_RUN, REGS_LCDIF_BASE + HW_LCDIF_CTRL_SET);

    // Write the Value

     __raw_writel(val, REGS_LCDIF_BASE + HW_LCDIF_DATA);

    // Wait until we are done

    while(__raw_readl(REGS_LCDIF_BASE + HW_LCDIF_CTRL) & BM_LCDIF_CTRL_RUN);

    // Clear the interrupt so someone else can send commands

    __raw_writel(BM_LCDIF_CTRL1_CUR_FRAME_DONE_IRQ,REGS_LCDIF_BASE + HW_LCDIF_CTRL1_CLR);

}

This allows you to do a CMD and DATA to setup the register.

The other biggest challenge was that when you are in RGB888 to RGB666 you will pre-shift your out going data as the LCDIF will shift for ALL transactions.

Hope this helps

0 Kudos
Reply

4,225 Views
erickang
Contributor II

Dear Derek Catterfeld,

I'm making the MPU Interface via LCDIF in i.MX28 EVK board.

I saw you made the function already.

Could you give me the modified code in i.MX28, if you give me the code?

It's very helpful to me.

Best Regards,

Eric.

0 Kudos
Reply

4,225 Views
erickang
Contributor II

I confirmed the MPU interface operation via LCDIF in i.MX28 EVK.

I used the MPU Interface to write any data into FPGA.

Best Regards,

Eric.

0 Kudos
Reply

4,226 Views
djcatter
Contributor I
0 Kudos
Reply

4,226 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

The LCDIF is similar for iMX23,iMX28 and iMX50. So the i80 interface driver is also similar for them.

0 Kudos
Reply