Patch to support uboot logo keep from uboot to kernel for NXP Linux and Android BSP (HDMI, LCD and LVDS)

Document created by Qiang Li - Mpu Se Employee on Nov 5, 2013Last modified by ebiz_ws_prod on Dec 13, 2017
Version 23Show Document
  • View in full screen mode

This patch made the display no interrupt from uboot to kernel to Android. The IPU and related hardware display interface will only be initialized once in Uboot, the kernel code will skip the IPU initialization.

 

1. Description

    1) Support HDMI, LVDS and LCD output in UBoot.
    2) Support UBoot logo keep from uboot to kernel to Android.
    3) For HDMI, both 720P and 1080P mode were supported.
    4) For LVDS, 1024x768 and 1080P dual channel panels were supported.
    5) The logo file is a 32 bpp bmp file.


2. File List
-- kernel_imx\0001-Keep-uboot-logo-for-Android-boot-supports-HDMI-LCD-a.patch

-- kernel_imx\0002-Bug-fix-for-uboot-logo-keep-patch.patch
   Kernel patch to support the logo keep feature.

-- uboot-imx\0001-Enable-uboot-logo-for-HDMI-LCD-and-LVDS.patch
   Uboot patch to support the logo display.

-- logo.bmp
   Example 32bpp logo file.

-- readme.txt
   this file, please refer to it before use the patches


3. Requirement

- iMX6 SabreSD board.

- Android JB4.2.2_1.1.0-GA UBoot and kernel.


4. How to use

-- Copy the two patch files to Android kernel_imx and uboot-imx folder and apply them.
    $ cd ~/myandroid/kernel_imx/
    $ git apply ./0001-Keep-uboot-logo-for-Android-boot-supports-HDMI-LCD-a.patch
    $ cd ~/myandroid/bootable/bootloader/uboot-imx/
    $ git apply ./0001-Enable-uboot-logo-for-HDMI-LCD-and-LVDS.patch

    $ git apply ./0002-Bug-fix-for-uboot-logo-keep-patch.patch

 

-- Build the new uboot image:
    $ cd ~/myandroid/bootable/bootloader/uboot-imx
    $ export CROSS_COMPILE=~/myandroid/prebuilt/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
    $ export ARCH=arm
    $ make mx6q_sabresd_android_config
    $ make

 

-- Before build new UBoot image, the display type can be selected from file uboot-imx\include\configs\mx6q_sabresd.h
// Select one of the output mode
#define IPU_OUTPUT_MODE_HDMI
//#define IPU_OUTPUT_MODE_LVDS
//#define IPU_OUTPUT_MODE_LCD

 

-- Build the new kernel image:
    $ cd ~/myandroid/kernel_imx
    $ export CROSS_COMPILE=~/myandroid/prebuilt/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
    $ export ARCH=arm
    $ make imx6_android_defconfig
    $ make uImage

 

-- Before "make uImage", make menuconfig can be used to select the display type.
                System Type  --->
                   Freescale MXC Implementations  --->
                      MX6 clk setting for smooth UI transtion from bootloader to kernel  --->
                          Select Display Interface
                             ( )  Smooth UI transtion on LCD, IPU1, DI0
                             ( )  Smooth UI transtion on LVDS, IPU1, DI1
                             (X)  Smooth UI transtion on HDMI, IPU2, DI0

 

-- Uboot parameters for video mode
   1080P HDMI:
      "video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 fb0base=0x27b00000 fbmem=28M hdmi_audio_clk=148500000"

 

   720P HDMI:
      "video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 fb0base=0x27b00000 fbmem=28M hdmi_audio_clk=74250000"

 

   1024x768 LVDS:
      "video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666,bpp=32 fb0base=0x27b00000 fbmem=28M"

 

   800x480 LCD:
      "video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB565,bpp=32 fb0base=0x27b00000 fbmem=28M"


-- dd the logo.bmp to SD card address 0x100000 and skip the 54 bytes bmp file header.
   sudo dd if=logo.bmp of=/dev/sdc bs=1 seek=1048576 skip=54


5. Note
    1) The logo.bmp file should be 32bpp or 16bpp, and it should be synced with video mode parameters "bpp=xx",

         and uboot config file mx6q_sabresd.h (#define DISPLAY_BPP  xx).

 

    2) The IPU number and DI number are hard coded in kernel file "board-mx6q_sabresd.c".
static struct fsl_mxc_hdmi_core_platform_data hdmi_core_data = {
  .ipu_id = 1,
  .disp_id = 0,
};

static struct fsl_mxc_lcd_platform_data lcdif_data = {
  .ipu_id = 0,
  .disp_id = 0,
  .default_ifmt = IPU_PIX_FMT_RGB565,
};

