试着用t113的uboot测试mipi屏幕,出现问题,能不能帮帮我
-
用的t113的sdk编译出来的uboot,自己修改了设备树,之前用的800x480的lcd在uboot下面已经用colorbar指令测试成功了,然后想测试手头的mipi屏幕,结果出现了个问题
用disp指令显示,我配置的刷新率应该是59帧,实际只有25.5帧,colorbar测试失败,但是用mipi指令可以获取到屏幕的id值,说明mipi其实已经跑起来了,可能是时钟哪里配置不对,没有修改uboot源码,只是修改了设备树,按照mipi初始化指令增加了屏幕的指令,这个屏幕不需要额外的初始化指令,只需要一个0x29和0x11指令就可以显示的uboot打印的logo如下
U-Boot 2018.05-g2a24076-dirty (May 13 2022 - 21:35:03 +0800) Allwinner Technology [03.349].................................set debug mode=8[03.354]CPU: Allwinner Family [03.357]Model: sun8iw20 [03.359]DRAM: 128 MiB [03.362]Relocation Offset is: 04f36000 [03.380]secure enable bit: 0 [03.383]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz [03.389]gic: normal mode [03.391]flash init start0 [03.393]workmode = 0,storage type = 3 spi sunxi_slave->max_hz:120000000 SF: Detected w25q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB [03.409]sunxi flash init ok [03.412]sunxi_flash_probe ok [03.415]sunxi_flash_probe ok1 [03.417]line:703 init_clocks [03.420]init_clocks:finish [03.422]drv_disp_init [03.430]get flash lcd idx 0 request pwm success, pwm7:pwm7:0x2000c00. fdt get node offset faill: hdmi [03.441]HDMI 2.0 driver init start! [03.444]fdt_path_offset hdmi fail [03.447]unable to map hdmi registers [03.450]drv_disp_init finish [03.453]boot_gui_init:start [03.456]set disp.dev2_output_type fail. using defval=0 [03.461]lcd_open_flow=0 [03.463]lcd_clk_config-------------------------------- [03.468]-------------disp_al_lcd_get_clk_info [03.472]DSI_VERSION_40 [03.474]DSI_VERSION_40 lcd_dsi_format=0 [03.477]tcon_div=4 lcd_div=1 dsi_div=6 dsi_rate=150000000 [03.482]lcd_rate=408000000 pll_rate=408000000 tcon_div=4 [03.488]pll_rate_set=408000000 [03.490]2222222222 [03.492]disp 0, clk: pll(408000000),clk(408000000),dclk(68000000) dsi_rate(150000000) clk real:pll(408000000),clk(408000000),dclk(102000000) dsi_rate(150000000) [03.507]DSI_VERSION_40 [03.509]DSI_VERSION_40 lcd_dsi_format=0 [03.512]tcon_div=4 lcd_div=1 dsi_div=6 dsi_rate=150000000 [03.518]lcd_open_flow=0 [03.851]switch device: sel=0, type=1, mode=4, format=0, bits=0, eotf=4, cs=260 [03.858]boot_gui_init:finish GUID P[03.861]lcd_open_flow=0 [03.873]lcd_panel_init dsi_dcs_write=29 get lcd id0 0x41 get lcd id15 0xff get lcd id16 0x0 readbytes=16 artition Table Header signature is wrong: 0xE07060200000000 != 0x5452415020494645 part_get_info_efi: *** ERROR: In[04.192]lcd_open_flow=0 valid GPT *** ERROR: attempting read past flash size *** ERROR: Can't read GPT header *** part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition bootloader GUID Partition Table Header signature is wrong: 0xE07060200000000 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid GPT *** ERROR: attempting read past flash size *** ERROR: Can't read GPT header *** part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition boot-resource [04.238]Get bootloader and boot-resource partition number fail[04.244]lcd_open_flow=0 [04.247]lcd_open_flow=0 [04.249]lcd_open_flow=0 [04.251]LCD open finish ! GUID Partition Table Header signature is wrong: 0xE07060200000000 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid GPT *** ERROR: attempting read past flash size *** ERROR: Can't read GPT header *** part_get_info_efi: *** ERROR: Invalid Backup GPT *** [04.277]Loading Environment from SUNXI_FLASH... GUID Partition Table Header signature is wrong: 0xE07060200000000 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid GPT *** ERROR: attempting read past flash size *** ERROR: Can't read GPT header *** part_get_info_efi: *** ERROR: Invalid Backup GPT *** *** Warning - no device, using default environment Failed (-19) GUID Partition Table Header signature is wrong: 0xE07060200000000 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid GPT *** ERROR: attempting read past flash size *** ERROR: Can't read GPT header *** part_get_info_efi: *** ERROR: Invalid Backup GPT *** [04.334]update part info [04.336]key 0 GUID Partition Table Header signature is wrong: 0xE07060200000000 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid GPT *** ERROR: attempting read past flash size *** ERROR: Can't read GPT header *** part_get_info_efi: *** ERROR: Invalid Backup GPT *** [04.361]no misc partition is found [04.364]update bootcmd GUID Partition Table Header signature is wrong: 0xE07060200000000 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid GPT *** ERROR: attempting read past flash size *** ERROR: Can't read GPT header *** part_get_info_efi: *** ERROR: Invalid Backup GPT *** GUID Partition Table Header signature is wrong: 0xE07060200000000 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid GPT *** ERROR: attempting read past flash size *** ERROR: Can't read GPT header *** part_get_info_efi: *** ERROR: Invalid Backup GPT *** [04.412]libfdt fdt_check_header(): FDT_ERR_BADMAGIC [04.417]replace_fdt fail addr:0x43200000 disable nand error: FDT_ERR_NOTFOUND [04.424](weak)update dtb dram start [04.428]## error: update_fdt_dram_para : FDT_ERR_NOTFOUND [04.434]update dts Hit any key to stop autoboot: 0 ## Error: "distro_bootcmd" not defined => disp screen 0: de_rate 300000000 hz, ref_fps:59 mgr0: 720x1280 fmt[rgb] cs[0x204] range[full] eotf[0x4] bits[8bits] err[1] force_sync[0] unblank direct_show[false] iommu[0] lcd output backlight(100) fps:25.5 720x1280 err:0 skip:0 irq:0 vsync:0 vsync_skip:0 =>
希望有经验的朋友能不能帮我分析一下,是不是哪里时钟配置出错了
uboot的dts文件如下
/* * Allwinner Technology CO., Ltd. sun8iw20p1 soc board. * * soc board support. */ /dts-v1/; #include "sun8iw20p1-soc-system.dtsi" &platform { eraseflag = <1>; next_work = <3>; debug_mode = <1>; }; &target { boot_clock = <1008>; /*CPU boot frequency, Unit: MHz*/ storage_type = <0xffffffff>; /*boot medium, 0-nand, 1-card0, 2-card2, -1(defualt)auto scan*/ burn_key = <0>; /*1:support burn key; 0:not support burn key*/ dragonboard_test = <0>; /*1:support card boot dragonboard; 0:not support card boot dragonboard*/ }; &charger0 { pmu_safe_vol = <3500>; }; &twi6 { clock-frequency = <200000>; pinctrl-0 = <&s_twi0_pins_a>; no_suspend = <1>; twi_drv_used = <1>; status = "okay"; }; &pwm7_pin_a { pins = "PD22"; function = "pwm7"; muxsel = <5>; drive-strength = <10>; bias-pull-up; }; &pwm7_pin_b { pins = "PD22"; muxsel = <0>; function = "gpio_out"; }; &pwm7 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm7_pin_a>; pinctrl-1 = <&pwm7_pin_b>; status = "okay"; }; &sdc0_pins_a { allwinner,pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; allwinner,function = "sdc0"; allwinner,muxsel = <2>; allwinner,drive = <3>; allwinner,pull = <1>; pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "sdc0"; drive-strength = <30>; bias-pull-up; power-source = <3300>; }; &sdc0_pins_b { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "sdc0"; drive-strength = <30>; bias-pull-up; power-source = <1800>; }; &sdc0_pins_c { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "gpio_in"; }; &sdc2_pins_a { allwinner,pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; allwinner,function = "sdc2"; allwinner,muxsel = <3>; allwinner,drive = <3>; allwinner,pull = <1>; pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; function = "sdc2"; drive-strength = <30>; bias-pull-up; }; &sdc2_pins_b { pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; function = "gpio_in"; }; &nand0_pins_a { allwinner,pins = "PC0", "PC1", "PC2", "PC5", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16"; allwinner,pname= "nand0_we", "nand0_ale","nand0_cle", "nand0_nre", "nand0_d0", "nand0_d1", "nand0_d2", "nand0_d3", "nand0_d4", "nand0_d5", "nand0_d6", "nand0_d7", "nand0_ndqs"; allwinner,function = "nand0"; allwinner,muxsel = <2>; allwinner,drive = <1>; allwinner,pull = <0>; }; &nand0_pins_b { allwinner,pins = "PC4", "PC6", "PC03", "PC07"; allwinner,pname= "nand0_ce0", "nand0_rb0", "nand0_ce1", "nand0_rb1"; allwinner,function = "nand0"; allwinner,muxsel = <2>; allwinner,drive = <1>; allwinner,pull = <1>; /* only RB&CE should be pulled up */ }; &nand0_pins_c { allwinner,pins = "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16"; allwinner,function = "io_disabled"; allwinner,muxsel = <7>; allwinner,drive = <1>; allwinner,pull = <0>; }; &spi0_pins_a { allwinner,pins = "PC2", "PC4", "PC5"; allwinner,pname = "spi0_sclk", "spi0_mosi", "spi0_miso"; allwinner,function = "spi0"; allwinner,muxsel = <2>; allwinner,drive = <1>; allwinner,pull = <0>; }; &spi0_pins_b { allwinner,pins = "PC3", "PC7", "PC6"; allwinner,pname = "spi0_cs0", "spi0_hold", "spi0_wp"; allwinner,function = "spi0"; allwinner,muxsel = <2>; allwinner,drive = <1>; allwinner,pull = <1>; // only CS should be pulled up }; &spi0_pins_c { allwinner,pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; allwinner,function = "gpio_in"; allwinner,muxsel = <0>; allwinner,drive = <1>; allwinner,pull = <0>; }; &card0_boot_para { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */ /* reg = <0x0 0x2 0x0 0x0>; [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */ device_type = "card0_boot_para"; card_ctrl = <0x0>; card_high_speed = <0x1>; card_line = <0x4>; pinctrl-0 = <&sdc0_pins_a>; }; &card2_boot_para { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */ /* reg = <0x0 0x3 0x0 0x0>; [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */ device_type = "card2_boot_para"; card_ctrl = <0x2>; card_high_speed = <0x1>; card_line = <0x4>; pinctrl-0 = <&sdc2_pins_a>; sdc_ex_dly_used = <0x2>; sdc_io_1v8 = <0x1>; sdc_tm4_win_th = <0x08>; sdc_tm4_hs200_max_freq = <150>; sdc_tm4_hs400_max_freq = <100>; sdc_type = "tm4"; }; &gpio_bias { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */ device_type = "gpio_bias"; pc_bias = <1800>; }; &nand0 { compatible = "allwinner,sun8iw20-nand"; device_type = "nand0"; //reg = <0x0 0x04011000 0x0 0x1000>;/* nand0 */ pinctrl-names = "default", "sleep"; pinctrl-0 = <&nand0_pins_a &nand0_pins_b>; pinctrl-1 = <&nand0_pins_c>; nand0_regulator1 = "vcc-nand"; nand0_regulator2 = "none"; nand0_cache_level = <0x55aaaa55>; nand0_flush_cache_num = <0x55aaaa55>; nand0_capacity_level = <0x55aaaa55>; nand0_id_number_ctl = <0x55aaaa55>; nand0_print_level = <0x55aaaa55>; nand0_p0 = <0x55aaaa55>; nand0_p1 = <0x55aaaa55>; nand0_p2 = <0x55aaaa55>; nand0_p3 = <0x55aaaa55>; chip_code = "sun8iw20"; status = "disabled"; }; &spi0 { clock-frequency = <100000000>; pinctrl-0 = <&spi0_pins_a &spi0_pins_b>; pinctrl-1 = <&spi0_pins_c>; pinctrl-names = "default", "sleep"; /*spi-supply = <®_dcdc1>;*/ spi_slave_mode = <0>; spi0_cs_number = <1>; spi0_cs_bitmap = <1>; status = "okay"; spi-nand@0 { compatible = "spi-nand"; spi-max-frequency=<0x5F5E100>; reg = <0x0>; spi-rx-bus-width=<0x04>; spi-tx-bus-width=<0x04>; status="okay"; }; }; &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>;*/ }; /*800x480 tft*/ /* &lcd0 { lcd_used = <1>; lcd_driver_name = "default_lcd"; lcd_backlight = <100>; lcd_if = <0>; lcd_x = <800>; lcd_y = <480>; lcd_width = <150>; lcd_height = <94>; lcd_dclk_freq = <36>; lcd_hv_clk_phase = <0>; lcd_hv_sync_polarity= <3>; lcd_pwm_used = <1>; lcd_pwm_ch = <7>; lcd_pwm_freq = <20000>; lcd_pwm_pol = <0>; lcd_hbp = <46>; lcd_ht = <1055>; lcd_hspw = <0>; lcd_vbp = <23>; lcd_vt = <525>; lcd_vspw = <0>; lcd_lvds_if = <0>; lcd_lvds_colordepth = <1>; lcd_lvds_mode = <0>; lcd_frm = <1>; lcd_io_phase = <0x0000>; lcd_gamma_en = <0>; lcd_bright_curve_en = <0>; lcd_cmap_en = <0>; pinctrl-0 = <&rgb18_pins_a>; pinctrl-1 = <&rgb18_pins_b>; }; &aliases { nand0 = &nand0; twi6 = &twi6; pwm = &pwm; pwm0 = &pwm0; pwm1 = &pwm1; pwm2 = &pwm2; pwm3 = &pwm3; pwm4 = &pwm4; pwm5 = &pwm5; pwm6 = &pwm6; pwm7 = &pwm7; disp = &disp; lcd0 = &lcd0; lcd1 = &lcd1; eink = &eink; spi0 = &spi0; }; */ &lcd0 { /* part 1 */ lcd_used = <1>; lcd_driver_name = "lq055k3sx02"; /* part 2 */ lcd_if = <4>; lcd_dsi_if = <0>; /* part 3 */ lcd_x = <720>; lcd_y = <1280>; lcd_width = <135>; lcd_height = <216>; lcd_dclk_freq = <68>; lcd_hbp = <40>; lcd_ht = <870>; lcd_hspw = <10>; lcd_vbp = <11>; lcd_vt = <1305>; lcd_vspw = <1>; /* part 4 */ lcd_backlight = <100>; lcd_pwm_used = <1>; lcd_pwm_ch = <7>; lcd_pwm_freq = <20000>; lcd_pwm_pol = <0>; lcd_pwm_max_limit = <100>; //lcd_bl_en = <&pio PD 22 1 0 3 1>;//pwm7 pd22 lcd_bright_curve_en = <0>; /* part 5 */ lcd_dsi_lane = <4>; lcd_dsi_format = <0>; lcd_dsi_te = <0>; /* part 6 */ lcd_frm = <0>; lcd_gamma_en = <0>; lcd_cmap_en = <0>; /* part 7 */ //lcd_pin_power = "dcdc1"; //lcd_pin_power1 = "eldo3"; //lcd_power = "dc1sw"; lcd_gpio_0 = <&pio PG 10 1 0 3 1>;//rst(PG10) lcd_gpio_1 = <&pio PG 13 1 0 3 1>;// led(PG13) pinctrl-0 = <&dsi4lane_pins_a>; pinctrl-1 = <&dsi4lane_pins_b>; }; &aliases { nand0 = &nand0; twi6 = &twi6; pwm = &pwm; pwm0 = &pwm0; pwm1 = &pwm1; pwm2 = &pwm2; pwm3 = &pwm3; pwm4 = &pwm4; pwm5 = &pwm5; pwm6 = &pwm6; pwm7 = &pwm7; disp = &disp; lcd0 = &lcd0; lcd1 = &lcd1; eink = &eink; spi0 = &spi0; };
Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号