[ NANO ] SD Card Mount Error(SDMMC3)

Dear All,

Jetpack-4.6.1( l4t_r32.7.1)
BSP
Extend from this post(Xavier NX)
System reboot when SD CARD insert

We’ve design a Carrier Board for Xavier NX/NANO.
In SD-Card Slot Side, there is the GPIO-7 for Control VDD SD
GPIO08 for SD Card Detect
For the post above for Xavier NX Side. We’re success bring up the SDMMC3 and work well. But there is some trouble in NANO Side, It will shows those message as below

# mount /dev/mmcblk1p1 /media
[  123.020426] mmcblk1: error -110 sending status command, retrying
[  123.026923] mmcblk1: error -110 sending status command, retrying
[  123.033539] mmcblk1: error -110 sending status command, aborting
[  123.094186] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.101054] mmc1: CMD CRC or end bit error, int mask 0xc0000
[  123.107804] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.114624] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.121616] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.127938] mmc1: tried to reset card, got error -84
[  123.133280] blk_update_request: I/O error, dev mmcblk1, sector 60637056
[  123.142135] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.149021] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.155614] mmcblk1: error -84 sending status command, retrying
[  123.162394] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.169214] mmcblk1: error -84 sending status command, retrying
[  123.175918] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.182457] mmcblk1: error -84 sending status command, aborting
[  123.188917] blk_update_request: I/O error, dev mmcblk1, sector 60637056
[  123.195913] Buffer I/O error on dev mmcblk1p1, logical block 7578608, async page read
[  123.209158] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.215983] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.222357] mmcblk1: error -84 sending status command, retrying
[  123.229194] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.235547] mmcblk1: error -84 sending status command, retrying
[  123.242498] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.248980] mmcblk1: error -84 sending status command, aborting
[  123.255356] blk_update_request: I/O error, dev mmcblk1, sector 8194
[  123.262471] EXT4-fs (mmcblk1p1): unable to read superblock
[  123.270572] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.277731] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.284075] mmcblk1: error -84 sending status command, retrying
[  123.290843] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.297235] mmcblk1: error -84 sending status command, retrying
[  123.303889] mmc1: CMD CRC or end bit error, int mask 0xc0000
[  123.310282] mmcblk1: error -84 sending status command, aborting
[  123.316647] blk_update_request: I/O error, dev mmcblk1, sector 8194
[  123.323921] EXT4-fs (mmcblk1p1): unable to read superblock
[  123.330710] mmc1: CMD CRC or end bit error, int mask 0xc0000
[  123.336956] mmc1: CMD CRC or end bit error, int mask 0xc0000
[  123.342969] mmcblk1: error -84 sending status command, retrying
[  123.349648] mmc1: CMD CRC or end bit error, int mask 0xc0000
[  123.355781] mmcblk1: error -84 sending status command, retrying
[  123.362597] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.369040] mmcblk1: error -84 sending status command, aborting
[  123.375407] blk_update_request: I/O error, dev mmcblk1, sector 8194
[  123.382567] EXT4-fs (mmcblk1p1): unable to read superblock
[  123.389256] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.395614] mmc1: CMD CRC or end bit error, int mask 0xc0000
[  123.401645] mmcblk1: error -84 sending status command, retrying
[  123.408059] mmc1: CMD CRC or end bit error, int mask 0xc0000
[  123.414114] mmcblk1: error -84 sending status command, retrying
[  123.420933] mmc1: CMD CRC or end bit error, int mask 0xc0001
[  123.427128] mmcblk1: error -84 sending status command, aborting
[  123.433542] blk_update_request: I/O error, dev mmcblk1, sector 8192
[  123.440540] SQUASHFS error: squashfs_read_data failed to read block 0x0
[  123.447269] squashfs: SQUASHFS error: unable to read squashfs_super_block
mount: /media: can't read superblock on /dev/mmcblk1p1.

There is the log file that include

  1. NANO Booting info
  2. device tree info
  3. pinmux reg
  4. partitons
  5. mount
  6. dmesg

NANO_SDCard_20220901_2027 (95.2 KB)

Xavier NX dts for Reference
tegra194-p3668-all-p3509-0000.dts (230.5 KB)
NANO dts
tegra210-p3448-0002-p3449-0000-b00.dts (293.9 KB)

dts change list
0. Mark GPIOZ,2 be used in other side.
Refer Error -84 whilst initialising SD CARD in Jetson Nano EMMC custom board

