Jetson Xavier NX JetPack5.1.3 - SD Card Errors

Hi,
We have a Jetson Xavier NX with JetPack 5.1.3 SDK installed.

We are using our own carrier board hardware with SD card connected to @3440000 as following:
• We have no Card Detect gpio connected
• The VDD power is always on
• The SD card is never removed
This is the change we have made to the ….dtb :

sdhci_sd: sdhci@3440000 {
	mmc-ocr-mask = <0x0>;
	//cd-inverted;
	//cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 7) 0>;
	//nvidia,cd-wakeup-capable;
	mmc-ocr-mask = <0>;
	//cd-inverted;
	//vmmc-supply = <&p3668_vdd_sdmmc1_sw>;
	status = "okay";
};

The issue is as following:
On power up/hardware reboot, everything works fine, SD card is detected and can be mounted.
But when doing software reboot, we are getting errors from the sdhci driver and the SD card is not detected anymore.
Here are the errors from the driver:

[    6.460394] mmc1: Data CRC error
[    6.466743] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[    6.466756] mmc1: sdhci: Sys addr:  0x00000000 | Version:  0x00000505
[    6.479522] mmc1: sdhci: Blk size:  0x00007040 | Blk cnt:  0x00000000
[    6.479532] mmc1: sdhci: Argument:  0x80fffff3 | Trn mode: 0x00000013
[    6.479542] mmc1: sdhci: Present:   0x01fb0000 | Host ctl: 0x00000019
[    6.493261] mmc1: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[    6.493270] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x00000407
[    6.493278] mmc1: sdhci: Timeout:   0x0000000e | Int stat: 0x00000000
[    6.506042] mmc1: sdhci: Int enab:  0x03ff008b | Sig enab: 0x03fc008b
[    6.506050] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[    6.506080] mmc1: sdhci: Caps:      0x3f6cd08c | Caps_1:   0x18002f70
[    6.518117] mmc1: sdhci: Cmd:       0x0000063a | Max curr: 0x00000000
[    6.518130] mmc1: sdhci: Resp[0]:   0x00000900 | Resp[1]:  0x04905c86
[    6.531324] mmc1: sdhci: Resp[2]:   0x0cc30000 | Resp[3]:  0x00000248
[    6.531329] mmc1: sdhci: Host ctl2: 0x00000008
[    6.531341] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000007ffffff20c
[    6.565398] mmc1: sdhci: ============================================

[   18.655609] mmc1: Timeout waiting for hardware cmd interrupt.
[   18.655822] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[   18.655985] mmc1: sdhci: Sys addr:  0x00000000 | Version:  0x00000505
[   18.656130] mmc1: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000000
[   18.656271] mmc1: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
[   18.656408] mmc1: sdhci: Present:   0x01fb00f1 | Host ctl: 0x00000003
[   18.656553] mmc1: sdhci: Power:     0x00000000 | Blk gap:  0x00000000
[   18.656692] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x00000000
[   18.656832] mmc1: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[   18.656976] mmc1: sdhci: Int enab:  0x00ff0083 | Sig enab: 0x00fc0083
[   18.657114] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[   18.657257] mmc1: sdhci: Caps:      0x3f6cd08c | Caps_1:   0x18002f70
[   18.657398] mmc1: sdhci: Cmd:       0x00000000 | Max curr: 0x00000000
[   18.657672] mmc1: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[   18.658146] mmc1: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[   18.661080] mmc1: sdhci: Host ctl2: 0x00000000
[   18.665203] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000007ffffff20c
[   18.672499] mmc1: sdhci: ============================================

[   18.694631] mmc1: Controller never released inhibit bit(s).
[   18.694839] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[   18.695052] mmc1: sdhci: Sys addr:  0x00000000 | Version:  0x00000505
[   18.697575] mmc1: sdhci: Blk size:  0x00000200 | Blk cnt:  0x00000000
[   18.704308] mmc1: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
[   18.710783] mmc1: sdhci: Present:   0x01fb00f1 | Host ctl: 0x00000003
[   18.716998] mmc1: sdhci: Power:     0x00000000 | Blk gap:  0x00000000
[   18.723732] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x00000000
[   18.730206] mmc1: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[   18.736771] mmc1: sdhci: Int enab:  0x00ff0083 | Sig enab: 0x00fc0083
[   18.743156] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[   18.749390] mmc1: sdhci: Caps:      0x3f6cd08c | Caps_1:   0x18002f70
[   18.756019] mmc1: sdhci: Cmd:       0x00000000 | Max curr: 0x00000000
[   18.762496] mmc1: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[   18.768970] mmc1: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[   18.775184] mmc1: sdhci: Host ctl2: 0x00000000
[   18.779564] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000007ffffff20c
[   18.786860] mmc1: sdhci: ============================================

Using the same hardware with JetPack 4.6 everything works fine.

Here is a full power up log where the SD card is detected:
hardware-reboot-logs.txt (53.4 KB)

Here is a full software reboot log where the issue occurs:
software-reboot-logs.txt (60.8 KB)

thanks,
Ben

  1. if no cd gpio, add non-removable property.

  2. always on power requires nvidia,vmmc-always-on property and also a always on regulator to vmmc-supply.

Hi, Wayne

Thank you for the quick reply,

I did as you said and made the following changes to the device trees,
But the issue still persists!

These are the changes i have made to the device trees:
The sdhci in tegra194-p3668-common.dtsi :

sdhci_sd: sdhci@3440000 {
	mmc-ocr-mask = <0x0>;
	non-removable;
	nvidia,vmmc-always-on;
	vmmc-supply = <&p3668_vdd_sdmmc1_sw>;
	status = "okay";
};

And took one of the fixed regulators and added regulator-always-on property to it:

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

From further investigation, I have noticed that in the kernel-5.10 of JetPack5.1.3
There is no parse and no usage of the property nvidia,vmmc-always-on in the sdhci-tegra platform driver
(Actually i did not see any reference to this property anywhere in the kernel-5.10).
But on the kernel-4.9 of JetPack4.6 I do see the parse and usage of the property in the tegra platform driver.

Thanks,
Ben

Ok, then regulator-always-on in the regulator is sufficient for rel-35 .

Please remove the gpio in the regulator or write another regulator that does not have gpio field and assign it to vmmc-supply.

Share us the dmesg if error is still.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.