100ASK_V853-PRO开发板支持4寸MIPI屏

100ASK_V853-PRO开发板支持4寸MIPI屏

0.前言

​ 由于之前我们已经适配过RGB屏,如果我们去适配了4寸MIPI屏,那么RGB屏就不能使用了。对于4寸屏购买链接为:百问网4寸MIPI屏

image-20230413093019260

LCD_调试指南:概述与介绍 - 全志Linux Tina-SDK开发完全手册

Display_开发指南:概述与介绍 - 全志Linux Tina-SDK开发完全手册

4寸屏适配资源包:V853支持4寸MIPI屏source.zip 。该资源包里面包含了适配修改后的所有文件(包括驱动程序、设备树和配置文件等)

开箱即用适配包:100ask-4inch_MIPI_screen.tar.gz 。可直接解压后,将所有文件替换tina SDK中的文件,再次编译打包即可使用。

1.添加新驱动

将驱动程序添加到

内核的lcd驱动目录下:
tina-v853-open/kernel/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/lcd

uboot的lcd驱动目录下:
tina-v853-open/brandy/brandy-2.0/u-boot-2018/drivers/video/sunxi/disp2/disp/lcd/

由于uboot和内核中的屏驱动会存在一些差别,下面分别展示出uboot和内核中不同的屏驱动。具体源文件可以在4寸屏适配资源包中查看。

1.1 uboot驱动程序

驱动程序头文件tft08006.h

#ifndef _TFT08006_H
#define _TFT08006_H

#include "panels.h"

extern __lcd_panel_t tft08006_panel;

extern s32 bsp_disp_get_panel_info(u32 screen_id, disp_panel_para *info);

#endif /*End of file*/

驱动程序的C文件tft08006.c

这里只展示与内核不同的部分

__lcd_panel_t tft08006_panel = {
        /* panel driver name, must mach the name of
         * lcd_drv_name in sys_config.fex
         */
        .name = "tft08006",
        .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,
        },
};

1.2 内核驱动程序

驱动程序头文件tft08006.h

#ifndef _TFT08006_H
#define _TFT08006_H

#include "panels.h"

extern struct __lcd_panel tft08006_panel;

extern s32 bsp_disp_get_panel_info(u32 screen_id, struct disp_panel_para *info);

#endif /*End of file*/

驱动程序的C文件"tft08006.c,这里只展示与uboot不同的部分。

struct __lcd_panel tft08006_panel = {
        /* panel driver name, must mach the name of
         * lcd_drv_name in sys_config.fex
         */
        .name = "tft08006",
        .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,
        },
};

2.修改内核中panels.h和panels.c

由于内核中没有对tft08006屏驱动有相关的配置,所以我们还需要在panels全志显示驱动中增加定义。

2.1 修改内核中panels.h

在屏驱动目录下修改panels.h

book@100ask:~/workspaces/tina-v853-open/kernel/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/lcd$ vi panels.h

在icn6202屏驱动定义的后面增加tft08006屏驱动定义

#ifdef CONFIG_LCD_SUPPORT_ICN6202
extern struct __lcd_panel icn6202_panel;
#endif
#ifdef CONFIG_LCD_SUPPORT_TFT08006
extern struct __lcd_panel tft08006_panel;
#endif
#ifdef CONFIG_LCD_SUPPORT_NT35510_MIPI
extern struct __lcd_panel nt35510_panel;
#endif

按下ESC,输入:wq,保存刚才的修改并退出

2.2 修改内核中panels.c

在屏驱动目录下修改panels.c

book@100ask:~/workspaces/tina-v853-open/kernel/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/lcd$ vi panels.c

在icn6202屏驱动定义的后面增加tft08006屏驱动定义

#ifdef CONFIG_LCD_SUPPORT_ICN6202
       &icn6202_panel,
#endif
#ifdef CONFIG_LCD_SUPPORT_TFT08006
        &tft08006_panel,
#endif

#ifdef CONFIG_LCD_SUPPORT_NT35510_MIPI
        &nt35510_panel,
#endif

按下ESC,输入:wq,保存刚才的修改并退出

3.修改内核中Kconfig和Makefile

3.1 修改内核中的Kconfig

修改屏驱动目录下的Kconfig,使内核配置中增加tft08006屏驱动的,以便后续选择编译该屏驱动

在屏驱动目录下输入vi Kconfig

tina-v853-open/kernel/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/lcd$ vi Kconfig

