Error -84 whilst initialising SD CARD in Jetson Nano EMMC custom board

I am developing a custom carrier board for the Jetson Nano and I am trying to make use of an external SD Card interface.
I have followed many similar posts on this forum namely :

-https://forums.developer.nvidia.com/t/microsd-card-not-detected-on-jetson-nano-production-module/80776
-https://forums.developer.nvidia.com/t/im-trying-to-use-microsd-on-a-custom-carrier-board/182869/19
-https://forums.developer.nvidia.com/t/jetson-nano-production-module-takes-long-time-to-boot-when-sd-card-is-inserted/83871

I have successfully compiled the kernel with the modifications described in the first link and updated the Linux_for_Tegra folder with the new DTBs and Image.
I have also flashed the module successfully and it working fine aside from the SD Card module.
cat /proc/device-tree/sdhci@700b0400/status outputs okay so the changes took effect.

However when I run dmesg I get the following output:

[  867.208031] mmc1: Data end bit error
[  867.211601] sdhci: =========== REGISTER DUMP (mmc1)===========
[  867.217423] sdhci: Sys addr: 0x00000000 | Version:  0x00000303
[  867.223245] sdhci: Blk size: 0x00007008 | Blk cnt:  0x00000000
[  867.229066] sdhci: Argument: 0x00000000 | Trn mode: 0x00000013
[  867.234889] sdhci: Present:  0x01eb0000 | Host ctl: 0x00000011
[  867.240709] sdhci: Power:    0x00000001 | Blk gap:  0x00000000
[  867.246532] sdhci: Wake-up:  0x00000000 | Clock:    0x00000607
[  867.252353] sdhci: Timeout:  0x0000000e | Int stat: 0x00000000
[  867.258174] sdhci: Int enab: 0x02ff100b | Sig enab: 0x02fc100b
[  867.263996] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[  867.269817] sdhci: Caps:     0x376cd08c | Caps_1:   0x10006f77
[  867.275638] sdhci: Cmd:      0x0000333a | Max curr: 0x00000000
[  867.281457] sdhci: Host ctl2: 0x00003000
[  867.285374] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000ffefe410
[  867.291941] sdhci: ===========================================
[  867.298383] mmc1: error -84 whilst initialising SD card

The SD Card is formatted to exFAT and I have installed the necessary dependencies.
This is the schematic:


The only I made to the source code were the same as the first link:
Set status for sdhci@700b0400 to “okay” in:
sources/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi
sources/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi

Patch changes applied manually in:
sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
sources/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi

I can put here whatever file is needed for debug.
Thank you in advance

Forget about any post from 2019. That may be out of date.

Please just check the sdmmc3 posts in this year.

Hi Wayne, thank you for the quick reply.
Would this be a good one to follow?

[I/O Error on SD Card over SDMMC3 - #8]

Just to make sure that I follow a proper guide this time. I’ll update this post with my steps if it works.

I have followed that guide and did the following modifications:

diff --git a/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts b/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
index f44fa10..084d718 100644
--- a/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
+++ b/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
@@ -900,8 +900,8 @@
 			gpio-controller;
 			#gpio-cells = <2>;
 			reg = <0x77>;
-			interrupt-parent = <&gpio>;
-			interrupts = <TEGRA_GPIO(Z, 2) 0x0>;
+			//interrupt-parent = <&gpio>;						//remove
+			//interrupts = <TEGRA_GPIO(Z, 2) 0x0>;					//remove GPIO Z2 is used for SD card detection
 			#interrupt-cells = <2>;
 			interrupt-controller;
 			vcc-supply = <&battery_reg>;
diff --git a/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi b/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
index c7c26d3..2d2e5cc 100644
--- a/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
+++ b/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
@@ -26,7 +26,7 @@
 		step_time = <100>; /* mesecs */
 		state_cap = <7>;
 		active_pwm_max = <255>;
-		tach_gpio =  <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PZ2 */
+		//tach_gpio =  <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PZ2 */			//remove
 		pwm_gpio = <&gpio TEGRA_GPIO(E, 7) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PE7 */
 		pwm_polarity = <PWM_POLARITY_NORMAL>;
 		suspend_state = <0>;
diff --git a/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi b/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
index 2dc032f..1cdb3d6 100644
--- a/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
+++ b/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
@@ -183,6 +183,7 @@
 				_overlay_ {
 					keep-power-in-suspend;
 					non-removable;
+				    status="okay";							//add
 				};
 			};
 		};
