SD High-Speed Card Not Working on Custom Motherboard error -84 -110

I have a custom motherboard, and the SD high-speed card does not work. However, it works fine in low-speed mode, i.e., when modifying max-clk-limit = <0xc28cb00>; ddr-clk-limit = <0xc28cb00>; to below 50MHz(According to the guidance of AI), it remains stable. Otherwise, I get error -84 and -100. I hope someone can help me, thank you. Below is the device tree configuration.

   sdhci@700b0400 {
            compatible = "nvidia,tegra210-sdhci";
            reg = <0x0 0x700b0400 0x0 0x200>;
            interrupts = <0x0 0x13 0x4>;
            aux-device-name = "sdhci-tegra.2";
            iommus = <0x4d 0x1b>;
            nvidia,runtime-pm-type = <0x0>;
            clocks = <0x43 0x45 0x43 0xf3 0x43 0x136 0x43 0xc1>;
            clock-names = "sdmmc", "pll_p", "pll_c4_out2", "sdmmc_legacy_tm";
            resets = <0x43 0x45>;
            reset-names = "sdhci";
            status = "disabled";
            cd-gpios = <0x85 524 0x1>;
            vqmmc-supply = <0x58>;
            vmmc-supply = <0x69>;
            tap-delay = <0x6>;
            trim-delay = <0x3>;
            mmc-ocr-mask = <0x0>;
            max-clk-limit = <0xc28cb00>;
            ddr-clk-limit = <0xc28cb00>;
            bus-width = <0x4>;
            calib-3v3-offsets = <0x7d>;
            calib-1v8-offsets = <0x7b7b>;
            compad-vref-3v3 = <0x7>;
            compad-vref-1v8 = <0x7>;
            pll_source = "pll_p", "pll_c4_out2";
            keep-power-in-suspend;
            ignore-pm-notify;
            non-removable;
            cap-mmc-highspeed;
            cap-sd-highspeed;
            nvidia,en-io-trim-volt;
            nvidia,en-periodic-calib;
            cd-inverted;
            wp-inverted;
            pwrdet-support;
            nvidia,min-tap-delay = <0x6a>;
            nvidia,max-tap-delay = <0xb9>;
            pinctrl-names = "sdmmc_schmitt_enable", "sdmmc_schmitt_disable", "sdmmc_clk_schmitt_enable", "sdmmc_clk_schmitt_disable", "sdmmc_drv_code", "sdmmc_default_drv_code", "sdmmc_e_33v_enable", "sdmmc_e_33v_disable";
            pinctrl-0 = <0xd5>;
            pinctrl-1 = <0xd6>;
            pinctrl-2 = <0xd7>;
            pinctrl-3 = <0xd8>;
            pinctrl-4 = <0xd9>;
            pinctrl-5 = <0xda>;
            pinctrl-6 = <0xdb>;
            pinctrl-7 = <0xdc>;
            default-drv-type = <0x1>;
            uhs-mask = <0x0>;
            power-off-rail;
            nvidia,update-pinctrl-settings;
            linux,phandle = <0x18e>;
            phandle = <0x18e>;
			
			
sdhci@700b0000 {
            compatible = "nvidia,tegra210-sdhci";
            reg = <0x0 0x700b0000 0x0 0x200>;
            interrupts = <0x0 0xe 0x4>;
            aux-device-name = "sdhci-tegra.0";
            iommus = <0x4d 0x19>;
            nvidia,runtime-pm-type = <0x1>;
            clocks = <0x43 0xe 0x43 0xf3 0x43 0xc1>;
            clock-names = "sdmmc", "pll_p", "sdmmc_legacy_tm";
            resets = <0x43 0xe>;
            reset-names = "sdhci";
            status = "okay";
            vqmmc-supply = <0xdd>;
            vmmc-supply = <0xde>;
            tap-delay = <0x6>;
            trim-delay = <0x3>;
            max-clk-limit = <0xc28cb00>;
            ddr-clk-limit = <0xc28cb00>;
            bus-width = <0x4>;
            mmc-ocr-mask = <0x3>;
            calib-3v3-offsets = <0x7d>;
            calib-1v8-offsets = <0x7b7b>;
            compad-vref-3v3 = <0x7>;
            compad-vref-1v8 = <0x7>;
            pll_source = "pll_p";
            cap-mmc-highspeed;
            cap-sd-highspeed;
            nvidia,en-io-trim-volt;
            nvidia,en-periodic-calib;
            keep-power-in-suspend;
            ignore-pm-notify;
            cd-inverted;
            wp-inverted;
            nvidia,min-tap-delay = <0x6a>;
            nvidia,max-tap-delay = <0xb9>;
            pwrdet-support;
            pinctrl-names = "sdmmc_schmitt_enable", "sdmmc_schmitt_disable", "sdmmc_clk_schmitt_enable", "sdmmc_clk_schmitt_disable", "sdmmc_drv_code", "sdmmc_default_drv_code", "sdmmc_e_33v_enable", "sdmmc_e_33v_disable";
            pinctrl-0 = <0xdf>;
            pinctrl-1 = <0xe0>;
            pinctrl-2 = <0xe1>;
            pinctrl-3 = <0xe2>;
            pinctrl-4 = <0xe3>;
            pinctrl-5 = <0xe4>;
            pinctrl-6 = <0xe5>;
            pinctrl-7 = <0xe6>;
            uhs-mask = <0x0>;
            power-off-rail;
            nvidia,update-pinctrl-settings;
            nvidia,sd-device;
            linux,phandle = <0x18f>;
            phandle = <0x18f>;

Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.744366] sdhci: ===========================================
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.750367] mmcblk2: error -110 sending stop command, original cmd response 0x900, card status 0x400900
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.750373] mmcblk2: error -84 transferring data, sector 7168, nr 1024, cmd response 0x900, card status 0x0
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.848959] mmc2: Data CRC error
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.852185] sdhci: =========== REGISTER DUMP (mmc2)===========
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.858005] sdhci: Sys addr: 0x00000400 | Version: 0x00000303
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.863824] sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000267
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.869644] sdhci: Argument: 0x00001c00 | Trn mode: 0x0000003b
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.875463] sdhci: Present: 0x01fb0000 | Host ctl: 0x00000013
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.881282] sdhci: Power: 0x00000001 | Blk gap: 0x00000000
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.887101] sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.892919] sdhci: Timeout: 0x0000000e | Int stat: 0x00000000
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.898738] sdhci: Int enab: 0x02ff100b | Sig enab: 0x02fc100b
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.904557] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.910377] sdhci: Caps: 0x376cd08c | Caps_1: 0x10006f77
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.916197] sdhci: Cmd: 0x0000123a | Max curr: 0x00000000
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.922014] sdhci: Host ctl2: 0x00003001
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.925927] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000ffefe440
Mar 18 14:03:54 tegra-ubuntu kernel: [ 52.932461] sdhci: ===========================================