在icn6202屏驱动配置的后面增加tft08006屏驱动配置

config LCD_SUPPORT_ICN6202
       bool "LCD support icn6202 panel"
       default n
       ---help---
               If you want to support icn6202 panel for display driver, select it.

config LCD_SUPPORT_TFT08006
       bool "LCD support tft08006 panel"
       default n
       ---help---
               If you want to support tft08006 panel for display driver, select it.

config LCD_SUPPORT_NT35510_MIPI
        bool "LCD support nt35510_mipi panel"
        default n
        help
                If you want to support nt35510_mipi panel for display driver, select it.

按下ESC,输入:wq,保存刚才的修改并退出

3.2 修改内核中的Makefile

返回屏驱动的上一级目录,修改Makefile文件

book@100ask:~/workspaces/tina-v853-open/kernel/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp$ vi Makefile

在icn6202屏驱动编译规则的后面增加tft08006屏驱动编译规则

disp-$(CONFIG_LCD_SUPPORT_ICN6202) += lcd/icn6202.o
disp-$(CONFIG_LCD_SUPPORT_TFT08006) += lcd/tft08006.o
disp-$(CONFIG_LCD_SUPPORT_NT35510_MIPI) += lcd/nt35510.o

按下ESC,输入:wq,保存刚才的修改并退出

4.修改内核配置

在Tina的根目录下输入make kernel_menuconfig,进入内核配置界面。

book@100ask:~/workspaces/tina-v853-open$ make kernel_menuconfig

在选中屏驱动前,要确保DISP Driver Support(sunxi-disp2) ,我们的提供的SDK默认已经打开了,如果您之前关闭了,需要在内核配置界面中,进入Video support for sunxi目录下输入Y选中sunxi-disp2打开lcd节点配置。

→ Device Drivers 
	→ Graphics support 
		→ Frame buffer Devices 
			→ Video support for sunxi
				<*> DISP Driver Support(sunxi-disp2)

进入屏驱动目录,输入Y选中tft08006

→ Device Drivers 
	→ Graphics support 
		→ Frame buffer Devices 
			→ Video support for sunxi 
				→ LCD panels select 
					[*] LCD support tft08006 panel

如下图所示,选中tft08006屏驱动,编译到内核中。

保存并推车内核配置界面。

5.修改uboot配置

进入uboot的根目录下,执行make menuconfig,打开uboot配置界面。

book@100ask:~/workspaces/tina-v853-open/brandy/brandy-2.0/u-boot-2018$ make menuconfig

在选中屏驱动前,要确保DISP Driver Support(sunxi-disp2) ,我们的提供的SDK默认已经打开了,如果您之前关闭了,需要在内核配置界面中,进入Graphics support目录下输入Y选中sunxi-disp2打开lcd节点配置。

→ Device Drivers 
	→ Graphics support 
		[*] DISP Driver Support(sunxi-disp2)  --->

进入屏驱动目录下,输入Y选中TFT08006屏驱动。

→ Device Drivers 
	→ Graphics support 
		→ LCD panels select 
			 [*] LCD support TFT08006 panel 

如下图所示,选中tft08006屏驱动。

保存并退出uboot配置界面

6.修改设备树

设备树位置:tina-v853-open/device/config/chips/v853/configs/100ask/

book@100ask:~/workspaces/tina-v853-open/device/config/chips/v853/configs/100ask$ ls
BoardConfig.mk  board.dts  buildroot  env.cfg  linux-4.9  sys_config.fex  uboot-board.dts

其中board.dts为内核设备树,uboot-board.dts为uboot设备树。

6.1 修改uboot设备树

在设备树的目录下输入vi uboot-board.dts,编译uboot设备树。

book@100ask:~/workspaces/tina-v853-open/device/config/chips/v853/configs/100ask$ vi uboot-board.dts

注释掉原来的lcd0节点,修改tft08006屏lcd0节点

