SDMMC3 can‘t work

,

Dear Supporter,
We want to know how can enable sdmmc3.
Some similar problems were found from forums, but none of them can solve the problem of not being able to catch SDCard
this is my change:
tegra194-p3668-common.dtsi :
265 sdhci_sd3: sdhci@3440000 {
266 mmc-ocr-mask = <0x0>;
267 cd-inverted;
268 cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(O, 5) 0>;
269 nvidia,cd-wakeup-capable;
270 mmc-ocr-mask = <0>;
271 cd-inverted;
272 vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
273 status = “okay”;
274 };

tegra194-fixed-regulator-p3668.dtsi :
37 p3668_vdd_sdmmc3_sw: regulator@106 {
38 compatible = “regulator-fixed”;
39 reg = <106>;
40 regulator-name = “vdd-sdmmc3-sw”;
41 regulator-min-microvolt = <3300000>;
42 regulator-max-microvolt = <3300000>;
43 // gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 2) 0>;
44 enable-active-high;
45 };

dmesg:
nx@nx-desktop:~$ dmesg |grep sd
[ 0.000000] Kernel command line: console=ttyTCU0,115200 video=tegrafb no_console_suspend=1 earlycon=tegra_comb_uart,mmio32,0x0c168000 gpt rootfs.slot_suffix= tegra_fbmem=0x800000@0xa06a0000 lut_mem=0x2008@0xa069a000 usbcore.old_scheme_first=1 tegraid=19.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.4.2 vpr_resize sdhci_tegra.en_boot_part_access=1 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
[ 0.725065] iommu: Adding device 3460000.sdhci to group 6
[ 0.725590] iommu: Adding device 3440000.sdhci to group 7
[ 0.796241] vdd-sdmmc3-sw: 3300 mV
[ 0.796582] vdd-1v8-sd: 1800 mV
[ 0.911018] vddio-sdmmc1-3v3: at 3300 mV
[ 1.689065] sd: No Scsi addr parsed to reserve index
[ 2.172038] sdhci: Secure Digital Host Controller Interface driver
[ 2.172042] sdhci: Copyright(c) Pierre Ossman
[ 2.172045] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.172974] sdhci-tegra 3460000.sdhci: Client registration for eMC Successful
[ 2.175388] sdhci-tegra 3440000.sdhci: Got CD GPIO
[ 2.177912] sdhci-tegra 3440000.sdhci: Client registration for eMC Successful
[ 2.179522] sdhci-tegra 3440000.sdhci: wakeup init done, cdirq 309
[ 2.221706] mmc0: SDHCI controller on 3460000.sdhci [3460000.sdhci] using ADMA 64-bit with 64 bit addr
[ 2.229885] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 2.267612] mmc0: mmc_decode_ext_csd: CMDQ supported: depth: 31, cmdq_support: 1
[ 3.848369] cgroup: cgroup2: unknown option “nsdelegate”
[ 34.133866] vdd-sdmmc3-sw: disabling
[ 34.133874] vdd-1v8-sd: disabling

$ cat /proc/device-tree/sdhci@3440000/status
okay

How can we use the SDcard?Thanks !

Please do not parse the log. Just attach the full dmesg as a text file.

dmesg.log (64.3 KB)
hi,
there is complete dmesg logs,please check it.

Please also attach full dts.

tegra194-fixed-regulator-p3668.dtsi (1.7 KB)
tegra194-p3668-common.dtsi (11.9 KB)

Full dts is here,tks

No, full dts means using the dtc tool to convert the dtb back to dts and then share that dts.

tegra194-p3668-all-p3509-0000.dts (246.6 KB)
tegra194-p3668-all-p3509-0000.dtb (195.3 KB)

the current dtb which on use is there.

1 Like

Can you add a “regulator-always-on” to your vmmc regulator and also nvidia,vmmc-always-on to your sdhci controller?

The log looks like there is no power to the sdmmc3.

We add the change in dtb,but it still not work.Although it seems has power.
here is dts and dmesg:
dmesg_vmmcalwayson.log (66.1 KB)
tegra194-p3668-all-p3509-0000.dtb (195.3 KB)
tegra194-p3668-all-p3509-0000.dts (246.6 KB)

Can you also paste the schematic?

And can you remove the gpio in your regulator and see if that helps?



did you mean this?

Where is that gpio that is in use in your regulator? Is it in this schematic?

yes, I just switched to this but found no effect. the second log use it.
common/tegra194-p3668-common.dtsi:
260 sdhci_emmc: sdhci@3460000 {
261 uhs-mask = <0x0>;
262 nvidia,enable-hwcq;
263 status = “okay”;
264 };
265 sdhci_sd3: sdhci@3440000 {
266 mmc-ocr-mask = <0x0>;
267 cd-inverted;
268 cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
269 nvidia,cd-wakeup-capable;
270 mmc-ocr-mask = <0>;
271 cd-inverted;
272 nvidia,vmmc-always-on;
273 vmmc-supply = <&p3668_vdd_sdmmc3_sw>;
274 status = “okay”;
275 };
276 sdhci_sd: sdhci@3400000 {
277 mmc-ocr-mask = <0x0>;
278 cd-inverted;
279 cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 7) 0>;
280 nvidia,cd-wakeup-capable;
281 mmc-ocr-mask = <0>;
282 cd-inverted;
283 vmmc-supply = <&p3668_vdd_sdmmc1_sw>;
284 status = “okay”;
285 };
286

I have no idea what you want to tell me in latest comment. It has nothing to do with the regulator GPIO I am talking about…

sorry, it’s my fault.
In the previous , i have not use gpio in sdmmc3.

37 p3668_vdd_sdmmc3_sw: regulator@106 {
38 compatible = “regulator-fixed”;
39 reg = <106>;
40 regulator-name = “vdd-sdmmc3-sw”;
41 regulator-min-microvolt = <3300000>;
42 regulator-max-microvolt = <3300000>;
43 // gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 2) 0>;
44 regulator-always-on;
45 enable-active-high;
46 };
Can i use it, the same config as sdmmc1
May be it’s to hard to me, thanks for your reply.

Hi,

Just a personal suggestion. Can you stop putting your comment inside the grey box…?
This is really not very good to read when you put code and your comments in the same grey box together.

You can use that to put the code or log, but please do not put the comment in it…

Also, pin G,2 does not have module pin out on jetson NX at all… thus I am not sure why you put it in your regulator…

What is the dmesg result after you remove it? The gpio here needs to match the hardware design… if it does not exist on your design, then you don’t have to write it.

Your log still shows no sdmmc3 activity so far.

And, there are also lots of sdmmc3 case on this forum… you can refer to their dts too.

Dear maintainer,
Pin G.2 is contained in sdmmc1 itself, and sdmmc3 did not exist before.I copied the content in sdmmc1 as sdmmc3 to use.Since I don’t know the usage of regulator GPIO, I commented it out.
In addition, I have tried the two modifications you mentioned but it still doesn’t work.
Looking forward to your reply.

Share me the log and dts every time you change anything please.

Do you also change the pinmux of your cd gpio? You should use the spreadsheet to set that pin from NV_THERM_FAN_TACH to GPIO.