STM32MP1: timeout errors with uSD connected to SDMMC1
Hello,
we are bringing-up our custom STM32MP157AAB3 board and we are facing some errors in linux with the uSD that it's connected to the SDMMC1 interface.
Here follows our setup:
- HW
- SDMMC1 cabled to a uSD connector, PE9 used as card detect
- SDMMC2 cabled to a 4GB eMMC
- SDMMC3 cabled to a custom connector (mainly for WiFi modules)
- SW
- OpenSTLinux-2.1.0
- Custom devicetree created starting from STM32CubeMX tool with USER CODE derived from EVKs dts
- tf-a and u-boot are read via SDMMC1
- kernel is loaded via tftp
- RFS is mounted via NFS
When we insert the uSD card the kernel periodically prints this error:
[ 134.448880] mmci-pl18x 58005000.sdmmc: error -110 requesting status
however the device is usable.
Using several uSD cards (of different manufacturers) we see that some are detected at the insertion and the volumes are automatically mounted, some are detected (the kernel creates the devices) but non other actions are performed (trying to manually mount the volumes stucks the tool), some other are not even detected. In the last 2 cases the bus seems to be stucked as no other uSD are detected (even the former ones) until the reboot.
So we performed some tests on the SDMMC3 bus, manually cabling a uSD connetor to the counterpart of the custom connector (with lenght mismatch and no impedance matching, this likely is a degrading configuration), dts bindigs are the same except for the missing card detect. Connecting any uSD card to this bus result in correct detect and volumes mount, no bus stuck or error prints.
For SDMMC1 bus, removing the card detect signal in the dts causes a detect loop when the uSD is inserted:
[ 39.036173] mmc0: new high speed SDHC card at address 59b4
[ 39.052012] mmcblk0: mmc0:59b4 USDU1 14.9 GiB
[ 39.078961] mmcblk0: p1
[ 40.009720] mmc0: card 59b4 removed
[ 40.131304] mmc0: new high speed SDHC card at address 59b4
[ 40.150951] mmcblk0: mmc0:59b4 USDU1 14.9 GiB
[ 40.161140] mmcblk0: p1
[ 40.532040] mmc0: card 59b4 removed
[ 40.631149] mmc0: new high speed SDHC card at address 59b4
[ 40.648180] mmcblk0: mmc0:59b4 USDU1 14.9 GiB
[ 40.657286] mmcblk0: p1
[ 40.659641] debugfs: Directory 'mmcblk0' with parent 'block' already present!
[ 41.129170] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 42.483563] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 43.769061] mmc0: card 59b4 removed
[ 43.899232] mmc0: new high speed SDHC card at address 59b4
[ 43.915101] mmcblk0: mmc0:59b4 USDU1 14.9 GiB
[ 43.925600] mmcblk0: p1
[ 44.000230] FAT-fs (mmcblk0p1): FAT read failed (blocknr 584)
[ 44.270267] mmc0: card 59b4 removed
Is there any known issue about this behaviour?
Could this be an HW or a SW issue?
I'm available for any further detail or test.
Best regards,
Rosario