&lcd0 {
        base_config_start   = <1>;
        lcd_used            = <1>;

        lcd_driver_name     = "tft08006";

        lcd_backlight       = <500>;
        lcd_if              = <4>;

        lcd_x               = <480>;
        lcd_y               = <800>;
        lcd_width           = <52>;
        lcd_height          = <52>;
        lcd_dclk_freq       = <25>;

        lcd_pwm_used        = <1>;
        lcd_pwm_ch          = <9>;
        lcd_pwm_freq        = <50000>;
        lcd_pwm_pol         = <1>;
        lcd_pwm_max_limit   = <255>;

        lcd_hbp             = <10>;
        lcd_ht              = <515>;
        lcd_hspw            = <5>;

        lcd_vbp             = <20>;
        lcd_vt              = <830>;
        lcd_vspw            = <5>;

        lcd_dsi_if          = <0>;
        lcd_dsi_lane        = <2>;
        lcd_dsi_format      = <0>;
        lcd_dsi_te          = <0>;
        lcd_dsi_eotp        = <0>;
        lcd_frm             = <0>;
        lcd_io_phase        = <0x0000>;
        lcd_hv_clk_phase    = <0>;
        lcd_hv_sync_polarity= <0>;
        lcd_gamma_en        = <0>;
        lcd_bright_curve_en = <0>;
        lcd_cmap_en         = <0>;
        lcdgamma4iep        = <22>;

        lcd_gpio_0          = <&pio PH 0 1 0 3 1>;
        pinctrl-0           = <&dsi4lane_pins_a>;
        pinctrl-1           = <&dsi4lane_pins_b>;
        base_config_end     = <1>;

};

在&pio节点后增加复用引脚

         dsi4lane_pins_a: dsi4lane@0 {
                allwinner,pins = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD9", "PD10", "PD11";
                allwinner,pname = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD9", "PD10", "PD11";
                allwinner,function = "dsi";
                allwinner,muxsel = <5>;
                allwinner,drive = <3>;
                allwinner,pull = <0>;
        };

        dsi4lane_pins_b: dsi4lane@1 {
                allwinner,pins = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD9", "PD10", "PD11";
                allwinner,pname = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD9", "PD10", "DP11";
                allwinner,function = "io_disabled";
                allwinner,muxsel = <0xf>;
                allwinner,drive = <1>;
                allwinner,pull = <0>;
        };

6.2 修改内核设备树

在设备树的目录下输入vi board.dts,编译内核设备树。

book@100ask:~/workspaces/tina-v853-open/device/config/chips/v853/configs/100ask$ vi board.dts

注释掉原来的lcd0节点,修改tft08006屏lcd0节点

&lcd0 {
        base_config_start   = <1>;
        lcd_used            = <1>;

        lcd_driver_name     = "tft08006";

        lcd_backlight       = <500>;
        lcd_if              = <4>;

        lcd_x               = <480>;
        lcd_y               = <800>;
        lcd_width           = <52>;
        lcd_height          = <52>;
        lcd_dclk_freq       = <25>;

        lcd_pwm_used        = <1>;
        lcd_pwm_ch          = <9>;
        lcd_pwm_freq        = <50000>;
        lcd_pwm_pol         = <1>;
        lcd_pwm_max_limit   = <255>;

        lcd_hbp             = <10>;
        lcd_ht              = <515>;
        lcd_hspw            = <5>;

        lcd_vbp             = <20>;
        lcd_vt              = <830>;
        lcd_vspw            = <5>;

        lcd_dsi_if          = <0>;
        lcd_dsi_lane        = <2>;
        lcd_dsi_format      = <0>;
        lcd_dsi_te          = <0>;
        lcd_dsi_eotp        = <0>;
        lcd_frm             = <0>;
        lcd_io_phase        = <0x0000>;
        lcd_hv_clk_phase    = <0>;
        lcd_hv_sync_polarity= <0>;
        lcd_gamma_en        = <0>;
        lcd_bright_curve_en = <0>;
        lcd_cmap_en         = <0>;
        lcdgamma4iep        = <22>;

        lcd_gpio_0          = <&pio PH 0 1 0 3 1>;
        pinctrl-0           = <&dsi4lane_pins_a>;
        pinctrl-1           = <&dsi4lane_pins_b>;
        base_config_end     = <1>;

};

在&pio节点后增加复用引脚

         dsi4lane_pins_a: dsi4lane@0 {
                allwinner,pins = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD9", "PD10", "PD11";
                allwinner,pname = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD9", "PD10", "PD11";
                allwinner,function = "dsi";
                allwinner,muxsel = <5>;
                allwinner,drive = <3>;
                allwinner,pull = <0>;
        };

        dsi4lane_pins_b: dsi4lane@1 {
                allwinner,pins = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD9", "PD10", "PD11";
                allwinner,pname = "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD9", "PD10", "DP11";
                allwinner,function = "io_disabled";
                allwinner,muxsel = <0xf>;
                allwinner,drive = <1>;
                allwinner,pull = <0>;
        };

