野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 959|回复: 2

[求助] SD卡不识别

[复制链接]
发表于 2024-3-23 14:10:28 | 显示全部楼层 |阅读模式
32G sanDisk 的插入板卡中,报如下错误信息,从log上看可以得出已经识别,并读出大小,但是就是没法挂载成功



[12:22:49.564]收←◆[   23.283053] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[12:22:49.795]收←◆[   23.514028] mmc_host mmc1: Bus speed (slot 0) = 49500000Hz (slot req 50000000Hz, actual 49500000HZ div = 0)
[   23.515397] mmc1: new high speed SDHC card at address aaaa
[   23.516844] mmcblk1: mmc1:aaaa SD32G 29.7 GiB
[   23.534674] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[12:22:49.883]收←◆[   23.602200] mmc_host mmc1: Bus speed (slot 0) = 49500000Hz (slot req 50000000Hz, actual 49500000HZ div = 0)
[   23.603812] print_req_error: 558 callbacks suppressed
[   23.603828] blk_update_request: I/O error, dev mmcblk1, sector 0 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.605633] blk_update_request: I/O error, dev mmcblk1, sector 1 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.606923] blk_update_request: I/O error, dev mmcblk1, sector 2 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.608293] blk_update_request: I/O error, dev mmcblk1, sector 3 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.609509] blk_update_request: I/O error, dev mmcblk1, sector 4 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.610812] blk_update_request: I/O error, dev mmcblk1, sector 5 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.612020] blk_update_request: I/O error, dev mmcblk1, sector 6 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.613223] blk_update_request: I/O error, dev mmcblk1, sector 7 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.614234] buffer_io_error: 7 callbacks suppressed
[   23.614245] Buffer I/O error on dev mmcblk1, logical block 0, async page read
[   23.616636] blk_update_request: I/O error, dev mmcblk1, sector 0 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.618077] blk_update_request: I/O error, dev mmcblk1, sector 1 op 0x0READ) flags 0x0 phys_seg 1 prio class 0
[   23.620761] Buffer I/O error on dev mmcblk1, logical block 0, async page read
[   23.621583]  mmcblk1: unable to read partition table
[   23.627244] Buffer I/O error on dev mmcblk1, logical block 7791728, async page read



DTS 配置信息如下,热插拔引脚用的不是默认的热插拔


sdmmc: mmc@fe2c0000 {
                compatible = "rockchip,rk3588-dw-mshc", "rockchip,rk3288-dw-mshc";
                reg = <0x0 0xfe2c0000 0x0 0x4000>;
                interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&scmi_clk SCMI_HCLK_SD>, <&scmi_clk SCMI_CCLK_SD>,
                         <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
                fifo-depth = <0x100>;
                max-frequency = <200000000>;
                pinctrl-names = "default";
                pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
                power-domains = <&power RK3588_PD_SDMMC>;
                status = "disabled";
        };





&sdmmc {
        max-frequency = <150000000>;
        no-sdio;
        no-mmc;
        bus-width = <4>;
        cap-mmc-highspeed;
        cap-sd-highspeed;
        disable-wp;
        //sd-uhs-sdr104;
        //vqmmc-supply = <&vccio_sd_s0>;
        vmmc-supply = <&vcc_sd>;
        cd-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
        cd-inverted;
        status = "okay";
};



那位大神帮看看怎么来定位是哪里的问题?























回复

使用道具 举报

发表于 2024-3-25 09:00:52 | 显示全部楼层
&sdmmc这部分重新加入:
                pinctrl-names = "default";
                pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
这两行再试试看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-4-9 19:39:47 | 显示全部楼层
我是通过另一个方法解决的,不用普通GPIO就可以,用默认的SD卡检测脚就没有问题
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-11-23 17:35 , Processed in 0.106611 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表