导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    t113 uboot 读取不到tf卡

    其它全志芯片讨论区
    1
    1
    829
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • C
      cjia3254 LV 5 最后由 编辑

      自制t113开发板,现状boot0可以运行,uboot读取tf卡失败
      日志输出

      U-Boot 2018.05-g24521d6-dirty (Feb 29 2024 - 19:07:26 +0800) Allwinner Technology
      
      [00.308]CPU:   Allwinner Family
      [00.311]Model: sun8iw20
      I2C:   FDT ERROR:fdt_set_all_pin:[twi0]-->FDT_ERR_BADPATH
      FDT ERROR:fdt_set_all_pin:[twi1]-->FDT_ERR_BADPATH
      ready
      [00.333]DRAM:  128 MiB
      [00.336]Relocation Offset is: 04f01000
      [00.355]secure enable bit: 0
      [00.358]smc_tee_inform_fdt failed with: -65526[00.362]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
      [29]HELLO! BOOT0 is starting!
      [32]BOOT0 commit : 88480af-dirty
      [35]set pll start
      [41]periph0 has been enabled
      [44]set pll end
      [45][pmu]: bus read error
      [48]board init ok
      [49]ZQ value = 0x2f
      [51]get_pmu_exist() = -1
      [54]ddr_efuse_type: 0xa
      [56]trefi:7.8ms
      [58][AUTO DEBUG] single rank and full DQ!
      [62]ddr_efuse_type: 0xa
      [65]trefi:7.8ms
      [67][AUTO DEBUG] rank 0 row = 13 
      [70][AUTO DEBUG] rank 0 bank = 8 
      [73][AUTO DEBUG] rank 0 page size = 2 KB 
      [77]DRAM BOOT DRIVE INFO: V0.33
      [80]DRAM CLK = 936 MHz
      [82]DRAM Type = 3 (2:DDR2,3:DDR3)
      [86]DRAMC read ODT  off.
      [88]DRAM ODT value: 0x42.
      [91]ddr_efuse_type: 0xa
      [94]DRAM SIZE =128 M
      [96]dram_tpr4:0x0
      [97]PLL_DDR_CTRL_REG:0xf8004d00
      [100]DRAM_CLK_REG:0xc0000000
      [103][TIMING DEBUG] MR2= 0x20
      [111]DRAM simple test OK.
      [113]rtc standby flag is 0x0, super standby flag is 0x0
      [118]dram size =128
      [121]card no is 0
      [123]sdcard 0 line count 4
      [125][mmc]: mmc driver ver 2021-05-21 14:47
      [134][mmc]: Wrong media type 0x0
      [137][mmc]: ***Try SD card 0***
      [157][mmc]: HSSDR52/SDR25 4 bit
      [160][mmc]: 50000000 Hz
      [162][mmc]: 30436 MB
      [164][mmc]: ***SD/MMC 0 init OK!!!***
      [237]Loading boot-pkg Succeed(index=0).
      [241]Entry_name        = u-boot
      [247]Entry_name        = optee
      [251]Entry_name        = dtb
      [253]mmc not para
      [255]Jump to second Boot.
      M/TC: OP-TEE version: 6aef7bb2-dirty (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Fri Jul 23 09:25:11 UTC 2021 arm
      
      
      U-Boot 2018.05-g24521d6-dirty (Feb 29 2024 - 19:07:26 +0800) Allwinner Technology
      
      [00.309]CPU:   Allwinner Family
      [00.311]Model: sun8iw20
      I2C:   FDT ERROR:fdt_set_all_pin:[twi0]-->FDT_ERR_BADPATH
      FDT ERROR:fdt_set_all_pin:[twi1]-->FDT_ERR_BADPATH
      ready
      [00.333]DRAM:  128 MiB
      [00.336]Relocation Offset is: 04f01000
      [00.355]secure enable bit: 0
      [00.358]smc_tee_inform_fdt failed with: -65526[00.362]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
      [00.368]gic: sec monitor mode
      [00.371]flash init start
      [00.373]workmode = 0,storage type = 1
      [00.376][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00
      [00.382][mmc]: get card0 para fail
      [00.385][mmc]: sunxi mmc host init failed!
      [00.389][mmc]: sunxi host mmc config failed!
      [00.393]error card no error
      [00.395][mmc]: MMC Device -1 not found
      fail to find one useful mmc card
      initcall sequence 47f90548 failed at call 4300d5a1 (err=-1)
      ### ERROR ### Please RESET the board ###
      

      对于编译出的设备树进项反汇编得到

              card0_boot_para@2 {
                  device_type = "card0_boot_para";
                  card_ctrl = <0x00000000>;
                  card_high_speed = <0x00000001>;
                  card_line = <0x00000004>;
                  pinctrl-0 = <0x0000001c>;
                  status = "okay";
              };
      

      先追踪到是uboot读取设备树出错,

      #define   FDT_PATH_CARD0_BOOT_PARA           "/soc/card0_boot_para"
      
      	if (sdc_no == 0) {
      		nodeoffset =  fdt_path_offset(working_fdt, FDT_PATH_CARD0_BOOT_PARA);
      		printf("nodeoffset=%d\n",(int )nodeoffset);
      		nodeoffset=2;
      		if (nodeoffset < 0) {
      			MMCINFO("get card0 para fail\n");
      			return -1;
      		}
      

      调试输出nodeoffset=-11

      [00.310]CPU:   Allwinner Family
      [00.313]Model: sun8iw20
      I2C:   FDT ERROR:fdt_set_all_pin:[twi0]-->FDT_ERR_BADPATH
      FDT ERROR:fdt_set_all_pin:[twi1]-->FDT_ERR_BADPATH
      ready
      [00.334]DRAM:  128 MiB
      [00.337]Relocation Offset is: 04eff000
      [00.356]secure enable bit: 0
      [00.359]smc_tee_inform_fdt failed with: ffff000a
      [00.364]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
      [00.370]gic: sec monitor mode
      sunxi flash map init
      [00.375]flash init start
      [00.377]workmode = 0,storage type = 1
      card_no = 0 
      [00.381][mmc]: mmc driver ver uboot2018:2021-12-20 13:35:00
      nodeoffset=-11[00.388][mmc]: get sdc_type fail and use default host:tm1.
      [00.393][mmc]: get card0 para fail
      [00.396][mmc]: can't find node "mmc0",will add new node
      [00.401][mmc]: fdt err returned <no error>
      [00.405][mmc]: Using default timing para
      [00.409][mmc]: sunxi mmc pin set failed!
      [00.412]error card no error
      [00.415][mmc]: MMC Device -1 not found
      if 
      fail to find one useful mmc card===0 
      initcall sequence 47f8fc04 failed at call 4300d991 (err=-1)
      ### ERROR ### Please RESET the board ###
      

      我怀疑是偏移地址有问题,导致找不到。

      1 条回复 最后回复 回复 引用 分享 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策