7.增加I2C触摸

通过拿到的屏幕资料包,我们可以知道该MIPI屏的触摸芯片为FT5336,下面我们使用全志已经内置好的FT6336触摸驱动。

7.1 修改设备树

修改twi2节点,使用ft6336驱动,修改触摸的范围。宽X为480,高y为800。其中初始化引脚需要查看V853底板原理图,其中初始化引脚为PH7,唤醒引脚为PH8。

&twi2 {
        ctp@38 {
                status = "okay";
                ctp_used = <1>;
                ctp_name = "ft6336";
                ctp_twi_id = <0x2>;
                ctp_twi_addr = <0x38>;
                ctp_screen_max_x = <0x480>;
                ctp_screen_max_y = <0x800>;
                ctp_revert_x_flag = <0x0>;
                ctp_revert_y_flag = <0x1>;
                ctp_exchange_x_y_flag = <0x0>;
                ctp_int_port = <&pio PH 7 6 1 3 0xffffffff>;
                ctp_wakeup   = <&pio PH 8 1 1 3 0xffffffff>;
        };
};

对于设备树的参数意义,可以访问百问网的Tina站点:系统配置介绍 - 全志Linux Tina-SDK开发完全手册

7.2 修改内核配置

​ 由于我们之前适配过了RGB屏触摸驱动,所以需要进入内核中修改为我们使用的新驱动,进入如下目录中,按下空格键取消勾选之前的触摸驱动gt9xxnew touchscreen driver,输入Y选中我们使用的ft6336 touchscreen driver新驱动,并保存退出。

→ Device Drivers 
	→ Input device support 
		→ Touchscreens
			<*>   ft6336 touchscreen driver

7.3 修改驱动程序

ft6336.c驱动程序位于以下目录:

tina-v853-open/kernel/linux-4.9/drivers/input/touchscreen/

修改ft6336.c触摸驱动程序,这里只展示修改的部分,源文件可见4寸屏适配资源包中查看。

                        input_report_abs(ts->input_dev,
                                        ABS_MT_POSITION_X, -(event->au16_x[i]-480));
                        input_report_abs(ts->input_dev,
                                        ABS_MT_POSITION_Y, -(event->au16_y[i]-800));

7.4 LVGL绑定新触摸节点

由于Tina使用的默认绑定的触摸节点为/dev/input/event0,我们需要修改lvgl驱动头文件中绑定的节点为我们触摸驱动上报数据的节点,我们触摸驱动上报的节点为event2,所以需要进入

tina-v853-open/platform/thirdparty/gui/lvgl-8/lv_examples/src目录下修改lv_drv_conf.h头文件,如下所示

book@100ask:~/workspaces/tina-v853-open$ cd platform/thirdparty/gui/lvgl-8/lv_examples/src/
book@100ask:~/workspaces/tina-v853-open/platform/thirdparty/gui/lvgl-8/lv_examples/src$ vi lv_drv_conf.h

找到触摸节点中的LIBINPUT_NAME,将原来的/dev/input/event0修改/dev/input/event2,如下图红框内所示。

注意:我们这里修改的是头文件,可能之前编译生成过了之后再重新编译时可能不会再编译头文件,导致修改的节点不会生效,可以手动删除out目录中的lv_examples示例程序或者直接删除out目录重新编译即可。具体原因可以观看韦东山老师的《ARM架构与编程》课程中的gcc编译过程详解。访问链接为:ARM架构与编程

8.编译系统并打包生成镜像

返回Tina根目录下,输入make,编译系统

book@100ask:~/workspaces/tina-v853-open$ make -j4
...
sun8iw21p1 compile Kernel successful
INFO: ----------------------------------------
INFO: build Tina OK.
INFO: ----------------------------------------

打包生成镜像,输入pack

book@100ask:~/workspaces/tina-v853-open$ pack
...
Dragon execute image.cfg SUCCESS !
----------image is at----------

33M     /home/book/workspaces/tina-v853-open/out/v853/100ask/openwrt/v853_linux_100ask_uart0.img

pack finish

9.烧录并测试

​ 打包完成后,将新生成的镜像拷贝到Windows主机电脑上,使用全志PhoenixSuit烧写工具,烧写到开发板上。具体可以参考:https://forums.100ask.net/t/topic/2882。

烧写完成后需要断电,才能连接MIPI屏的排线到MIPI屏接口,注意排线的线序是否一致。

