Buildroot显示uboot logo

根据之前的开机现象,uboot部分没有开机logo

 1、Makefile配置

查看一下u-boot/tools/Makefile是否都有如下配置

# Enable all the config-independent tools
ifneq ($(HOST_TOOLS_ALL),)
CONFIG_LCD_LOGO = y
CONFIG_CMD_LOADS = y
CONFIG_CMD_NET = y
CONFIG_XWAY_SWAP_BYTES = y
CONFIG_NETCONSOLE = y
CONFIG_SHA1_CHECK_UB_IMG = y
CONFIG_ARCH_SUNXI = y
endif
# Generated LCD/video logo
LOGO_H = $(objtree)/include/bmp_logo.h
LOGO_DATA_H = $(objtree)/include/bmp_logo_data.h
LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_H)
LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_DATA_H)
LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_H)
LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_DATA_H)

# Generic logo
ifeq ($(LOGO_BMP),)
LOGO_BMP= $(srctree)/$(src)/logos/denx.bmp

# Use board logo and fallback to vendor
ifneq ($(wildcard $(srctree)/$(src)/logos/$(BOARD).bmp),)
LOGO_BMP= $(srctree)/$(src)/logos/$(BOARD).bmp
else
ifneq ($(wildcard $(srctree)/$(src)/logos/$(VENDOR).bmp),)
LOGO_BMP= $(srctree)/$(src)/logos/$(VENDOR).bmp
endif
endif

endif # !LOGO_BMP

 这些都是默认的,并没有修改,而且u-boot显示的logo在kernel/logo.bmp,文件名在kernel的dts配置

2、跑u-boot时没有检测到dsi配置

boot mode: None
Found DTB in boot part
DTB: rk-kernel.dtb
HASH(c): OK
I2c0 speed: 400000Hz
PMIC:  RK808
vdd_center 900000 uV
vdd_cpu_l 900000 uV
vdd_log 1100000 uV
I2c8 speed: 100000Hz
panel_i2c_reg_read fail, i = 0  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 1  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 2  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 3  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 0  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 1  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 2  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 3  reg = 4 ret = -121
rockchip_display_probe rpi_buffer=-121  powertip_buffer=-121
rockchip_display_probe: no dsi panel connected
Could not find baseparameter partition
Model: ASUS Tinker Board 2/2S
read_bmp_header:BMP singature incorrectly 0x9d 0x27load_bmp_logo  42 4d bit_count=8 width=258 height=94 file_size=2d40
Rockchip UBOOT DRM driver version: v1.0.1
hdmi@ff940000 disconnected

 在网上有些源码没有这段代码,先把continue屏蔽一下,继续往下跑

Buildroot显示uboot logo_第1张图片

