硬件设备及镜像
主板为:Yuzuki Lizard V851S开发板
宿主机环境:ubuntu 22.04
SDK版本:Yuzukilizard的github上的Docker镜像
img为:github上Yuzukilizard释放的镜像:[01]v851s_linux_lizard_uart0_2022_12_29.img v851s_linux_lizard_uart0_2022_12_29.img
问题现象简述:
- sdc0报错:
sunxi-mmc sdc0: smc 0 p0 err, cmd 8, RTO !!
sunxi-mmc sdc0: smc 0 p0 err, cmd 55, RTO !!
- sdc1报错:
sunxi-mmc sdc1: smc 1 p1 err, cmd 5, RTO !!
sunxi-mmc sdc1: smc 1 p1 err, cmd 52, RTO !!
- /dev下无sdc0的mmcblock设备TF卡故障,但是sdc1的WiFi部分工作正常
- 已确认此TF卡可在其他设备上正常读取,TF卡分为两个分区:第一分区FAT32——2GB,第二分区EXT4——2GB
已尝试过的方法
- 用Yuzukilizard的github上的Docker直接编译镜像,烧录后故障仍存在。❌
- 更换过Yuzukilizard在github上直接释放的不同镜像,均无效。❌
- 尝试按照Tina SDK文档更改board.dts、uboot-board.dts、sys_config.fex的sdc0和card0部分以及make menuconfig和make kernel_menuconfig,编译烧录无效。❌
- 尝试在board.dts中追加vmmc regulator等配置,编译烧录后无效。❌
- 更换不同的TF卡,和不同的文件系统尝试过FAT32和EXT4均为2GB,故障依旧。❌
- 尝试更换不同的SDK和Ubuntu版本,无效。❌
- 用示波器测试TF卡的CMD信号脚,信号正常发出。
系统启动日志
[24]HELLO! BOOT0 is starting!
[27]BOOT0 commit : 4b419f21ba
[114][pmu]: bus read error
[117]set pll start
[119]periph0 has been enabled
[122]set pll end
[123]board init ok
[125]rtc[0] value = 0x80000001
[128]DRAM use internal ZQ!!
[131]ZQ value = 0x2e
[133]chip id check OK
[135]POWER SETTING ERROR!
[138]DRAM BOOT DRIVE INFO: V0.16
[141]DRAM CLK = 528 MHz
[143]DRAM Type = 2 (2:DDR2,3:DDR3)
[146]DRAMC read ODT off.
[149]DRAM ODT off.
[151]DRAM SIZE =64 M
[153]dram_tpr4:0x0
[161]DRAM simple test OK.
[163]rtc standby flag is 0x0, super standby flag is 0x0
[169]dram size =64
[172]audio:avcc calibration
[174]spinand UBOOT_START_BLK_NUM 8 UBOOT_LAST_BLK_NUM 32
[179]block from 8 to 32
[561]Check is correct.
[563]Entry_name = optee
[566]Entry_name = u-boot
[574]Entry_name = dtb
[578]Jump to second Boot.
M/TC: OP-TEE version: 15ee1539b (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05))
E/TC:0 0 platform_standby_fdt_parse:133 no pmu node
E/TC:0 0 sunxi_twi_parse_from_dt:121 no pmu node
U-Boot 2018.05-g3a34d5f (Jul 08 2022 - 07:00:11 +0000) Allwinner Technology
[00.657]CPU: Allwinner Family
[00.660]Model: sun8iw21
I2C: [I2C-ERROR]:twi_send_clk_9pulse() 147 SDA is still Stuck Low, failed.
ready
[00.720]DRAM: 64 MiB
[00.724]Relocation Offset is: 00ed0000
[00.757]secure enable bit: 0
E/TC:0 tee_read_fdt:433 fine node /firmware/optee failed with FDT_ERR_NOTFOUND
[00.772]smc_tee_inform_fdt failed with: ffff0000
[I2C-ERROR]:twi_stop() 339 STOP can't sendout!
[00.782]pmu_axp2101_probe pmic_bus_read fail
[I2C-ERROR]:twi_stop() 339 STOP can't sendout!
[00.790]bmu_axp2101_probe pmic_bus_read fail
[00.794]CPU=900 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=24Mhz MBus=300Mhz
[00.800]gic: sec monitor mode
sunxi flash map init
[00.805]flash init start
[00.807]workmode = 0,storage type = 0
[00.815]sunxi-spinand-phy: spinand sample_mode:1 sample_delay:18
device nand0 <nand>,
0: boot0 0x00100000 0x00000000 1
1: uboot 0x00300000 0x00100000 1
2: secure_storage 0x00100000 0x00400000 1
3: sys 0x07b00000 0x00500000 0
active partition: nand0,0 - (boot0) 0x00100000 @ 0x00000000
defaults:
mtdids : nand0=nand
mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
[00.933]ubi0: attaching mtd4
[01.163]ubi0: scanning is finished
[01.173]ubi0: attached mtd4 (name "sys", size 123 MiB)
[01.177]ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes
[01.183]ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 2048
[01.190]ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[01.196]ubi0: good PEBs: 492, bad PEBs: 0, corrupted PEBs: 0
[01.201]ubi0: user volume: 6, internal volumes: 1, max. volumes count: 128
[01.208]ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[01.216]ubi0: available PEBs: 0, total reserved PEBs: 492, PEBs reserved for bad PEB handling: 20
[01.224]sunxi flash init ok
[01.227]line:724 init_clocks
[01.230]drv_disp_init
request pwm success, pwm6:pwm6:0x2000c00.
[01.244]drv_disp_init finish
[01.387]Loading Environment from SUNXI_FLASH... OK
[01.425]boot_gui_init:start
[01.428]set disp.dev2_output_type fail. using defval=0
[01.433]LCD open finish
[01.436]boot_gui_init:finish
partno erro : can't find partition bootloader
partno erro : can't find partition boot-resource
[01.493]Get bootloader and boot-resource partition number fail!
[01.501]Item0 (Map) magic is bad
[01.504]out of usb burn from boot: not need burn key
[01.532]update bootcmd
[01.558]change working_fdt 0x41e8fe70 to 0x41e6fe70
[01.569]
[01.578]update dts
Hit any key to stop autoboot: 0
input addr exceed dram scope
[03.504]no vendor_boot partition is found
Android's image name: sun8i_arm
[03.568]Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.191 (yuzuki@YuzukiOMEN) (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05) )
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt:Machine model: sun8iw21
[ 0.000000] disp reserve base 0x41f13000 ,size 0x177000
[ 0.000000] Reserved memory: created DMA memory pool at 0x47000000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0buffer@47000000, compatible id shared-dma-pool
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] On node 0 totalpages: 16384
[ 0.000000] free_area_init_node: node 0, pgdat c0a454e8, node_mem_map c3f78000
[ 0.000000] Normal zone: 128 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16384 pages, LIFO batch:3
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.0
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: ubi.mtd=sys ubi.block=0,rootfs earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/ubiblock0_4 rootfstype=squashfs init=/init partitions=mbr@ubi0_0:boot-res@ubi0_1:env@ubi0_2:boot@ubi0_3:rootfs@ubi0_4:UDISK@ubi0_5: cma= snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.hardware=sun8iw21p1 boot_type=5 androidboot.boot_type=5 gpt=1 uboot_message=2018.05-g3a34d5f(07/08/2022-07:00:11) mbr_offset=1032192 disp_reserve=1536000,0x41f13000 bootreason=button aw-ubi-spinand.ubootblks=24 androidboot.dramsize=64
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 53248K/65536K available (6144K kernel code, 280K rwdata, 1408K rodata, 1024K init, 168K bss, 12288K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a463a8 ( 281 kB)
[ 0.000000] .bss : 0xc0a463a8 - 0xc0a70454 ( 169 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000000] arm_arch_timer: Architected cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000020] Switching to timer-based delay loop, resolution 41ns
[ 0.000208] Console: colour dummy device 80x30
[ 0.000239] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000253] pid_max: default: 32768 minimum: 301
[ 0.000450] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000463] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001044] CPU: Testing write buffer coherency: ok
[ 0.001673] Setting up static identity map for 0x40100000 - 0x40100058
[ 0.003419] devtmpfs: initialized
[ 0.036187] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.036770] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.036795] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.036943] atomic64_test: passed
[ 0.036957] pinctrl core: initialized pinctrl subsystem
[ 0.038100] NET: Registered protocol family 16
[ 0.038871] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.040337] dump_class_init,857, success
[ 0.069569] cpuidle: using governor menu
[ 0.070933] platform 2010000.iommu: iova_base: 0x48400000
[ 0.071525] sunxi iommu: irq = 22
[ 0.092595] sun8iw21p1-pinctrl pio: initialized sunXi PIO driver
[ 0.095671] iommu: Adding device npu to group 0
[ 0.097783] iommu: Adding device 1c0e000.ve to group 0
[ 0.111222] iommu: Adding device 5410000.g2d to group 0
[ 0.112083] iommu: Adding device 5000000.disp to group 0
[ 0.123650] iommu: Adding device 5908000.tdm to group 0
[ 0.124546] iommu: Adding device 5900000.isp to group 0
[ 0.125494] iommu: Adding device 58ffffc.isp to group 0
[ 0.126432] iommu: Adding device 58ffff8.isp to group 0
[ 0.127160] iommu: Adding device 58ffff4.isp to group 0
[ 0.127822] iommu: Adding device 5800800.vind:isp@4 to group 0
[ 0.128564] iommu: Adding device 5910000.scaler to group 0
[ 0.129271] iommu: Adding device 590fffc.scaler to group 0
[ 0.130254] iommu: Adding device 590fff8.scaler to group 0
[ 0.130794] iommu: Adding device 590fff4.scaler to group 0
[ 0.131519] iommu: Adding device 5910400.scaler to group 0
[ 0.132203] iommu: Adding device 59103fc.scaler to group 0
[ 0.132699] iommu: Adding device 59103f8.scaler to group 0
[ 0.133433] iommu: Adding device 59103f4.scaler to group 0
[ 0.134149] iommu: Adding device 5910800.scaler to group 0
[ 0.134846] iommu: Adding device 59107fc.scaler to group 0
[ 0.135319] iommu: Adding device 59107f8.scaler to group 0
[ 0.135973] iommu: Adding device 59107f4.scaler to group 0
[ 0.136718] iommu: Adding device 5910c00.scaler to group 0
[ 0.137423] iommu: Adding device 5910bfc.scaler to group 0
[ 0.137882] iommu: Adding device 5910bf8.scaler to group 0
[ 0.138556] iommu: Adding device 5910bf4.scaler to group 0
[ 0.139624] iommu: Adding device vinc0 to group 0
[ 0.140851] iommu: Adding device vinc4 to group 0
[ 0.141891] iommu: Adding device vinc8 to group 0
[ 0.142788] iommu: Adding device vinc12 to group 0
[ 0.148519] iommu: Adding device e907_rproc@0 to group 0
[ 0.148960] iommu: Adding device rpbuf_controller@0 to
问题分析思路:
- 检查一下这个img镜像是否开启了TF卡的读写功能?
- 确定一下这个问题出现在哪一个方面,①设备树配置问题?②SDK工具和环境问题?③硬件问题?
.
github上释放的镜像并没有开启TF卡的读写功能!需要自行更改board.dts并编译打包烧录!
解决方法
4. 修改board.dts如下位置
sdc0_pins_a: sdc0@0 {
allwinner,pins = "PF0", "PF1", "PF2",
"PF3", "PF4", "PF5";
allwinner,function = "sdc0";
allwinner,muxsel = <2>;
- allwinner,drive = <1>;
+ allwinner,drive = <3>;
- allwinner,pull = <0>;
+ allwinner,pull = <1>;
};
&sdc0 {
- /*cd-gpios = <&pio PF 6 6 1 3 0xffffffff>;*/
+ cd-gpios = <&pio PF 6 6 1 3 0xffffffff>;
- /*cd-used-24M;*/
+ cd-used-24M;
};
- 检查Kernel Configuration是否设置正确,这些选项已在docker镜像中默认配置好
i. 确认Device Drivers的设置下的MMC/SD/SDIO card support设置为开启
ii. 设置 MMC/SD/SDIO card support ——> Number of minors per block device 为 8
iii. 确认MMC/SD/SDIO card support ——> MMC block device driver 和 Allwinner sunxi SD/MMC Host Controller support设置为开启
iv. 确认File systems下开启对ext4文件系统和VFAT文件系统的支持
三. 仍存在问题
- tf卡不支持热插拔,一但拔出需要重启系统
- sdc1仍然报错,但是wifi部分正常
- tf卡时不时就报以下错误
[ 45.129171] sunxi-mmc sdc0: smc 0 p0 err, cmd 24, WR EBE !!
[ 45.135471] sunxi-mmc sdc0: retry:start
[ 45.139819] sunxi-mmc sdc0: retry:stop
[ 45.144066] sunxi-mmc sdc0: retry:stop recover
[ 45.149076] sunxi-mmc sdc0: send manual stop command failed 100
[ 45.155839] sunxi-mmc sdc0: REG_DRV_DL: 0x00030000
[ 45.161253] sunxi-mmc sdc0: REG_SD_NTSR: 0x81710110
[ 45.166717] sunxi-mmc sdc0: REG_NTDL_HS400: 0x20000110
[ 45.172514] sunxi-mmc sdc0: *****retry:re-send cmd*****
[ 45.178362] 1,end
原贴链接:https://bbs.aw-ol.com/topic/3819/
资源获取、问题讨论可以到全志在线开发者社区进行:https://www.aw-ol.com
全志及开发者最新动态可以关注全志在线微信公众号