--- sources_tegra_l4t_r32.7.1/hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts        2022-06-20 17:59:50.308038620 +0800
+++ sources/hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts  2022-09-01 18:33:42.379537408 +0800
-                       interrupt-parent = <&gpio>;
-                       interrupts = <TEGRA_GPIO(Z, 2) 0x0>;
+//lanner++Remove GPIOZ,2 in tca9539 for SDCard
+//                     interrupt-parent = <&gpio>;
+//                     interrupts = <TEGRA_GPIO(Z, 2) 0x0>;

--- sources_tegra_l4t_r32.7.1/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi   2022-06-20 17:59:52.035956021 +0800
+++ sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi     2022-09-01 16:50:19.988826491 +0800

-               tach_gpio =  <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PZ2 */
+//lanner++Remove GPIOZ,2 in pwm for SDCard
+//             tach_gpio =  <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PZ2 */
+//lanner--
  1. Add Regulator
--- sources_tegra_l4t_r32.7.1/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-fixed-p3448-0000-a00.dtsi      2022-06-20 17:59:52.031956213 +0800
+++ sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-fixed-p3448-0000-a00.dtsi        2022-08-31 19:46:04.950781106 +0800
+//Refer p3448_vdd_3v3_sd: regulator@3
+               p3448_vdd_3v3_sd3: regulator@11 {
+                        compatible = "regulator-fixed-sync";
+//                     compatible = "regulator-fixed";
+                       reg = <11>;
+//                     regulator-name = "vdd-3v3-sd";
+                       regulator-name = "vdd-sdmmc3-sw";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&gpio TEGRA_GPIO(V, 0) 1>;
+                       enable-active-low;
+                       regulator-boot-on;
+                       vin-supply = <&p3448_vdd_3v3_sys>;
+               };
  1. Remove vqmmc-supply, adjust vmmc-supply
--- sources_tegra_l4t_r32.7.1/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-power-tree-p3448-0000-a00.dtsi 2022-06-20 17:59:52.035956021 +0800
+++ sources/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-power-tree-p3448-0000-a00.dtsi   2022-08-31 20:15:54.313755287 +0800
-               vqmmc-supply = <&max77620_sd3>; /* SDMMC3 for 2nd Wifi on loki */
-               vmmc-supply = <&p3448_vdd_3v3_sys>; /* SDMMC3 no stuff for full size SD on foster */
+//             vqmmc-supply = <&max77620_sd3>; /* SDMMC3 for 2nd Wifi on loki */
+//             vmmc-supply = <&p3448_vdd_3v3_sys>; /* SDMMC3 no stuff for full size SD on foster */
+               vmmc-supply = <&p3448_vdd_3v3_sd3>;
  1. sdhci@700b0400 Tune
--- sources_tegra_l4t_r32.7.1/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi     2022-06-20 17:59:52.035956021 +0800
+++ sources/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi       2022-09-01 20:13:43.538323617 +0800
        sdhci@700b0400 {
-               status = "disabled";
+//             status = "disabled";
+               status = "okay";
                /delete-property/ keep-power-in-suspend;
                /delete-property/ non-removable;
+//             dma-coherent;
+               cd-gpios = <&gpio TEGRA_GPIO(Z, 2) 0>;
                mmc-ddr-1_8v;
+//             mmc-hs200-1_8v;
+//             nvidia,cd-wakeup-capable;
                mmc-ocr-mask = <3>;
+//             mmc-ocr-mask = <0>;
                uhs-mask = <0x0>;
+//             uhs-mask = <0x8>;
                tap-delay = <3>;
        };

--- sources_tegra_l4t_r32.7.1/hardware/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi      2022-06-20 17:59:45.788254696 +0800
+++ sources/hardware/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi        2022-09-01 19:40:44.728522069 +0800
...
sdmmc3: sdhci@700b0400 {
...
-                wp-inverted;
+//             wp-inverted;

Would you mind help us to check these setting which could add/remove for that??

Best Regards,
MOMO Chen

Just compare the finalized dtb between your NX and your Nano. Check those two sdmmc3.
The driver is same.

Dear Wayne,

Thanks for your shared. There is one thing to update.
Our SDMMC3 is working now.
But it just need to unmark the vqmmc-supply in tegra210-porg-plugin-manager.dtsi

                        override@1 {
                                target = <&sdhci2>;
                                _overlay_ {
                                        vqmmc-supply = <&max77620_ldo6>;
//                                      no-sdio;
//                                      no-mmc;
                                        sd-uhs-sdr104;
                                        sd-uhs-sdr50;
                                        sd-uhs-sdr25;
                                        sd-uhs-sdr12;
                                };
                        };

Final DTS
tegra210-p3448-0002-p3449-0000-b00.dts (293.9 KB)
Log File
NANO_SDCard_20220902_1508 (84.2 KB)
That might be an impressed different between Xavier NX and NANO’s setting.

Best Regards,
MOMO Chen

1 Like

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