I don’t know what you want to point out in that picture. There is nothing useful from your schematic.

You basically shared nothing. No one knows where do those lines go to. Nothing there shown how the connector side is wired.

Which Jetpack release are you using?

Are you sure your device tree is matching to the board design?

I’m sorry, I modified the content and uploaded the picture again. I’m using the official device tree, and I just added cd-gpios = <0x85 524 0x1>; in sdhci@700b0400 . Then I removed cdgpio from sdhci@700b0000 , otherwise the SD card cannot be detected.

So what is “cd-gpios = <0x85 524 0x1>”? Which pin is that ?

And if you have cd-gpio there, you should not remove it. Your issue is from something else so you should not remove it.

"Hi WayneWWW,

Please excuse me, but all of this information was provided by AI. I don’t have personal expertise in these matters. The AI also suggested removing cd-gpios, and indeed, doing so resolved my initial issue. Adding cd-gpios to sdhci@700b0400 also resolved the hot-plugging issue, and now, with the AI’s assistance, I’m able to use high-speed SD cards (though I haven’t ruled out the possibility that the issue was specific to that particular SD card). The speed now reaches over 90MB/s.

Currently, the only remaining issue is that during a soft reboot, the SD card operates at 50MHz. It only operates at 200MHz after a cold reboot or hot-plugging. Here are some logs:"