diff --git a/drivers/video/drm/rockchip_display.c b/drivers/video/drm/rockchip_display.c
index 6fcedcdfe6..a70bc02087 100644
--- a/drivers/video/drm/rockchip_display.c
+++ b/drivers/video/drm/rockchip_display.c
@@ -507,6 +507,7 @@ static int display_get_timing_from_dts(struct panel_state *panel_state,
        struct rockchip_panel *panel = panel_state->panel;
        int phandle;
        ofnode timing, native_mode;
+       printf("rpi_panel_connected=%d, powertip_panel_connected=%d\n", rpi_panel_connected, powertip_panel_connected);

        timing = dev_read_subnode(panel->dev, "display-timings");
        if (rpi_panel_connected) {
@@ -1776,8 +1777,11 @@ static int rockchip_display_probe(struct udevice *dev)
                return -ENODEV;

        ofnode_for_each_subnode(node, route_node) {
-               if (!ofnode_is_available(node))
+               if (!ofnode_is_available(node)) {
+                       printf("rockchip_display_probe node.np->name=%s is not available\n", node.np->name);
                        continue;
+               }
+               printf("rockchip_display_probe node.np->name=%s\n", node.np->name);
                if (!strncmp(node.np->name, "route-dsi", 9)) {
                        struct udevice *powertip_dev;
                        struct udevice *rpi_dev;
@@ -1789,7 +1793,7 @@ static int rockchip_display_probe(struct udevice *dev)

                        i2c_get_chip_for_busnum(0x8, 0x36, 1, &powertip_dev);//powertip
                        powertip_buffer = panel_i2c_reg_read(powertip_dev, 0x4);
-                       printf("rockchip_display_probe rpi_buffer=%d  powertip_buffer=%d\n",rpi_buffer, powertip_buffer);
+                       printf("rockchip_display_probe rpi_buffer=%x  powertip_buffer=%x\n",rpi_buffer, powertip_buffer);

                        if (rpi_buffer == 0xDE  || rpi_buffer == 0xC3) {
                                rpi_panel_connected = true;
@@ -1799,7 +1803,7 @@ static int rockchip_display_probe(struct udevice *dev)

                        if (!powertip_panel_connected && !rpi_panel_connected) {
                                        printf("rockchip_display_probe: no dsi panel connected\n");
-                                       continue;
+                                       //continue;
                        }
                }

 3、dw_mipi_dsi.c

rockchip_display_probe node.np->name=route-hdmi
rockchip_display_probe node.np->name=route-dsi
I2c8 speed: 100000Hz
panel_i2c_reg_read fail, i = 0  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 1  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 2  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 3  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 0  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 1  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 2  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 3  reg = 4 ret = -121
rockchip_display_probe rpi_buffer=ffffff87  powertip_buffer=ffffff87
rockchip_display_probe: no dsi panel connected
panel_i2c_reg_read fail, i = 0  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 1  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 2  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 3  reg = 80 ret = -121
panel_i2c_reg_read fail, i = 0  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 1  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 2  reg = 4 ret = -121
panel_i2c_reg_read fail, i = 3  reg = 4 ret = -121
 dw_mipi_dsi_child_pre_probe rpi_buffer=-121  powertip_buffer=-121
rockchip_display_probe node.np->name=route-edp is not available
Could not find baseparameter partition
Model: ASUS Tinker Board 2/2S
read_bmp_header:BMP singature incorrectly 0x9d 0x27load_bmp_logo  42 4d bit_count=8 width=258 height=94 file_size=2d40
Rockchip UBOOT DRM driver version: v1.0.1
hdmi@ff940000 disconnected
rpi_panel_connected=0, powertip_panel_connected=1
Using display timing dts
dsi@ff960000:  detailed mode clock 66800 kHz, flags[a]
    H: 0720 0728 0783 0838
    V: 1280 1288 1308 1328
bus_format: 100e
final DSI-Link bandwidth: 504 Mbps x 2
panel_simple_prepaer

看log跑到了dw_mipi_dsi_child_pre_probe

Buildroot显示uboot logo_第2张图片

对powertip_buffer的判断不完整导致获取到的timing参数不对,屏幕显示如下

修改powertip_buffer的判断

diff --git a/drivers/video/drm/dw_mipi_dsi.c b/drivers/video/drm/dw_mipi_dsi.c
index 370948a3c8..2c17939363 100644
--- a/drivers/video/drm/dw_mipi_dsi.c
+++ b/drivers/video/drm/dw_mipi_dsi.c
@@ -1732,7 +1732,7 @@ static int dw_mipi_dsi_child_pre_probe(struct udevice *dev)
                device->lanes = 1;
                device->format = MIPI_DSI_FMT_RGB888;
                device->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |MIPI_DSI_MODE_LPM;
-       } else if ((powertip_buffer & 0xF0) == 0x80) {
+       } else if ((powertip_buffer > 0) && (powertip_buffer & 0xF0) == 0x80) {
                powertip_panel_connected = true;
                powertip_id = powertip_buffer;
                device->lanes = 2;

4、运行正常

buildroot显示uboot logo

你可能感兴趣的:(TinkerBoard2,嵌入式,linux,BuildRoot)