/*********************************************************************
* I.MX6 U-boot Kernel backlight setting
* 说明:
* 本文主要记录I.MX6 U-boot、Kernel中如何打开、关闭背光设置。
*
* 2016-3-7 深圳 南山平山村 曾剑锋
********************************************************************/ . 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 |= ( << );
writel(reg, GPIO6_BASE_ADDR + GPIO_GDIR); reg = readl(GPIO6_BASE_ADDR + GPIO_DR);
//reg &= ~(1 << 15);
reg |= ( << );
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 |= ( << );
writel(reg, GPIO6_BASE_ADDR + GPIO_GDIR); reg = readl(GPIO6_BASE_ADDR + GPIO_DR);
//reg &= ~(1 << 16);
reg |= ( << );
writel(reg, GPIO6_BASE_ADDR + GPIO_DR);
......
}
...... . 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); ......
}
......

I.MX6 U-boot Kernel backlight setting的更多相关文章

  1. I.MX6 change boot partition 1 to User area

    /************************************************************************************ * I.MX6 change ...

  2. spring boot 遇到 supported setting property http://xml.org/sax/properties/lexical-handler

    解决链接:http://apache-fop.1065347.n5.nabble.com/org-xml-sax-SAXNotSupportedException-thrown-by-FOP-td11 ...

  3. 深入linux kernel内核配置选项

    ============================================================================== 深入linux kernel内核配置选项 ...

  4. Linux - 升级+编译kernel

    For upgrading present kernel to linux-next kernel, we need to follow below steps. 1. Check present k ...

  5. 快速编译system.img、userdata.img、boot.img的方法

    快速编译system.img和boot.img的方法 快速编译system.img,可以使用这个命令: #make systemimage 快速编译boot.img,可以使用以下命令: #make b ...

  6. Raspberry Pi Kernel Compilation 内核编译官方文档

    elinux.org/Raspberry_Pi_Kernel_Compilation#Use_the_provided_compiler Software & Distributions: S ...

  7. RPi Kernel Compilation

    Overview This page explains how to rebuild the kernel image for the RPi. There are two possible rout ...

  8. kernel笔记——内核编译与进程管理

    内核与操作系统 由于一些商业操作系统设计上的缺陷以及日益庞杂,“操作系统”的概念对很多人而言变得含糊不清.在进一步讨论Linux内核的话题前,我们先区分“内核”与“操作系统”这两个概念. 操作系统:指 ...

  9. 解决Ubuntu启动错误——kernel panic not syncing vfs unable to mount root fs on unknown-block 0 0 – error

    最近在倒腾Ubuntu,然后想着怎么美化一下界面,于是照着网上的教程整了一下Flatabulous这个软件,然后好像/boot就满了.关机之后再开机就出现了如题所述的错误,无法开机,也无法进入reco ...

随机推荐

  1. Linux网络通信编程(套接字模型TCP\UDP与IO多路复用模型select\poll\epoll)

    Linux下测试代码: http://www.linuxhowtos.org/C_C++/socket.htm TCP模型 //TCPClient.c #include<string.h> ...

  2. N皇后摆放问题

    Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上.  你的任务是,对于给定的N,求出有多少种 ...

  3. css 面试学习

    最经在学习前端的一些东西 转载于http://www.cnblogs.com/lei2007/archive/2013/08/16/3262897.html 雅虎的css前端的35条定律

  4. Servlet一次乱码排查后的总结(转)

    原文地址:http://my.oschina.net/looly/blog/287255 由来 在写一个小小的表单提交功能的时候,出现了乱码,很奇怪request上来的参数全部是乱码,而从数据库查询出 ...

  5. 三、mysql运算符

    取模有2种方法: 或 mod(,) 比较一个字段的值是不是null有两种方法:is null 或 <=> null 不能直接使用 where id = null;是不对的

  6. 【Nhibernate】HQL 分页

    HQL IQuery query = NHibernateHelper.OpenSession() .CreateQuery( @"from Product"); query.Se ...

  7. ashx与验证码

    using System; using System.Drawing; using System.Drawing.Imaging; using System.Drawing.Drawing2D; us ...

  8. 读书笔记汇总 --- 用Python写网络爬虫

    本系列记录并分享:学习利用Python写网络爬虫的过程. 书目信息 Link 书名: 用Python写网络爬虫 作者: [澳]理查德 劳森(Richard Lawson) 原版名称: web scra ...

  9. Telerik 控件事例(鼠标拖动行,拖动列,设置行对齐,行宽,是否显示)

    People.cs using System;using System.Collections.Generic;using System.Data;using System.Linq;using Sy ...

  10. bnuoj 27874 "Center" of [p]erimeter midpoints(计算几何)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=27874 [题意]: 给你一个三角形三个顶点的坐标ABC,三角形各边取一点DEF,将三角形周长平均分割 ...