static struct fsl_mxc_ldb_platform_data ldb_data = {
  .ipu_id = 0,
  .disp_id = 1,
  .ext_ref = 1,
  .mode = LDB_SEP1,
  .sec_ipu_id = 0,
  .sec_disp_id = 0,
};

 

    3) The IPU number and DI number are defined by Macro in Uboot file "include\configs\mx6q_sabresd.h"
#define IPU_NUM   2  // 1 for IPU1, 2 for IPU2.
#define DI_NUM   0  // 0 for DI0, 1 for DI1.

 

    4) The display type used in uboot and kernel must be same, same type, same IPU number, same DI port and
       same resolution.

 

 

[2015-06-29 Update]: JB4.2.2_1.1.0_uboot_logo_keep_patch_2015-06-29.zip

Fix some LVDS issues for iMX6DL.

Also given an example for LVDS0 with DI0.

New Uboot patches:

     0002-Updated-lvds-clock-source-to-pll2_pfd0.-Same-as-kern.patch

     0003-Add-support-for-iMX6DL.patch

 

New kernel patches

     0003-Skip-lvds-re-initialization-for-logo-keep.patch

     0004-Add-examlpe-for-LVDS0-logo-keep.patch

 

 

[2015-08-07 Update]: JB4.2.2_1.1.0_uboot_logo_keep_patch_2015-08-07.zip

Added the new Uboot patch 0004-Correct-the-sequence-to-set-LDB-clock.patch

It can correct the LVDS clock set sequence whch is a known issue that caused no LVDS display sometimes.

 

[2015-09-18 Update]: JB4.3_1.1.1_uboot_logo_keep_patch_2015-09-18.zip

Added the patch for Android JB4.3_GA1.1.1 release.

Updated clock usecount, after blank the display, the related clock can be gated off correctly.

Support LVDS clock from PLL5.

 

[2015-12-21 Update]: Added 3.10.53_GA1.1.0 patch: L3.10.53_GA1.1.0_uboot_logo_keep_patch_2015-12-21.zip.

Verified on iMX6DL/Q SabreSD board. It supports LCD and LVDS panels, HDMI patch will be released later.

 

[2016-01-04 Update]: Added 3.10.53_GA1.1.0 patch: L3.10.53_GA1.1.0_uboot_logo_keep_patch_2016-01-04.zip.

Added HDMI display support. Now it supports LCD, LVDS and HDMI displays.

Fixed the video playback issue for boot up.

 

[2016-05-18 Update]: 0001-Fix-the-split-mode-LVDS-panel-no-TX3-signal-issue.patch

An issue was founded, when dual channel 4 lanes LVDS panel was used, in uboot there will be no LVDS TX3 signa on one LVDS port, the attach "0001-Fix-the-split-mode-LVDS-panel-no-TX3-signal-issue.patch" was used to fix this issue, it is based on JB4.3_1.1.1_uboot_logo_keep_patch_2015-09-18.zip, for other BSP, please port it manually.

 

[2016-08-29 Update]: 0001-After-reset-IPU-in-SRC-Control-Register-wait-for-res.patch

On some iMX6 chip, after reset the IPU in SRC Control Register, enable IPU at once will cause system hang up, to avoid such issue, software needs wait for IPU reset done by polling the SRC register.

The attach "0001-After-reset-IPU-in-SRC-Control-Register-wait-for-res.patch" was used to fix this issue, it is based on JB4.3_1.1.1_uboot_logo_keep_patch_2015-09-18.zip + "0001-Fix-the-split-mode-LVDS-panel-no-TX3-signal-issue.patch", for other BSP, please port it manually.

 

[2017-01-06 Update] Added patch for L4.1.15_GA1.2.0 BSP and Android M6.0.1_GA2.1.0 BSP.

Files: L4.1.15_GA1.2.0_uboot_logo_keep_patch_2017-01-06.zip; M6.0.1_2.1.0_uboot_logo_keep_patch_2017-01-06.zip

Original Attachment has been moved to: JB4.3_1.1.1_uboot_logo_keep_patch_2015-09-18.zip

Original Attachment has been moved to: L3.10.53_GA1.1.0_uboot_logo_keep_patch_2016-01-04.zip

Original Attachment has been moved to: 0001-Fix-the-split-mode-LVDS-panel-no-TX3-signal-issue.patch.zip

Original Attachment has been moved to: L3.0.35_4.1.0_uboot_logo_keep_patch_2013-11-22.zip

Original Attachment has been moved to: JB4.2.2_1.1.0_uboot_logo_keep_patch_2015-08-07.zip

Original Attachment has been moved to: 0001-After-reset-IPU-in-SRC-Control-Register-wait-for-res.patch.zip

Original Attachment has been moved to: L4.1.15_GA1.2.0_uboot_logo_keep_patch_2017-01-06.zip

Original Attachment has been moved to: M6.0.1_2.1.0_uboot_logo_keep_patch_2017-01-06.zip

14 people found this helpful

Attachments

    Outcomes