SDMMC3 can‘t work

,

Can you share the full schematic of your board? The image you provided does not provide any info for the sdcard slot…

P3509_A01_OrCAD_schematic.pdf (928.7 KB)
did you mean this schematic? We have nothing change in pinmux before, and start to change pinmux now.

You should share the board schematic of “your board” which contains the sdcard slot design on sdmmc3… Ask your hardware engineer to provide it…

Please do not share me the p3509 schematic …
A NVIDIA employee wouldn’t ask you to share a NVIDIA devkit board schematic to him… we already have that file. That file is provided by us…

hi,
Because it was only used for a short time in pre-study and exhibit, we used wires to connect the board and the card slot. Is this schematic okay?
2FS011-B1_V1.01_DL(210524).pdf (1.4 MB)

Hi,

Why is your schematic says the the connector is to M.2 Key E? Aren’t you say we are debugging a SDcard slot issue?

hi,
I’m chenglong.jiang108’s partner, and responsible for this issue also.
I think this is the multiplexing interface of WIFI and SDCARD.We hope we can connect a card here, and we have done. So the above problems appeared. Can we use this method to mount SDCARD?
Looking forward to your reply.

hi,
In the schematic, we seem to find no other information about the sdmmc pins. I think these Pins match the given documents, so we actually treat them as sdmmc3 Pins although they are marked M.2 Key E. Can I use it like this?
ths for your reply.

I cannot reply. My colleague will deal with the hardware side problem here.

I just have one question for you @chenglong.jiang108

Do you ever read the schematic of your own custom board design here?

It seems has something that do not match to what you wrote to your device tree.

For example, you give GPIO Q,2 to the cd-gpios of sd controller. CD-gpio is the card detection pin to detect the sdcard.

However, your board schematic shows the Q2 pin is used by FAN. Totally not connected to the sd controller.

As I mentioned earlier, we connected the development board and the card slot with a wire. We connected this pin, and it can detect whether the sdcard is inserted (0v if it is inserted, 1.8v if it is not inserted).

Ok, so now you have something that is different from the schematic. Can you directly share a finalized version to us so that our hardware guy can comment?

Actually, we don’t have any working case that is using a M.2 + sdcard slot case. Thus, I cannot directly comment if this would work or not.

Sorry I didn’t elaborate on the details of the hardware.

We connected these pins and Q.2 that appeared to be SDMMC3 to the sd card slot and provided power to it. The hardware part has always been used in this way. But obviously, we still don’t know whether these pins can be used in this way.
We noticed that this set of pins has been marked as M.2 in the original design. I want to know if sdcard can be used in the emmc version. Did we use the wrong pin?

I think we should forget about the software part first and focus on the hardware side.

If the hardware side is wrong, then there is no help to resolve anything on software.

Few questions

  1. Did your team ever check the NX product design guide document? or you just read the p3509 schematic?

  2. Can your team provide a schematic that really matches your board design? It sounds like your B1_V1.01_DL(210524).pdf is just another p3509 schematic. We just need a schematic that matches your current hardware design.

We have been dealing with sdmmc3 with sdcard slot issues on custom board like every week. It is not a fresh issue here.
You can just search “sdmmc3” under NX forum and you shall see topics about it.

However, we don’t have any SDIO case on M.2 key slot. Even the P3509 board does not validate that case either.

We use the wire to connect the board and the card slot and did not change the schematic.We have used VDD, GND, G.2 and these pins in the picture, which are connected directly with wires.

Can you provide a reference design of the SD card, we want to compare it.

The only reference I can provide is the document here.

https://developer.nvidia.com/embedded/downloads#?search=product%20design

hi,
We checked the schematic and reconnected the hardware. It’s still can not work, but it seems a little better.

We made the following changes in dts and hardware:
common/tegra194-p3668-common.dtsi:

       sdhci_sd3: sdhci@3440000 {
               mmc-ocr-mask = <0x0>;
               cd-inverted;
               cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
               nvidia,cd-wakeup-capable;
               mmc-ocr-mask = <0>;
               cd-inverted;
               nvidia,vmmc-always-on;
               vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
               status = "okay";
       };

common/tegra194-fixed-regulator-p3668.dtsi:

               p3668_vdd_sdmmc3_sw: regulator@106 {
                       compatible = "regulator-fixed";
                       reg = <106>;
                       regulator-name = "vdd-sdmmc3-sw";
                       regulator-min-microvolt = <3300000>;
                       regulator-max-microvolt = <3300000>;
                       gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(H, 1) 0>;
                       regulator-always-on;
                       enable-active-high;
               };

We use Q.2 as the detection pin of SDCARD and make sure that it can detect the plug status of SDCARD. Pin H.1 is used as the control of vdd.

Here is some additional information:

nx@nx-desktop:~$ cat /proc/device-tree/sdhci@3440000/status
okay

current dtb:
tegra194-p3668-all-p3509-0000.dtb (195.3 KB)
full dmesg log:
dmesg.log (73.5 KB)

As in the log, we cannot successfully use SDCARD. Can you provide us with some help?

Looking forward to your reply.

Oh, it looks good. We finally see the driver starts. Did you change anything in hardware side?

There is another user who writes almost the same thing in device tree (though on jetson nano), but his sdmmc still not starts.

Can you change mmc-ocr-mask to 0x3 and see if it can work?

By the way, we found that if the SD card is inserted before booting, it does not seem to be detected. Is this related to some of my misconfigurations?

And, can we burn sdmmc3 later? Does it exist only as a mounting device?

Does your “not detect” mean the driver is same as before that there is no mmc driver log coming out?

yes, If I insert the SD card before booting, no log will appear, even though the voltage of det has changed.

This is the modification and log of this time, it still does not work, please check:
common/tegra194-p3668-common.dtsi:

       sdhci_sd3: sdhci@3440000 {
               mmc-ocr-mask = <0x3>;    // 0x0 -> 0x3
               cd-inverted;
               cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
               nvidia,cd-wakeup-capable;
               mmc-ocr-mask = <3>;    // 0 -> 3
               cd-inverted;
               nvidia,vmmc-always-on;
               vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
               status = "okay";
       };

full dmesg log:
dmesg.log (77.3 KB)

We found a problem that seems to have occurred before, and the response to different SD cards seems to be different.
For example, [180s] and [240s] of this log are different.