We have a custom carrier board that has a SD card on it for extra storage, we are using sdhci-tegra.2 for it. We have the card slot always powered by a rail outside of the jetson’s control.
I am not sure where I am going wrong but I can successfully see the card_detect going from 1 to 0 when I insert the SD card, I can also see the clock speed changing from 100,000 to 400,000 when the SD card is inserted. However, I am unable to see anything new show up in /dev or with fdisk -l.
We put a probe on the clock line and saw that the clock started running when we ejected the card but not when we inserted it. So the HW team swiched the resistor to pull high when the card was inserted instead of the normal active low, when we did this the card_detect never saw the change. So we stuck with the original Active Low HW design.
This is the device tree that we have been trying to implement (based on some other forum posts we saw):
We also had to change the FAN_TACH gpio to get this to work.
Does anyone have experience with the device trees needed to get the SD card to work? We don’t need to boot from it (atleast for right now), just to use it for extra storage.
Also, even though you are using the always-on power source, you still need to give a always-on 3v3 power regulator to the vmmc-supply. Check “sdmmc3” over this forum and you will find lots of similar topics.
So we are closer. With these changes I am able to see the sdcard with lsblk or fdisk, but only if the Jetson boots with the SD card inserted. Hot plugging doesn’t work.
Actually I spoke too soon. I was using the wrong carrier board that had the register flipped and pulling card detect high when I saw the lsblk work. It still only worked if the card was in the whole time though. Just trying to give all the information.
Is there a part of the dmesg that help more than others? We have other devices that I would need to censor out of the dmesg before we can share. It will take me a minute to get that.
If the GPIO is supposed to be active low and we are seeing card_detect go to 0 when it is inserted, that is expected behavior right?
Here is the dmesg log.
There is no message when inserting or ejecting the sdcard. I did this a few times.
I will try the cd-inverted property as well. I tried that a while back, but I didn’t see a difference, but maybe with the other DTB changes you suggested it will work.
I focused on just the CD GPIO and I believe I got it figured out. I had to remove cd-inverted and also change the cd-gpio to active high. Just changing one or the other didn’t work, I had to do both.
For anyone else who is struggling with the same issue, this is the device tree that ended up working for this board design: