【已解决】D1s 调试 MIPI LCD 不亮
-
Uboot阶段背光不亮,进Linux后背光亮了但是没有显示。感觉Uboot的开屏也有问题,为什么开了这么多次
U-Boot 2018.05-00005-g7819edc-dirty (May 24 2022 - 13:34:56 +0800) Allwinner Technology [00.197]DRAM: 64 MiB [00.199]Relocation Offset is: 01ef2000 [00.203]secure enable bit: 0 [00.206]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz [00.213]flash init start [00.215]workmode = 0,storage type = 1 [00.218][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00 [00.224][mmc]: get sdc_type fail and use default host:tm1. [00.230][mmc]: can't find node "mmc0",will add new node [00.235][mmc]: fdt err returned <no error> [00.239][mmc]: Using default timing para [00.242][mmc]: SUNXI SDMMC Controller Version:0x50310 [00.260][mmc]: card_caps:0x3000000a [00.263][mmc]: host_caps:0x3000003f [00.266]sunxi flash init ok [00.268]line:703 init_clocks [00.272]drv_disp_init [00.284]drv_disp_init finish [00.286]boot_gui_init:start [00.289]set disp.dev2_output_type fail. using defval=0 [00.294]=====================lcd_open_flow [00.298]=====================lcd_open_flow [00.302]=====================lcd_power_on [00.492]boot_gui_init:finish [00.502]=====================lcd_open_flow partno erro : can't find partition bootloader 54 bytes read in 4 ms (12.7 KiB/s) [00.982]bmp_name=bootlogo.bmp size 38454 38454 bytes read in 8 ms (4.6 MiB/s) [01.029]Loading Environment from SUNXI_FLASH... OK [01.051]out of usb burn from boot: not need burn key [01.066]=====================lcd_open_flow [01.081]Item0 (Map) magic is bad [01.083]the secure storage item0 copy0 magic is bad [01.109]Item0 (Map) magic is bad [01.112]the secure storage item0 copy1 magic is bad [01.117]Item0 (Map) magic is bad partno erro : can't find partition private root_partition is rootfs set root to /dev/mmcblk0p5 [01.134]update part info [01.139]update bootcmd [01.145]change working_fdt 0x42ab1da0 to 0x42a91da0 disable nand error: FDT_ERR_BADPATH No reserved memory region found in source FDT [01.176]update dts noncached_alloc(): addr = 0x42c95200 noncached_alloc(): addr = 0x42c95240 noncached_alloc(): addr = 0x42c95280 noncached_alloc(): addr = 0x42c[01.190]=====================lcd_open_flow [01.194]=====================lcd_bl_open [01.197]=====================lcd_open_flow [01.201]=====================lcd_open_flow [01.205]LCD open finish 95ac0 geth_sys_init:634: get node 'gmac0' error geth_sys_init fail! [01.213]Board Net Initialization Failed [01.217]No ethernet found. Hit any key to stop autoboot: 1 ... 0 [02.576]no vendor_boot partition is found Android's image name: d1s-rv_router Detect comp none [02.593] Starting kernel ... [ 0.209348][DISP]disp_module_init [ 0.210052]disp 5000000.disp: Adding to iommu group 0 [ 0.210823][DISP] disp_init,line:2386: [ 0.210830]smooth display screen:0 type:1 mode:4 [ 0.252283]display_fb_request,fb_id:0 [ 0.268371]Freeing logo buffer memory: 1500K [ 0.268990]disp_al_manager_apply ouput_type:1 [ 0.269256][DISP] lcd_clk_config,line:732: [ 0.269270]disp 0, clk: pll(408000000),clk(408000000),dclk(34000000) dsi_rate(34000000) [ 0.269270] clk real:pll(408000000),clk(408000000),dclk(102000000) dsi_rate(150000000) [ 0.269296][DISP] disp_sys_pwm_config,line:509: [ 0.269299]disp_sys_pwm_Config, handle is NULL! [ 0.269302][DISP] disp_sys_pwm_set_polarity,line:528: [ 0.269305]disp_sys_pwm_Set_Polarity, handle is NULL! [ 0.269554]=====================lcd_open_flow [ 0.269560]=====================lcd_power_on [ 0.270266]sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator [ 1.875671]=====================lcd_bl_open [ 1.875682][DISP] disp_lcd_pwm_enable,line:1231: [ 1.875685]pwm device hdl is NULL [ 1.979054]Console: switching to colour frame buffer device 60x50 [ 2.053706][DISP]disp_module_init finish
-
驱动文件
#include "d310t9362v1.h" 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 panel_reset(sel, val) sunxi_lcd_gpio_set_value(sel, 0, val) static void lcd_cfg_panel_info(panel_extend_para *info) { u32 i = 0, j = 0; u32 items; u8 lcd_gamma_tbl[][2] = { {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)); } static s32 lcd_open_flow(u32 sel) { printk("=====================lcd_open_flow\n"); LCD_OPEN_FUNC(sel, lcd_power_on, 10); LCD_OPEN_FUNC(sel, lcd_panel_init, 120); LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 120); LCD_OPEN_FUNC(sel, lcd_bl_open, 0); return 0; } static s32 lcd_close_flow(u32 sel) { printk("=====================lcd_close_flow\n"); LCD_CLOSE_FUNC(sel, lcd_bl_close, 0); LCD_CLOSE_FUNC(sel, lcd_panel_exit, 200); LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 0); LCD_CLOSE_FUNC(sel, lcd_power_off, 500); return 0; } static void lcd_power_on(u32 sel) { printk("=====================lcd_power_on\n"); sunxi_lcd_pin_cfg(sel, 1); sunxi_lcd_power_enable(sel, 0); // sunxi_lcd_power_enable(sel, 1); sunxi_lcd_delay_ms(50); /* reset lcd by gpio */ panel_reset(sel, 1); sunxi_lcd_delay_ms(5); panel_reset(sel, 0); sunxi_lcd_delay_ms(10); panel_reset(sel, 1); sunxi_lcd_delay_ms(120); } static void lcd_power_off(u32 sel) { printk("=====================lcd_power_off\n"); sunxi_lcd_pin_cfg(sel, 0); sunxi_lcd_delay_ms(20); panel_reset(sel, 0); sunxi_lcd_delay_ms(5); sunxi_lcd_power_disable(sel, 0); } static void lcd_bl_open(u32 sel) { printk("=====================lcd_bl_open\n"); sunxi_lcd_pwm_enable(sel); sunxi_lcd_backlight_enable(sel); } static void lcd_bl_close(u32 sel) { printk("=====================lcd_bl_close\n"); sunxi_lcd_backlight_disable(sel); sunxi_lcd_pwm_disable(sel); } #define REGFLAG_DELAY 0XFC #define REGFLAG_END_OF_TABLE 0xFD /* END OF REGISTERS MARKER */ struct LCM_setting_table { u8 cmd; u32 count; u8 para_list[32]; }; static struct LCM_setting_table lcm_initialization_setting[] = { {0x01, 1, {0x00} }, {REGFLAG_DELAY, REGFLAG_DELAY, {120} }, {0x11, 1, {0x00} }, {REGFLAG_DELAY, REGFLAG_DELAY, {120} }, {0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x11} }, {0xd1, 1, {0x11} }, {0x55, 1, {0xb0} }, {0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x10} }, {0xc0, 2, {0x63, 0x00} }, // SCNL = (0x63 + 1) * 8 = 800 {0xc1, 2, {0x09, 0x02} }, // VFB=0x09 VBF=0x02 {0xc2, 2, {0x37, 0x08} }, // PCLK= 512 + (0x08 * 16) = 640 {0xc7, 1, {0x00} }, // x-dir rotate 0 : 0x00 rotate 180 :0x04 {0xcc, 1, {0x38} }, {0xb0, 16, {0x00, 0x11, 0x19, 0x0c, 0x10, 0x06, 0x07, 0x0a, 0x09, 0x22, 0x04, 0x10, 0x0e, 0x28, 0x30, 0x1c} }, {0xb1, 16, {0x00, 0x12, 0x19, 0x0d, 0x10, 0x04, 0x06, 0x07, 0x08, 0x23, 0x04, 0x12, 0x11, 0x28, 0x30, 0x1c} }, {0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x11} }, // enable bk fun of command 2 BK1 {0xb0, 1, {0x4d} }, {0xb1, 1, {0x5b} }, // 0x56 0x4a 0x5b {0xb2, 1, {0x07} }, {0xb3, 1, {0x80} }, {0xb5, 1, {0x47} }, {0xb7, 1, {0x8a} }, {0xb8, 1, {0x21} }, {0xc1, 1, {0x78} }, {0xc2, 1, {0x78} }, {0xd0, 1, {0x88} }, {REGFLAG_DELAY, REGFLAG_DELAY, {100} }, {0xe0, 3, {0x00, 0x00, 0x02} }, {0xe1, 11, {0x01, 0xa0, 0x03, 0xa0, 0x02, 0xa0, 0x04, 0xa0, 0x00, 0x44, 0x44} }, {0xe2, 12, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, {0xe3, 4, {0x00, 0x00, 0x33, 0x33} }, {0xe4, 2, {0x44, 0x44} }, {0xe5, 16, {0x01, 0x26, 0xa0, 0xa0, 0x03, 0x28, 0xa0, 0xa0, 0x05, 0x2a, 0xa0, 0xa0, 0x07, 0x2c, 0xa0, 0xa0} }, {0xe6, 4, {0x00, 0x00, 0x33, 0x33} }, {0xe7, 2, {0x44, 0x44} }, {0xe8, 16, {0x02, 0x26, 0xa0, 0xa0, 0x04, 0x28, 0xa0, 0xa0, 0x06, 0x2a, 0xa0, 0xa0, 0x08, 0x2c, 0xa0, 0xa0} }, {0xeb, 7, {0x00, 0x01, 0xe4, 0xe4, 0x44, 0x00, 0x40} }, {0xed, 16, {0xff, 0xf7, 0x65, 0x4f, 0x0b, 0xa1, 0xcf, 0xff, 0xff, 0xfc, 0x1a, 0xb0, 0xf4, 0x56, 0x7f, 0xff} }, {0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x00} }, {0x36, 1, {0x00} }, // U&D Y-DIR rotate 0: 0x00 : rotate 180 :0x10 {0x3a, 1, {0x55} }, {0x29, 1, {0x00} }, {REGFLAG_END_OF_TABLE, REGFLAG_END_OF_TABLE, {} } }; static void lcd_panel_init(u32 sel) { u32 i = 0; sunxi_lcd_dsi_clk_enable(sel); sunxi_lcd_delay_ms(100); for (i = 0;; i++) { if (lcm_initialization_setting[i].count == REGFLAG_END_OF_TABLE) break; else if (lcm_initialization_setting[i].count == REGFLAG_DELAY) { sunxi_lcd_delay_ms(lcm_initialization_setting[i].para_list[0]); } else { dsi_gen_wr(sel, lcm_initialization_setting[i].cmd, lcm_initialization_setting[i].para_list, lcm_initialization_setting[i].count); } /* break; */ } } static void lcd_panel_exit(u32 sel) { sunxi_lcd_dsi_dcs_write_0para(sel, 0x10); sunxi_lcd_delay_ms(80); sunxi_lcd_dsi_dcs_write_0para(sel, 0x28); sunxi_lcd_delay_ms(50); } /*sel: 0:lcd0; 1:lcd1*/ static s32 lcd_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3) { return 0; } __lcd_panel_t d310t9362v1_panel = { /* panel driver name, must mach the name of * lcd_drv_name in sys_config.fex */ .name = "d310t9362v1", .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, }, };
设备树文件
&lcd0 { lcd_used = <1>; lcd_driver_name = "d310t9362v1"; lcd_if = <4>; lcd_x = <480>; lcd_y = <800>; lcd_width = <40>; lcd_height = <67>; lcd_dclk_freq = <34>; lcd_hbp = <120>; lcd_ht = <624>; lcd_hspw = <48>; lcd_vbp = <28>; lcd_vt = <908>; lcd_vspw = <12>; lcd_dsi_if = <0>; lcd_dsi_lane = <2>; lcd_lvds_if = <0>; lcd_lvds_colordepth = <0>; lcd_lvds_mode = <0>; lcd_frm = <0>; lcd_hv_clk_phase = <0>; lcd_hv_sync_polarity= <0>; lcd_io_phase = <0x0000>; lcd_gamma_en = <0>; lcd_bright_curve_en = <0>; lcd_cmap_en = <0>; lcd_fsync_en = <0>; lcd_fsync_act_time = <1000>; lcd_fsync_dis_time = <1000>; lcd_fsync_pol = <0>; deu_mode = <0>; lcdgamma4iep = <22>; smart_color = <90>; lcd_gpio_0 = <&pio PD 9 GPIO_ACTIVE_HIGH>; lcd_bl_en = <&pio PE 12 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&dsi2lane_pins_a>; pinctrl-1 = <&dsi2lane_pins_b>; }
-
亮了,关闭uboot里的屏幕驱动就ok了,看来uboot的dsi驱动有bug啊
-
-
@yuzukitsuru
调用多次lcd_open_flow是正常的,是在u-boot-2018/drivers/video/sunxi/disp2/disp/dev_disp.c的drv_lcd_open_callback函数中bsp_disp_lcd_get_open_flow调用的,主要是为了获取lcd_power_on、lcd_bl_open这些函数句柄。没有背光还是要检查供电情况,另外uboot的显示用的是uboot-board.dts,需要注意相关配置有没有配好。
-
@anruliu 都是配置好的,之前测试D1-H可以点亮。上面的驱动和设备树都是uboot的
-
@yuzukitsuru 你这个是不是这个bl没有去操作啊
lcd_bl_en = <&pio PE 12 GPIO_ACTIVE_HIGH>;我在调试mipi的时候发现这个定义好像是离开uboot进入kernel之后才去操作拉高的,在uboot阶段你跟rst一样,去操作bl口子应该就好了吧
-
@smiletiger 是,但是如果开uboot的disp驱动,kernel就没有输出,关了uboot的就可以了
-
@yuzukitsuru 我这边试了下,uboot和kernel阶段都有logo显示正常的
-
@smiletiger 我这里的uboot没有显示,开了uboit的disp2在kernel内也没有显示
-
你好,您的问题解决了吗。我目前也是遇到这个问题
-
@wyljkl 解决了
-
@smiletiger 在 D1s 调试 MIPI LCD 不亮 中说:
@yuzukitsuru 我这边试了下,uboot和kernel阶段都有logo显示正常
你好,这边logo显示是在哪个部分实现的呀? -
@yuzukitsuru 是什么原因导致的呀?能否指点一下,非常感谢。
-
现在uboot部分都没有进入到LCD_open_flow 这个函数中,对比了驱动文件和设备树的名字也是一一致的:
驱动:
/* * drivers/video/sunxi/disp2/disp/lcd/K080_IM2HYL802R_800X1280.c * * Copyright (c) 2007-2018 Allwinnertech Co., Ltd. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "K080_IM2HYL802R_800X1280.h" //#include <mach/sys_config.h> #include "panels.h" /* &lcd0 { lcd_used = <1>; status = "okay"; lcd_driver_name = "K080_IM2HYL802R_800X1280"; lcd_backlight = <50>; lcd_if = <4>; lcd_x = <800>; lcd_y = <1280>; lcd_width = <135>; lcd_height = <216>; lcd_dclk_freq = <75>; lcd_pwm_used = <1>; lcd_pwm_ch = <0>; lcd_pwm_freq = <50000>; lcd_pwm_pol = <1>; lcd_pwm_max_limit = <255>; lcd_hbp = <88>; lcd_ht = <960>; lcd_hspw = <4>; lcd_vbp = <12>; lcd_vt = <1300>; lcd_vspw = <4>; lcd_frm = <0>; lcd_gamma_en = <0>; lcd_bright_curve_en = <0>; lcd_cmap_en = <0>; deu_mode = <0>; lcdgamma4iep = <22>; smart_color = <90>; lcd_dsi_if = <0>; lcd_dsi_lane = <4>; lcd_dsi_format = <0>; lcd_dsi_te = <0>; lcd_dsi_eotp = <0>; lcd_pin_power = "dcdc1"; lcd_pin_power1 = "eldo3"; lcd_power = "eldo3"; lcd_power1 = "dcdc1"; lcd_power2 = "dc1sw"; lcd_gpio_1 = <&pio PD 22 1 0 3 1>; pinctrl-0 = <&dsi4lane_pins_a>; pinctrl-1 = <&dsi4lane_pins_b>; lcd_bl_en = <&pio PB 8 1 0 3 1>; lcd_bl_0_percent = <15>; lcd_bl_100_percent = <100>; }; */ 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_try_switch(u32 sel); static void LCD_panel_init(u32 sel); static void LCD_panel_exit(u32 sel); //static u8 const mipi_dcs_pixel_format[4] = {0x77,0x66,0x66,0x55}; #define panel_reset(val) sunxi_lcd_gpio_set_value(sel, 1, val) #define power_en(val) sunxi_lcd_gpio_set_value(sel, 0, val) static void LCD_cfg_panel_info(panel_extend_para *info) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); 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)); } static s32 LCD_open_flow(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); LCD_OPEN_FUNC(sel, LCD_power_on, 100); //open lcd power, and delay 50ms LCD_OPEN_FUNC(sel, LCD_panel_init, 200); //open lcd power, than delay 200ms LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50); //open lcd controller, and delay 100ms LCD_OPEN_FUNC(sel, LCD_bl_open, 0); //open lcd backlight, and delay 0ms printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return 0; } static s32 LCD_close_flow(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); LCD_CLOSE_FUNC(sel, LCD_bl_close, 200); //close lcd backlight, and delay 0ms LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 20); //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, 500); //close lcd power, and delay 500ms printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return 0; } static void LCD_power_on(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); panel_reset(0); sunxi_lcd_power_enable(sel, 0);//config lcd_power pin to open lcd power sunxi_lcd_delay_ms(5); sunxi_lcd_power_enable(sel, 1);//config lcd_power pin to open lcd power1 sunxi_lcd_delay_ms(5); sunxi_lcd_power_enable(sel, 2);//config lcd_power pin to open lcd power2 sunxi_lcd_delay_ms(5); power_en(1); sunxi_lcd_delay_ms(20); //panel_reset(1); sunxi_lcd_delay_ms(40); panel_reset(1); //sunxi_lcd_delay_ms(10); //panel_reset(0); //sunxi_lcd_delay_ms(5); //panel_reset(1); sunxi_lcd_delay_ms(120); //sunxi_lcd_delay_ms(5); sunxi_lcd_pin_cfg(sel, 1); printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); } static void LCD_power_off(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); sunxi_lcd_pin_cfg(sel, 0); power_en(0); sunxi_lcd_delay_ms(20); panel_reset(0); sunxi_lcd_delay_ms(5); sunxi_lcd_power_disable(sel, 2);//config lcd_power pin to close lcd power2 sunxi_lcd_delay_ms(5); sunxi_lcd_power_disable(sel, 1);//config lcd_power pin to close lcd power1 sunxi_lcd_delay_ms(5); sunxi_lcd_power_disable(sel, 0);//config lcd_power pin to close lcd power printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); } static void LCD_bl_open(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); sunxi_lcd_pwm_enable(sel); sunxi_lcd_delay_ms(50); sunxi_lcd_backlight_enable(sel);//config lcd_bl_en pin to open lcd backlight printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); } static void LCD_bl_close(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); sunxi_lcd_backlight_disable(sel);//config lcd_bl_en pin to close lcd backlight sunxi_lcd_delay_ms(20); sunxi_lcd_pwm_disable(sel); printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); } #define REGFLAG_DELAY 0XFE #define REGFLAG_END_OF_TABLE 0xFD // END OF REGISTERS MARKER struct LCM_setting_table { u8 cmd; u32 count; u8 para_list[64]; }; /*add panel initialization below*/ static struct LCM_setting_table lcm_initialization_setting[] = { {0x80, 1, {0x65} }, //GIP_1 {0x81, 1, {0x99} }, {0x82, 1, {0x15} }, {0x83, 1, {0xD1} }, //STA Width 4H {0x84, 1, {0x40} }, {0x85, 1, {0xDD} }, //STA Width 4H {0x86, 1, {0xE8} }, //CMD_Page 0 {0xFF, 3, {0x98, 0x81, 0x00} }, //SLP OUT {0x11, 0, {0x00} }, // SLPOUT {REGFLAG_DELAY, REGFLAG_DELAY, {120} }, //DISP ON {0x29, 0, {0x00} }, // DSPON {REGFLAG_DELAY, REGFLAG_DELAY, {5} }, //TE ON {0x35, 0, {0x00} }, // TE {REGFLAG_DELAY, REGFLAG_DELAY, {5} }, {REGFLAG_END_OF_TABLE, REGFLAG_END_OF_TABLE, {} } }; static void LCD_panel_init(u32 sel) { __u32 i; char model_name[25]; printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); disp_sys_script_get_item("lcd0", "lcd_model_name", (int *)model_name, 25); sunxi_lcd_dsi_clk_enable(sel); sunxi_lcd_delay_ms(20); sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SOFT_RESET); sunxi_lcd_delay_ms(10); for (i = 0; ; i++) { if (lcm_initialization_setting[i].count == REGFLAG_END_OF_TABLE) break; else if (lcm_initialization_setting[i].count == REGFLAG_DELAY) sunxi_lcd_delay_ms(lcm_initialization_setting[i].para_list[0]); #ifdef SUPPORT_DSI else dsi_dcs_wr(sel, lcm_initialization_setting[i].cmd, lcm_initialization_setting[i].para_list, lcm_initialization_setting[i].count); #endif //break; } printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return; } static void LCD_panel_exit(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SET_DISPLAY_OFF); sunxi_lcd_delay_ms(20); sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_ENTER_SLEEP_MODE); sunxi_lcd_delay_ms(80); printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return ; } //sel: 0:lcd0; 1:lcd1 static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return 0; } //sel: 0:lcd0; 1:lcd1 /*static s32 LCD_set_bright(u32 sel, u32 bright) { sunxi_lcd_dsi_dcs_write_1para(sel,0x51,bright); return 0; }*/ __lcd_panel_t K080_IM2HYL802R_800X1280_mipi_panel = { /* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */ .name = "K080_IM2HYL802R_800X1280", .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, //.set_bright = LCD_set_bright, }, };
设备树:
&lcd0 { lcd_used = <1>; lcd_driver_name = "K080_IM2HYL802R_800X1280"; lcd_backlight = <50>; lcd_if = <4>; /* lcd_x = <1200>; lcd_y = <1920>; */ lcd_x = <1024>; lcd_y = <600>; lcd_width = <135>; lcd_height = <216>; lcd_dclk_freq = <156>; lcd_pwm_used = <0>; lcd_pwm_ch = <7>; lcd_pwm_freq = <50000>; lcd_pwm_pol = <0>; lcd_hbp = <160>; lcd_ht = <1354>; lcd_hspw = <10>; lcd_vbp = <23>; lcd_vt = <636>; lcd_vspw = <1>; lcd_lvds_if = <0>; lcd_lvds_colordepth = <1>; lcd_lvds_mode = <0>; lcd_frm = <0>; lcd_io_phase = <0x0000>; lcd_gamma_en = <0>; lcd_bright_curve_en = <0>; lcd_cmap_en = <0>; deu_mode = <0>; lcdgamma4iep = <22>; smart_color = <90>; lcd_dsi_if = <0>; lcd_dsi_lane = <4>; lcd_dsi_format = <0>; lcd_dsi_eotp = <0>; lcd_dsi_port_num = <0>; /*lcd_gpio_1 = <&pio PB 8 GPIO_ACTIVE_HIGH>;*/ /*lcd_bl_en = <&pio PD 20 GPIO_ACTIVE_HIGH>;*/ pinctrl-0 = <&dsi4lane_pins_a>; pinctrl-1 = <&dsi4lane_pins_b>; };
启动logo:
mtdids : nand0=nand
mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
[00.600]ubi0: attaching mtd4
[00.713]ubi0: scanning is finished
[00.719]ubi0: attached mtd4 (name "sys", size 123 MiB)
[00.724]ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes
[00.730]ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 2048
[00.736]ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[00.743]ubi0: good PEBs: 492, bad PEBs: 0, corrupted PEBs: 0
[00.748]ubi0: user volume: 10, internal volumes: 1, max. volumes count: 128
[00.755]ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[00.763]ubi0: available PEBs: 0, total reserved PEBs: 492, PEBs reserved for bad PEB handling: 20
[00.771]sunxi flash init ok
[00.774]line:703 init_clocks
[00.777]drv_disp_init
lcd_x = 1024 drv_disp_check_spec
lcd_y = 600 drv_disp_check_spec
drivers/video/sunxi/disp2/disp/de/disp_display.c 23 bsp_disp_init
drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/disp_al.c 1242 disp_init_al
drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/disp_al.c 1323 disp_init_al
drivers/video/sunxi/disp2/disp/de/disp_lcd.c 2892 disp_init_lcd
drivers/video/sunxi/disp2/disp/de/disp_display.c 65 bsp_disp_init
drivers/video/sunxi/disp2/disp/lcd/panels.c 184 lcd_init
drivers/video/sunxi/disp2/disp/dev_disp.c 720 sunxi_disp_get_source_ops
drivers/video/sunxi/disp2/disp/dev_disp.c 749 sunxi_disp_get_source_ops
drivers/video/sunxi/disp2/disp/lcd/panels.c 174 lcd_set_panel_funs
drivers/video/sunxi/disp2/disp/lcd/panels.c 178 lcd_set_panel_funs
drivers/video/sunxi/disp2/disp/lcd/panels.c 187 lcd_init
[00.856]drv_disp_init finish
[00.975]Loading Environment from SUNXI_FLASH... OK
[00.997]Item0 (Map) magic is bad -
@wyljkl 在 【已解决】D1s 调试 MIPI LCD 不亮 中说:
现在uboot部分都没有进入到LCD_open_flow 这个函数中,对比了驱动文件和设备树的名字也是一一致的:
驱动:
/* * drivers/video/sunxi/disp2/disp/lcd/K080_IM2HYL802R_800X1280.c * * Copyright (c) 2007-2018 Allwinnertech Co., Ltd. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "K080_IM2HYL802R_800X1280.h" //#include <mach/sys_config.h> #include "panels.h" /* &lcd0 { lcd_used = <1>; status = "okay"; lcd_driver_name = "K080_IM2HYL802R_800X1280"; lcd_backlight = <50>; lcd_if = <4>; lcd_x = <800>; lcd_y = <1280>; lcd_width = <135>; lcd_height = <216>; lcd_dclk_freq = <75>; lcd_pwm_used = <1>; lcd_pwm_ch = <0>; lcd_pwm_freq = <50000>; lcd_pwm_pol = <1>; lcd_pwm_max_limit = <255>; lcd_hbp = <88>; lcd_ht = <960>; lcd_hspw = <4>; lcd_vbp = <12>; lcd_vt = <1300>; lcd_vspw = <4>; lcd_frm = <0>; lcd_gamma_en = <0>; lcd_bright_curve_en = <0>; lcd_cmap_en = <0>; deu_mode = <0>; lcdgamma4iep = <22>; smart_color = <90>; lcd_dsi_if = <0>; lcd_dsi_lane = <4>; lcd_dsi_format = <0>; lcd_dsi_te = <0>; lcd_dsi_eotp = <0>; lcd_pin_power = "dcdc1"; lcd_pin_power1 = "eldo3"; lcd_power = "eldo3"; lcd_power1 = "dcdc1"; lcd_power2 = "dc1sw"; lcd_gpio_1 = <&pio PD 22 1 0 3 1>; pinctrl-0 = <&dsi4lane_pins_a>; pinctrl-1 = <&dsi4lane_pins_b>; lcd_bl_en = <&pio PB 8 1 0 3 1>; lcd_bl_0_percent = <15>; lcd_bl_100_percent = <100>; }; */ 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_try_switch(u32 sel); static void LCD_panel_init(u32 sel); static void LCD_panel_exit(u32 sel); //static u8 const mipi_dcs_pixel_format[4] = {0x77,0x66,0x66,0x55}; #define panel_reset(val) sunxi_lcd_gpio_set_value(sel, 1, val) #define power_en(val) sunxi_lcd_gpio_set_value(sel, 0, val) static void LCD_cfg_panel_info(panel_extend_para *info) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); 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)); } static s32 LCD_open_flow(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); LCD_OPEN_FUNC(sel, LCD_power_on, 100); //open lcd power, and delay 50ms LCD_OPEN_FUNC(sel, LCD_panel_init, 200); //open lcd power, than delay 200ms LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50); //open lcd controller, and delay 100ms LCD_OPEN_FUNC(sel, LCD_bl_open, 0); //open lcd backlight, and delay 0ms printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return 0; } static s32 LCD_close_flow(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); LCD_CLOSE_FUNC(sel, LCD_bl_close, 200); //close lcd backlight, and delay 0ms LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 20); //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, 500); //close lcd power, and delay 500ms printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return 0; } static void LCD_power_on(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); panel_reset(0); sunxi_lcd_power_enable(sel, 0);//config lcd_power pin to open lcd power sunxi_lcd_delay_ms(5); sunxi_lcd_power_enable(sel, 1);//config lcd_power pin to open lcd power1 sunxi_lcd_delay_ms(5); sunxi_lcd_power_enable(sel, 2);//config lcd_power pin to open lcd power2 sunxi_lcd_delay_ms(5); power_en(1); sunxi_lcd_delay_ms(20); //panel_reset(1); sunxi_lcd_delay_ms(40); panel_reset(1); //sunxi_lcd_delay_ms(10); //panel_reset(0); //sunxi_lcd_delay_ms(5); //panel_reset(1); sunxi_lcd_delay_ms(120); //sunxi_lcd_delay_ms(5); sunxi_lcd_pin_cfg(sel, 1); printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); } static void LCD_power_off(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); sunxi_lcd_pin_cfg(sel, 0); power_en(0); sunxi_lcd_delay_ms(20); panel_reset(0); sunxi_lcd_delay_ms(5); sunxi_lcd_power_disable(sel, 2);//config lcd_power pin to close lcd power2 sunxi_lcd_delay_ms(5); sunxi_lcd_power_disable(sel, 1);//config lcd_power pin to close lcd power1 sunxi_lcd_delay_ms(5); sunxi_lcd_power_disable(sel, 0);//config lcd_power pin to close lcd power printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); } static void LCD_bl_open(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); sunxi_lcd_pwm_enable(sel); sunxi_lcd_delay_ms(50); sunxi_lcd_backlight_enable(sel);//config lcd_bl_en pin to open lcd backlight printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); } static void LCD_bl_close(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); sunxi_lcd_backlight_disable(sel);//config lcd_bl_en pin to close lcd backlight sunxi_lcd_delay_ms(20); sunxi_lcd_pwm_disable(sel); printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); } #define REGFLAG_DELAY 0XFE #define REGFLAG_END_OF_TABLE 0xFD // END OF REGISTERS MARKER struct LCM_setting_table { u8 cmd; u32 count; u8 para_list[64]; }; /*add panel initialization below*/ static struct LCM_setting_table lcm_initialization_setting[] = { {0x80, 1, {0x65} }, //GIP_1 {0x81, 1, {0x99} }, {0x82, 1, {0x15} }, {0x83, 1, {0xD1} }, //STA Width 4H {0x84, 1, {0x40} }, {0x85, 1, {0xDD} }, //STA Width 4H {0x86, 1, {0xE8} }, //CMD_Page 0 {0xFF, 3, {0x98, 0x81, 0x00} }, //SLP OUT {0x11, 0, {0x00} }, // SLPOUT {REGFLAG_DELAY, REGFLAG_DELAY, {120} }, //DISP ON {0x29, 0, {0x00} }, // DSPON {REGFLAG_DELAY, REGFLAG_DELAY, {5} }, //TE ON {0x35, 0, {0x00} }, // TE {REGFLAG_DELAY, REGFLAG_DELAY, {5} }, {REGFLAG_END_OF_TABLE, REGFLAG_END_OF_TABLE, {} } }; static void LCD_panel_init(u32 sel) { __u32 i; char model_name[25]; printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); disp_sys_script_get_item("lcd0", "lcd_model_name", (int *)model_name, 25); sunxi_lcd_dsi_clk_enable(sel); sunxi_lcd_delay_ms(20); sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SOFT_RESET); sunxi_lcd_delay_ms(10); for (i = 0; ; i++) { if (lcm_initialization_setting[i].count == REGFLAG_END_OF_TABLE) break; else if (lcm_initialization_setting[i].count == REGFLAG_DELAY) sunxi_lcd_delay_ms(lcm_initialization_setting[i].para_list[0]); #ifdef SUPPORT_DSI else dsi_dcs_wr(sel, lcm_initialization_setting[i].cmd, lcm_initialization_setting[i].para_list, lcm_initialization_setting[i].count); #endif //break; } printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return; } static void LCD_panel_exit(u32 sel) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SET_DISPLAY_OFF); sunxi_lcd_delay_ms(20); sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_ENTER_SLEEP_MODE); sunxi_lcd_delay_ms(80); printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return ; } //sel: 0:lcd0; 1:lcd1 static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3) { printf("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__); return 0; } //sel: 0:lcd0; 1:lcd1 /*static s32 LCD_set_bright(u32 sel, u32 bright) { sunxi_lcd_dsi_dcs_write_1para(sel,0x51,bright); return 0; }*/ __lcd_panel_t K080_IM2HYL802R_800X1280_mipi_panel = { /* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */ .name = "K080_IM2HYL802R_800X1280", .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, //.set_bright = LCD_set_bright, }, };
设备树:
&lcd0 { lcd_used = <1>; lcd_driver_name = "K080_IM2HYL802R_800X1280"; lcd_backlight = <50>; lcd_if = <4>; /* lcd_x = <1200>; lcd_y = <1920>; */ lcd_x = <1024>; lcd_y = <600>; lcd_width = <135>; lcd_height = <216>; lcd_dclk_freq = <156>; lcd_pwm_used = <0>; lcd_pwm_ch = <7>; lcd_pwm_freq = <50000>; lcd_pwm_pol = <0>; lcd_hbp = <160>; lcd_ht = <1354>; lcd_hspw = <10>; lcd_vbp = <23>; lcd_vt = <636>; lcd_vspw = <1>; lcd_lvds_if = <0>; lcd_lvds_colordepth = <1>; lcd_lvds_mode = <0>; lcd_frm = <0>; lcd_io_phase = <0x0000>; lcd_gamma_en = <0>; lcd_bright_curve_en = <0>; lcd_cmap_en = <0>; deu_mode = <0>; lcdgamma4iep = <22>; smart_color = <90>; lcd_dsi_if = <0>; lcd_dsi_lane = <4>; lcd_dsi_format = <0>; lcd_dsi_eotp = <0>; lcd_dsi_port_num = <0>; /*lcd_gpio_1 = <&pio PB 8 GPIO_ACTIVE_HIGH>;*/ /*lcd_bl_en = <&pio PD 20 GPIO_ACTIVE_HIGH>;*/ pinctrl-0 = <&dsi4lane_pins_a>; pinctrl-1 = <&dsi4lane_pins_b>; };
启动logo:
mtdids : nand0=nand
mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
[00.600]ubi0: attaching mtd4
[00.713]ubi0: scanning is finished
[00.719]ubi0: attached mtd4 (name "sys", size 123 MiB)
[00.724]ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes
[00.730]ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 2048
[00.736]ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[00.743]ubi0: good PEBs: 492, bad PEBs: 0, corrupted PEBs: 0
[00.748]ubi0: user volume: 10, internal volumes: 1, max. volumes count: 128
[00.755]ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[00.763]ubi0: available PEBs: 0, total reserved PEBs: 492, PEBs reserved for bad PEB handling: 20
[00.771]sunxi flash init ok
[00.774]line:703 init_clocks
[00.777]drv_disp_init
lcd_x = 1024 drv_disp_check_spec
lcd_y = 600 drv_disp_check_spec
drivers/video/sunxi/disp2/disp/de/disp_display.c 23 bsp_disp_init
drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/disp_al.c 1242 disp_init_al
drivers/video/sunxi/disp2/disp/de/lowlevel_v2x/disp_al.c 1323 disp_init_al
drivers/video/sunxi/disp2/disp/de/disp_lcd.c 2892 disp_init_lcd
drivers/video/sunxi/disp2/disp/de/disp_display.c 65 bsp_disp_init
drivers/video/sunxi/disp2/disp/lcd/panels.c 184 lcd_init
drivers/video/sunxi/disp2/disp/dev_disp.c 720 sunxi_disp_get_source_ops
drivers/video/sunxi/disp2/disp/dev_disp.c 749 sunxi_disp_get_source_ops
drivers/video/sunxi/disp2/disp/lcd/panels.c 174 lcd_set_panel_funs
drivers/video/sunxi/disp2/disp/lcd/panels.c 178 lcd_set_panel_funs
drivers/video/sunxi/disp2/disp/lcd/panels.c 187 lcd_init
[00.856]drv_disp_init finish
[00.975]Loading Environment from SUNXI_FLASH... OK
[00.997]Item0 (Map) magic is bad大佬可以问一下这个问题你解决了吗,我也碰到了无法进入到LCD_open_flow 这个函数的情况,能否指点一下,非常感谢
-
uboot下背光控制有问题,可以使用lcd-gpio手动开启背光,进系统之后再pwm调光即可
-
同样问题,解决后记录
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号