首页 > 其他 > 详细

I.MX6 U-boot backlight setting

时间:2016-03-07 10:24:01      阅读:346      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!