&disp {
disp_init_enable = <1>;
disp_mode = <0>;
screen0_output_type = <1>;
screen0_output_mode = <4>;
screen1_output_type = <3>;
screen1_output_mode = <10>;
screen1_output_format = <0>;
screen1_output_bits = <0>;
screen1_output_eotf = <4>;
screen1_output_cs = <257>;
screen1_output_range = <2>;
screen1_output_scan = <0>;
screen1_output_aspect_ratio = <8>;
dev0_output_type = <1>;
dev0_output_mode = <4>;
dev0_screen_id = <0>;
dev0_do_hpd = <0>;
dev1_output_type = <4>;
dev1_output_mode = <10>;
dev1_screen_id = <1>;
dev1_do_hpd = <1>;
def_output_dev = <0>;
fb0_format = <0>;
fb0_width = <0>;
fb0_height = <0>;
fb1_format = <0>;
fb1_width = <0>;
fb1_height = <0>;
chn_cfg_mode = <1>;
disp_para_zone = <1>;
/*VCC-LCD*/
/* dc1sw-supply = <®_dc1sw>;*/
/*VCC-DSI*/
/* eldo3-supply = <®_eldo3>;*/
/*VCC-PD*/
/* dcdc1-supply = <®_dcdc1>;*/
};
&lcd0 {
lcd_used = <1>;
lcd_driver_name = "default_lcd";
lcd_backlight = <50>;
lcd_if = <3>;
lcd_x = <800>;
lcd_y = <600>;
lcd_width = <150>;
lcd_height = <94>;
lcd_dclk_freq = <35>;
lcd_pwm_used = <1>;
lcd_pwm_ch = <7>;
lcd_pwm_freq = <50000>;
lcd_pwm_pol = <1>;
lcd_pwm_max_limit = <255>;
lcd_bl_en = <&pio PD 20 GPIO_ACTIVE_HIGH>;
lcd_hbp = <20>;
lcd_ht = <1418>;
lcd_hspw = <10>;
lcd_vbp = <10>;
lcd_vt = <814>;
lcd_vspw = <5>;
lcd_lvds_if = <0>;
lcd_lvds_colordepth = <1>;
lcd_lvds_mode = <1>;
lcd_frm = <1>;
lcd_hv_clk_phase = <0>;
lcd_hv_sync_polarity= <0>;
lcd_gamma_en = <0>;
lcd_bright_curve_en = <0>;
lcd_cmap_en = <0>;
deu_mode = <0>;
lcdgamma4iep = <22>;
smart_color = <90>;
pinctrl-0 = <&lvds0_pins_a>;
pinctrl-1 = <&lvds0_pins_b>;
};
离线
屏是正常的,追踪了一下代码,发现 default_pancel.c文件中的 static s32 LCD_open_flow(u32 sel) 函数一直没有被调用,但是我关机重启LCD_close_flow函数调用了:
static s32 LCD_open_flow(u32 sel)
{
printk("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__);
/* open lcd power, and delay 50ms */
LCD_OPEN_FUNC(sel, LCD_power_on, 30);
/* open lcd power, than delay 200ms */
LCD_OPEN_FUNC(sel, LCD_panel_init, 50);
/* open lcd controller, and delay 100ms */
LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 100);
/* open lcd backlight, and delay 0ms */
LCD_OPEN_FUNC(sel, LCD_bl_open, 0);
printk("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__);
return 0;
}
static s32 LCD_close_flow(u32 sel)
{
printk("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__);
/* close lcd backlight, and delay 0ms */
LCD_CLOSE_FUNC(sel, LCD_bl_close, 0);
/* close lcd controller, and delay 0ms */
LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 0);
/* open lcd power, than delay 200ms */
LCD_CLOSE_FUNC(sel, LCD_panel_exit, 200);
/* close lcd power, and delay 500ms */
LCD_CLOSE_FUNC(sel, LCD_power_off, 500);
printk("%s %d %s\n",__FILE__,__LINE__,__FUNCTION__);
return 0;
}
TCON的相关配置是在open函数中注册的,这块函数一直没被调用,这可能是哪里有问题?
最近编辑记录 jkl (2022-05-26 10:37:17)
离线
我现在把uboot部分的lcd部分的配置去掉了, LCD_open_flow(u32 sel) 该函数被调用了,目前加载disp.ko模块:
root@TinaLinux:/# insmod disp.ko
[ 34.456629] [DISP]disp_module_init
[ 34.461321] disp 5000000.disp: Adding to iommu group 0
[ 34.467668] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 3044 disp_probe
[ 34.475476] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 2224 disp_init
[ 34.483263] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 2346 disp_init
[ 34.490996] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c 26 bsp_disp_init
[ 34.499602] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c 38 bsp_disp_init
[ 34.508261] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c 40 bsp_disp_init
[ 34.516867] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c 44 bsp_disp_init
[ 34.525449] drivers/video/fbdev/sunxi/disp2/disp/de/disp_lcd.c 3071 disp_init_lcd
[ 34.543787] lcd_dclk_freq = 50
[ 34.547710] lcd_if = 3
[ 34.550891] lcd_hv_if = 1065
[ 34.557254] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c 46 bsp_disp_init
[ 34.565903] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c 86 bsp_disp_init
[ 34.575232] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 2374 disp_init
[ 34.582987] drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c 145 lcd_init
[ 34.590728] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 2535 sunxi_disp_get_source_ops
[ 34.600015] drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c 147 lcd_init
[ 34.607745] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 23 LCD_cfg_panel_info
[ 34.617036] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 81 LCD_cfg_panel_info
[ 34.626301] drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c 149 lcd_init
[ 34.634031] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 2376 disp_init
[ 34.641763] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 2378 disp_init
[ 34.649503] display_fb_request,fb_id:0
[ 34.655416] [DISP] Fb_copy_boot_fb,line:1446:
[ 34.655419] no boot_fb0
[ 34.663626] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 2380 disp_init
[ 34.671471] disp_al_manager_apply ouput_type:0
[ 34.672137] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 2386 disp_init
[ 34.676818] [DISP] lcd_clk_config,line:734:
[ 34.676828] disp 0, clk: pll(350000000),clk(350000000),dclk(50000000) dsi_rate(350000000)
[ 34.676828] clk real:pll(348000000),clk(348000000),dclk(49714285) dsi_rate(0)
[ 34.685251] drivers/video/fbdev/sunxi/disp2/disp/dev_disp.c 3046 disp_probe
[ 34.688932] drivers/video/fbdev/sunxi/disp2/disp/de/disp_lcd.c 777 lcd_clk_enable
[ 34.708790] [DISP]disp_module_init finish
[ 34.714465] drivers/video/fbdev/sunxi/disp2/disp/de/disp_lcd.c 783 lcd_clk_enable
root@TinaLinux:/# [ 34.736624] drivers/video/fbdev/sunxi/disp2/disp/de/disp_lcd.c 791 lcd_clk_enable
[ 34.745856] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 87 LCD_open_flow
[ 34.754682] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 96 LCD_open_flow
[ 34.763488] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 117 LCD_power_on
[ 34.772288] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c 1458 bsp_disp_lcd_pin_cfg
[ 34.782344] sun8iw20-pinctrl pio: pio supply vcc-pd not found, using dummy regulator
[ 34.791266] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c 1462 bsp_disp_lcd_pin_cfg
[ 34.800761] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 140 LCD_power_on
[ 34.846488] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 171 LCD_panel_init
[ 34.916477] drivers/video/fbdev/sunxi/disp2/disp/lcd/lcd_source.c43sunxi_lcd_tcon_enable
[ 34.925553] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c1372bsp_disp_lcd_tcon_enable
[ 34.935259] drivers/video/fbdev/sunxi/disp2/disp/de/disp_display.c1405bsp_disp_lcd_tcon_enable
[ 35.046481] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 154 LCD_bl_open
[ 35.055374] drivers/video/fbdev/sunxi/disp2/disp/lcd/default_panel.c 157 LCD_bl_open
[ 35.064104] [DISP] disp_device_attached_and_enable,line:226:
[ 35.064108] attached ok, mgr0<-->dev0
[ 35.074614] [DISP] disp_device_attached_and_enable,line:229:
[ 35.074622] type:1,mode:0,fmt:rgb,bits:8bits,eotf:4,cs:0 dvi:2, range:0 scan:8 ratio:-1062187512
用示波器测量波形和时钟目前还是不对
离线