I tried removing vqmmc-supply from the sdhci@3440000 section of my dts, and that didn’t change much. Normally when I boot with an SD card or hotplug one into our PCB, I will see an LED flicker (indicating the SD card has 3.3V power). With vqmmc-supply removed, I don’t ever see the LED light up at all. Still no matter what, the SD card does not show in lsblk.
Additionally, I see the following line many times repeatedly during boot (over UART) when an SD card is plugged in:
[ 1.470729] mmc1: CMD CRC or end bit error, int mask 0xc0000
Should I be editing other sections as well? For instance the other sdhci@xxxxx sections? For reference this is our SD card and we’ve tried multiple physical cards which all work in other computers.
I understand that this issue is not new, and I understand your feedback. That being said, I don’t believe our designer has laid out the PCB incorrectly.
This process is very challenging for us, since we are not Firmware Engineers. Hunting down countless different forum posts and trying random DT edits from them is not an effective process for us to fix issues or determine why something is not working.
It would make our lives a lot easier if you could explain a few things for us:
Which DT section is controlling the SD card? Is it sdhci@3440000? Which one is for the mmc?
What is the difference between vmmc-supply and vqmmc-supply?
Is there any documentation on the device tree itself and how you can do basic things like setting up support for an SD card?
Do you have any additional resources you can point us to, or do you have any more suggestions for things to try?
If these questions seem dumb, that’s because we are “dumb”! We need things explained as though we know fairly little about what we’re doing, because we really don’t!
vmmc-supply : phandle to the regulator device tree node, mentioned as the VCC/VDD supply in the eMMC/SD specs.
vqmmc-supply : phandle to the regulator device tree node, mentioned as the VCCQ/VDD_IO supply in the eMMC/SD specs. And vqmmc-supply is optional.
Sorry, there is no document. Only the driver code. And kernel driver documentation folder shall have some info regarding each property meaning. I don’t remember the actual location. You can grep “sdhci-tegra” or something like “nvidia,vmmc-always-on” and it should tell the path.
Basically, no matter jetson nano/ jetson NX or jetson TX2-NX, they are all sharing the same case. vmmc-supply and cd-gpios needs to match the board design. If your vmmc-supply is a always-on one, which does not control by any GPIO, then you also need to add “nvidia,vmmc-always-on;”
Here is a post where we did some check with this chao.zhang and his sdcard slot can work.
Hey, yeah so the SD_EN is controlled by gpio07. I have left that untouched in the pinmux configuration currently. When ever I have the dt configured to get the “mmc1: error -110 whilst initialising SD card” in dmesg. I see the LED on 3v3_SD turn on for a split second. With this configuration, the light will flash 4 times whenever the card is hot plugged and I will get 4 new instances of the error message.
Also, I’m looking at the dts from chao.zhang and I see that he has vmmc-supply = <0x17>;
In that dts, phandle 0x17 is this section:
Are you saying that a power enable line is not supported at all? There’s no device tree change I can make that will work? When I set that pin to output drive 1 in the pinmux it turns the power enable on reliably…
I understand that the nvidia,vmmc-always-on flag is incorrect if the power is not always on… But if I have a card detect do I not want the power to be toggled on and off by the presence of the card? This is how our TX2 carrier works for the old model.