
On Tue, Jan 5, 2021 at 2:20 PM Adam Ford aford173@gmail.com wrote:
On Tue, Jan 5, 2021 at 4:07 PM Jaehoon Chung jh80.chung@samsung.com wrote:
Hi Adam,
+CC: Tim Harvey,
On 12/31/20 2:39 AM, Adam Ford wrote:
The Linux driver automatically can detect and enable UHS, HS200, HS400 and HS400_ES automatically without extra flags being placed into the device tree.
Right now, for U-Boot to use UHS, HS200 or HS400, the extra flags are needed. Let's go through the esdhc_soc_data flags and enable the host caps where applicable.
Suggested-by: Fabio Estevam festevam@gmail.com Signed-off-by: Adam Ford aford173@gmail.com
I am not an expert on the SD/MMC standards, but I used the Linux driver as a model, and made the assumption that the USDHC flag needs to be set in order to use the extra speeds.
Looks good to me. If it can't parse property from device-tree, it needs to set host_caps as proper mode. Does it work fine about UHS mode? AFAIK, there was an issue about not detecting host capabilities.
From the troubleshooting I've done, without this patch the host didn't show it was capable of UHS, but with this patch, the card doesn't show UHS, so I think there is something wrong still, but this at least gets us past it being a host caps issue. I was able to get it working with HS400ES.
If you want me to hold off until we get UHS working, I can hold off. I know Tim was having issues as well.
I was able to confirm the UHS SDR104 works on the Renesas RZ/G2H board that I have using the same care, so I think the issue may be unique to the esdhc driver.
I'm all for this patch and getting rid of the custom u-boot props that were added to enable UHS.
I don't think there is any need to wait as this patch does not cause any issue with microSD, just exposes something and if you hit the issue we are hitting with the microSD failing to acknowledge the voltage switch at least it falls back to legacy mode so it doesn't hurt to have this in place, esp given the benefit of enabling HS200/HS400/HS400ES. I could use some help understanding the microSD failing to acknowledge the voltage switch as I'm completely out of ideas.
The IMX6 SDHC supports UHS as well but it isn't enabled by this patch - have you tried enabling UHS for IMX6?
Best regards,
Tim