@@ -215,7 +216,7 @@
 			override@1 {
 				target = <&sdhci2>;
 				_overlay_ {
-					vqmmc-supply = <&max77620_ldo6>;
+				    status="okay";							//add
 					no-sdio;
 					no-mmc;
 					sd-uhs-sdr104;
diff --git a/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts b/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
index 30ccb03..0e16c3d 100644
--- a/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
+++ b/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
@@ -38,6 +38,11 @@
 		status = "disabled";
 	};
 
+	sdhci@700b0400 { /* SDMMC3 for SD card */				//added for sd card on JN30(fd)
+		status = "okay";
+		vqmmc-supply = <&max77620_ldo6>;
+	};
+
 	spi@70410000 { /* QSPI */
 		status = "disabled";
 	};
diff --git a/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi b/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
index bf4875b..70239ef 100644
--- a/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
+++ b/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
@@ -278,13 +278,14 @@
 		max-clk-limit = <0xbebc200>;
 	};
 
-	sdhci@700b0400 {
-		status = "disabled";
+	sdhci@700b0400 { /* SDMMC3 for SD card on NANO */
+		status = "okay";				//change
 		/delete-property/ keep-power-in-suspend;
 		/delete-property/ non-removable;
 		mmc-ddr-1_8v;
 		mmc-ocr-mask = <3>;
 		uhs-mask = <0x0>;
+		//max-clk-limit = <400000>;			//remove it for all SD card to work with full speed
 		tap-delay = <3>;
 	};
 
diff --git a/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi b/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
index c65c30e..cbc00d6 100644
--- a/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
+++ b/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
@@ -65,6 +65,7 @@
 	};
 
 	sdmmc3: sdhci@700b0400 {
+		status="okay";							//add
 		tap-delay = <1>;
 		trim-delay = <3>;
 		mmc-ocr-mask = <0>;
@@ -75,6 +76,8 @@
 		calib-1v8-offsets = <0x7B7B>;
 		compad-vref-3v3 = <0x7>;
 		compad-vref-1v8 = <0x7>;
+		cd-gpios = <&gpio TEGRA_GPIO(Z, 2) 0>;				//add
+		nvidia,vmmc-always-on;
 		pll_source = "pll_p", "pll_c4_out2";
 		resets = <&tegra_car TEGRA210_CLK_SDMMC3>;
 		reset-names = "sdhci";

I do have an always-on load switch for the MicroSD Con and the connections are the same (suggested by the design guide) so it should be the same. However, I am still getting the same error? Do you have any suggestions on how I can debug this? I have tried to format the card to multiple formats and none of them work

The format does not matter here.

There are only few things needed to be configured.

  1. The vmmc-supply needs to give a 3v3 regulator. vqmmc-supply does not matter. No need to add that.

  2. The cd-gpios need to match your hardware design.

  3. If this is always-on, then add always-on property.

You don’t really need to modify A, B, C, D …etc dtsi files. Just modify sdhci@700b0400 and check /proc/device-tree on your board to make sure those properties are present.
Or use dtc tool to convert your dtb back to dts and check.

And you should share the full dmesg.

Hi Wayne.
I have followed all your steps and only changed sdhci@700b0400.

  • vmmc is regulator3 which is vdd-sys-sd
diff --git a/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts b/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
index 30ccb03..0e16c3d 100644
--- a/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
+++ b/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
@@ -38,6 +38,11 @@
 		status = "disabled";
 	};
 
+	sdhci@700b0400 { /* SDMMC3 for SD card */				//added for sd card on JN30(fd)
+		status = "okay";
+		vmmc-supply = <&p3448_vdd_3v3_sd>;
+	};
+
diff --git a/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi b/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
index bf4875b..70239ef 100644
--- a/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
+++ b/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
@@ -278,13 +278,14 @@
 		max-clk-limit = <0xbebc200>;
 	};
 
