<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[t113 uboot 读取不到tf卡]]></title><description><![CDATA[<p dir="auto">自制t113开发板，现状boot0可以运行，uboot读取tf卡失败<br />
日志输出</p>
<pre><code>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]--&gt;FDT_ERR_BADPATH
FDT ERROR:fdt_set_all_pin:[twi1]--&gt;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]--&gt;FDT_ERR_BADPATH
FDT ERROR:fdt_set_all_pin:[twi1]--&gt;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 ###
</code></pre>
<p dir="auto">先追踪到是uboot读取设备树出错，</p>
<pre><code>#define   FDT_PATH_CARD0_BOOT_PARA           "/soc/card0_boot_para"
</code></pre>
<pre><code>	if (sdc_no == 0) {
		nodeoffset =  fdt_path_offset(working_fdt, FDT_PATH_CARD0_BOOT_PARA);
		if (nodeoffset &lt; 0) {
			MMCINFO("get card0 para fail\n");
			return -1;
		}
</code></pre>
<p dir="auto">对于编译出的设备树进项反汇编得到<a href="/assets/uploads/files/1711602667715-xxx.dts">xxx.dts</a></p>
<pre><code>        card0_boot_para@2 {
            device_type = "card0_boot_para";
            card_ctrl = &lt;0x00000000&gt;;
            card_high_speed = &lt;0x00000001&gt;;
            card_line = &lt;0x00000004&gt;;
            pinctrl-0 = &lt;0x0000001c&gt;;
            status = "okay";
        };
</code></pre>
<p dir="auto">我怀疑是偏移地址有问题，导致找不到。</p>
]]></description><link>https://bbs.aw-ol.com/topic/5228/t113-uboot-读取不到tf卡</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 19:32:36 GMT</lastBuildDate><atom:link href="https://bbs.aw-ol.com/topic/5228.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Mar 2024 05:13:07 GMT</pubDate><ttl>60</ttl></channel></rss>