码迷,mamicode.com
首页 > 其他好文 > 详细

I.MX6 U-boot backlight setting

时间:2016-03-07 10:25:24      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:

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


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);
        ......
    }
    ......

 

I.MX6 U-boot backlight setting

标签:

原文地址:http://www.cnblogs.com/zengjfgit/p/5249437.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!