TX2 NX platform: SD card on sdmmc3 is not work

please remove vqmmc-supply and force-non-removable-rescan;

The necessary properties that are validated by other customer.

sdhci@3440000 {
status = "okay";
mmc-ocr-mask = <3>;
uhs-mask = <0x8>;
disable-wp;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-ddr-1_8v;
mmc-hs200-1_8v;

vmmc-supply = <&correct to your supply regualtor>;


/delete-property/ non-removable;
/delete-property/ force-non-removable-rescan;

vmmc-supply <&correct to your supply regualtor>;
Supply regualtor value do correct ?
Is there any documentation, Thanks

sdhci@3440000 {
status = “okay”;
mmc-ocr-mask = <3>;
uhs-mask = <0x8>;
disable-wp;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-ddr-1_8v;
mmc-hs200-1_8v;

vmmc-supply = <&correct to your supply regualtor>;

/delete-property/ non-removable;
/delete-property/ force-non-removable-rescan;
};

but sd card donot work,kernel log:

[ 24.431921] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 24.432272] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 24.435910] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 24.436255] mmc1: CMD CRC or end bit error, int mask 0x40000
[ 24.436588] mmc1: CMD CRC or end bit error, int mask 0x40000
[ 24.436922] mmc1: CMD CRC or end bit error, int mask 0x40000
[ 24.437255] mmc1: CMD CRC or end bit error, int mask 0x40000

…I am not asking you to just type whatever I write here.

If your power supply is called en_sd_card regulator, then give vmmc-supply to en_sd_card.

And also stop sharing partial log. Please only share full dmesg from now on.

Dear WayneWWW:

but sd card donot work,dts:
sdhci@3440000 {
265 status = “okay”;
266 //cd-gpios = <&tegra_main_gpio TEGRA_MAIN_GPIO(C, 3) 0>;
267 mmc-ocr-mask = <3>;
268 uhs-mask = <0x8>;
269 disable-wp;
270 sd-uhs-sdr104;
271 sd-uhs-sdr50;
272 sd-uhs-sdr25;
273 sd-uhs-sdr12;
274 mmc-ddr-1_8v;
275 mmc-hs200-1_8v;
276
277 vmmc-supply = <&en_sd_card>;
278 //vmmc-supply = <&spmic_sd2>;
279
280 /delete-property/ non-removable;
281 /delete-property/ force-non-removable-rescan;
282 };
… …
594 en_sd_card:regulator@108 {
595 gpio = <&gpio_i2c_0_74 2 1>;
596 compatible = “regulator-fixed”;
597 reg = <108>;
598 regulator-name = “en_sd_card”;
599 regulator-min-microvolt = <3300000>;
600 regulator-max-microvolt = <3300000>;
601 enable-active-high;
602 regulator-always-on;
603 status = “okay”;
604 };

en_sd_card gpio correspond to design on SDCARD_CD_L.
kernel log donot mmc1 log.

tegra186-p3636-0001-p3509-0000-a01.dts (236.2 KB)
dmesg.txt (67.3 KB)

Thanks!

I try a test,i find tegra186-p3636-0001-a00-power-tree.dtsi.
platform/t18x/lanai/kernel-dts/common/tegra186-p3636-0001-a00-power-tree.dtsi flow as:
122 sdhci@3460000 {
123 vqmmc-supply = <&spmic_sd2>;
124 vmmc-supply = <&spmic_sd3>;
125 };
126
127 sdhci@3440000 {
128 vqmmc-supply = <&spmic_ldo5>;
129 vmmc-supply = <&spmic_sd2>;
130 };
131
132 sdhci@3420000 {
133 vqmmc-supply = <&spmic_sd2>;
134 vmmc-supply = <&spmic_sd3>;
135 };
136
137 sdhci@3400000 {
138 vqmmc-supply = <&spmic_ldo3>;
139 vmmc-supply = <&spmic_sd2>;
140 };

so I try vmmc-supply = <&spmic_sd2>,but sd card donot work.
tegra186-p3636-0001-p3509-0000-a01.dts (236.2 KB)
dmesgTest.txt (70.8 KB)

HI,

Do you write the en_sd_card for the VDD_3V3_SYS on your schematic? That what vmmc-supply is doing.

On my schematic the VDD_3V3_SYS is highed(3.3V)default.

en_sd_card only enable power supply chip,but en_sd_card donot power-supply sd card(/sd card chip).

My company of product is xavier nx,sd crad is ok(sd card hardw is same),but sd card

dts flow as:

 sdhci@3440000 {
      cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Y, 4) 0>;
      nvidia,cd-wakeup-capable;
      vmmc-supply = <&p3668_vdd_sdmmc1_sw>;
      vqmmc-supply = <&p3668_spmic_sd3>;   **//default,if  vqmmc-supply  delete,the sd card still do work.** 
      status = "okay";

};

     en_sd_card:regulator@108 {
         gpio = <&gpio_i2c_0_74 2 1>;
         compatible = "regulator-fixed";
       reg = <108>;
         regulator-name = "en_sd_card";
         regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        enable-active-high;
         regulator-always-on;
         status = "okay";
     };

Dear WayneWWW,

kernel sd card err log,
[ 24.995107] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 24.996328] mmc1: CMD CRC or end bit error, int mask 0x40000

kernel code (drivers/mmc/host/sdhci.c):
if (intmask & (SDHCI_INT_TIMEOUT | SDHCI_INT_CRC |
2770 SDHCI_INT_END_BIT | SDHCI_INT_INDEX)) {
2771 if (intmask & SDHCI_INT_TIMEOUT)
2772 host->cmd->error = -ETIMEDOUT;
2773 else {
2774 pr_err(“%s: CMD CRC or end bit error, int mask %#x\n”,
2775 mmc_hostname(host->mmc), (unsigned)intmask);
2776 host->cmd->error = -EILSEQ;
2777 }
2778
2779 /* Treat data command CRC error the same as data CRC error */
2780 if (host->cmd->data &&
2781 (intmask & (SDHCI_INT_CRC | SDHCI_INT_TIMEOUT)) ==
2782 SDHCI_INT_CRC) {
2783 host->cmd = NULL;
2784 *intmask_p |= SDHCI_INT_DATA_CRC;
2785 return;
2786 }
2787
2788 sdhci_finish_mrq(host, host->cmd->mrq);
2789 return;
2790 }

Can it be analyzed by log, Thanks!

Can you just give us the error log without any debug print added by you?

CRC error is probably from the hardware.

dmesgtmp.txt (72.4 KB)

Hardware do work,I try to xavier nx platform + this sd card party also do work,I think that CRC is probably from software config.

Hi @shaorui,

What is the device tree you are using on the NX platform? What is the vmmc-supply you gave on NX case? Also a 3.3V always-on regulator?

code is TX2 NX.My kernel R32.5.1.
I try a test, confirm hardware do work.

I know the issue is on TX2 NX. I just want to know how did you configure NX before? This part should be similar.

Yes.
My question is sd card on TX2 NX.

CRC error is the reason?project time is urgent,Thanks

I already sent you a private message. Please check.