将全志R16平台上的MIPI屏迁移到全志R40平台上(草稿)
来源:互联网 发布:龙腾世纪2 知乎 编辑:程序博客网 时间:2024/06/05 19:09
将全志R16平台上的MIPI屏迁移到全志R40平台上
2017/11/3 20:29
版本:V1.0
0、
在全志R16平台,MIPI屏幕同事在DragonBorad(DragonMate)/Android4.4.2(Parrot V1.1)下已经点亮!
uboot中就算你不配置MIPI屏幕,在lichee中编译就可以让MIPI屏幕显示了。
1、
在全志R40的android6.0/tinav2.1的SDK中默认配置
W:\lcd_r40_tianv2.1\target\allwinner\azalea-m2ultra\configs\sys_config.fex
[lcd0]
lcd_used = 1
lcd_driver_name = "S070WV20_MIPI_RGB"
W:\r40-android-6.0\lichee\tools\pack\chips\sun8iw11p1\configs\m2ultra\sys_config.fex
[lcd0]
lcd_used = 1
lcd_driver_name = "S070WV20_MIPI_RGB"
也就是LCD屏的名称就是S070WV20_MIPI_RGB,很容易找到驱动程序为:
rootroot@cm-System-Product-Name:~$ cd /home/wwt/lcd_r40_tianv2.1/
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1$ ll
总用量 96
drwxrwxr-x 5 rootroot rootroot 4096 10月 31 22:07 build
drwxrwxr-x 3 rootroot rootroot 4096 1月 12 2017 config
-r--r--r-- 1 rootroot rootroot 609 1月 12 2017 Config.in
drwxrwxr-x 3 rootroot rootroot 24576 1月 12 2017 dl
drwxrwxr-x 3 rootroot rootroot 4096 1月 12 2017 docs
drwxrwxr-x 4 rootroot rootroot 4096 1月 12 2017 lichee
-r--r--r-- 1 rootroot rootroot 82 1月 12 2017 Makefile
drwxrwxr-x 4 rootroot rootroot 4096 10月 31 21:47 out
drwxrwxr-x 19 rootroot rootroot 4096 1月 12 2017 package
drwxrwxr-x 4 rootroot rootroot 4096 1月 12 2017 prebuilt
-r--r--r-- 1 rootroot rootroot 13360 1月 12 2017 rules.mk
drwxrwxr-x 6 rootroot rootroot 4096 1月 12 2017 scripts
drwxrwxr-x 7 rootroot rootroot 4096 1月 12 2017 target
drwxrwxr-x 3 rootroot rootroot 4096 11月 1 17:08 tmp
drwxrwxr-x 12 rootroot rootroot 4096 1月 12 2017 toolchain
drwxrwxr-x 60 rootroot rootroot 4096 1月 12 2017 tools
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1$ cd lichee/linux-3.10/drivers/video/sunxi/disp2/disp/
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1/lichee/linux-3.10/drivers/video/sunxi/disp2/disp$ ll
总用量 13240
-rw-r--r-- 1 rootroot rootroot 8 10月 31 21:57 built-in.o
drwxrwxr-x 6 rootroot rootroot 4096 10月 31 21:52 de
-rw-rw-r-- 1 rootroot rootroot 20535 1月 12 2017 dev_composer.c
-rw-r--r-- 1 rootroot rootroot 132656 10月 31 21:52 dev_composer.o
-rw-rw-r-- 1 rootroot rootroot 65586 1月 12 2017 dev_disp.c
-rwxrwxr-x 1 rootroot rootroot 19901 1月 12 2017 dev_disp_debugfs.c
-rwxrwxr-x 1 rootroot rootroot 615 1月 12 2017 dev_disp_debugfs.h
-rw-r--r-- 1 rootroot rootroot 127012 10月 31 21:52 dev_disp_debugfs.o
-rw-rw-r-- 1 rootroot rootroot 6623 1月 12 2017 dev_disp.h
-rw-r--r-- 1 rootroot rootroot 215060 10月 31 21:52 dev_disp.o
-rw-rw-r-- 1 rootroot rootroot 48495 1月 12 2017 dev_fb.c
-rw-r--r-- 1 rootroot rootroot 165440 10月 31 21:52 dev_fb.o
-rw-r--r-- 1 rootroot rootroot 6275992 10月 31 21:52 disp.ko
-rw-r--r-- 1 rootroot rootroot 471 10月 31 21:52 disp.mod.c
-rw-r--r-- 1 rootroot rootroot 17488 10月 31 21:52 disp.mod.o
-rw-r--r-- 1 rootroot rootroot 6262228 10月 31 21:52 disp.o
-rw-rw-r-- 1 rootroot rootroot 17295 1月 12 2017 disp_sys_intf.c
-rw-rw-r-- 1 rootroot rootroot 2998 1月 12 2017 disp_sys_intf.h
-rw-r--r-- 1 rootroot rootroot 116596 10月 31 21:52 disp_sys_intf.o
drwxrwxr-x 2 rootroot rootroot 4096 10月 31 21:52 lcd
-rwxrwxr-x 1 rootroot rootroot 802 1月 12 2017 Makefile
-rw-r--r-- 1 rootroot rootroot 46 11月 1 17:08 modules.order
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1/lichee/linux-3.10/drivers/video/sunxi/disp2/disp$
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1/lichee/linux-3.10/drivers/video/sunxi/disp2/disp$
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1/lichee/linux-3.10/drivers/video/sunxi/disp2/disp$ grep S070WV20_MIPI_RGB . -R
./.disp.o.cmd:cmd_drivers/video/sunxi/disp2/disp/disp.o := arm-openwrt-linux-muslgnueabi-ld -EL -r -o drivers/video/sunxi/disp2/disp/disp.o drivers/video/sunxi/disp2/disp/dev_disp.o drivers/video/sunxi/disp2/disp/dev_fb.o drivers/video/sunxi/disp2/disp/dev_disp_debugfs.o drivers/video/sunxi/disp2/disp/disp_sys_intf.o drivers/video/sunxi/disp2/disp/dev_composer.o drivers/video/sunxi/disp2/disp/de/disp_display.o drivers/video/sunxi/disp2/disp/de/disp_features.o drivers/video/sunxi/disp2/disp/de/disp_device.o drivers/video/sunxi/disp2/disp/de/disp_lcd.o drivers/video/sunxi/disp2/disp/de/disp_manager.o drivers/video/sunxi/disp2/disp/de/disp_private.o drivers/video/sunxi/disp2/disp/de/disp_smart_backlight.o drivers/video/sunxi/disp2/disp/de/disp_enhance.o drivers/video/sunxi/disp2/disp/de/disp_capture.o drivers/video/sunxi/disp2/disp/de/disp_hdmi.o drivers/video/sunxi/disp2/disp/de/disp_tv.o drivers/video/sunxi/disp2/disp/de/disp_vdevice.o drivers/video/sunxi/disp2/disp/de/disp_eink_manager.o drivers/video/sunxi/disp2/disp/de/eink_buffer_manager.o drivers/video/sunxi/disp2/disp/de/eink_pipeline_manager.o drivers/video/sunxi/disp2/disp/de/disp_format_convert.o drivers/video/sunxi/disp2/disp/de/disp_vga.o drivers/video/sunxi/disp2/disp/lcd/panels.o drivers/video/sunxi/disp2/disp/lcd/lcd_source.o drivers/video/sunxi/disp2/disp/lcd/default_panel.o drivers/video/sunxi/disp2/disp/lcd/lt070me05000.o drivers/video/sunxi/disp2/disp/lcd/wtq05027d01.o drivers/video/sunxi/disp2/disp/lcd/t27p06.o drivers/video/sunxi/disp2/disp/lcd/dx0960be40a1.o drivers/video/sunxi/disp2/disp/lcd/tft720x1280.o drivers/video/sunxi/disp2/disp/lcd/S6D7AA0X01.o drivers/video/sunxi/disp2/disp/lcd/default_eink.o drivers/video/sunxi/disp2/disp/lcd/cpu_gg1p4062utsw.o drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_fcc.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_gsu.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_hal.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/disp_al.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_peak.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_rtmx.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_scaler_table.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_vep_table.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_vsu.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_feat.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_lcd.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_lti.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_fce.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_ase.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_bws.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_enhance.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_smbl.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_ccsc.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_dcsc.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_wb.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_clock.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_dsi.o
匹配到二进制文件 ./disp.o
./lcd/S070WV20_MIPI_RGB.h:#ifndef __S070WV20_MIPI_RGB_PANEL_H__
./lcd/S070WV20_MIPI_RGB.h:#define __S070WV20_MIPI_RGB_PANEL_H__
./lcd/S070WV20_MIPI_RGB.h:extern __lcd_panel_t S070WV20_MIPI_RGB_panel;
./lcd/S070WV20_MIPI_RGB.c:#include "S070WV20_MIPI_RGB.h"
./lcd/S070WV20_MIPI_RGB.c:__lcd_panel_t S070WV20_MIPI_RGB_panel = {
./lcd/S070WV20_MIPI_RGB.c: .name = "S070WV20_MIPI_RGB",
很容易确认默认的MIPI屏的驱动就是:S070WV20_MIPI_RGB.c
W:\lcd_r40_tianv2.1\lichee\linux-3.10\drivers\video\sunxi\disp2\disp\lcd\S070WV20_MIPI_RGB.c
为了防止平台的不同所导致的移植的问题(全志的每一个平台的驱动都是有点细微的差别,貌似就是要给你找难受的!)
我还是决定拿S070WV20_MIPI_RGB.c开刀,替换其中的配置参数!
3、分析源码:头文件分析
MIPI屏幕的额控制引脚确认让我看了好久好久!
W:\lcd_r40_tianv2.1\lichee\linux-3.10\drivers\video\sunxi\disp2\disp\lcd\S070WV20_MIPI_RGB.h
/*
*
* Copyright (c) 2016 Allwinnertech Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*/
#ifndef __S070WV20_MIPI_RGB_PANEL_H__
#define __S070WV20_MIPI_RGB_PANEL_H__
#include "panels.h"
#define icn_en(val) sunxi_lcd_gpio_set_value(sel, 0, val)
#define power_en(val) sunxi_lcd_gpio_set_value(sel, 1, val)
extern __lcd_panel_t S070WV20_MIPI_RGB_panel;
#endif
忽然之间发现:sys_config.fex中有配置GPIO0和GPIO1的,但是没有注释它们是做啥用的!
W:\lcd_r40_tianv2.1\target\allwinner\azalea-m2ultra\configs\sys_config.fex
;BPI-M2U
;lcd_bl_en = port:PH16<1><0><2><1>
;CB-S
lcd_bl_en = port:PB10<1><0><2><1>
lcd_power = "vcc-3v"
;lcd_power = "vcc-mipi"
;BPI-M2U
;LCD-RST
;lcd_gpio_0 = port:PH17<1><0><2><1>
;LCD-PWR-EN
;lcd_gpio_1 = port:PH18<1><0><2><1>
;CB-S
;LCD-RST
lcd_gpio_0 = port:PB09<1><0><2><1>
;LCD-PWR-EN
lcd_gpio_1 = port:PB11<1><0><2><1>
;lcd_io_regluator1 = "vcc-pd"
对照BPI M2U的原始图,根据引脚定义,很容易发现GPIO0是RESET复位引脚,GPIO1是电源使能引脚。不过我们我们的全志R40开发板设计的时候LCD始终供电,那就是不用考虑供电的配置了。简化了一点!
根据全志R16的经验,只要要RESET引脚拉高(置1)就可以显示了!
/*
*
* Copyright (c) 2016 Allwinnertech Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*/
#ifndef __S070WV20_MIPI_RGB_PANEL_H__
#define __S070WV20_MIPI_RGB_PANEL_H__
#include "panels.h"
//;CB-S
//;LCD-RST
//lcd_gpio_0 = port:PB09<1><0><2><1>
//;LCD-PWR-EN
//lcd_gpio_1 = port:PB11<1><0><2><1>
//;lcd_io_regluator1 = "vcc-pd"
//SET GPIO0
#define icn_en(val) sunxi_lcd_gpio_set_value(sel, 0, val)
//SET GPIO1
#define power_en(val) sunxi_lcd_gpio_set_value(sel, 1, val)
//R16
//#define panel_rst(v) (sunxi_lcd_gpio_set_value(0, 0, v))
extern __lcd_panel_t S070WV20_MIPI_RGB_panel;
#endif
4、更新sys_config.fex
比对全志R16的可以使用的参数。对于全志R40没有但是全志R16有的,拷贝并标记。
对于全志R40有但是全志R16不涉及的配置暂时也不动(动了怕出错!)
5、
更新驱动部分(参照全志R16平台已经调通的驱动程序,具体不详细叙述了)
W:\lcd_r40_tianv2.1\lichee\linux-3.10\drivers\video\sunxi\disp2\disp\lcd\S070WV20_MIPI_RGB.c
#define REGFLAG_END_OF_TABLE 0x102
#define REGFLAG_DELAY 0x101
struct lcd_setting_table {
u16 cmd;
u32 count;
u8 para_list[64];
};
static struct lcd_setting_table hx050bh12a04_init_setting[] = {
//JD9365 initial code
//Page0
{0xE0,01,{0x00}},
//--- PASSWORD ----//
{0xE1,01,{0x93}},
{0xE2,01,{0x65}},
{0xE3,01,{0xF8}},
{0x80,01,{0x03}},
//Page0
{0xE0,01,{0x04}},
{0x2D,01,{0x03}},
//--- Sequence Ctrl ----//
//{0x70,01,{0x10}},//DC0,01,{DC1 10 20
//{0x71,01,{0x13}},//DC2,01,{DC3 13 13
//{0x72,01,{0x06}},//DC7 06 06
//{0x75,01,{0x03}},// 03 04
//--- Page1 ----//
{0xE0,01,{0x01}},
//{0x4A,01,{0x30}},
//Set VCOM
{0x00,01,{0x00}},
{0x01,01,{0x8E}},//A0
{0x03,01,{0x00}},
{0x04,01,{0x8E}},//A0
//Set Gamma Power,01,{ VGMP,01,{VGMN,01,{VGSP,01,{VGSN
//{0x0A,01,{0x07}},
//{0x0C,01,{0x74}},
//Set Gamma Power,01,{ VGMP,01,{VGMN,01,{VGSP,01,{VGSN
{0x17,01,{0x00}},
{0x18,01,{0xD8}},//D7
{0x19,01,{0x01}},//00
{0x1A,01,{0x00}},
{0x1B,01,{0xD8}},
{0x1C,01,{0x01}},//00
//Set Gate Power
{0x1F,01,{0x74}},//VGH_REG=17V 6A VGH_REG=15V
{0x20,01,{0x19}},//VGL_REG=-8V 23 VGL_REG=-10V
{0x21,01,{0x19}},//VGL_REG2=-8V 23 VGL_REG2=-10V
{0x22,01,{0x0E}},
//SET RGBCYC
{0x37,01,{0x29}},//SS=1,01,{ BGR=1
{0x38,01,{0x05}},//JDT=101 Zig-zag
{0x39,01,{0x08}},//RGB_N_EQ1,01,{ modify 20140806
{0x3A,01,{0x18}},//12 modify 15/05/06RGB_N_EQ2,01,{ modify 20140806
{0x3B,01,{0x18}},//modify 15/05/06
{0x3C,01,{0x72}},//78 modify 15/05/06SET EQ3 for TE_H
{0x3D,01,{0xFF}},//SET CHGEN_ON,01,{ modify 20140827
{0x3E,01,{0xFF}},//SET CHGEN_OFF,01,{ modify 20140827
{0x3F,01,{0xFF}},//SET CHGEN_OFF2,01,{ modify 20140827
//Set TCON
{0x40,01,{0x06}},//RSO 04h=720,01,{ 05h=768,01,{ 06h=800
{0x41,01,{0xA0}},//LN=640->1280 line
{0x43,01,{0x10}},//VFP
{0x44,01,{0x0E}},//VBP
{0x45,01,{0x3C}},//HBP
//--- power voltage ----//
{0x55,01,{0x0F}},//DCDCM=0011,01,{ HX PWR_IC
{0x56,01,{0x01}},
{0x57,01,{0x64}},//65 modify 15/05/06
{0x58,01,{0x0A}},//AVDD
{0x59,01,{0x0A}},//VCL &AVEE
{0x5A,01,{0x28}},//VGH ,01,{15V
{0x5B,01,{0x10}},//VGL,01,{-10V
//--- Gamma ----//
{0x5D,01,{0x7C}},//70
{0x5E,01,{0x60}}, //56
{0x5F,01,{0x4E}},//45
{0x60,01,{0x40}},//39
{0x61,01,{0x39}}, //35
{0x62,01,{0x28}}, //26
{0x63,01,{0x2A}}, //2A
{0x64,01,{0x11}}, //14
{0x65,01,{0x27}}, //2E
{0x66,01,{0x23}}, //2D
{0x67,01,{0x21}}, //2D
{0x68,01,{0x3D}}, //4C
{0x69,01,{0x2B}}, //3A
{0x6A,01,{0x33}}, //45
{0x6B,01,{0x26}}, //38
{0x6C,01,{0x24}}, //36
{0x6D,01,{0x18}}, //2B
{0x6E,01,{0x0A}}, //1C
{0x6F,01,{0x00}}, //00
{0x70,01,{0x7C}}, //70
{0x71,01,{0x60}}, //56
{0x72,01,{0x4E}}, //45
{0x73,01,{0x40}}, //39
{0x74,01,{0x39}}, //35
{0x75,01,{0x29}}, //26
{0x76,01,{0x2B}}, //2A
{0x77,01,{0x12}}, //14
{0x78,01,{0x27}}, //2E
{0x79,01,{0x24}}, //2D
{0x7A,01,{0x21}}, //2D
{0x7B,01,{0x3E}}, //4C
{0x7C,01,{0x2B}}, //3A
{0x7D,01,{0x33}}, //45
{0x7E,01,{0x26}}, //38
{0x7F,01,{0x24}}, //36
{0x80,01,{0x19}}, //2B
{0x81,01,{0x0A}}, //1C
{0x82,01,{0x00}}, //00
//Page2,01,{ for GIP
{0xE0,01,{0x02}},
//GIP_L Pin mapping
{0x00,01,{0x0E}},//L1/CK2BO/CKV10
{0x01,01,{0x06}}, //L2/CK2O/CKV2
{0x02,01,{0x0C}}, //L3/CK1BO/CKV8
{0x03,01,{0x04}}, //L4/CK1O/CKV0
{0x04,01,{0x08}}, //L5/CK3O/CKV4
{0x05,01,{0x19}}, //L6/CK3BO/CKV2
{0x06,01,{0x0A}}, //L7/CK4O/CKV6
{0x07,01,{0x1B}}, //L8/CK4BO/CKV14
{0x08,01,{0x00}}, //L9/STVO/STV0
{0x09,01,{0x1D}}, //L10
{0x0A,01,{0x1F}}, //L11/VGL
{0x0B,01,{0x1F}}, //L12/VGL
{0x0C,01,{0x1D}}, //L13
{0x0D,01,{0x1D}}, //L14
{0x0E,01,{0x1D}}, //L15
{0x0F,01,{0x17}}, //L16/V1_O/FLM1
{0x10,01,{0x37}}, //L17/V2_O/FLM1_INV
{0x11,01,{0x1D}}, //L18
{0x12,01,{0x1F}}, //L19/BW/VGL
{0x13,01,{0x1E}}, //L20/FW/VGH
{0x14,01,{0x10}}, //L21/RST_O/ETV0
{0x15,01,{0x1D}}, //L22
//GIP_R Pin mapping
{0x16,01,{0x0F}}, //R1/CK2BE/CKV11
{0x17,01,{0x07}}, //R2/CK2E/CKV3
{0x18,01,{0x0D}}, //R3/CK1BE/CKV9
{0x19,01,{0x05}}, //R4/CK1E/CKV1
{0x1A,01,{0x09}}, //R5/CK3E/CKV5
{0x1B,01,{0x1A}}, //R6/CK3BE/CKV13
{0x1C,01,{0x0B}}, //R7/CK4E/CKV7
{0x1D,01,{0x1C}}, //R8/CK4BE/CKV15
{0x1E,01,{0x01}}, //R9/STVE/STV1
{0x1F,01,{0x1D}}, //R10
{0x20,01,{0x1F}}, //R11/VGL
{0x21,01,{0x1F}}, //R12/VGL
{0x22,01,{0x1D}}, //R13
{0x23,01,{0x1D}}, //R14
{0x24,01,{0x1D}}, //R15
{0x25,01,{0x18}}, //R16/V1_E/FLM2
{0x26,01,{0x38}}, //R17/V2_E/FLM2_INV
{0x27,01,{0x1D}}, //R18
{0x28,01,{0x1F}}, //R19/BW/VGL
{0x29,01,{0x1E}}, //R20/FW/VGH
{0x2A,01,{0x11}}, //R21/RST_E/ETV1
{0x2B,01,{0x1D}}, //R22
//GIP_L_GS Pin mapping
{0x2C,01,{0x09}}, //L1/CK2BO/CKV5
{0x2D,01,{0x1A}}, //L2/CK2O/CKV13
{0x2E,01,{0x0B}}, //L3/CK1BO/CKV7
{0x2F,01,{0x1C}}, //L4/CK1O/CKV15
{0x30,01,{0x0F}}, //L5/CK3O/CKV11
{0x31,01,{0x07}}, //L6/CK3BO/CKV3
{0x32,01,{0x0D}}, //L7/CK4O/CKV9
{0x33,01,{0x05}}, //L8/CK4BO/CKV1
{0x34,01,{0x11}}, //L9/STVO/ETV1
{0x35,01,{0x1D}}, //L10
{0x36,01,{0x1F}}, //L11/VGL
{0x37,01,{0x1F}}, //L12/VGL
{0x38,01,{0x1D}}, //L13
{0x39,01,{0x1D}}, //L14
{0x3A,01,{0x1D}}, //L15
{0x3B,01,{0x18}}, //L16/V1_O/FLM2
{0x3C,01,{0x38}}, //L17/V2_O/?
{0x3D,01,{0x1D}}, //L18
{0x3E,01,{0x1E}}, //L19/BW/VGH
{0x3F,01,{0x1F}}, //L20/FW/VGL
{0x40,01,{0x01}}, //L21/RST_O/STV1
{0x41,01,{0x1D}}, //L22
//GIP_R_GS Pin mapping
{0x42,01,{0x08}}, //R1/CK2BE/CKV4
{0x43,01,{0x19}}, //R2/CK2E/CKV12
{0x44,01,{0x0A}}, //R3/CK1BE/CKV6
{0x45,01,{0x1B}}, //R4/CK1E/CKV14
{0x46,01,{0x0E}}, //R5/CK3E/CKV10
{0x47,01,{0x06}}, //R6/CK3BE/CKV2
{0x48,01,{0x0C}}, //R7/CK4E/CKV8
{0x49,01,{0x04}}, //R8/CK4BE/CKV0
{0x4A,01,{0x10}}, //R9/STVE/ETV0
{0x4B,01,{0x1D}}, //R10
{0x4C,01,{0x1F}}, //R11/VGL
{0x4D,01,{0x1F}}, //R12/VGL
{0x4E,01,{0x1D}}, //R13
{0x4F,01,{0x1D}}, //R14
{0x50,01,{0x1D}}, //R15
{0x51,01,{0x17}}, //R16/V1_E/FLM1
{0x52,01,{0x37}}, //R17/V2_E/?
{0x53,01,{0x1D}}, //R18
{0x54,01,{0x1E}}, //R19/BW/VGH
{0x55,01,{0x1F}}, //R20/FW/VGL
{0x56,01,{0x00}}, //R21/RST_E/STV0
{0x57,01,{0x1D}}, //R22
//GIP Timing
{0x58,01,{0x10}},
{0x59,01,{0x00}},
{0x5A,01,{0x00}},
{0x5B,01,{0x10}},
{0x5C,01,{0x00}}, //01
{0x5D,01,{0xD0}}, //50
{0x5E,01,{0x01}},
{0x5F,01,{0x02}},
{0x60,01,{0x60}},
{0x61,01,{0x01}},
{0x62,01,{0x02}},
{0x63,01,{0x06}},
{0x64,01,{0x6A}},
{0x65,01,{0x55}},
{0x66,01,{0x0F}}, //2C
{0x67,01,{0xF7}}, //73
{0x68,01,{0x08}}, //05
{0x69,01,{0x08}},
{0x6A,01,{0x6A}}, //66_by Max_20151029
{0x6B,01,{0x10}},//dummy clk
{0x6C,01,{0x00}},
{0x6D,01,{0x00}},
{0x6E,01,{0x00}},
{0x6F,01,{0x88}},
{0x70,01,{0x00}}, //00
{0x71,01,{0x17}}, //00
{0x72,01,{0x06}},
{0x73,01,{0x7B}},
{0x74,01,{0x00}},
{0x75,01,{0x80}}, //80
{0x76,01,{0x01}},
{0x77,01,{0x5D}}, //0D
{0x78,01,{0x18}}, //18
{0x79,01,{0x00}},
{0x7A,01,{0x00}},
{0x7B,01,{0x00}},
{0x7C,01,{0x00}},
{0x7D,01,{0x03}},
{0x7E,01,{0x7B}},
//Page4
{0xE0,01,{0x04}},
//{0x04,01,{0x01}},//00 modify 15/05/06
{0x09,01,{0x10}},// modify 15/05/06
{0x0E,01,{0x38}},// modify 15/05/06
//ESD Check & lane number
{0x2B,01,{0x2B}},
{0x2D,01,{0x03}},
{0x2E,01,{0x44}},
//Page0
{0xE0,01,{0x00}},
//Watch dog
{0xE6,01,{0x02}},
{0xE7,01,{0x06}},
{0x11,01,{0x00}},
{REGFLAG_DELAY, 20, {}},
{0x29,01,{0x00}},
{REGFLAG_DELAY, 200, {}},
{REGFLAG_END_OF_TABLE, 0x00, {}},
};
static void LCD_panel_init(u32 sel)
{
/*
dprintk("***LCD_panel_init_kernel:Begin!!!\n");
sunxi_lcd_dsi_gen_write_1para(sel,0x7A,0xC1);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x20,0x20);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x21,0xE0);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x22,0x13);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x23,0x28);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x24,0x30);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x25,0x28);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x26,0x00);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x27,0x0D);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x28,0x03);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x29,0x1D);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x34,0x80);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x36,0x28);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0xB5,0xA0);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x5C,0xFF);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x2A,0x01);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x56,0x92);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x6B,0x71);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x69,0x2B);//2B
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x10,0x40);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x11,0x98);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0xB6,0x20);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x51,0x20);
sunxi_lcd_delay_ms(10);
#if Bist_mode
sunxi_lcd_dsi_gen_write_1para(sel,0x14,0x43);
sunxi_lcd_dsi_gen_write_1para(sel,0x2A,0x49);
#endif
sunxi_lcd_dsi_gen_write_1para(sel,0x09,0x10);
sunxi_lcd_delay_ms(10);
*/
u32 i;
printk(KERN_ERR "**** wyb %s-%d-%s \n", __FILE__, __LINE__, __func__);
printk("raoyiming +++ LCD_panel_init\n");
/*R16*/
//panel_rst(1);
//sunxi_lcd_delay_ms(10);
//panel_rst(0);
//sunxi_lcd_delay_ms(50);
//panel_rst(1);
//sunxi_lcd_delay_ms(200);
/*R40*/
icn_en(1);
sunxi_lcd_delay_ms(10);
icn_en(0);
sunxi_lcd_delay_ms(50);
icn_en(1);
sunxi_lcd_delay_ms(200);
for (i = 0; ; i++) {
if(hx050bh12a04_init_setting[i].cmd == REGFLAG_END_OF_TABLE) {
break;
} else if (hx050bh12a04_init_setting[i].cmd == REGFLAG_DELAY) {
sunxi_lcd_delay_ms(hx050bh12a04_init_setting[i].count);
} else {
dsi_dcs_wr(sel, (u8)hx050bh12a04_init_setting[i].cmd, hx050bh12a04_init_setting[i].para_list, hx050bh12a04_init_setting[i].count);
}
}
sunxi_lcd_dsi_clk_enable(sel);
dprintk("***LCD_panel_init_kernel:End!!!\n");
printk(KERN_ERR "**** wyb %s-%d-%s \n", __FILE__, __LINE__, __func__);
return;
}
dsi_dcs_wr(sel, (u8)hx050bh12a04_init_setting[i].cmd, hx050bh12a04_init_setting[i].para_list, hx050bh12a04_init_setting[i].count);
dsi_dcs_wr函数可以用熟悉的I2C(读)写类比。
sel就是设备ID。(哪一条I2C总线,哪一个从机地址!)
(u8)hx050bh12a04_init_setting[i].cmd就是寄存器号码!
hx050bh12a04_init_setting[i].para_list就是寄存器值。
hx050bh12a04_init_setting[i].count计算器。定义它是因为有些I2C设备支持以块为单位的连续(读)写!^_(融会贯通了)
6、奇葩的事情:
驱动程序貌似没有反应!
就算你给驱动程序的每一个函数都加了打印,貌似驱动程序就根本没有进去过!蒙圈了。
因为全志R16平台的tinav2.1系统/android4.4.2系统都是在内核里面加载好MIPI屏幕的驱动就可以工作了,当时对于uboot也没有多想!(这里就是问题的关键所在了!)
不过reboot的时候,S070WV20_MIPI_RGB.c这个屏的退出会退出一下!使用BPI M2U调试的开发板的时候也是这样的!
加班到晚上22点,忽然想起来,还有uboot呢!司马当活马医了!把uboot配置一下试试!
当把BPI-M2U的uboot的驱动每一个函数都加打印之后,马上启动的时候一长串打印就出来!
U-Boot 2014.07 (Nov 02 2017 - 22:05:34) Allwinner Technology
uboot commit : 66f890531bb93547478b60b27f30e9cad626dc63
i2c_init: by cpux
i2c_init ok
[ 0.568]pmbus: ready
[ 0.589]PMU: AXP221
[ 0.589]PMU: AXP22x found
[ 0.590]PMU: dcdc2 1160
[ 0.592]PMU: cpux 1008 Mhz,AXI=336 Mhz
PLL6=600 Mhz,AHB1=200 Mhz, APB1=100Mhz MBus=400Mhz
set power on vol to default
dcdc1_vol = 3300, onoff=1
dcdc2_vol = 1160, onoff=1
dcdc3_vol = 1100, onoff=1
dcdc4_vol = 1100, onoff=0
aldo1_vol = 2800, onoff=0
aldo2_vol = 2500, onoff=0
aldo3_vol = 3000, onoff=1
dc1sw_vol = 3300, onoff=0
dc5ldo_vol = 1100, onoff=0
dldo1_vol = 3300, onoff=0
dldo2_vol = 3300, onoff=0
dldo3_vol = 3300, onoff=0
dldo4_vol = 2500, onoff=0
eldo1_vol = 2800, onoff=0
eldo2_vol = 1500, onoff=0
eldo3_vol = 1200, onoff=0
gpio0_vol = 3300, onoff=0
gpio1_vol = 1800, onoff=0
find power_sply to end
vbus exist
DRAM: 2 GiB
fdt addr: 0xb6dd3678
gd->fdt_size: 0x16400
Relocation Offset is: 75f15000
In: serial
Out: serial
Err: serial
gic: normal mode
[ 0.717]display init start
drv_disp_init
init_clocks: finish init_clocks.
pwm_request: reg = 0x1c23400. pwm = 0.
request pwm success, pwm = 0.
tv_init:
tv_init:
drv_disp_init finish
boot_disp.output_disp=0
boot_disp.output_type=1
boot_disp.output_mode=10
boot_disp.auto_hpd=1
disp0 device type(1) enable
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-75-LCD_cfg_panel_info
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-105-LCD_cfg_panel_info
disp 0, clk: pll(120000000),clk(120000000),dclk(20000000) dsi_rate(20000000)
clk real:pll(118800000),clk(118800000),dclk(29700000) dsi_rate(148500000)
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-138-LCD_power_on
enable power vcc-3v, ret=0
***LCD_power_on_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-156-LCD_power_on
[ 0.951]display init end
[ 0.953]flash init start
workmode = 0,storage type = 2
[ 0.958]MMC: 2
[mmc]: mmc driver ver 2016-09-19 14:00:00
[mmc]: get sdc_ex_dly_used 2, use auto tuning sdly
SUNXI SD/MMC: 2
[mmc]: 50 MHz...
[mmc]: sample: 50 - 200(ps)
[mmc]: ds: 52 - 192(ps)
[mmc]: 100 MHz...
[mmc]: sample: 25 - 200(ps)
[mmc]: ds: 25 - 200(ps)
[mmc]: 200 MHz...
[mmc]: sample: 13 - 192(ps)
[mmc]: ds: 13 - 192(ps)
[mmc]: media type 0x8000000
[mmc]: ************Try MMC card 2************
[mmc]: host caps: 0x6f
[mmc]: MID 000015 PSN 5ca94221
[mmc]: PNM 8WPD3R -- 0x38-57-50-44-33
[mmc]: PRV 0.0
[mmc]: MDT m-12 y-2016
[mmc]: MMC v5.0
[mmc]: speed mode : HSSDR52/SDR25
[mmc]: clock : 50000000 Hz
[mmc]: bus_width : 8 bit
[mmc]: user capacity : 7456 MB
[mmc]: boot capacity : 4096 KB
[mmc]: rpmb capacity : 512 KB
[mmc]: ************SD/MMC 2 init OK!!!************
[mmc]: mmc_init_boot: tuning procedure is executed!
[mmc]: ========best spd md: 2-HSDDR52/DDR50, freq: 2-50000000
[mmc]: already at HSSDR52_SDR25 mode
[mmc]: erase_grp_size : 0x400WrBlk*0x200=0x80000 Byte
[mmc]: secure_feature : 0x55
[mmc]: secure_removal_type : 0x9
[mmc]: EOL Info(Rev blks): Normal
[mmc]: Wear out(type A): 0%-10% life time used
[mmc]: Wear out(type B): 0%-10% life time used
[ 1.086]sunxi flash init ok
[ 1.090]flash init end
try to burn key
sunxi secure storage is not supported
[ 1.097]usb burn from boot
delay time 0
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-383-LCD_panel_init
***LCD_panel_init_kernel:Begin!!!
***LCD_panel_init_kernel:End!!!
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-482-LCD_panel_init
[ 1.436]usb prepare ok
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
usb sof ok
[ 1.660]usb probe ok
[ 1.660]usb setup ok
set address 0xb
set address 0xb ok
sunxi usb error: received bytes 0x20 is not equal cbw struct size 0x1f
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-177-LCD_bl_open
***LCD_bl_open_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-182-LCD_bl_open
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
[ 4.691]do_burn_from_boot usb : have no handshake
--------fastboot partitions--------
-total partitions:9-
-name- -start- -size-
boot-res : 1000000 100000
env : 1100000 100000
boot : 1200000 400000
rootfs : 1600000 1000000
rootfs_data : 2600000 3000000
private : 5600000 100000
recovery : 5700000 1000000
misc : 6700000 100000
UDISK : 6800000 0
-----------------------------------
base bootcmd=run setargs_nand boot_normal
bootcmd set setargs_mmc
key 0
cant find rcvy value
cant find fstbt value
misc partition found
[ 4.747]to be run cmd=run setargs_mmc boot_normal
[mmc]: hsddr 2-50000000
[mmc]: get max-frequency ok 50000000 Hz
[mmc]: 1 1 0: 1 1 0
[mmc]: no mmc-hs400-1_8v!
[mmc]: no mmc-hs200-1_8v!
[ 4.766]update dtb dram start
[ 4.768]update dtb dram end
sunxi_serial: serial_feature is not exist
serial is: 140050370310601f074e
PowerBus = 2( 2:vBus 3:acBus other: not exist)
no battery, limit to dc
no battery exist
sunxi_bmp_logo_display
reading bootlogo.bmp
38454 bytes read in 3 ms (12.2 MiB/s)
bmp file buffer: 0x40000000, bmp_info.buffer: 46400000
screen_id =0, screen_width =800, screen_height =480
frame buffer address 46400036
[ 4.805]inter uboot shell
Hit any key to stop autoboot: 0
fatload partition name: boot -> 2
reading uImage
3198328 bytes read in 39 ms (78.2 MiB/s)
## Booting kernel from Legacy Image at 43800000 ...
Image Name: ARM OpenWrt Linux-3.10.65
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3198264 Bytes = 3.1 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
reserving fdt memory region: addr=43000000 size=800
Using Device Tree in place at 45000000, end 450193ff
prepare for kernel
[mmc]: mmc exit start
[mmc]: 50 MHz...
[mmc]: sample: 24 - 416(ps)
[mmc]: ds: 24 - 416(ps)
[mmc]: 100 MHz...
[mmc]: sample: 12 - 416(ps)
[mmc]: ds: 12 - 416(ps)
[mmc]: 200 MHz...
[mmc]: sample: 8 - 312(ps)
[mmc]: ds: 8 - 312(ps)
[mmc]: mmc 2 exit ok
[ 4.963]
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.10.65 (rootroot@cm-System-Product-Name) (gcc version 5.2.1 (OpenWrt/Linaro GCC 5.2-2015.11-2 2016-11-07) ) #4 SMP Thu Nov 2 13:49:17 UTC 2017
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: sun8iw11p1, model: sun8iw11p1
[ 0.000000] cma: CMA: reserved 256 MiB at 5f800000
后来想想在BPI-M2U的Android启动的时候在kernel启动LCD的阶段也是一长串的挂载失败。(lichee使用的是:linux-3.10)
在全志R40平台的tinav2.1系统下,大概是在内核时间为4秒钟前后就会出现挂载LCD失败的信息:
全志R18的Android6.0在在kernel启动LCD的时候同样也是失败!(lichee使用的是:linux-3.10)
[ 3.184454] VFS: Mounted root (squashfs filesystem) readonly on device 179:7.
[ 3.192686] Freeing unused kernel memory: 192K (c05b3000 - c05e3000)
[ 3.411993] init: Console is alive
[ 3.415849] init: - watchdog -
[ 3.419584] init: - preinit -
/dev/by-name/UDISK: UUID="5a892e64-cdd0-4602-a34c-889869fb4545" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ext4"
/dev/by-name/UDISK already format by ext4
/dev/by-name/rootfs_data: UUID="710b3ebd-d6d2-4a18-ab4e-eece2968625d" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ext4"
/dev/by-name/rootfs_data already format by ext4
[ 4.001864] mount_root: mounting /dev/root
[ 4.006691] mount_root: loading kmods from internal overlay
[ 4.032696] [DISP]disp_module_init
[ 4.037247] [DISP] boot_disp:0x10a
[ 4.065335] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.076102] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.086751] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.097395] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.108040] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.118685] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.129329] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.140272] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.151085] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.161767] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.172121] [DISP] fb_base:0x46400000
[ 4.185379] axp22_dcdc1: Failed to create debugfs directory
[ 4.192594] [DISP]disp_module_init finish
[ 4.206332] dhd_module_init: in
[ 4.209773] ======== bcm_wlan_set_plat_data ========
[ 4.215417] dhd_wifi_platform_load: Enter
[ 4.219857] Power-up adapter 'DHD generic adapter'
[ 4.225745] wifi_platform_set_power = 1
在全志R16的tianv2.1的系统中:
W:\lcd_r40_tianv2.1\lichee\linux-3.10\drivers\video\sunxi\disp2\disp\lcd\panels.c
struct sunxi_lcd_drv g_lcd_drv;
__lcd_panel_t* panel_array[] = {
&default_eink,
&default_panel,
<070me05000_panel,
&wtq05027d01_panel,
&t27p06_panel,
&dx0960be40a1_panel,
&tft720x1280_panel,
&S6D7AA0X01_panel,
&gg1p4062utsw_panel,
/* add new panel below */
//&S070WV20_MIPI_RGB_panel,
NULL,
};
panel_array数组中设置都没有S070WV20_MIPI_RGB_panel。也就是根本就不打算初始化它,也许全部关闭可以节省启动的时间!^_
那就对了。对于全志平台的MIPI屏幕驱动,linux-3.10内核的系统在uboot阶段初始化,比如:全志R40/R18。
linux-3.4的内核的系统在kernel/BOOT阶段初始化。(uboot是否有初始化过没有测试过!)比如:全志R16。
不过在编译uboot的时候,LCD的驱动会被编译,但是很快就会被删除掉!(你在SDK的相应的目录下是看不到的*.o这种临时文件的)
原因不得而知!
不过最好调试全志R40平台的时候还出现了一个奇葩的事情,背光的控制GPIO:PB10已经拉高了,但是背光不亮!
硬件检测了半个小时,最后说是一个电阻的阻值小了一点!^_
2017/11/3 20:29
版本:V1.0
0、
在全志R16平台,MIPI屏幕同事在DragonBorad(DragonMate)/Android4.4.2(Parrot V1.1)下已经点亮!
uboot中就算你不配置MIPI屏幕,在lichee中编译就可以让MIPI屏幕显示了。
1、
在全志R40的android6.0/tinav2.1的SDK中默认配置
W:\lcd_r40_tianv2.1\target\allwinner\azalea-m2ultra\configs\sys_config.fex
[lcd0]
lcd_used = 1
lcd_driver_name = "S070WV20_MIPI_RGB"
W:\r40-android-6.0\lichee\tools\pack\chips\sun8iw11p1\configs\m2ultra\sys_config.fex
[lcd0]
lcd_used = 1
lcd_driver_name = "S070WV20_MIPI_RGB"
也就是LCD屏的名称就是S070WV20_MIPI_RGB,很容易找到驱动程序为:
rootroot@cm-System-Product-Name:~$ cd /home/wwt/lcd_r40_tianv2.1/
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1$ ll
总用量 96
drwxrwxr-x 5 rootroot rootroot 4096 10月 31 22:07 build
drwxrwxr-x 3 rootroot rootroot 4096 1月 12 2017 config
-r--r--r-- 1 rootroot rootroot 609 1月 12 2017 Config.in
drwxrwxr-x 3 rootroot rootroot 24576 1月 12 2017 dl
drwxrwxr-x 3 rootroot rootroot 4096 1月 12 2017 docs
drwxrwxr-x 4 rootroot rootroot 4096 1月 12 2017 lichee
-r--r--r-- 1 rootroot rootroot 82 1月 12 2017 Makefile
drwxrwxr-x 4 rootroot rootroot 4096 10月 31 21:47 out
drwxrwxr-x 19 rootroot rootroot 4096 1月 12 2017 package
drwxrwxr-x 4 rootroot rootroot 4096 1月 12 2017 prebuilt
-r--r--r-- 1 rootroot rootroot 13360 1月 12 2017 rules.mk
drwxrwxr-x 6 rootroot rootroot 4096 1月 12 2017 scripts
drwxrwxr-x 7 rootroot rootroot 4096 1月 12 2017 target
drwxrwxr-x 3 rootroot rootroot 4096 11月 1 17:08 tmp
drwxrwxr-x 12 rootroot rootroot 4096 1月 12 2017 toolchain
drwxrwxr-x 60 rootroot rootroot 4096 1月 12 2017 tools
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1$ cd lichee/linux-3.10/drivers/video/sunxi/disp2/disp/
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1/lichee/linux-3.10/drivers/video/sunxi/disp2/disp$ ll
总用量 13240
-rw-r--r-- 1 rootroot rootroot 8 10月 31 21:57 built-in.o
drwxrwxr-x 6 rootroot rootroot 4096 10月 31 21:52 de
-rw-rw-r-- 1 rootroot rootroot 20535 1月 12 2017 dev_composer.c
-rw-r--r-- 1 rootroot rootroot 132656 10月 31 21:52 dev_composer.o
-rw-rw-r-- 1 rootroot rootroot 65586 1月 12 2017 dev_disp.c
-rwxrwxr-x 1 rootroot rootroot 19901 1月 12 2017 dev_disp_debugfs.c
-rwxrwxr-x 1 rootroot rootroot 615 1月 12 2017 dev_disp_debugfs.h
-rw-r--r-- 1 rootroot rootroot 127012 10月 31 21:52 dev_disp_debugfs.o
-rw-rw-r-- 1 rootroot rootroot 6623 1月 12 2017 dev_disp.h
-rw-r--r-- 1 rootroot rootroot 215060 10月 31 21:52 dev_disp.o
-rw-rw-r-- 1 rootroot rootroot 48495 1月 12 2017 dev_fb.c
-rw-r--r-- 1 rootroot rootroot 165440 10月 31 21:52 dev_fb.o
-rw-r--r-- 1 rootroot rootroot 6275992 10月 31 21:52 disp.ko
-rw-r--r-- 1 rootroot rootroot 471 10月 31 21:52 disp.mod.c
-rw-r--r-- 1 rootroot rootroot 17488 10月 31 21:52 disp.mod.o
-rw-r--r-- 1 rootroot rootroot 6262228 10月 31 21:52 disp.o
-rw-rw-r-- 1 rootroot rootroot 17295 1月 12 2017 disp_sys_intf.c
-rw-rw-r-- 1 rootroot rootroot 2998 1月 12 2017 disp_sys_intf.h
-rw-r--r-- 1 rootroot rootroot 116596 10月 31 21:52 disp_sys_intf.o
drwxrwxr-x 2 rootroot rootroot 4096 10月 31 21:52 lcd
-rwxrwxr-x 1 rootroot rootroot 802 1月 12 2017 Makefile
-rw-r--r-- 1 rootroot rootroot 46 11月 1 17:08 modules.order
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1/lichee/linux-3.10/drivers/video/sunxi/disp2/disp$
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1/lichee/linux-3.10/drivers/video/sunxi/disp2/disp$
rootroot@cm-System-Product-Name:/home/wwt/lcd_r40_tianv2.1/lichee/linux-3.10/drivers/video/sunxi/disp2/disp$ grep S070WV20_MIPI_RGB . -R
./.disp.o.cmd:cmd_drivers/video/sunxi/disp2/disp/disp.o := arm-openwrt-linux-muslgnueabi-ld -EL -r -o drivers/video/sunxi/disp2/disp/disp.o drivers/video/sunxi/disp2/disp/dev_disp.o drivers/video/sunxi/disp2/disp/dev_fb.o drivers/video/sunxi/disp2/disp/dev_disp_debugfs.o drivers/video/sunxi/disp2/disp/disp_sys_intf.o drivers/video/sunxi/disp2/disp/dev_composer.o drivers/video/sunxi/disp2/disp/de/disp_display.o drivers/video/sunxi/disp2/disp/de/disp_features.o drivers/video/sunxi/disp2/disp/de/disp_device.o drivers/video/sunxi/disp2/disp/de/disp_lcd.o drivers/video/sunxi/disp2/disp/de/disp_manager.o drivers/video/sunxi/disp2/disp/de/disp_private.o drivers/video/sunxi/disp2/disp/de/disp_smart_backlight.o drivers/video/sunxi/disp2/disp/de/disp_enhance.o drivers/video/sunxi/disp2/disp/de/disp_capture.o drivers/video/sunxi/disp2/disp/de/disp_hdmi.o drivers/video/sunxi/disp2/disp/de/disp_tv.o drivers/video/sunxi/disp2/disp/de/disp_vdevice.o drivers/video/sunxi/disp2/disp/de/disp_eink_manager.o drivers/video/sunxi/disp2/disp/de/eink_buffer_manager.o drivers/video/sunxi/disp2/disp/de/eink_pipeline_manager.o drivers/video/sunxi/disp2/disp/de/disp_format_convert.o drivers/video/sunxi/disp2/disp/de/disp_vga.o drivers/video/sunxi/disp2/disp/lcd/panels.o drivers/video/sunxi/disp2/disp/lcd/lcd_source.o drivers/video/sunxi/disp2/disp/lcd/default_panel.o drivers/video/sunxi/disp2/disp/lcd/lt070me05000.o drivers/video/sunxi/disp2/disp/lcd/wtq05027d01.o drivers/video/sunxi/disp2/disp/lcd/t27p06.o drivers/video/sunxi/disp2/disp/lcd/dx0960be40a1.o drivers/video/sunxi/disp2/disp/lcd/tft720x1280.o drivers/video/sunxi/disp2/disp/lcd/S6D7AA0X01.o drivers/video/sunxi/disp2/disp/lcd/default_eink.o drivers/video/sunxi/disp2/disp/lcd/cpu_gg1p4062utsw.o drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_fcc.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_gsu.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_hal.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/disp_al.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_peak.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_rtmx.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_scaler_table.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_vep_table.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_vsu.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_feat.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_lcd.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_lti.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_fce.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_ase.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_bws.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_enhance.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_smbl.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_ccsc.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_dcsc.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_wb.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_clock.o drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/de_dsi.o
匹配到二进制文件 ./disp.o
./lcd/S070WV20_MIPI_RGB.h:#ifndef __S070WV20_MIPI_RGB_PANEL_H__
./lcd/S070WV20_MIPI_RGB.h:#define __S070WV20_MIPI_RGB_PANEL_H__
./lcd/S070WV20_MIPI_RGB.h:extern __lcd_panel_t S070WV20_MIPI_RGB_panel;
./lcd/S070WV20_MIPI_RGB.c:#include "S070WV20_MIPI_RGB.h"
./lcd/S070WV20_MIPI_RGB.c:__lcd_panel_t S070WV20_MIPI_RGB_panel = {
./lcd/S070WV20_MIPI_RGB.c: .name = "S070WV20_MIPI_RGB",
很容易确认默认的MIPI屏的驱动就是:S070WV20_MIPI_RGB.c
W:\lcd_r40_tianv2.1\lichee\linux-3.10\drivers\video\sunxi\disp2\disp\lcd\S070WV20_MIPI_RGB.c
为了防止平台的不同所导致的移植的问题(全志的每一个平台的驱动都是有点细微的差别,貌似就是要给你找难受的!)
我还是决定拿S070WV20_MIPI_RGB.c开刀,替换其中的配置参数!
3、分析源码:头文件分析
MIPI屏幕的额控制引脚确认让我看了好久好久!
W:\lcd_r40_tianv2.1\lichee\linux-3.10\drivers\video\sunxi\disp2\disp\lcd\S070WV20_MIPI_RGB.h
/*
*
* Copyright (c) 2016 Allwinnertech Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*/
#ifndef __S070WV20_MIPI_RGB_PANEL_H__
#define __S070WV20_MIPI_RGB_PANEL_H__
#include "panels.h"
#define icn_en(val) sunxi_lcd_gpio_set_value(sel, 0, val)
#define power_en(val) sunxi_lcd_gpio_set_value(sel, 1, val)
extern __lcd_panel_t S070WV20_MIPI_RGB_panel;
#endif
忽然之间发现:sys_config.fex中有配置GPIO0和GPIO1的,但是没有注释它们是做啥用的!
W:\lcd_r40_tianv2.1\target\allwinner\azalea-m2ultra\configs\sys_config.fex
;BPI-M2U
;lcd_bl_en = port:PH16<1><0><2><1>
;CB-S
lcd_bl_en = port:PB10<1><0><2><1>
lcd_power = "vcc-3v"
;lcd_power = "vcc-mipi"
;BPI-M2U
;LCD-RST
;lcd_gpio_0 = port:PH17<1><0><2><1>
;LCD-PWR-EN
;lcd_gpio_1 = port:PH18<1><0><2><1>
;CB-S
;LCD-RST
lcd_gpio_0 = port:PB09<1><0><2><1>
;LCD-PWR-EN
lcd_gpio_1 = port:PB11<1><0><2><1>
;lcd_io_regluator1 = "vcc-pd"
对照BPI M2U的原始图,根据引脚定义,很容易发现GPIO0是RESET复位引脚,GPIO1是电源使能引脚。不过我们我们的全志R40开发板设计的时候LCD始终供电,那就是不用考虑供电的配置了。简化了一点!
根据全志R16的经验,只要要RESET引脚拉高(置1)就可以显示了!
/*
*
* Copyright (c) 2016 Allwinnertech Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*/
#ifndef __S070WV20_MIPI_RGB_PANEL_H__
#define __S070WV20_MIPI_RGB_PANEL_H__
#include "panels.h"
//;CB-S
//;LCD-RST
//lcd_gpio_0 = port:PB09<1><0><2><1>
//;LCD-PWR-EN
//lcd_gpio_1 = port:PB11<1><0><2><1>
//;lcd_io_regluator1 = "vcc-pd"
//SET GPIO0
#define icn_en(val) sunxi_lcd_gpio_set_value(sel, 0, val)
//SET GPIO1
#define power_en(val) sunxi_lcd_gpio_set_value(sel, 1, val)
//R16
//#define panel_rst(v) (sunxi_lcd_gpio_set_value(0, 0, v))
extern __lcd_panel_t S070WV20_MIPI_RGB_panel;
#endif
4、更新sys_config.fex
比对全志R16的可以使用的参数。对于全志R40没有但是全志R16有的,拷贝并标记。
对于全志R40有但是全志R16不涉及的配置暂时也不动(动了怕出错!)
5、
更新驱动部分(参照全志R16平台已经调通的驱动程序,具体不详细叙述了)
W:\lcd_r40_tianv2.1\lichee\linux-3.10\drivers\video\sunxi\disp2\disp\lcd\S070WV20_MIPI_RGB.c
#define REGFLAG_END_OF_TABLE 0x102
#define REGFLAG_DELAY 0x101
struct lcd_setting_table {
u16 cmd;
u32 count;
u8 para_list[64];
};
static struct lcd_setting_table hx050bh12a04_init_setting[] = {
//JD9365 initial code
//Page0
{0xE0,01,{0x00}},
//--- PASSWORD ----//
{0xE1,01,{0x93}},
{0xE2,01,{0x65}},
{0xE3,01,{0xF8}},
{0x80,01,{0x03}},
//Page0
{0xE0,01,{0x04}},
{0x2D,01,{0x03}},
//--- Sequence Ctrl ----//
//{0x70,01,{0x10}},//DC0,01,{DC1 10 20
//{0x71,01,{0x13}},//DC2,01,{DC3 13 13
//{0x72,01,{0x06}},//DC7 06 06
//{0x75,01,{0x03}},// 03 04
//--- Page1 ----//
{0xE0,01,{0x01}},
//{0x4A,01,{0x30}},
//Set VCOM
{0x00,01,{0x00}},
{0x01,01,{0x8E}},//A0
{0x03,01,{0x00}},
{0x04,01,{0x8E}},//A0
//Set Gamma Power,01,{ VGMP,01,{VGMN,01,{VGSP,01,{VGSN
//{0x0A,01,{0x07}},
//{0x0C,01,{0x74}},
//Set Gamma Power,01,{ VGMP,01,{VGMN,01,{VGSP,01,{VGSN
{0x17,01,{0x00}},
{0x18,01,{0xD8}},//D7
{0x19,01,{0x01}},//00
{0x1A,01,{0x00}},
{0x1B,01,{0xD8}},
{0x1C,01,{0x01}},//00
//Set Gate Power
{0x1F,01,{0x74}},//VGH_REG=17V 6A VGH_REG=15V
{0x20,01,{0x19}},//VGL_REG=-8V 23 VGL_REG=-10V
{0x21,01,{0x19}},//VGL_REG2=-8V 23 VGL_REG2=-10V
{0x22,01,{0x0E}},
//SET RGBCYC
{0x37,01,{0x29}},//SS=1,01,{ BGR=1
{0x38,01,{0x05}},//JDT=101 Zig-zag
{0x39,01,{0x08}},//RGB_N_EQ1,01,{ modify 20140806
{0x3A,01,{0x18}},//12 modify 15/05/06RGB_N_EQ2,01,{ modify 20140806
{0x3B,01,{0x18}},//modify 15/05/06
{0x3C,01,{0x72}},//78 modify 15/05/06SET EQ3 for TE_H
{0x3D,01,{0xFF}},//SET CHGEN_ON,01,{ modify 20140827
{0x3E,01,{0xFF}},//SET CHGEN_OFF,01,{ modify 20140827
{0x3F,01,{0xFF}},//SET CHGEN_OFF2,01,{ modify 20140827
//Set TCON
{0x40,01,{0x06}},//RSO 04h=720,01,{ 05h=768,01,{ 06h=800
{0x41,01,{0xA0}},//LN=640->1280 line
{0x43,01,{0x10}},//VFP
{0x44,01,{0x0E}},//VBP
{0x45,01,{0x3C}},//HBP
//--- power voltage ----//
{0x55,01,{0x0F}},//DCDCM=0011,01,{ HX PWR_IC
{0x56,01,{0x01}},
{0x57,01,{0x64}},//65 modify 15/05/06
{0x58,01,{0x0A}},//AVDD
{0x59,01,{0x0A}},//VCL &AVEE
{0x5A,01,{0x28}},//VGH ,01,{15V
{0x5B,01,{0x10}},//VGL,01,{-10V
//--- Gamma ----//
{0x5D,01,{0x7C}},//70
{0x5E,01,{0x60}}, //56
{0x5F,01,{0x4E}},//45
{0x60,01,{0x40}},//39
{0x61,01,{0x39}}, //35
{0x62,01,{0x28}}, //26
{0x63,01,{0x2A}}, //2A
{0x64,01,{0x11}}, //14
{0x65,01,{0x27}}, //2E
{0x66,01,{0x23}}, //2D
{0x67,01,{0x21}}, //2D
{0x68,01,{0x3D}}, //4C
{0x69,01,{0x2B}}, //3A
{0x6A,01,{0x33}}, //45
{0x6B,01,{0x26}}, //38
{0x6C,01,{0x24}}, //36
{0x6D,01,{0x18}}, //2B
{0x6E,01,{0x0A}}, //1C
{0x6F,01,{0x00}}, //00
{0x70,01,{0x7C}}, //70
{0x71,01,{0x60}}, //56
{0x72,01,{0x4E}}, //45
{0x73,01,{0x40}}, //39
{0x74,01,{0x39}}, //35
{0x75,01,{0x29}}, //26
{0x76,01,{0x2B}}, //2A
{0x77,01,{0x12}}, //14
{0x78,01,{0x27}}, //2E
{0x79,01,{0x24}}, //2D
{0x7A,01,{0x21}}, //2D
{0x7B,01,{0x3E}}, //4C
{0x7C,01,{0x2B}}, //3A
{0x7D,01,{0x33}}, //45
{0x7E,01,{0x26}}, //38
{0x7F,01,{0x24}}, //36
{0x80,01,{0x19}}, //2B
{0x81,01,{0x0A}}, //1C
{0x82,01,{0x00}}, //00
//Page2,01,{ for GIP
{0xE0,01,{0x02}},
//GIP_L Pin mapping
{0x00,01,{0x0E}},//L1/CK2BO/CKV10
{0x01,01,{0x06}}, //L2/CK2O/CKV2
{0x02,01,{0x0C}}, //L3/CK1BO/CKV8
{0x03,01,{0x04}}, //L4/CK1O/CKV0
{0x04,01,{0x08}}, //L5/CK3O/CKV4
{0x05,01,{0x19}}, //L6/CK3BO/CKV2
{0x06,01,{0x0A}}, //L7/CK4O/CKV6
{0x07,01,{0x1B}}, //L8/CK4BO/CKV14
{0x08,01,{0x00}}, //L9/STVO/STV0
{0x09,01,{0x1D}}, //L10
{0x0A,01,{0x1F}}, //L11/VGL
{0x0B,01,{0x1F}}, //L12/VGL
{0x0C,01,{0x1D}}, //L13
{0x0D,01,{0x1D}}, //L14
{0x0E,01,{0x1D}}, //L15
{0x0F,01,{0x17}}, //L16/V1_O/FLM1
{0x10,01,{0x37}}, //L17/V2_O/FLM1_INV
{0x11,01,{0x1D}}, //L18
{0x12,01,{0x1F}}, //L19/BW/VGL
{0x13,01,{0x1E}}, //L20/FW/VGH
{0x14,01,{0x10}}, //L21/RST_O/ETV0
{0x15,01,{0x1D}}, //L22
//GIP_R Pin mapping
{0x16,01,{0x0F}}, //R1/CK2BE/CKV11
{0x17,01,{0x07}}, //R2/CK2E/CKV3
{0x18,01,{0x0D}}, //R3/CK1BE/CKV9
{0x19,01,{0x05}}, //R4/CK1E/CKV1
{0x1A,01,{0x09}}, //R5/CK3E/CKV5
{0x1B,01,{0x1A}}, //R6/CK3BE/CKV13
{0x1C,01,{0x0B}}, //R7/CK4E/CKV7
{0x1D,01,{0x1C}}, //R8/CK4BE/CKV15
{0x1E,01,{0x01}}, //R9/STVE/STV1
{0x1F,01,{0x1D}}, //R10
{0x20,01,{0x1F}}, //R11/VGL
{0x21,01,{0x1F}}, //R12/VGL
{0x22,01,{0x1D}}, //R13
{0x23,01,{0x1D}}, //R14
{0x24,01,{0x1D}}, //R15
{0x25,01,{0x18}}, //R16/V1_E/FLM2
{0x26,01,{0x38}}, //R17/V2_E/FLM2_INV
{0x27,01,{0x1D}}, //R18
{0x28,01,{0x1F}}, //R19/BW/VGL
{0x29,01,{0x1E}}, //R20/FW/VGH
{0x2A,01,{0x11}}, //R21/RST_E/ETV1
{0x2B,01,{0x1D}}, //R22
//GIP_L_GS Pin mapping
{0x2C,01,{0x09}}, //L1/CK2BO/CKV5
{0x2D,01,{0x1A}}, //L2/CK2O/CKV13
{0x2E,01,{0x0B}}, //L3/CK1BO/CKV7
{0x2F,01,{0x1C}}, //L4/CK1O/CKV15
{0x30,01,{0x0F}}, //L5/CK3O/CKV11
{0x31,01,{0x07}}, //L6/CK3BO/CKV3
{0x32,01,{0x0D}}, //L7/CK4O/CKV9
{0x33,01,{0x05}}, //L8/CK4BO/CKV1
{0x34,01,{0x11}}, //L9/STVO/ETV1
{0x35,01,{0x1D}}, //L10
{0x36,01,{0x1F}}, //L11/VGL
{0x37,01,{0x1F}}, //L12/VGL
{0x38,01,{0x1D}}, //L13
{0x39,01,{0x1D}}, //L14
{0x3A,01,{0x1D}}, //L15
{0x3B,01,{0x18}}, //L16/V1_O/FLM2
{0x3C,01,{0x38}}, //L17/V2_O/?
{0x3D,01,{0x1D}}, //L18
{0x3E,01,{0x1E}}, //L19/BW/VGH
{0x3F,01,{0x1F}}, //L20/FW/VGL
{0x40,01,{0x01}}, //L21/RST_O/STV1
{0x41,01,{0x1D}}, //L22
//GIP_R_GS Pin mapping
{0x42,01,{0x08}}, //R1/CK2BE/CKV4
{0x43,01,{0x19}}, //R2/CK2E/CKV12
{0x44,01,{0x0A}}, //R3/CK1BE/CKV6
{0x45,01,{0x1B}}, //R4/CK1E/CKV14
{0x46,01,{0x0E}}, //R5/CK3E/CKV10
{0x47,01,{0x06}}, //R6/CK3BE/CKV2
{0x48,01,{0x0C}}, //R7/CK4E/CKV8
{0x49,01,{0x04}}, //R8/CK4BE/CKV0
{0x4A,01,{0x10}}, //R9/STVE/ETV0
{0x4B,01,{0x1D}}, //R10
{0x4C,01,{0x1F}}, //R11/VGL
{0x4D,01,{0x1F}}, //R12/VGL
{0x4E,01,{0x1D}}, //R13
{0x4F,01,{0x1D}}, //R14
{0x50,01,{0x1D}}, //R15
{0x51,01,{0x17}}, //R16/V1_E/FLM1
{0x52,01,{0x37}}, //R17/V2_E/?
{0x53,01,{0x1D}}, //R18
{0x54,01,{0x1E}}, //R19/BW/VGH
{0x55,01,{0x1F}}, //R20/FW/VGL
{0x56,01,{0x00}}, //R21/RST_E/STV0
{0x57,01,{0x1D}}, //R22
//GIP Timing
{0x58,01,{0x10}},
{0x59,01,{0x00}},
{0x5A,01,{0x00}},
{0x5B,01,{0x10}},
{0x5C,01,{0x00}}, //01
{0x5D,01,{0xD0}}, //50
{0x5E,01,{0x01}},
{0x5F,01,{0x02}},
{0x60,01,{0x60}},
{0x61,01,{0x01}},
{0x62,01,{0x02}},
{0x63,01,{0x06}},
{0x64,01,{0x6A}},
{0x65,01,{0x55}},
{0x66,01,{0x0F}}, //2C
{0x67,01,{0xF7}}, //73
{0x68,01,{0x08}}, //05
{0x69,01,{0x08}},
{0x6A,01,{0x6A}}, //66_by Max_20151029
{0x6B,01,{0x10}},//dummy clk
{0x6C,01,{0x00}},
{0x6D,01,{0x00}},
{0x6E,01,{0x00}},
{0x6F,01,{0x88}},
{0x70,01,{0x00}}, //00
{0x71,01,{0x17}}, //00
{0x72,01,{0x06}},
{0x73,01,{0x7B}},
{0x74,01,{0x00}},
{0x75,01,{0x80}}, //80
{0x76,01,{0x01}},
{0x77,01,{0x5D}}, //0D
{0x78,01,{0x18}}, //18
{0x79,01,{0x00}},
{0x7A,01,{0x00}},
{0x7B,01,{0x00}},
{0x7C,01,{0x00}},
{0x7D,01,{0x03}},
{0x7E,01,{0x7B}},
//Page4
{0xE0,01,{0x04}},
//{0x04,01,{0x01}},//00 modify 15/05/06
{0x09,01,{0x10}},// modify 15/05/06
{0x0E,01,{0x38}},// modify 15/05/06
//ESD Check & lane number
{0x2B,01,{0x2B}},
{0x2D,01,{0x03}},
{0x2E,01,{0x44}},
//Page0
{0xE0,01,{0x00}},
//Watch dog
{0xE6,01,{0x02}},
{0xE7,01,{0x06}},
{0x11,01,{0x00}},
{REGFLAG_DELAY, 20, {}},
{0x29,01,{0x00}},
{REGFLAG_DELAY, 200, {}},
{REGFLAG_END_OF_TABLE, 0x00, {}},
};
static void LCD_panel_init(u32 sel)
{
/*
dprintk("***LCD_panel_init_kernel:Begin!!!\n");
sunxi_lcd_dsi_gen_write_1para(sel,0x7A,0xC1);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x20,0x20);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x21,0xE0);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x22,0x13);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x23,0x28);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x24,0x30);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x25,0x28);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x26,0x00);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x27,0x0D);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x28,0x03);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x29,0x1D);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x34,0x80);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x36,0x28);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0xB5,0xA0);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x5C,0xFF);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x2A,0x01);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x56,0x92);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x6B,0x71);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x69,0x2B);//2B
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x10,0x40);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x11,0x98);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0xB6,0x20);
sunxi_lcd_delay_ms(10);
sunxi_lcd_dsi_gen_write_1para(sel,0x51,0x20);
sunxi_lcd_delay_ms(10);
#if Bist_mode
sunxi_lcd_dsi_gen_write_1para(sel,0x14,0x43);
sunxi_lcd_dsi_gen_write_1para(sel,0x2A,0x49);
#endif
sunxi_lcd_dsi_gen_write_1para(sel,0x09,0x10);
sunxi_lcd_delay_ms(10);
*/
u32 i;
printk(KERN_ERR "**** wyb %s-%d-%s \n", __FILE__, __LINE__, __func__);
printk("raoyiming +++ LCD_panel_init\n");
/*R16*/
//panel_rst(1);
//sunxi_lcd_delay_ms(10);
//panel_rst(0);
//sunxi_lcd_delay_ms(50);
//panel_rst(1);
//sunxi_lcd_delay_ms(200);
/*R40*/
icn_en(1);
sunxi_lcd_delay_ms(10);
icn_en(0);
sunxi_lcd_delay_ms(50);
icn_en(1);
sunxi_lcd_delay_ms(200);
for (i = 0; ; i++) {
if(hx050bh12a04_init_setting[i].cmd == REGFLAG_END_OF_TABLE) {
break;
} else if (hx050bh12a04_init_setting[i].cmd == REGFLAG_DELAY) {
sunxi_lcd_delay_ms(hx050bh12a04_init_setting[i].count);
} else {
dsi_dcs_wr(sel, (u8)hx050bh12a04_init_setting[i].cmd, hx050bh12a04_init_setting[i].para_list, hx050bh12a04_init_setting[i].count);
}
}
sunxi_lcd_dsi_clk_enable(sel);
dprintk("***LCD_panel_init_kernel:End!!!\n");
printk(KERN_ERR "**** wyb %s-%d-%s \n", __FILE__, __LINE__, __func__);
return;
}
dsi_dcs_wr(sel, (u8)hx050bh12a04_init_setting[i].cmd, hx050bh12a04_init_setting[i].para_list, hx050bh12a04_init_setting[i].count);
dsi_dcs_wr函数可以用熟悉的I2C(读)写类比。
sel就是设备ID。(哪一条I2C总线,哪一个从机地址!)
(u8)hx050bh12a04_init_setting[i].cmd就是寄存器号码!
hx050bh12a04_init_setting[i].para_list就是寄存器值。
hx050bh12a04_init_setting[i].count计算器。定义它是因为有些I2C设备支持以块为单位的连续(读)写!^_(融会贯通了)
6、奇葩的事情:
驱动程序貌似没有反应!
就算你给驱动程序的每一个函数都加了打印,貌似驱动程序就根本没有进去过!蒙圈了。
因为全志R16平台的tinav2.1系统/android4.4.2系统都是在内核里面加载好MIPI屏幕的驱动就可以工作了,当时对于uboot也没有多想!(这里就是问题的关键所在了!)
不过reboot的时候,S070WV20_MIPI_RGB.c这个屏的退出会退出一下!使用BPI M2U调试的开发板的时候也是这样的!
加班到晚上22点,忽然想起来,还有uboot呢!司马当活马医了!把uboot配置一下试试!
当把BPI-M2U的uboot的驱动每一个函数都加打印之后,马上启动的时候一长串打印就出来!
U-Boot 2014.07 (Nov 02 2017 - 22:05:34) Allwinner Technology
uboot commit : 66f890531bb93547478b60b27f30e9cad626dc63
i2c_init: by cpux
i2c_init ok
[ 0.568]pmbus: ready
[ 0.589]PMU: AXP221
[ 0.589]PMU: AXP22x found
[ 0.590]PMU: dcdc2 1160
[ 0.592]PMU: cpux 1008 Mhz,AXI=336 Mhz
PLL6=600 Mhz,AHB1=200 Mhz, APB1=100Mhz MBus=400Mhz
set power on vol to default
dcdc1_vol = 3300, onoff=1
dcdc2_vol = 1160, onoff=1
dcdc3_vol = 1100, onoff=1
dcdc4_vol = 1100, onoff=0
aldo1_vol = 2800, onoff=0
aldo2_vol = 2500, onoff=0
aldo3_vol = 3000, onoff=1
dc1sw_vol = 3300, onoff=0
dc5ldo_vol = 1100, onoff=0
dldo1_vol = 3300, onoff=0
dldo2_vol = 3300, onoff=0
dldo3_vol = 3300, onoff=0
dldo4_vol = 2500, onoff=0
eldo1_vol = 2800, onoff=0
eldo2_vol = 1500, onoff=0
eldo3_vol = 1200, onoff=0
gpio0_vol = 3300, onoff=0
gpio1_vol = 1800, onoff=0
find power_sply to end
vbus exist
DRAM: 2 GiB
fdt addr: 0xb6dd3678
gd->fdt_size: 0x16400
Relocation Offset is: 75f15000
In: serial
Out: serial
Err: serial
gic: normal mode
[ 0.717]display init start
drv_disp_init
init_clocks: finish init_clocks.
pwm_request: reg = 0x1c23400. pwm = 0.
request pwm success, pwm = 0.
tv_init:
tv_init:
drv_disp_init finish
boot_disp.output_disp=0
boot_disp.output_type=1
boot_disp.output_mode=10
boot_disp.auto_hpd=1
disp0 device type(1) enable
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-75-LCD_cfg_panel_info
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-105-LCD_cfg_panel_info
disp 0, clk: pll(120000000),clk(120000000),dclk(20000000) dsi_rate(20000000)
clk real:pll(118800000),clk(118800000),dclk(29700000) dsi_rate(148500000)
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-138-LCD_power_on
enable power vcc-3v, ret=0
***LCD_power_on_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-156-LCD_power_on
[ 0.951]display init end
[ 0.953]flash init start
workmode = 0,storage type = 2
[ 0.958]MMC: 2
[mmc]: mmc driver ver 2016-09-19 14:00:00
[mmc]: get sdc_ex_dly_used 2, use auto tuning sdly
SUNXI SD/MMC: 2
[mmc]: 50 MHz...
[mmc]: sample: 50 - 200(ps)
[mmc]: ds: 52 - 192(ps)
[mmc]: 100 MHz...
[mmc]: sample: 25 - 200(ps)
[mmc]: ds: 25 - 200(ps)
[mmc]: 200 MHz...
[mmc]: sample: 13 - 192(ps)
[mmc]: ds: 13 - 192(ps)
[mmc]: media type 0x8000000
[mmc]: ************Try MMC card 2************
[mmc]: host caps: 0x6f
[mmc]: MID 000015 PSN 5ca94221
[mmc]: PNM 8WPD3R -- 0x38-57-50-44-33
[mmc]: PRV 0.0
[mmc]: MDT m-12 y-2016
[mmc]: MMC v5.0
[mmc]: speed mode : HSSDR52/SDR25
[mmc]: clock : 50000000 Hz
[mmc]: bus_width : 8 bit
[mmc]: user capacity : 7456 MB
[mmc]: boot capacity : 4096 KB
[mmc]: rpmb capacity : 512 KB
[mmc]: ************SD/MMC 2 init OK!!!************
[mmc]: mmc_init_boot: tuning procedure is executed!
[mmc]: ========best spd md: 2-HSDDR52/DDR50, freq: 2-50000000
[mmc]: already at HSSDR52_SDR25 mode
[mmc]: erase_grp_size : 0x400WrBlk*0x200=0x80000 Byte
[mmc]: secure_feature : 0x55
[mmc]: secure_removal_type : 0x9
[mmc]: EOL Info(Rev blks): Normal
[mmc]: Wear out(type A): 0%-10% life time used
[mmc]: Wear out(type B): 0%-10% life time used
[ 1.086]sunxi flash init ok
[ 1.090]flash init end
try to burn key
sunxi secure storage is not supported
[ 1.097]usb burn from boot
delay time 0
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-383-LCD_panel_init
***LCD_panel_init_kernel:Begin!!!
***LCD_panel_init_kernel:End!!!
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-482-LCD_panel_init
[ 1.436]usb prepare ok
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
usb sof ok
[ 1.660]usb probe ok
[ 1.660]usb setup ok
set address 0xb
set address 0xb ok
sunxi usb error: received bytes 0x20 is not equal cbw struct size 0x1f
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-177-LCD_bl_open
***LCD_bl_open_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-182-LCD_bl_open
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-110-LCD_open_flow
***LCD_open_flow_kernel
**** wyb drivers/video/sunxi/disp2/disp/lcd/S070WV20_MIPI_RGB.c-119-LCD_open_flow
[ 4.691]do_burn_from_boot usb : have no handshake
--------fastboot partitions--------
-total partitions:9-
-name- -start- -size-
boot-res : 1000000 100000
env : 1100000 100000
boot : 1200000 400000
rootfs : 1600000 1000000
rootfs_data : 2600000 3000000
private : 5600000 100000
recovery : 5700000 1000000
misc : 6700000 100000
UDISK : 6800000 0
-----------------------------------
base bootcmd=run setargs_nand boot_normal
bootcmd set setargs_mmc
key 0
cant find rcvy value
cant find fstbt value
misc partition found
[ 4.747]to be run cmd=run setargs_mmc boot_normal
[mmc]: hsddr 2-50000000
[mmc]: get max-frequency ok 50000000 Hz
[mmc]: 1 1 0: 1 1 0
[mmc]: no mmc-hs400-1_8v!
[mmc]: no mmc-hs200-1_8v!
[ 4.766]update dtb dram start
[ 4.768]update dtb dram end
sunxi_serial: serial_feature is not exist
serial is: 140050370310601f074e
PowerBus = 2( 2:vBus 3:acBus other: not exist)
no battery, limit to dc
no battery exist
sunxi_bmp_logo_display
reading bootlogo.bmp
38454 bytes read in 3 ms (12.2 MiB/s)
bmp file buffer: 0x40000000, bmp_info.buffer: 46400000
screen_id =0, screen_width =800, screen_height =480
frame buffer address 46400036
[ 4.805]inter uboot shell
Hit any key to stop autoboot: 0
fatload partition name: boot -> 2
reading uImage
3198328 bytes read in 39 ms (78.2 MiB/s)
## Booting kernel from Legacy Image at 43800000 ...
Image Name: ARM OpenWrt Linux-3.10.65
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3198264 Bytes = 3.1 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
reserving fdt memory region: addr=43000000 size=800
Using Device Tree in place at 45000000, end 450193ff
prepare for kernel
[mmc]: mmc exit start
[mmc]: 50 MHz...
[mmc]: sample: 24 - 416(ps)
[mmc]: ds: 24 - 416(ps)
[mmc]: 100 MHz...
[mmc]: sample: 12 - 416(ps)
[mmc]: ds: 12 - 416(ps)
[mmc]: 200 MHz...
[mmc]: sample: 8 - 312(ps)
[mmc]: ds: 8 - 312(ps)
[mmc]: mmc 2 exit ok
[ 4.963]
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.10.65 (rootroot@cm-System-Product-Name) (gcc version 5.2.1 (OpenWrt/Linaro GCC 5.2-2015.11-2 2016-11-07) ) #4 SMP Thu Nov 2 13:49:17 UTC 2017
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: sun8iw11p1, model: sun8iw11p1
[ 0.000000] cma: CMA: reserved 256 MiB at 5f800000
后来想想在BPI-M2U的Android启动的时候在kernel启动LCD的阶段也是一长串的挂载失败。(lichee使用的是:linux-3.10)
在全志R40平台的tinav2.1系统下,大概是在内核时间为4秒钟前后就会出现挂载LCD失败的信息:
全志R18的Android6.0在在kernel启动LCD的时候同样也是失败!(lichee使用的是:linux-3.10)
[ 3.184454] VFS: Mounted root (squashfs filesystem) readonly on device 179:7.
[ 3.192686] Freeing unused kernel memory: 192K (c05b3000 - c05e3000)
[ 3.411993] init: Console is alive
[ 3.415849] init: - watchdog -
[ 3.419584] init: - preinit -
/dev/by-name/UDISK: UUID="5a892e64-cdd0-4602-a34c-889869fb4545" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ext4"
/dev/by-name/UDISK already format by ext4
/dev/by-name/rootfs_data: UUID="710b3ebd-d6d2-4a18-ab4e-eece2968625d" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ext4"
/dev/by-name/rootfs_data already format by ext4
[ 4.001864] mount_root: mounting /dev/root
[ 4.006691] mount_root: loading kmods from internal overlay
[ 4.032696] [DISP]disp_module_init
[ 4.037247] [DISP] boot_disp:0x10a
[ 4.065335] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.076102] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.086751] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.097395] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.108040] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.118685] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.129329] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.140272] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.151085] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.161767] [DISP] disp_sys_script_get_item,line:203:of_find_compatible_node allwinner,sunxi-lcd1 fail
[ 4.172121] [DISP] fb_base:0x46400000
[ 4.185379] axp22_dcdc1: Failed to create debugfs directory
[ 4.192594] [DISP]disp_module_init finish
[ 4.206332] dhd_module_init: in
[ 4.209773] ======== bcm_wlan_set_plat_data ========
[ 4.215417] dhd_wifi_platform_load: Enter
[ 4.219857] Power-up adapter 'DHD generic adapter'
[ 4.225745] wifi_platform_set_power = 1
在全志R16的tianv2.1的系统中:
W:\lcd_r40_tianv2.1\lichee\linux-3.10\drivers\video\sunxi\disp2\disp\lcd\panels.c
struct sunxi_lcd_drv g_lcd_drv;
__lcd_panel_t* panel_array[] = {
&default_eink,
&default_panel,
<070me05000_panel,
&wtq05027d01_panel,
&t27p06_panel,
&dx0960be40a1_panel,
&tft720x1280_panel,
&S6D7AA0X01_panel,
&gg1p4062utsw_panel,
/* add new panel below */
//&S070WV20_MIPI_RGB_panel,
NULL,
};
panel_array数组中设置都没有S070WV20_MIPI_RGB_panel。也就是根本就不打算初始化它,也许全部关闭可以节省启动的时间!^_
那就对了。对于全志平台的MIPI屏幕驱动,linux-3.10内核的系统在uboot阶段初始化,比如:全志R40/R18。
linux-3.4的内核的系统在kernel/BOOT阶段初始化。(uboot是否有初始化过没有测试过!)比如:全志R16。
不过在编译uboot的时候,LCD的驱动会被编译,但是很快就会被删除掉!(你在SDK的相应的目录下是看不到的*.o这种临时文件的)
原因不得而知!
不过最好调试全志R40平台的时候还出现了一个奇葩的事情,背光的控制GPIO:PB10已经拉高了,但是背光不亮!
硬件检测了半个小时,最后说是一个电阻的阻值小了一点!^_
改完之后屏幕就显示uboot的开机画面了!不过那个时候,我都已经调的怀疑人生了!
阅读全文
0 0
- 将全志R16平台上的MIPI屏迁移到全志R40平台上(草稿)
- 全志R16平台tinav2.1系统下调通rtl8188eu(草稿)
- OV5645 MIPI YUVS 摄像头MTK6572平台上调试问题
- 关于客户科技全志R16平台配SPI接口的NOR格式的FLASH的刷tinav2.1系统的解决过程(草稿)
- 全志R16平台的GPIO操作
- 打开r40平台tinav2.1下的AP6212A0版本的WIFI(分色排版)
- 打开r40平台tinav2.1下的AP6212A0版本的BT(分色排版)
- 全志r40平台的tinav2.1系统下的SATA验证(分色排版)
- 13打开r40平台tinav2.1下的AP6212A1版本的WIFI+BT(分色排版)
- 打开r40平台tinav2.1下的以太网卡(分色排版)
- 打开r40平台tinav2.1下的耳机(分色排版)
- 全志R40平台的tinav2.1系统下打开SPI2接口(分色排版)
- 将全志R16的DEBUG口的波特率由115200修改为9600(草稿)
- AIX平台上Sybase ASE数据库迁移步骤
- 各平台上JDK上的差异(by quqi99)
- Windows 平台上的 InnoDB
- MSM平台上的AMSS
- windows平台上的调试
- bzoj 4818 [Sdoi2017]序列计数(简单容斥+快速幂加速dp)
- 全面了解equals与==的区别
- Python的绝对路径和相对路径
- 【BZOJ1084】最大子矩阵(动态规划)
- 使用Scanner时的一个注意事项
- 将全志R16平台上的MIPI屏迁移到全志R40平台上(草稿)
- Python的Socket
- 拉格朗日乘子法、KKT条件、线性规划对偶理论
- JAVA内存分配分析/栈内存、堆内存
- [OS] Shell脚本
- Linux下设置环境变量
- LVM原理及PV、VG、LV、PE、LE关系图
- bzoj1567[JSOI2008]Blue Mary的战役地图 二分+矩阵hash
- Lua汇总