rk2928: lvds support, lcd support
authorkfx <kfx@rock-chips.com>
Tue, 7 Aug 2012 03:23:32 +0000 (11:23 +0800)
committerkfx <kfx@rock-chips.com>
Tue, 7 Aug 2012 03:23:32 +0000 (11:23 +0800)
drivers/video/display/screen/lcd_hsd100pxn.c
drivers/video/rockchip/lvds/rk_lvds.c
drivers/video/rockchip/lvds/rk_lvds.h

index c11fa732613c6a0c2b0315f84015bef52689cbc2..b840a51382e8dfd52f349a546a6b1e887d36d8d8 100755 (executable)
@@ -36,6 +36,7 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
     /* screen type & face */\r
     screen->type = OUT_TYPE;\r
     screen->face = OUT_FACE;\r
+    screen->hw_format = 1;\r
 \r
     /* Screen size */\r
     screen->x_res = H_VD;\r
index 0fd1656120cb06e75a080b9c9b1dd45b80095583..72885dfde55b5ca324c50d1188b91becd3bbb653 100644 (file)
@@ -7,10 +7,16 @@
 
 static void rk_output_lvds(rk_screen *screen)
 {
-       LVDSWrReg(m_PD_PLL(1)|m_PD_PLL(0)|m_PDN(1)|m_OEN(0)     \
+        printk("%s: %x\n", __func__, m_PDN_CBG(1)|m_PD_PLL(0)|m_PDN(1)|m_OEN(0)        \
                                        |m_DS(DS_10PF)|m_MSBSEL(DATA_D0_MSB)    \
                                        |m_OUT_FORMAT(screen->hw_format)                \
                                        |m_LCDC_SEL(FROM_LCDC0));
+       LVDSWrReg(m_PDN_CBG(1)|m_PD_PLL(0)|m_PDN(1)|m_OEN(0)    \
+                                       |m_DS(DS_10PF)|m_MSBSEL(DATA_D0_MSB)    \
+                                       |m_OUT_FORMAT(screen->hw_format)                \
+                                       |m_LCDC_SEL(FROM_LCDC0));
+
+        printk("%s: reg = 0x%x\n",  __func__, LVDSRdReg());
 }
 
 static void rk_output_lvttl(rk_screen *screen)
@@ -19,11 +25,13 @@ static void rk_output_lvttl(rk_screen *screen)
                                        |m_DS(DS_10PF)|m_MSBSEL(DATA_D0_MSB)    \
                                        |m_OUT_FORMAT(screen->hw_format)                \
                                        |m_LCDC_SEL(FROM_LCDC0));
+        printk("%s: reg = 0x%x\n",  __func__, LVDSRdReg());
 }
 
 static void rk_output_disable(void)
 {
        LVDSWrReg(m_PD_PLL(0)|m_PD_PLL(0)|m_PDN(0)|m_OEN(0));
+        printk("%s: reg = 0x%x\n",  __func__, LVDSRdReg());
 }
 
 static int rk_lvds_set_param(rk_screen *screen,bool enable )
@@ -32,6 +40,7 @@ static int rk_lvds_set_param(rk_screen *screen,bool enable )
                switch(screen->type){
                        case SCREEN_LVDS:
                                        rk_output_lvds(screen);
+                                        
                                        break;
                        case SCREEN_RGB:
                                        rk_output_lvttl(screen);
index f5289344d8859ccf7f717ff6381ec7d2fee46f77..4298433cb9da37f71bfa23131508b84494d9f54a 100644 (file)
@@ -8,7 +8,7 @@
 #define LVDSWrReg(val)         __raw_writel( val ,LVDS_CON0_REG)
 
 #define m_value(x,offset,mask)      \
-                       ((mask<<(offset+8)) | (x&mask)<<offset)
+                       ((mask<<(offset+16)) | (x&mask)<<offset)
 
 #define OEN                            (1<<9)
 #define m_OEN(x)                       m_value(x,9,1)