We have partitioned and formatted the SD card on another computer and have mounted it on another computer.
We have also mounted the SD Card (plugged into a USB Dongle) and inserted into the EMMC carrier board, and have mounted it as /dev/sdb1
When executing lsusb when the SD card is plugged into the External SD slot (sdmmc3) , it is detected as /dev/mmcblk1 (disk) , but we do not see the sub partition at all.
also when executing fdisk /dev/mmcblk1 -u , the command stalls
Compared to here: Micro-SD card on custom jetson nano - #74 by mjnm
We are missing a cd-gpios line and our vmmc-supply is different, but I donât know enough to know how to set these, or even if these settings are related to the problem or not.
We werenât able to create the partitions on the Nano so we partitioned and formatted the sd card on the Ubuntu 18.04 host system and the SD card works fine there.
Hardware wise, card detect is connected to pin 118 on the SoM. VDD for the SD card is provided by a standalone 3v3 regulator.
gdisk -l /dev/mmcblk1 hangs
lsblk -f /dev/mmcblk1 just shows the mmcblk1 device without any partitions
Yes, those settings are related to the issue. vmmc-supply and cd-gpios are basically the most important things for adding an extra sdcard slot. cd-gpios are the âcard detect pinâ, so you need to provide pin 118 to it. As for vmmc-supply, you need to give a 3v3 always-on regulator to it.
I also have a question regarding to your device tree
It seems that your device tree is out-of-order, especially the properties inside sdhci@700b0400. It looks like you are not building it from the kernel source.
If what I am saying is true, please try to use the standard way to create the dtb. That kind of dtb will be more easier for others to check.
Wayne - what is the correct way to modify the settings for the emmc sdio? We have previously used the pinmux tool to create a dtsi file, but that doesnât seem to be the same way to modify, eg, setting âstatus = âokayââ under sdhci@700b0400.
What is your method to modify device tree now? I am just curious because such dts comes out sometimes from some users and I am not sure how you guys make the dtb become like that.
The official way is download and build the dtb with the public source code and the method is listed on the document.
I tried to compile the dtb with the correct settings from source. Using L4T sources and tools version 32.6.1.
I used the attached two dtsi files from the pinmux tool along with the 3 patch files to show the changes I made to the device tree sources in addition to the pinmux dtsi files.
I also attach the result which seems to be not correct.
The attached .dts file was generated by:
dtc -I dtb -O dts -o tegra210-p3448-0002-p3449-0000-b00.dts tegra210-p3448-0002-p3449-0000-b00.dtb
As far as I can tell, pin 118 on the Nano module corresponds to port S, 5. But it doesnât seem my patches were applied, so I must be changing the wrong files?
I donât have your schematic so I wonât really know your exact design. If your pin 118 is âcard detectionâ pin, then you should add one âcd-gpiosâ under your sdmmc3 node and assign this gpio to this cd-gpios property. Not modify the regulator and give pin 118 to it. The regulator with âgpio = <&gpio TEGRA_GPIO(Z, 3) 0>;â means they use GPIO Z3 to control the power. If such design does not exist on your board, then you should just find some 3.3v regulator that does not have gpio and is âregulator-boot-onâ.
Also, there is no standard answer for âwhich filesâ to modify a device tree if you really understand how device tree works.
For example, I have several platforms (TX1/TX2/Nano/TX2-NX/Xaver AGX/Xavier NX) here, it is not wise to âmemorizeâ what files I need to use for each platform. Once you know which dtb will get flashed, open the source code and start to trace code. That will be more efficient to ask other people âwhich files should I modify??â.
If you donât want to trace code, then you just write what you need inside the last dts file and make sure it would take effect in the final dtb file. Thatâs all.
If your pin 118 is âcard detectionâ pin, then you should add one âcd-gpiosâ under your sdmmc3 node and assign this gpio to this cd-gpios property
What is cd-gpios property for pin 118? According to the pinmux spreadsheet, the Nano signal name for pin 118 is GPIO01. The GPIO name is GPIO3 PS.05.
so
cd-gpios = <0x5b 0xa8 0x0>;
what is setting for Pin 118?
This is where I got the idea to make the changes to the files:
Check the original source code. Original source code are all human-readable strings. If you just read the dts converted from dtb, it is already hex value and you wonât really able to know what is that if you are a beginner to write a dts file.
For example, from the post you just shared. This guy is using GPIO V0. For your case, you are using GPIO S5.
Ok iâve attached the latest dts file and the patch files I used. The result is the same - we can see mmcblk1 but we see I/O errors in dmesg and attempting to communicate with the device still hangs.
3v3 is supplied entirely by an external regulator and not supplied by the Nano module.
What we have so far is we are confident the system can see the SD card. Removing and inserting the SD card causes MMCBLK1 to disappear and reappear. The OS also reports the correct size of the SD card. However, we are unable to mount or create any partitions. lsblk will list mmcblk1 as a 59.5G disk with no partitions. gdisk -l /dev/mmblk1 and blkid commands hang.
What else can I try, software/configuration wise, to get the SD card working?
when we add nvidia,vmmc-always-on; the SD card is not detected at all. also, while applying the bl_update_payload with the vmmc-always-on added, the patch seems to hang for a few moments but does eventually complete. We donât see that behavior when vmmc-always-on is left out
I also fixed my post above to fix the link to the full dtb file.
Please add always-on back and share the log. Your dmesg always has timeout issue. With that kind of log, even you said your sdcard is able to get detected, it is still in bad state.
If that power source is always and cannot be controlled by the sdhci driver, then it needs to tell the driver it is a always-on one.
This kind of configuration has been conducted by lots of users before. You can search âsdmmc3â over the forum.