-	sdhci@700b0400 {
-		status = "disabled";
+	sdhci@700b0400 { /* SDMMC3 for SD card on NANO */
+		status = "okay";				//change
 		/delete-property/ keep-power-in-suspend;
 		/delete-property/ non-removable;
 		mmc-ddr-1_8v;
 		mmc-ocr-mask = <3>;
 		uhs-mask = <0x0>;
+		//max-clk-limit = <400000>;			//remove it for all SD card to work with full speed
 		tap-delay = <3>;
 	};
  • the cd gpio is gpio08, or GPIO_PZ2 and I have added that.
  • the power switch is always on and I have added data that.
diff --git a/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi b/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
index c65c30e..cbc00d6 100644
--- a/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
+++ b/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
@@ -65,6 +65,7 @@
 	};
 
 	sdmmc3: sdhci@700b0400 {
+		status="okay";							//add
 		tap-delay = <1>;
 		trim-delay = <3>;
 		mmc-ocr-mask = <0>;
@@ -75,6 +76,8 @@
 		calib-1v8-offsets = <0x7B7B>;
 		compad-vref-3v3 = <0x7>;
 		compad-vref-1v8 = <0x7>;
+		cd-gpios = <&gpio TEGRA_GPIO(Z, 2) 0>;				//add
+		nvidia,vmmc-always-on;
 		pll_source = "pll_p", "pll_c4_out2";
 		resets = <&tegra_car TEGRA210_CLK_SDMMC3>;
 		reset-names = "sdhci";

The gpio used ig TACH_GPIO from the dev kit and I removed it by applying this change although I am not sure this is the way to do it:

diff --git a/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi b/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
index c7c26d3..2d2e5cc 100644
--- a/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
+++ b/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
@@ -26,7 +26,7 @@
 		step_time = <100>; /* mesecs */
 		state_cap = <7>;
 		active_pwm_max = <255>;
-		tach_gpio =  <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PZ2 */
+		//tach_gpio =  <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PZ2 */			//remove
 		pwm_gpio = <&gpio TEGRA_GPIO(E, 7) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PE7 */
 		pwm_polarity = <PWM_POLARITY_NORMAL>;
 		suspend_state = <0>;

I am however still getting the same error when I hot plug the SD card. The schematics are in the first message and this is my dts converted from the dtb from the nano boot folder and dmesg log.

dmesg.txt (58.5 KB)
tegra210-p3448-0002-p3449-0000-b00.dtb (231.7 KB)

The dtb files seems to contain all the changes made: the status, the regulator, the gpios and the always on configuration.

Please just share me the result after the dtc. You don’t need to tell me how many files you modified. That really does not matter. Just convert your dtb back to dts by using the dtc tool and share that file here.

Sorry my bad I meant the dts. Here it is
tegra210-p3448-0002-p3449-0000-b00.dts (318.8 KB)

I just added the changes to explain what I modified if that information is needed.

please remove vqmmc-supply = <0x3b>;.

Also, I am not sure why some of the properties are missing. Those should be there by default.

  sd-uhs-sdr104;
                sd-uhs-sdr50;
                sd-uhs-sdr25;
                sd-uhs-sdr12;

Also, vdd-3v3-sd is still controlled by a gpio. Not a always-on one.

I recompiled everything and the extra parameters have now shown up. I have changed the vmmc-supply to vdd-3v3-sys which is always on. I’m not sure where I can delete the vqmmc property. I have searched for any reference for vqmmc for sdhci@700b0400 and only found it in the plugin manager. I deleted it however, it is present in the completed dts file. Do you have any idea where it is referenced?

New dts file:
tegra210-p3448-0002-p3449-0000-b00.dts (318.9 KB)

For plugin-manager, you need to do full reflash, but not only the DTB partition since it is handled by cboot.

This dts is the result of the compiled kernel with the changes made. It is the dtb file that is being copied to the boot folder for the Nano. Even with a full reflash I get that dts file

You can use /proc/device-tree to check whether there your dtb properties are correct or not.

If you are sure there are something add vqmmc, then you just grep the whole folder and see which one has it.

I have checked /proc/device tree and everything is correct:

  • cat status okay
  • hexdump vmmc-supply 0000000 0000 4c00 0000004 (0xc4)
  • hexdump cd-gpios 0000000 0000 5b00 0000 ca00 0000 0000 000000c (0x5b 0xca 0x0)

It has all the parameters

diogonano@diogonano-desktop:/proc/device-tree/sdhci@700b0400$ ls
aux-device-name    compad-vref-1v8   mmc-ocr-mask              phandle        pll_source      status
bus-width          compad-vref-3v3   name                      pinctrl-0      prod-settings   tap-delay
calib-1v8-offsets  compatible        no-mmc                    pinctrl-1      pwrdet-support  trim-delay
calib-3v3-offsets  ddr-clk-limit     no-sdio                   pinctrl-2      reg             uhs-mask
cap-mmc-highspeed  ignore-pm-notify  nvidia,en-io-trim-volt    pinctrl-3      reset-names     vmmc-supply
cap-sd-highspeed   interrupts        nvidia,en-periodic-calib  pinctrl-4      resets          vqmmc-supply
cd-gpios           iommus            nvidia,max-tap-delay      pinctrl-5      sd-uhs-sdr104   wp-inverted
cd-inverted        linux,phandle     nvidia,min-tap-delay      pinctrl-6      sd-uhs-sdr12
clock-names        max-clk-limit     nvidia,runtime-pm-type    pinctrl-7      sd-uhs-sdr25
clocks             mmc-ddr-1_8v      nvidia,vmmc-always-on     pinctrl-names  sd-uhs-sdr50

When I try to find vqmmc-supply:

diogonano@diogonano-desktop:/proc/device-tree$ find . -name vqmmc-supply
./sdhci@700b0400/vqmmc-supply
./sdhci@700b0000/vqmmc-supply
./sdhci@700b0600/vqmmc-supply
./sdhci@700b0200/vqmmc-supply

In the source files, I can only find references of vqmmc-supply on dtsi files for different part numbers such as a00 or e03. No reference to b00.
Mind you, I am using release r32.7.1

The error is now:

[   29.095273] mmc1: fallback to HS enumeration.
[   29.135606] mmc1: Data end bit error
[   29.139259] sdhci: =========== REGISTER DUMP (mmc1)===========
[   29.145159] sdhci: Sys addr: 0x00000000 | Version:  0x00000303
[   29.151045] sdhci: Blk size: 0x00007008 | Blk cnt:  0x00000000
[   29.156928] sdhci: Argument: 0x00000000 | Trn mode: 0x00000013
[   29.162811] sdhci: Present:  0x01eb0000 | Host ctl: 0x00000011
[   29.168688] sdhci: Power:    0x00000001 | Blk gap:  0x00000000
[   29.174568] sdhci: Wake-up:  0x00000000 | Clock:    0x00000807
[   29.180447] sdhci: Timeout:  0x0000000e | Int stat: 0x00000000
[   29.186327] sdhci: Int enab: 0x02ff100b | Sig enab: 0x02fc100b
[   29.192206] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[   29.198087] sdhci: Caps:     0x376cd08c | Caps_1:   0x10006f77
[   29.203965] sdhci: Cmd:      0x0000333a | Max curr: 0x00000000
[   29.209839] sdhci: Host ctl2: 0x00003008
[   29.213818] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000ffefe410
[   29.220463] sdhci: ===========================================
[   29.228820] mmc1: error -84 whilst initialising SD card

dmesg.txt (62.0 KB)

When I hotplug I get this error:

[   47.522963] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.532368] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.541013] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.549602] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.558186] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.668695] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.678047] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.687340] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.697074] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   47.704758] mmc1: CMD CRC or end bit error, int mask 0xc0001

