SD Card on sdmmc3 isn't working

Hello,

We are using sdmmc3 on the carrier board, but it doesn’t work well.

Attached 3 kinds of dmesg.
The first dmesg is that the sd card was mounted before booting.
sdcard equiment1.txt (65.6 KB)

Second dmesg is remove sd card and mounted again.
sdcard equiment2.txt (65.6 KB)

Third dmesg is disable the GPIO in tegra194-p3668-common.dtsi.
GPIO disable dmesg.txt (66.4 KB)

           sdhci_sd: sdhci@3440000 {
                     mmc-ocr-mask = <0x0>;
                     cd-inverted;
                     **//cd-gpios = <&tegra_aon_gpio TEGRA194_AON_GPIO(CC, 2) 0>;   <- here**
                     nvidia,cd-wakeup-capable;
                     mmc-ocr-mask = <0>;
                     cd-inverted;
                     vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
                     nvidia,vmmc-always-on;
                     status = "okay";
           };

I think CD enable and vdmmc disable is working same time.

What should we do?

Best regard

And also attach 3 dtsi files too.
tegra194-fixed-regulator-p3668.dtsi.txt (1.8 KB)
tegra194-p3668-common.dtsi.txt (11.7 KB)
tegra194-plugin-manager-p3668.dtsi.txt (1.9 KB)

Thank you.

Don’t know what are you trying to tell here…

It looks like the first two logs are correct. The 3rd log has no sdmmc3 log but you said you removed the gpio.
Then why did you remove the gpio as it is needed? CD gpio is needed to card detection as its name…

I’m sorry it’s my mistake.
The first two dmesg is disable the GPIO. And the last dmesg is enable gpio.
Sorry for confusing…

Best regard

What is the exact purpose that you need to disable the GPIO? And what GPIO are you talking about ?

The CD-GPIO?

Do you have your board schematic to share?

Yes exactily.

When CD-GPIO Enable, the SD-card doesn’t detect.
But CD-GPIO Disable, the SD-card detected first time on booting. But it doesn’t detect anymore when i remove sd-card and mount again

Here’s our sd-card schematic



Thank you

Please enable the cd gpio back and confirm if cd-inverted is really a necessary configuration you need there…

If sd-card mounted the card slot, the slot has short the ground. So we design cd signal low active.

Change the 0 to 1 as that means low active. And remove the cd-inverted in DT.

Dear WayneWWW

Now, it someting diffrent.

run ‘sudo fdisk -l’, it shows the sd card. But still not detected.

Attatch dmesg and dtsi file.

Thank you
dmesg.txt (67.1 KB)
tegra194-p3668-common.dtsi.txt (11.7 KB)

I am still not sure what you are talking about.

Your log still cannot match to what you told. This situation happened since first comment.

There is no sdcard from sdmmc3 in your log.

And if you want to share device tree, share the one directly from either dtb-> dts conversion, or from /proc/device-tree on your board. Those dtsi files are meaningless.

Hi

So is this device tree? or someting diffrent?
device tree.txt (4.2 KB)

And Sd card still not working.

Thank you

No, you need to use this method to dump the whole file but not just ls…

Hi

Is this right? I don’t know much well.

device tree.txt (271.0 KB)

Thank you

cd-inverted is still in your device tree.

If you don’t know how to tell, please find someone who is familiar with device tree software on your side to help.
We are not able to guide such basic things here.