Enabling LCD in Redboot on mx257

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

Enabling LCD in Redboot on mx257

703 Views
sletter
Contributor I

I am missing something in the early initialization that is needed to get the LCD display working in the boot loader.  I used the BSP version of Linux as a guide,  I am not quite sure what it is I am missing.  Some settings here may be particular to our touchscreen.

Set up DMA
mm 0x53f8000c 0x04080020
mm 0x53f80014 0x00000060

Turn on backlight
mm 0x53fe0000 0x00000008
mm 0x53f8000c md 0x53f8000c | 0x00000400
mm 0x53fe0010 0x000000fd
mm 0x53fe000c 0x000000ff
mm 0x53fe0000 0x03c20101

Set up LCDC registers
mm 0x53fbc000 0x81400000
mm 0x53fbc004 0x014000f0
mm 0x53fbc008 0x000000a0
mm 0x53f8001c 0x01010901
mm 0x53fbc018 0xfa208b85
mm 0x53fbc01c 0x2c001143
mm 0x53fbc020 0x3000080f
mm 0x53fbc028 0x00120300
mm 0x53fbc034 0x00000000
mm 0x53fbc030 0x00020010

Set up graphics registers
  * Not sure how but 0x53fbc068 starts here with 0x80040060
mm 0x53fbc050 0x81400000
mm 0x53fbc054 0x014000f0
mm 0x53fbc058 0x000000a0
mm 0x53fbc060 0x00000000
mm 0x53fbc05c 0x00000000
mm 0x53fbc068 0x00020010
mm 0x53fbc064 0xff400000
mm 0x53fbc064 0x00400000
mm 0x53fbc054 0x00100010
mm 0x53fbc064 0x00000000

Enable clock
mm 0x53f80008 0x21034000
read 0x53f80004, and with (1 << 15) if 0 continue
mm 0x53f8000c 0x000804a0
mm 0x53f8000c 0x010804a0
mm 0x53f80010 0x2c0f0000

Enable GPIO
mm 0x43fac0c8 0x00000000
mm 0x43fac0cc 0x00000000
mm 0x43fac0d0 0x00000000
mm 0x43fac0d4 0x00000000
mm 0x43fac0d8 0x00000000
mm 0x43fac0dc 0x00000000
mm 0x43fac0e0 0x00000000
mm 0x43fac0e4 0x00000000
mm 0x43fac0e8 0x00000000
mm 0x43fac0ec 0x00000000
mm 0x43fac0f0 0x00000000
mm 0x43fac0f4 0x00000000
mm 0x43fac0f8 0x00000000
mm 0x43fac0fc 0x00000000
mm 0x43fac100 0x00000000
mm 0x43fac104 0x00000000
mm 0x43fac204 0x00000002
mm 0x43fac208 0x00000002
mm 0x43fac108 0x00000000
mm 0x43fac10c 0x00000000
mm 0x43fac110 0x00000000
mm 0x43fac114 0x00000000
mm 0x43fac2c0 0x000000e0
mm 0x43fac2c4 0x000000e0
mm 0x43fac2c8 0x000000e0
mm 0x43fac2cc 0x000000e0
mm 0x43fac2d0 0x000000e0
mm 0x43fac2d4 0x000000e0
mm 0x43fac2d8 0x000000e0
mm 0x43fac2dc 0x000000e0
mm 0x43fac2e0 0x000000e0
mm 0x43fac2e4 0x000000e0
mm 0x43fac2e8 0x000000e0
mm 0x43fac2ec 0x000000e0
mm 0x43fac2f0 0x000000e0
mm 0x43fac2f4 0x000000e0
mm 0x43fac2f8 0x000000e0
mm 0x43fac2fc 0x000000e0
mm 0x43fac400 0x000000e0
mm 0x43fac404 0x000000e0
mm 0x43fac300 0x000000e0
mm 0x43fac304 0x000000e0
mm 0x43fac308 0x000000e1
mm 0x43fac30c 0x000000e0




Labels (1)
0 Kudos
3 Replies

654 Views
sletter
Contributor I

That was the problem.  Shutting it down, configuring, and turning it back on (was doing that) was the answer.  Thanks!

0 Kudos

654 Views
sletter
Contributor I

It is our own board, the backlight is fine.   I am not using the graphics and it is usually not configured but I included them for completeness.  I'll give this a look and see if it helps (LCD_En)

0 Kudos

654 Views
FlorentAuger
Contributor V

Hello,

If the board is a Freescale PDK, the backlight is controlled by the MC34704. By default, REG1 is off, and it has to be turned on with an I2C command.

LCD_En signal has to be controller too.

Basically, I/Os, clocks, and LCDC have to be configured properly.

The clock configuration seems correct, though LCDC_EN in CCM_CGCR1 should be enabled before accessing the LCDC registers. It allows the programming of the registers.

Unless it is needed, I won't enable the graphic window capability at this stage. If enabled but not used, it generates unnecessary memory traffic.

0 Kudos