​ 接完排线后,重新接入电源,和2条Type-C数据线,再将开关拨向电源接口处上电启动,启动时会出现Tina Linux小企鹅logo,进入系统后,可以查看触摸节点

root@TinaLinux:/# ls /dev/input/
event0  event1  event2

​ 我们使用的event2,如果你不确定您的触摸驱动程序使用的是哪个,可以通过cat /dev/input/event*,其中*表示要查看的是哪一个触摸节点,例如我使用的是event2,则需要输入cat /dev/input/event2,此时触摸屏幕会有上报信息。

​ 使用LVGL DEMO示例,输入lv_examples 0启动lvgl示例,可以通过点击屏幕上的UI交互按钮测试触摸是否生效。

root@TinaLinux:/# lv_examples 0
wh=480x800, vwh=480x1600, bpp=32, rotated=0
Turn on double buffering.
Turn on 2d hardware acceleration.
Turn on 2d hardware acceleration rotate.
1 个赞

我使用的T113-pro开发板,也是这个屏幕,想配置触摸,本身没有ft6336这个驱动,我将您发的ft6336的文件添加了进去,编译的时候出现如下错误

T113和V853的SDK存在差异,导致某些函数并没有在T113的触摸驱动头文件中定义,直接拷贝过去是不可行的。所以T113的触摸建议使用这个
image

1 个赞

现象说明

  1. 按照《100ASK-V853_Pro系统开发手册》将SDK解压并且拷贝了100ask的补丁包,按照本帖上述步骤下载了mipi lcd资源包并且对照替换过后,生成最终的固件并烧写,只有LCD屏幕背光和触屏可用,执行lv_examples 程序无法显示,移植和编写fb-test程序操作/dev/fb0进行显示均没有反应
  2. 烧写资料光盘中的10_测试镜像/2.测试4寸MIPI屏/v853_linux_100ask_uart0.img固件在开机过程中屏幕有logo,并且执行lv_examples 可以显示lvgl界面,在该镜像基础上进入uboot使用fastboot单独烧写boot.img后启动也是可以的,并且自己手动加的log在disp初始化时候也打出来了,对比烧写前后log打印的基础信息都是一样的,唯一不同点是cat /sys/class/disp/disp/attr/sys信息中的frame[ 0, 0, 480, 800]这一条不一样

资料光盘镜像启动成功log

