I.MX6 U-boot Kernel backlight setting

简介: /********************************************************************* * I.MX6 U-boot Kernel backlight setting * 说明: * 本文主要记录I.MX6 U-boot、Kernel中如何打开、关闭背光设置。
/*********************************************************************
 *              I.MX6 U-boot Kernel backlight setting
 * 说明:
 *     本文主要记录I.MX6 U-boot、Kernel中如何打开、关闭背光设置。
 * 
 *                                   2016-3-7 深圳 南山平山村 曾剑锋
 ********************************************************************/


1. cat bootable/bootloader/uboot-imx/board/freescale/mx6q_sabresd/mx6q_sabresd.c
    ......
    #ifdef CONFIG_LCD
    void lcd_enable(void)
    {
        ......
        /*
         * Set LVDS panel CABC_EN0 to low to disable
         * CABC function. This function will turn backlight
         * automatically according to display content, so
         * simply disable it to get rid of annoying unstable
         * backlight phenomena.
         * 
         * • GPIO direction register (GPIO_GDIR)
         * • Data register (GPIO_DR)
         *
         * 2015-10-8 zengjf modify fot lvds backlight
         */
        reg = readl(GPIO6_BASE_ADDR + GPIO_GDIR);
        reg |= (1 << 15);
        writel(reg, GPIO6_BASE_ADDR + GPIO_GDIR);
        
        reg = readl(GPIO6_BASE_ADDR + GPIO_DR);
        //reg &= ~(1 << 15);
        reg |= (1 << 15);
        writel(reg, GPIO6_BASE_ADDR + GPIO_DR);
        
        /*
         * Set LVDS panel CABC_EN1 to low to disable
         * CABC function.
         */
        reg = readl(GPIO6_BASE_ADDR + GPIO_GDIR);
        reg |= (1 << 16);
        writel(reg, GPIO6_BASE_ADDR + GPIO_GDIR);
        
        reg = readl(GPIO6_BASE_ADDR + GPIO_DR);
        //reg &= ~(1 << 16);
        reg |= (1 << 16);
        writel(reg, GPIO6_BASE_ADDR + GPIO_DR);
        ......
    }
    ......

2. cat arch/arm/mach-mx6/board-mx6q_sabresd.c
    ......
    /*!
     * Board specific initialization.
     */
    static void __init mx6_sabresd_board_init(void)
    {
        ......
        /*
         * Disable HannStar touch panel CABC function,
         * this function turns the panel's backlight automatically
         * according to the content shown on the panel which
         * may cause annoying unstable backlight issue.
         * 
         * zengjf 2015-10-8 this also has down in uboot 
         */
        gpio_request(SABRESD_CABC_EN0, "cabc-en0");
        gpio_direction_output(SABRESD_CABC_EN0, 1);
        gpio_request(SABRESD_CABC_EN1, "cabc-en1");
        gpio_direction_output(SABRESD_CABC_EN1, 1);
        
        ......
    }
    ......

 

目录
相关文章
|
3月前
|
编译器 Windows
plugin cannot be loaded for module “QtQuick“ && Could not load the Qt platform plugin “windows“
本文讨论了在Qt应用程序中遇到的平台插件加载问题,包括具体的错误信息、解决方案和参考链接。问题表现为无法加载“QtQuick”模块的插件,并且无法找到“windows”平台插件。解决方案是修改环境变量`Qt5_DIR`以使用正确的Qt版本和编译器环境。
|
4月前
|
C++ Windows
vs2019 This application failed to start because it could not find or load the QT platform plugin
这篇文章介绍了在VS2019中解决QT程序运行时出现的“无法找到或加载QT平台插件”错误的步骤,通过将必要的DLL文件和插件目录复制到项目解决方案中解决了问题。
|
6月前
|
Windows
Qtdesigner报错:This application failed to stat could not find or load the Qt platform plugin “windows“
Qtdesigner报错:This application failed to stat could not find or load the Qt platform plugin “windows“
|
应用服务中间件
Cannot change version of project facet Dynamic Web Module to 3.0
Cannot change version of project facet Dynamic Web Module to 3.0
|
Oracle 关系型数据库 Unix
Linux Kernel Lowmem Pressure Issues and Related Kernel Structures (Doc ID 452326.1)
Linux Kernel Lowmem Pressure Issues and Related Kernel Structures (Doc ID 452326.1)
131 0
|
开发工具
修复VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot – please use a kernel appropriate for your CPU"
异常处理汇总-开发工具  http://www.cnblogs.com/dunitian/p/4522988.html 修复VirtualBox "This kernel requires the following features not present on the CPU: pae Una...
1016 0
|
芯片
I.MX6 PMU MMPF0100 driver porting
/************************************************************************** * I.MX6 MMPF0100 driver porting * 说明: * 虽然主板上有MMPF0100芯片,却没有注册设备并使用该PMU驱动,真是浪费, * 当然因为需要,所以将PMU的驱动注册起来。
983 0
|
Linux
I.MX6 Linux kernel LVDS backlight enable
/*************************************************************************** * I.
859 0