Hello Tim, > -----Original Message----- > From: Tim Harvey <thar...@gateworks.com> > Sent: Wednesday, December 30, 2020 12:22 AM > To: ZHIZHIKIN Andrey <andrey.zhizhi...@leica-geosystems.com>; Peng Fan > <peng....@nxp.com>; u-boot <u-boot@lists.denx.de> > Cc: Fabio Estevam <feste...@gmail.com>; Stefano Babic <sba...@denx.de> > Subject: IMX8MM SD UHS support > > > Greetings, > > In 50b1a69cee0d ("ARM: dts: imx8m: add UHS or HS400/HS400ES > properties") u-boot dt props were added to enable UHS and HS400 on a couple of > IMX8MM boards including the imx8mm-evk and in the subsequent patch > enabled the config items. > > While I see this making a huge difference for eMMC performance in U-Boot I > find > it doesn't do anything for microSD performance. > > The issue appears to be that sd_get_capabilities() is not appropriately > detecting > UHS speeds on cards that appropriately detect as SDR104/DDR50 in Linux: > > u-boot=> mmc info > Device: FSL_SDHC > Manufacturer ID: 1b > OEM: 534d > Name: 00000 > Bus Speed: 50000000 > Mode: SD High Speed (50MHz) > card capabilities: widths [4, 1] modes [MMC legacy, SD High Speed (50MHz)] > ^^^^ > no SDR104 detected for this card host capabilities: widths [4, 1] modes [MMC > legacy, MMC High Speed (26MHz), SD High Speed (50MHz), MMC High Speed > (52MHz), UHS DDR50 (50MHz), UHS SDR104 (208MHz)] Rd Block Len: 512 SD > version 3.0 High Capacity: Yes > Capacity: 14.9 GiB > Bus Width: 4-bit > Erase Group Size: 512 Bytes > > The same card in Linux shows the following upon insertion and performance > tests > show that it is operating at SDR104 speeds: > mmc1: new ultra high speed SDR104 SDHC card at address 0001 > > I haven't found very good documentation on the SD switch settings to > understand if something is wrong in the U-Boot implementation of of > sd_get_capabilities() and I suppose it also could be an issue in > sdhci-esdhc-imx.c.
In order to SD Card to operate in High Speed modes, the signaling voltage should be switched from 3v3 to 1v8. Otherwise, higher clock rates cannot be applied and card continues to be operating with lower speed modes. Have you verified that the NVCC_SD2 is switched to 1v8 in your case? Since you did not indicate which board you're using - it is hard for me to suggest on how measure this voltages. If you're using i.MX8M Mini EVK, then you can verify this by measuring the voltage at the test point called "NVCC_SD2" located on the Core Module in the PMIC area. > > Any ideas where to look? > > Anyone see SDR104 cards being detected properly for other platforms? Yes, in fact I do see that SD Card is recognized for me as UHS SD104: u-boot=> mmc dev 1 Run CMD11 1.8V switch switch to partitions #0, OK mmc1 is current device u-boot=> mmc info Device: FSL_SDHC Manufacturer ID: 9f OEM: 5449 Name: 00000 Bus Speed: 200000000 Mode: UHS SDR104 (208MHz) Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 29.8 GiB Bus Width: 4-bit Erase Group Size: 512 Bytes Please pay attention to the output, which says "Run CMD11 1.8V switch". Do you also observe the same output? > > Best regards, > > Tim -- andrey