赞
踩
第一步 查看原理图、全志硬件手册、屏幕手册
这个就不全部贴出来了
第二步 配置屏
路径:/root/workspace/allwinner/lichee/tools/pack/chips/sun8iw11p1/configs/a40-OKA40i_C/sys_config1024x600mipi.fex
- ;disp init configuration
- fb0_width = 800
- fb0_height = 1280
- ;lcd0 configuration
- lcd_used = 1
- lcd_driver_name = "tft720x1280" ;与驱动名称一致,我没有新增,直接用已支持的驱动改的
- lcd_backlight = 255
- lcd_if = 4
- lcd_x = 800 ;根据屏幕厂家提供的填写,有些屏幕x与y是反过来的
- lcd_y = 1280 ;根据屏幕厂家提供的填写,有些屏幕x与y是反过来的
- ctp_touch_panel_max_x = 800
- ctp_touch_panel_max_y = 480
- lcd_width =
- lcd_height =
- lcd_dclk_freq = 72 ;传输像素传送频率。单位为MHz。lcd_dclk_freq=lcd_htlcd_vt,算出来的值再稍微大一些,我这边算出来是69左右,我用了72
- lcd_pwm_used = 1 ;此参数标识是否使用pwm 用以背光亮度的控制。我这边使用pwm进行控制背光,也定义了对应的lcd_bl_en来控制背光
- lcd_pwm_ch = 1 ; 此参数标识使用的Pwm 通道,这里是指使用SoC 哪个pwm 通道,通过查看原理图连接可知。我这边使用了1通道
- lcd_pwm_freq = 50000
- lcd_pwm_pol = 0
- lcd_pwm_max_limit = 255
-
- lcd_hbp = 56 ;根据如上图屏幕手册Input Timing定义对应值计算:THS+THB得出
- lcd_ht = 908 ;lcd_x+HS+HBP+HFP,如果屏幕手册已经有HT则直接填就行
- lcd_hspw = 8 ;根据如上图屏幕手册Input Timing定义填写
- lcd_vbp = 22 ;根据如上图屏幕手册Input Timing定义对应值计算:TVS+TVB得出
- lcd_vt = 1317 ;lcd_y+VS+VBP+VFP,如果屏幕手册已经有VT则直接填就行
- lcd_vspw = 6 ;根据如上图屏幕手册Input Timing定义填写
- lcd_lvds_if = 0
- lcd_lvds_colordepth = 1
- lcd_lvds_mode = 0
- lcd_frm = 0
- lcd_hv_clk_phase = 0
- lcd_hv_sync_polarity= 0
- lcd_gamma_en = 0
- lcd_bright_curve_en = 0
- lcd_cmap_en = 0
- lcd_dsi_if = 0 ;0:Video mode 1:Command mode 2:video burst mode ,我当时没有在意这个参数,我设置了1,然后一直背光亮,屏幕黑,后面改成0后,屏幕正常点亮
- lcd_dsi_lane = 4 ;屏幕支持的通道数,从1开始,1:1 data lane 2:2 data lane 3:3 data lane 4:4 data lane
- lcd_dsi_format = 0 ;0:Package Pixel Stream, 24bit RGB 1:Loosely Package Pixel Stream, 18bit RGB 2:Package Pixel Stream, 18bit RGB 3:Package Pixel Stream, 16bit RGB
- lcd_dsi_te = 1 ;0:frame trigged automatically 1:frame trigged by te rising edge 2:frame trigged by te falling edge
-
- deu_mode = 0
- lcdgamma4iep = 22
- smart_color = 90
-
- lcd_bl_en = port:PB3<1><0><default><1> ;根据原理图和全志硬件手册填写背光引脚
- lcd_gpio_0 = port:PH11<1><0><default><1> ;根据原理图和全志硬件手册填写电源使能(复位)引脚
- lcd_power = "vcc-lcd" ;3.3v屏幕供电
- lcd_power1 = "vcc-lcd"
第三步 增加屏幕驱动
注意:如果是新增文件则需要在panel、makefile等文件中按要求新增
1.关注是否需要初始化屏幕的指令序列,我这边是需要的,问屏幕厂家要即可
2.关注屏幕的打开电源与关闭电源的时序,从屏幕手册可以查到,如第一步的图2
3.关注屏幕背光打开与关闭
4.如果需要在boot启动过程中就要显示,需要在u-boot源码中修改对应驱动,和内核保持一致。
驱动源码如下:
u-boot路径:/root/workspace/allwinner/lichee/brandy/u-boot-2014.07/drivers/video/sunxi/disp2/disp/lcd/tft720x1280.c
内核路径:/root/workspace/allwinner/lichee/linux-3.10/drivers/video/sunxi/disp2/disp/lcd/tft720x1280.c
- #include "tft720x1280.h"
-
- extern s32 bsp_disp_get_panel_info(u32 screen_id, disp_panel_para *info);
- static void LCD_power_on(u32 sel);
- static void LCD_power_off(u32 sel);
- static void LCD_bl_open(u32 sel);
- static void LCD_bl_close(u32 sel);
-
- static void LCD_panel_init(u32 sel);
- static void LCD_panel_exit(u32 sel);
-
- #define dsi_dcs_wr_0para sunxi_lcd_dsi_dcs_write_0para
- #define dsi_dcs_wr_1para sunxi_lcd_dsi_dcs_write_1para
- #define dsi_dcs_wr_2para sunxi_lcd_dsi_dcs_write_2para
- #define dsi_dcs_wr_3para sunxi_lcd_dsi_dcs_write_3para
- #define dsi_dcs_wr_4para sunxi_lcd_dsi_dcs_write_4para
- #define dsi_dcs_wr_5para sunxi_lcd_dsi_dcs_write_5para
- #define delayms sunxi_lcd_delay_ms
-
- #define panel_reset(val) sunxi_lcd_gpio_set_value(sel, 0, val)
- #define power_en(val) sunxi_lcd_gpio_set_value(sel, 1, val)
-
- #define REGFLAG_DELAY 0xFE
- #define REGFLAG_END_OF_TABLE 0xFD // END OF REGISTERS MARKER
-
- struct LCM_setting_table {
- unsigned cmd;
- unsigned char count;
- unsigned char para_list[64];
- };
-
- static struct LCM_setting_table lcm_initialization_setting[] = {
-
- //Page0
- {0xFF, 3, {0x98, 0x81, 0x03} },
- {0x01, 1, {0x00}},
- {0x02, 1, {0x00}},
- {0x03, 1, {0x53}},
- {0x04, 1, {0x53}},
- {0x05, 1, {0x13}},
- {0x06, 1, {0x04}},
- {0x07, 1, {0x02}},
- {0x08, 1, {0x02}},
- {0x09, 1,{0x00}},
- {0x0A, 1,{0x00}},
- {0x0B, 1,{0x00}},
- {0x0C, 1,{0x00}},
- {0x0D, 1,{0x00}},
- {0x0E, 1,{0x00}},
- {0x0F, 1,{0x00}},
- {0x10, 1,{0x00}},
- {0x11, 1,{0x00}},
- {0x12, 1,{0x00}},
- {0x13, 1,{0x00}},
- {0x14, 1,{0x00}},
- {0x15, 1,{0x00}},
- {0x16, 1,{0x00}},
- {0x17, 1,{0x00}},
- {0x18, 1,{0x00}},
- {0x19, 1,{0x00}},
- {0x1A, 1,{0x00}},
- {0x1B, 1,{0x00}},
- {0x1C, 1,{0x00}},
- {0x1D, 1,{0x00}},
- {0x1E, 1,{0xc0}},
- {0x1F, 1,{0x00}},
- {0x20, 1,{0x02}},
- {0x21, 1,{0x09}},
- {0x22, 1,{0x00}},
- {0x23, 1,{0x00}},
- {0x24, 1,{0x00}},
- {0x25, 1,{0x00}},
- {0x26, 1,{0x00}},
- {0x27, 1,{0x00}},
- {0x28, 1,{0x55}},
- {0x29, 1,{0x03}},
- {0x2A, 1,{0x00}},
- {0x2B, 1,{0x00}},
- {0x2C, 1,{0x00}},
- {0x2D, 1,{0x00}},
- {0x2E, 1,{0x00}},
- {0x2F, 1,{0x00}},
- {0x30, 1,{0x00}},
- {0x31, 1,{0x00}},
- {0x32, 1,{0x00}},
- {0x33, 1,{0x00}},
- {0x34, 1,{0x00}}, // GPWR1/2 non overlap time 2.62us
- {0x35, 1,{0x00}},
- {0x36, 1,{0x00}},
- {0x37, 1,{0x00}},
- {0x38, 1,{0x3c}},
- {0x39, 1,{0x00}},
- {0x3A, 1,{0x00}},
- {0x3B, 1,{0x00}},
- {0x3C, 1,{0x00}},
- {0x3D, 1,{0x00}},
- {0x3E, 1,{0x00}},
- {0x3F, 1,{0x00}},
- {0x40, 1,{0x00}},
- {0x41, 1,{0x00}},
- {0x42, 1,{0x00}},
- {0x43, 1,{0x00}},
- {0x44, 1,{0x00}},
- //{0x45, 1,{0x00}},
-
- {0x50, 1, {0x01} },
- {0x51, 1, {0x23} },
- {0x52, 1, {0x45} },
- {0x53, 1, {0x67} },
- {0x54, 1, {0x89} },
- {0x55, 1, {0xAB} },
- {0x56, 1, {0x01} },
- {0x57, 1, {0x23} },
- {0x58, 1, {0x45} },
- {0x59, 1, {0x67} },
- {0x5A, 1, {0x89} },
- {0x5B, 1, {0xAB} },
- {0x5C, 1, {0xCD} },
- {0x5D, 1, {0xEF} },
-
- {0x5E, 1, {0x01} },
- {0x5F, 1, {0x0A} },
- {0x60, 1, {0x02} },
- {0x61, 1, {0x02} },
- {0x62, 1, {0x08} },
- {0x63, 1, {0x15} },
- {0x64, 1, {0x14} },
- {0x65, 1, {0x02} },
- {0x66, 1, {0x11} },
- {0x67, 1, {0x10} },
- {0x68, 1, {0x02} },
- {0x69, 1, {0x0F} },
- {0x6A, 1, {0x0E} },
- {0x6B, 1, {0x02} },
- {0x6C, 1, {0x0D} },
- {0x6D, 1, {0x0C} },
- {0x6E, 1, {0x06} },
- {0x6F, 1, {0x02} },
- {0x70, 1, {0x02} },
- {0x71, 1, {0x02} },
- {0x72, 1, {0x02} },
- {0x73, 1, {0x02} },
- {0x74, 1, {0x02} },
- {0x75, 1, {0x0A} },
- {0x76, 1, {0x02} },
- {0x77, 1, {0x02} },
- {0x78, 1, {0x06} },
- {0x79, 1, {0x15} },
- {0x7A, 1, {0x14} },
- {0x7B, 1, {0x02} },
- {0x7C, 1, {0x10} },
- {0x7D, 1, {0x11} },
- {0x7E, 1, {0x02} },
- {0x7F, 1, {0x0C} },
- {0x80, 1, {0x0D} },
- {0x81, 1, {0x02} },
- {0x82, 1, {0x0E} },
- {0x83, 1, {0x0F} },
- {0x84, 1, {0x08} },
- {0x85, 1, {0x02} },
- {0x86, 1, {0x02} },
- {0x87, 1, {0x02} },
- {0x88, 1, {0x02} },
- {0x89, 1, {0x02} },
- {0x8A, 1, {0x02} },
-
- //Page 4 command;
- {0xFF, 3,{0x98,0x81,0x04}},
- // {0x00, 1,{0x00}},//3L
- {0x3B, 1,{0xC0}}, // ILI4003D sel
- {0x6C, 1,{0x15}}, //Set VCORE voltage =1.5V
- {0x6E, 1,{0x30}}, //2A di_pwr_reg=0 for power mode 2A //VGH clamp 18V
- {0x6F, 1,{0x55}}, //45 //pumping ratio VGH=5x VGL=-3x
- {0x3A, 1,{0x24}},
- {0x8D, 1, {0x1F} },
- {0x87, 1, {0xBA} },
- //{0x3A, 1, {0x24} },
- {0x26, 1,{0x76}},
- {0xB2, 1,{0xD1}},
- {0xB5, 1,{0x07}},
- {0x35, 1,{0x1F}},
- {0x88, 1,{0x0B}},
- {0x21, 1,{0x30}},
- //TEST
- // {0x2D, 1,{0xFF}},
- // {0x2F, 1,{0x01}},
-
- // Page 1 command
- {0xFF, 3,{0x98,0x81,0x01}},
- {0x22, 1,{0x0A}}, //BGR, SS
- // {0x53, 1,{0x40}},
- // {0x55, 1,{0x40}},
- {0x31, 1,{0x09}}, //Zigzag type3 inversion
- {0x40, 1,{0x33}}, // ILI4003D sel
- // {0x43, 1,{0x66}},
-
- {0x53, 1,{0x37}},//4C
- {0x55, 1, {0x38} },
- {0x50, 1, {0x95} },
- {0x51, 1, {0x95} },
- {0x60, 1, {0x30} },
- // {0x61, 1, {0x01} },
- // {0x62, 1, {0x0C} },
- // {0x63, 1, {0x00} },
- {0xA0, 1, {0x0f} },
- {0xA1, 1, {0x17} },
- {0xA2, 1, {0x22} },
- {0xA3, 1, {0x19} },
- {0xA4, 1, {0x15} },
- {0xA5, 1, {0x28} },
- {0xA6, 1, {0x1c} },
- {0xA7, 1, {0x1c} },
- {0xA8, 1, {0x78} },
- {0xA9, 1, {0x1c} },
- {0xAA, 1, {0x28} },
- {0xAB, 1, {0x69} },
- {0xAC, 1, {0x1a} },
- {0xAD, 1, {0x19}}, //VP36
- {0xAE, 1, {0x4B}}, //VP24
- {0xAF, 1, {0x22} },
- {0xB0, 1, {0x2a} },
- {0xB1, 1, {0x4b} },
- {0xB2, 1, {0x6b} },
- {0xB3, 1, {0x3F} },
-
- {0xC0, 1, {0x01} },
- {0xC1, 1, {0x17} },
- {0xC2, 1, {0x22} },
- {0xC3, 1, {0x19} },
- {0xC4, 1, {0x15} },
- {0xC5, 1, {0x28} },
- {0xC6, 1, {0x1c} },
- {0xC7, 1, {0x1D} },
- {0xC8, 1, {0x78} },
- {0xC9, 1, {0x1c} },
- {0xCA, 1, {0x28} },
- {0xCB, 1, {0x69} },
- {0xCC, 1, {0x1a} },
- {0xCD, 1, {0x19}}, //VN36
- {0xCE, 1, {0x4B}}, //VN24
- {0xCF, 1, {0x22}}, //VN16
- {0xD0, 1, {0x2a}}, //VN12
- {0xD1, 1, {0x4b}}, //VN8
- {0xD2, 1, {0x6b}}, //VN4
- {0xD3, 1, {0x3F}}, //VN0
-
- // Page 0 command
- {0xFF,3,{0x98,0x81,0x00}},
- //{0x35,1,{0x00}}, // TE On
- //{0x36,1,{0x03}},
- {0x11,0,{0x00}}, // Sleep Out
- {REGFLAG_DELAY, 130, {}},
-
- {0x29,0,{0x00}}, // Display On
- {REGFLAG_DELAY, 30, {}},
-
- {REGFLAG_END_OF_TABLE, 0x00, {}}
- };
-
-
-
-
-
-
- static void LCD_cfg_panel_info(panel_extend_para * info)
- {
- u32 i = 0, j=0;
- u32 items;
- u8 lcd_gamma_tbl[][2] =
- {
- //{input value, corrected value}
- {0, 0},
- {15, 15},
- {30, 30},
- {45, 45},
- {60, 60},
- {75, 75},
- {90, 90},
- {105, 105},
- {120, 120},
- {135, 135},
- {150, 150},
- {165, 165},
- {180, 180},
- {195, 195},
- {210, 210},
- {225, 225},
- {240, 240},
- {255, 255},
- };
-
- u32 lcd_cmap_tbl[2][3][4] = {
- {
- {LCD_CMAP_G0,LCD_CMAP_B1,LCD_CMAP_G2,LCD_CMAP_B3},
- {LCD_CMAP_B0,LCD_CMAP_R1,LCD_CMAP_B2,LCD_CMAP_R3},
- {LCD_CMAP_R0,LCD_CMAP_G1,LCD_CMAP_R2,LCD_CMAP_G3},
- },
- {
- {LCD_CMAP_B3,LCD_CMAP_G2,LCD_CMAP_B1,LCD_CMAP_G0},
- {LCD_CMAP_R3,LCD_CMAP_B2,LCD_CMAP_R1,LCD_CMAP_B0},
- {LCD_CMAP_G3,LCD_CMAP_R2,LCD_CMAP_G1,LCD_CMAP_R0},
- },
- };
-
- items = sizeof(lcd_gamma_tbl)/2;
- for (i=0; i<items-1; i++) {
- u32 num = lcd_gamma_tbl[i+1][0] - lcd_gamma_tbl[i][0];
-
- for (j=0; j<num; j++) {
- u32 value = 0;
-
- value = lcd_gamma_tbl[i][1] + ((lcd_gamma_tbl[i+1][1] - lcd_gamma_tbl[i][1]) * j)/num;
- info->lcd_gamma_tbl[lcd_gamma_tbl[i][0] + j] = (value<<16) + (value<<8) + value;
- }
- }
- info->lcd_gamma_tbl[255] = (lcd_gamma_tbl[items-1][1]<<16) + (lcd_gamma_tbl[items-1][1]<<8) + lcd_gamma_tbl[items-1][1];
-
- memcpy(info->lcd_cmap_tbl, lcd_cmap_tbl, sizeof(lcd_cmap_tbl));
- printf("[disp]lcd720:%s\r\n",__func__);
-
- }
-
- static s32 LCD_open_flow(u32 sel)
- {
- printf("[disp]lcd720:%s\r\n",__func__);
- LCD_OPEN_FUNC(sel, LCD_power_on, 120); //open lcd power, and delay 50ms
- LCD_OPEN_FUNC(sel, LCD_panel_init, 1); //open lcd power, than delay 200ms
- LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 5); //open lcd controller, and delay 100ms
- LCD_OPEN_FUNC(sel, LCD_bl_open, 0); //open lcd backlight, and delay 0ms
-
- return 0;
- }
-
- static s32 LCD_close_flow(u32 sel)
- {
- printf("[disp]lcd720:%s\r\n",__func__);
- LCD_CLOSE_FUNC(sel, LCD_bl_close, 0); //close lcd backlight, and delay 0ms
- LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 1); //close lcd controller, and delay 0ms
- LCD_CLOSE_FUNC(sel, LCD_panel_exit, 10); //open lcd power, than delay 200ms
- LCD_CLOSE_FUNC(sel, LCD_power_off, 0); //close lcd power, and delay 500ms
-
- return 0;
- }
-
- static void LCD_power_on(u32 sel)
- {
- /* set lcd-rst to 0 */
- panel_reset(0);
- /* vcc18-lcd */
- sunxi_lcd_power_enable(sel, 0);
- sunxi_lcd_delay_ms(50);
-
- /* vcc33-lcd */
- sunxi_lcd_power_enable(sel, 1);
- sunxi_lcd_delay_ms(100);
-
- sunxi_lcd_pin_cfg(sel, 1);
- sunxi_lcd_delay_ms(20);
-
- panel_reset(1);
- sunxi_lcd_delay_ms(50);
- panel_reset(0);
- sunxi_lcd_delay_ms(35);
- panel_reset(1);
- sunxi_lcd_delay_ms(50);
- }
-
- static void LCD_power_off(u32 sel)
- {
- printf("[disp]lcd720:%s\r\n",__func__);
- sunxi_lcd_delay_ms(20);
- panel_reset(0);
- sunxi_lcd_delay_ms(5);
- power_en(0);
- sunxi_lcd_delay_ms(10);
-
- sunxi_lcd_power_disable(sel, 1);
- sunxi_lcd_delay_ms(5);
- sunxi_lcd_power_disable(sel, 0);
- sunxi_lcd_pin_cfg(sel, 0);
- }
-
- static void LCD_bl_open(u32 sel)
- {
- printf("[disp]lcd720:%s\r\n",__func__);
- sunxi_lcd_backlight_enable(sel);//config lcd_bl_en pin to open lcd backlight
- sunxi_lcd_pwm_enable(sel);
- }
-
- static void LCD_bl_close(u32 sel)
- {
- printf("[disp]lcd720:%s\r\n",__func__);
- sunxi_lcd_backlight_disable(sel);//config lcd_bl_en pin to close lcd backlight
- }
-
- static void LCD_panel_init(u32 sel)
- {
- u32 i = 0;
- printf("[disp]lcd720:%s\r\n",__func__);
-
- sunxi_lcd_dsi_clk_enable(sel);
- sunxi_lcd_delay_ms(10);
-
- //sunxi_lcd_pin_cfg(sel, 1);
- //sunxi_lcd_delay_ms(20);
-
- //panel_reset(1);
- //sunxi_lcd_delay_ms(50);
- //panel_reset(0);
- //sunxi_lcd_delay_ms(35);
- //panel_reset(1);
- //sunxi_lcd_delay_ms(50);
-
-
- for (i = 0;; i++) {
- if (lcm_initialization_setting[i].cmd == REGFLAG_END_OF_TABLE)
- break;
- else if (lcm_initialization_setting[i].cmd == REGFLAG_DELAY)
- sunxi_lcd_delay_ms(lcm_initialization_setting[i].count);
- else {
- dsi_dcs_wr(0, lcm_initialization_setting[i].cmd,
- lcm_initialization_setting[i].para_list,
- lcm_initialization_setting[i].count);
- }
- }
- //sunxi_lcd_dsi_clk_enable(sel);
- //sunxi_lcd_delay_ms(10);
-
-
- return;
- }
-
- static void LCD_panel_exit(u32 sel)
- {
- printf("[disp]lcd720:%s\r\n",__func__);
- sunxi_lcd_dsi_dcs_write_0para(sel,DSI_DCS_SET_DISPLAY_OFF);
- sunxi_lcd_delay_ms(50);
- sunxi_lcd_dsi_dcs_write_0para(sel,DSI_DCS_ENTER_SLEEP_MODE);
- sunxi_lcd_delay_ms(20);
-
- return ;
- }
-
- //sel: 0:lcd0; 1:lcd1
- static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3)
- {
- printf("[disp]lcd720:%s\r\n",__func__);
- return 0;
- }
-
- __lcd_panel_t tft720x1280_panel = {
- /* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */
- .name = "tft720x1280",
- .func = {
- .cfg_panel_info = LCD_cfg_panel_info,
- .cfg_open_flow = LCD_open_flow,
- .cfg_close_flow = LCD_close_flow,
- .lcd_user_defined_func = LCD_user_defined_func,
- },
- };
第四步 配置触摸
- [ctp]
- compatible = "allwinner,sun50i-ctp-para"
- ctp_used = 1
- ctp_name = "gt9xx_ts" ;根据使用触摸芯片选择对应驱动,我这里用的是gt927
- ctp_twi_id = 4 ;根据原理图确认使用的那组twi,我这里用的twi4
- ctp_twi_addr = 0x14
- ctp_screen_max_x = 800 ;根据屏幕手册填写
- ctp_screen_max_y = 1280 ;根据屏幕手册填写
- ctp_touch_panel_max_x = 800
- ctp_touch_panel_max_y = 480
- ctp_revert_x_flag = 0
- ctp_revert_y_flag = 0
- ctp_exchange_x_y_flag = 0
- ctp_power_ldo = "vcc-ctp"
- ctp_power_ldo_vol = 3300
-
- ctp_int_port = port:PH09<6><default><default><default> ;根据原理图和全志硬件手册进行填写
- ctp_wakeup = port:PH10<1><default><default><0> ;根据原理图和全志硬件手册进行填写
- [ctp_list]
- compatible = "allwinner,sun50i-ctp-list"
- ctp_list_used = 1 ;使用ctp list
- ;ft5x_ts = 1
- ;gt82x = 1
- gt9xx_ts = 1 ;对应驱动使能
-
- ;根据原理图和全志硬件手册进行填写
- [twi4]
- twi4_used = 1
- twi4_scl = port:PI2<3><default><default><default>
- twi4_sda = port:PI3<3><default><default><default>
第五步 其他说明或调试方法
1.查看显示信息
这是vsync 中断的次数,每加1 都代表刷新了一帧,正常来说是一秒60(期望的fps)次,重复cat sys,如果无变化,则异常。
这个里面的irq、vsync等信息,正常情况下是会一直变化的,如果一直不动,就要检查fex中的相关配置参数是否正确,我这边就是因为lcd_dsi_if参数配置错误,irq等信息都不会变化,现象就是一直黑屏,背光亮。
2.查看电源信息
可确认屏幕电源与触屏电源是否存在
3.设置默认横屏或者竖屏
方式一(可行)
vim device/softwinner/a40-OKA40i_C/a40_OKA40i_C.mk
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=160 \
ro.display.sdcard=1 \
ro.part.sdcard=1 \
ro.sf.rotation=90 //增加角度来旋转
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。