root@tegra-ubuntu:/home/nvidia# dd if=/dev/mmcblk2 of=/dev/null bs=1M count=500 iflag=nocache status=progress
250609664 bytes (251 MB, 239 MiB) copied, 11 s, 22.8 MB/s
249+0 records in
248+0 records out
260046848 bytes (260 MB, 248 MiB) copied, 11.4777 s, 22.7 MB/sroot@tegra-ubuntu:/home/nvidia# dmesg |grep mmc
[    0.000000] Kernel command line: tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1125 core_edp_ma=4000 gpt  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1
[    0.572697] vddio-sdmmc1: 1800 <--> 3300 mV at 3300 mV
[    0.597215] tegra210_dvfs: no clock found for sdmmc2_ddr
[    0.597231] tegra210_dvfs: no clock found for sdmmc4_ddr
[    0.597275] tegra210_dvfs: no clock found for sdmmc1_ddr
[    0.597290] tegra210_dvfs: no clock found for sdmmc3_ddr
[    1.310634] mmc0: SDHCI controller on sdhci-tegra.3 [sdhci-tegra.3] using ADMA 64-bit with 64 bit addr
[    1.318633] mmc1: SDHCI controller on sdhci-tegra.1 [sdhci-tegra.1] using ADMA 64-bit with 64 bit addr
[    1.322635] mmc2: SDHCI controller on sdhci-tegra.0 [sdhci-tegra.0] using ADMA 64-bit with 64 bit addr
[    1.358984] mmc2: host does not support reading read-only switch, assuming write-enable
[    1.362105] mmc2: new high speed SDXC card at address 59b4
[    1.366571] mmcblk2: mmc2:59b4 ED2S5 119 GiB
[    1.368790]  mmcblk2: p1 p2 p3
[    1.382391] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[    1.382770] mmcblk0: mmc0:0001 016G32 14.7 GiB
[    1.387019] mmcblk0boot0: mmc0:0001 016G32 partition 1 4.00 MiB
[    1.391319] mmcblk0boot1: mmc0:0001 016G32 partition 2 4.00 MiB
[    1.391413] mmcblk0rpmb: mmc0:0001 016G32 partition 3 4.00 MiB
[    1.393964]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22
[    1.463552] mmcblk mmc2:59b4: Card claimed for testing.
[    1.463561] mmcblk mmc0:0001: Card claimed for testing.
[    1.491827] Root device found: mmcblk0p1
[    1.493051] Found dev node: /dev/mmcblk0p1
[    1.554315] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    1.556009] Rootfs mounted over mmcblk0p1
[    1.566662] mmc1: hw tuning done ...
[    1.570234] mmc1: new ultra high speed SDR104 SDIO card at address 0001
[    1.902589] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[   12.367931] FAT-fs (mmcblk2p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@tegra-ubuntu:/home/nvidia# dd if=/dev/mmcblk2 of=/dev/null bs=1M count=500 iflag=nocache status=progress
458227712 bytes (458 MB, 437 MiB) copied, 5 s, 91.5 MB/s
500+0 records in
500+0 records out
524288000 bytes (524 MB, 500 MiB) copied, 5.74122 s, 91.3 MB/s
root@tegra-ubuntu:/home/nvidia# dmesg |grep mmc
[    0.000000] Kernel command line: tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1125 core_edp_ma=4000 gpt  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1
[    0.572697] vddio-sdmmc1: 1800 <--> 3300 mV at 3300 mV
[    0.597215] tegra210_dvfs: no clock found for sdmmc2_ddr
[    0.597231] tegra210_dvfs: no clock found for sdmmc4_ddr
[    0.597275] tegra210_dvfs: no clock found for sdmmc1_ddr
[    0.597290] tegra210_dvfs: no clock found for sdmmc3_ddr
[    1.310634] mmc0: SDHCI controller on sdhci-tegra.3 [sdhci-tegra.3] using ADMA 64-bit with 64 bit addr
[    1.318633] mmc1: SDHCI controller on sdhci-tegra.1 [sdhci-tegra.1] using ADMA 64-bit with 64 bit addr
[    1.322635] mmc2: SDHCI controller on sdhci-tegra.0 [sdhci-tegra.0] using ADMA 64-bit with 64 bit addr
[    1.358984] mmc2: host does not support reading read-only switch, assuming write-enable
[    1.362105] mmc2: new high speed SDXC card at address 59b4
[    1.366571] mmcblk2: mmc2:59b4 ED2S5 119 GiB
[    1.368790]  mmcblk2: p1 p2 p3
[    1.382391] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[    1.382770] mmcblk0: mmc0:0001 016G32 14.7 GiB
[    1.387019] mmcblk0boot0: mmc0:0001 016G32 partition 1 4.00 MiB
[    1.391319] mmcblk0boot1: mmc0:0001 016G32 partition 2 4.00 MiB
[    1.391413] mmcblk0rpmb: mmc0:0001 016G32 partition 3 4.00 MiB
[    1.393964]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22
[    1.463552] mmcblk mmc2:59b4: Card claimed for testing.
[    1.463561] mmcblk mmc0:0001: Card claimed for testing.
[    1.491827] Root device found: mmcblk0p1
[    1.493051] Found dev node: /dev/mmcblk0p1
[    1.554315] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    1.556009] Rootfs mounted over mmcblk0p1
[    1.566662] mmc1: hw tuning done ...
[    1.570234] mmc1: new ultra high speed SDR104 SDIO card at address 0001
[    1.902589] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[   12.367931] FAT-fs (mmcblk2p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   91.408426] mmc2: card 59b4 removed
[   93.015345] mmc2: host does not support reading read-only switch, assuming write-enable
[   93.160787] mmc2: Applying tuning correction
[   93.160801] mmc2: Tap value after applying correction 60
[   93.160818] mmc2: hw tuning done ...
[   93.160849] mmc2: new ultra high speed SDR104 SDXC card at address 59b4
[   93.161284] mmcblk2: mmc2:59b4 ED2S5 119 GiB
[   93.162512]  mmcblk2: p1 p2 p3```