Jetson nano SD card can use,but kernel prompt error

Hello,nvidia.
I use Jetson nano.
Jetpack 4.4.
set dts and use sdmmc3 for external SD card.
> sdhci@700b0400 {

		status = "okay";
		cd-gpios = <&gpio TEGRA_GPIO(Y, 2) 0>; /* TF卡插入检测管脚 */
		vqmmc-supply = <&max77620_ldo6>;
		nvidia,cd-wakeup-capable;
		/delete-property/ keep-power-in-suspend;
		/delete-property/ non-removable;
		mmc-ddr-1_8v;
		sd-uhs-sdr104;
        	sd-uhs-sdr50;
        	sd-uhs-sdr25;
        	sd-uhs-sdr12;
		mmc-ocr-mask = <3>;
		uhs-mask = <0x0>;
		tap-delay = <3>;
		no-sdio;
		no-mmc;
	};

Now the sd card detection and hotplugging are working.
But sometims( not always ) there is error in writing/reading sd card:

[ 6.073132] mmc1: Data CRC error
[ 6.073135] sdhci: =========== REGISTER DUMP (mmc1)===========
[ 6.073139] sdhci: Sys addr: 0x00000200 | Version: 0x00000303
[ 6.073143] sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000157
[ 6.073147] sdhci: Argument: 0x000080a0 | Trn mode: 0x0000003b
[ 6.073150] sdhci: Present: 0x010b0000 | Host ctl: 0x00000013
[ 6.073154] sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 6.073157] sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 6.073161] sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 6.073164] sdhci: Int enab: 0x02ff100b | Sig enab: 0x02fc100b
[ 6.073168] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 6.073171] sdhci: Caps: 0x376cd08c | Caps_1: 0x10006f77
[ 6.073175] sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 6.073177] sdhci: Host ctl2: 0x00003000
[ 6.073181] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000ffefe420
[ 6.073207] sdhci: ===========================================
[ 6.073286] mmcblk1: error -84 transferring data, sector 32928, nr 512, cmd response 0x900, card status 0xb00
[ 6.156478] mmc1: Data CRC error
[ 6.156480] sdhci: =========== REGISTER DUMP (mmc1)===========
[ 6.156485] sdhci: Sys addr: 0x00000200 | Version: 0x00000303
[ 6.156489] sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000147
[ 6.156493] sdhci: Argument: 0x000080a0 | Trn mode: 0x0000003b
[ 6.156496] sdhci: Present: 0x010b0000 | Host ctl: 0x00000013
[ 6.156500] sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 6.156503] sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 6.156507] sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
[ 6.156510] sdhci: Int enab: 0x02ff100b | Sig enab: 0x02fc100b
[ 6.156514] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 6.156517] sdhci: Caps: 0x376cd08c | Caps_1: 0x10006f77
[ 6.156520] sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
[ 6.156523] sdhci: Host ctl2: 0x00003000
[ 6.156527] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000ffefe420
[ 6.156553] sdhci: ===========================================
[ 6.156632] mmcblk1: error -84 transferring data, sector 32928, nr 512, cmd response 0x900, card status 0xb00
[ 6.156667] mmcblk1: retrying using single block read

Only power off or replug sd card can solve the above problem(reboot can’t).
I test some SD card.
Find 16G 32G SDHC does not have these error.Look like work fine.
But 64G SDXC always have these error.
And sometimes resulting mmcblk1p1 can not mount.

This is all boot log.
kernel_all.log (97.3 KB)

My problem is same as this.But his problem is jetson nx.

Hello,

  1. The basic device tree change for enabling sdmmc3
    https://forums.developer.nvidia.com/t/microsd-card-not-detected-on-jetson-nano-production-module/80776/14

  2. If you notice the mmc speed is slow, please try this patch.
    https://forums.developer.nvidia.com/t/slow-sd-card-access-speed-read-write-with-jetson-nano-production-module/111749/31

  3. Some other forum users notice if tring warm boot, the speed becomes slow again. Turns out this patch is also needed in kernel
    https://forums.developer.nvidia.com/t/jetson-nano-sd-card-enters-back-to-high-speed-mode-instead-of-uhs-mode-after-soft-reboot/119041/4

  4. Also, for those who do not have SDMMC_VDD_EN gpio on their carrier board, then need to add “nvidia,vmmc-always-on” under sdhci device tree too.

1 Like

Thanks,I have solved the problem.
For use 3.
(1)DTS add nvidia,vmmc-always-on;
(2)Use 9875882.diff.zip to update kernel.

1 Like