I have modified the device tree to add the missing parameters:

  • no-sdio
  • no-mmc
  • mmc-hs200-1v8;

But the result is exactly the same

Remove vqmmc-supply from tegra210-porg-power-tree-p3448-0000-a00.dtsi

Hi wayne,

There was a little bit of solder in the ESD diodes that was grounding one of the data pins. It works now perfectly with the modifications you suggested.
Thank you very much for your help!

1 Like

I have another problem. i cant seem to mount the card despite it showing up in lsblk.
However, as soon as I try to ready it, it starts logging this:

71.857572] mmcblk1: error -110 sending status command, retrying
[   71.863676] mmcblk1: error -110 sending status command, retrying
[   71.869859] mmcblk1: error -110 sending status command, aborting
[   71.927476] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   71.933939] mmc1: CMD CRC or end bit error, int mask 0xc0000
[   71.940773] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   71.947594] mmc1: CMD CRC or end bit error, int mask 0xc0001
[   71.954470] mmc1: CMD CRC or end bit error, int mask 0xc0000
[   71.960628] mmc1: tried to reset card, got error -84
[   71.965819] blk_update_request: I/O error, dev mmcblk1, sector 0
[   71.972040] blk_update_request: I/O error, dev mmcblk1, sector 8
[   71.978195] blk_update_request: I/O error, dev mmcblk1, sector 16