rk3066b lcdc:support 1.8V io
authoryxj <yxj@rock-chips.com>
Thu, 21 Feb 2013 06:46:04 +0000 (14:46 +0800)
committeryxj <yxj@rock-chips.com>
Thu, 21 Feb 2013 06:46:04 +0000 (14:46 +0800)
drivers/video/rockchip/lcdc/Kconfig
drivers/video/rockchip/lcdc/rk3066b_lcdc.c

index a0f3322565b9cd4d84f9b5fe103f8f9785a5200f..a714142eabdebeb25b00d27cb5b3f3b8b9366073 100644 (file)
@@ -37,6 +37,13 @@ config LCDC0_RK3066B
         help
            Support lcdc0 if you say y here
 
+config RK3066B_LCDC0_IO_18V
+        bool "lcdc0 1.8v io support"
+        depends on LCDC0_RK3066B
+        default n
+        help
+         LCDC0 io voltage is 1.8V if you say y here,the default voltage is 3.3V
+
 config LCDC1_RK3066B
         bool "lcdc1 support"
         depends on LCDC_RK3066B
@@ -44,6 +51,14 @@ config LCDC1_RK3066B
         help
            Support lcdc1 if you say y here
 
+config RK3066B_LCDC1_IO_18V
+        bool "lcdc1 1.8v io support"
+        depends on LCDC1_RK3066B
+        default n
+        help
+         LCDC1 io voltage is 1.8V if you say y here,the default voltage is 3.3V
+
+
 config LCDC_RK3188
         bool "rk3188 lcdc support"
         depends on FB_ROCKCHIP && ARCH_RK3188
index ce26a6f5566e5a7a1051c260ac15ddd701eecbb0..b71f69c31170fa972b3affd45fcc9da6ee33c5ab 100755 (executable)
@@ -47,6 +47,8 @@ module_param(dbg_thresd, int, S_IRUGO|S_IWUSR);
 static int init_rk3066b_lcdc(struct rk_lcdc_device_driver *dev_drv)
 {
        struct rk3066b_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk3066b_lcdc_device,driver);
+       int v;
+       
        if(lcdc_dev->id == 0) //lcdc0
        {
                lcdc_dev->pd = clk_get(NULL,"pd_lcdc0");
@@ -76,8 +78,27 @@ static int init_rk3066b_lcdc(struct rk_lcdc_device_driver *dev_drv)
        clk_enable(lcdc_dev->dclk);
        lcdc_dev->clk_on = 1;
 
+       if(lcdc_dev->id == 0)
+       {
+               #if defined(CONFIG_RK3066B_LCDC0_IO_18V)
+               v = 0x40004000;               //bit14: 1,1.8v;0,3.3v
+               writel_relaxed(v,RK30_GRF_BASE + GRF_IO_CON4);
+               #else
+               v = 0x40000000;              
+               writel_relaxed(v,RK30_GRF_BASE + GRF_IO_CON4);
+               #endif
+       }
+
        if(lcdc_dev->id == 1) //iomux for lcdc1
        {
+               #if defined(CONFIG_RK3066B_LCDC1_IO_18V)
+               v = 0x80008000;               //bit14: 1,1.8v;0,3.3v
+               writel_relaxed(v,RK30_GRF_BASE + GRF_IO_CON4);
+               #else
+               v = 0x80000000;
+               writel_relaxed(v,RK30_GRF_BASE + GRF_IO_CON4);
+               #endif
+               
                iomux_set(LCDC1_DCLK);
                iomux_set(LCDC1_DEN);
                iomux_set(LCDC1_HSYNC);