## cat /sys/class/disp/disp/attr/sys
screen 0:
de_rate 300000000 hz, ref_fps:58
mgr0: 480x800 fmt[rgb] cs[0x204] range[full] eotf[0x4] bits[8bits] err[0] force_sync[0] unblank direct_show[false] iommu[1]
dmabuf: cache[0] cache max[0] umap skip[0] umap skip max[16]
	lcd output	backlight(100)	fps:58.8	 480x 800
	err:2075	skip:132	irq:11812	vsync:0	vsync_skip:0	
   BUF    enable ch[1] lyr[0] z[16] prem[N] a[pixel 255] fmt[  0] fb[ 480, 800; 480, 800; 480, 800] crop[   0,   0, 480, 800] frame[   0,   0, 480, 800] addr[48400000,       0,       0] flags[0x       0] trd[0,0

## boot kernel log
[    0.994085] [DISP]disp_module_init
[    0.999220] [DISP] disp_init,line:2340:
[    1.002902] smooth display screen:0 type:1 mode:4
[    1.044176] lcd 0, driver_name tft08006,  panel_name default_lcd
[    1.050391] lcd 0, driver_name tft08006,  panel_name tft08006
[    1.056250] lcd_cfg_panel_info 
[    1.059531] lcd 0, driver_name tft08006,  panel_name super_lcd_driver
[    1.066192] display_fb_request,fb_id:0
[    1.074183] [DISP] de_fcm_set_para,line:491:
[    1.078356] fcm lut 0 not find, auto retry after init
[    1.084996] [DISP]disp_module_init finish
[    1.089360] [DISP] de_fcm_set_para,line:491:
[    1.089360] fcm lut 0 not find, auto retry after init
[    1.089381] [DISP] de_fcm_set_para,line:491:
[    1.089381] fcm lut 0 not find, auto retry after init
[    1.089455] [DISP] lcd_clk_config,line:702:
[    1.089456] disp 0, clk: pll(150000000),clk(150000000),dclk(25000000) dsi_rate(25000000)
[    1.089456]      clk real:pll(288000000),clk(288000000),dclk(72000000) dsi_rate(150000000)

自己用SDK编译烧写固件失败log

## cat /sys/class/disp/disp/attr/sys
screen 0:
de_rate 300000000 hz, ref_fps:58
mgr0: 480x800 fmt[rgb] cs[0x204] range[full] eotf[0x4] bits[8bits] err[0] force_sync[0] unblank direct_show[false] iommu[0]
dmabuf: cache[0] cache max[0] umap skip[0] umap skip max[0]
	lcd output	backlight(100)	fps:25.5	 480x 800
	err:0	skip:0	irq:0	vsync:0	vsync_skip:0	
   BUF    enable ch[1] lyr[0] z[16] prem[N] a[pixel 255] fmt[  0] fb[ 480, 800; 480, 800; 480, 800] crop[   0, 800, 480, 800] frame[   0,   0,1024, 600] addr[48400000,       0,       0] flags[0x       0] trd[0,0]

## boot kernel log
[    1.027473] [DISP]disp_module_init
[    1.032506] [DISP] disp_init,line:2340:
[    1.036379] smooth display screen:0 type:1 mode:4
[    1.077587] lcd 0, driver_name tft08006,  panel_name default_lcd
[    1.083715] lcd 0, driver_name tft08006,  panel_name tft08006
[    1.089595] drivers/video/fbdev/sunxi/disp2/disp/lcd/tft08006.c lcd_cfg_panel_info 
[    1.097372] lcd 0, driver_name tft08006,  panel_name super_lcd_driver
[    1.104059] display_fb_request,fb_id:0
[    1.112086] [DISP] de_fcm_set_para,line:491:
[    1.116237] fcm lut 0 not find, auto retry after init
[    1.122883] [DISP]disp_module_init finish
[    1.127245] [DISP] de_fcm_set_para,line:491:
[    1.127245] fcm lut 0 not find, auto retry after init
[    1.127263] [DISP] de_fcm_set_para,line:491:
[    1.127264] fcm lut 0 not findn       etc       lib       proc      root      squashfs  usr
data      home      mnt       rdinit    run       sys       var
dev       init      nfs       rom       sbin      tmp       www
root@TinaLinux:/# , auto retry after init
[    1.127338] [DISP] lcd_clk_config,line:702:
[    1.127339] disp 0, clk: pll(150000000),clk(150000000),dclk(25000000) dsi_rate(25000000)
[    1.127339]      clk real:pll(288000000),clk(288000000),dclk(72000000) dsi_rate(150000000)

是不是还有其他需要注意的地方没有修改?

疑点:屏幕中断没出来,正常来说:每加1 都代表刷新了一帧,正常来说是一秒60(期望的fps)次,重复cat sys,如果无变化,则异常。

解决办法:
1.查看lcd调试指南FAQ - 全志Linux Tina-SDK开发完全手册
2.思路:检查驱动、内核配置、设备树。
3.提供修改的步骤,包括(设备树节点,驱动,内核配置),因为这看着像你漏做了某一步

是因为没有移植uboot对应的驱动,导致uboot使用了默认的default_lcd来初始化LCD,进到kernel后也不可用了

我在板子上尝试驱动两个屏幕都没有点亮,我也没有一直uboot的驱动,我回头看看是不是这个原因。原来用536,831之类的,如果不要求uboot显示开机画面,并不用管uboot对应的屏幕驱动,只改内核的就可以了。

目前用起来没什么问题了,不用就关对应选项

之前调试只配置了内核的设备树和驱动。确实先关闭uboot的disp就正常显示了,之前还一直以为是自己没搞对。

请教一下,我用的镜像 和补丁都是在百度网盘下载的
但是在实际操作的过程中,1 make kernel_menuconfig 命令用不了
2 内核配置中添加LCD驱动时,没有对应的选项[*] DISP Driver Support(sunxi-disp2) —> 选不了


没有配置环境的问题

  1. source build/envsetup.sh
  2. lunch 1
  3. make kernel_menuconfig

感谢指导,是每次重启虚拟机都需要重新配置下环境是吗?我记得之前编译过的。

企业微信截图_1689767961980
接上屏幕后测试时,手在屏幕上滑动时,刷屏乱码,麻烦指导下。

似乎修改内核设备树的相关项内容是错的,要把适配资源包里面的解压出来替换才行。

您好,提供的文件和文章中的配置是一样的