TF card does not work properly after updating the JetPack version from Jetpack4.6 to JetPck5.0.2

Dear all:

  1. After update Jetpack to 5.0.2 and modify dtb to enable sd-card
hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-p3668-common.dtsi
-       sdhci_sd: sdhci@3400000 {
+       sdhci_sd: sdhci@3440000 {
                mmc-ocr-mask = <0x0>;
                cd-inverted;
-               cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 7) 0>;
+               cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;
                nvidia,cd-wakeup-capable;
                mmc-ocr-mask = <0>;
                cd-inverted;
@@ -365,7 +365,7 @@
                        output-high;
                        gpio-suspend;
                        suspend-output-low;
-                       gpios = <TEGRA194_AON_GPIO(CC, 1) GPIO_ACTIVE_HIGH>;
+                       gpios = <TEGRA194_AON_GPIO(CC, 1) GPIO_ACTIVE_LOW>;
                        label = "suspend-led-gpio";
                        status = "okay";
                };
hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc/tegra194-soc-sdhci.dtsi
        sdmmc3: sdhci@3440000 {
-               compatible = "nvidia,tegra194-sdhci", "nvidia,tegra186-sdhci";
+               compatible = "nvidia,tegra194-sdhci";
                reg = <0x0 0x3440000 0x0 0x00020000>;
                interrupts = < 0 TEGRA194_IRQ_SDMMC3 0x04>;
                iommus = <&smmu TEGRA_SID_SDMMC3A>;
@@ -154,7 +154,7 @@
                        <&bpmp_clks TEGRA194_CLK_SDMMC_LEGACY_TM>;
                clock-names = "sdmmc", "pll_p", "pll_c4_muxed", "sdmmc_legacy_tm", "tmclk";
                uhs-mask = <0x08>;
-               status = "disabled";
+               status = "okay";
         };
  1. sd card can work, but show follow message:
> dmesg:
[  436.076140] mmc1: Applying tuning correction
[  436.076163] mmc1: Tap value after applying correction 63
[  441.964667] mmc1: Applying tuning correction
[  441.964689] mmc1: Tap value after applying correction 62
[  479.389062] mmc1: Applying tuning correction
[  479.389084] mmc1: Tap value after applying correction 63
  • Full dmesg information is below
    dmesg.log (102.8 KB)
  1. in Jetpack 4.6 Without these hints, sdcard work normal.

So, do I still need to adjust devicetree of sdhci@3440000?

hello 848145724,

tuning in SDHCI is hardware based, below logs show tuning was ran and auto-correction was applied.
then, the board is tuned as SDR104 mode… is it expected?

[    8.222520] mmc1: Applying tuning correction
[    8.246402] mmc1: Tap value after applying correction 63
[    8.264645] mmc1: new ultra high speed SDR104 SDXC card at address aaaa

Yes, SDR104 is expected.

  • So , I want comment out the printed information about tuning for stoping tunning information scrolling in dmesg log.
  • This way should be no problem ?

hello 848145724,

the value should applied, could you please also check whether tuning is complete or not.

How to check tuning is comp;ete or not ? add print information in source code?

add information in source code


dmesg print following information

So , in software tunning is completed.

hello 848145724,

ya, you may check from kernel sources to understand the behavior.
since it’s a debug flag, pr_debug.

static void tegra_sdhci_post_tuning(struct sdhci_host *host)
{
...
        tegra_host->tuning_status = TUNING_STATUS_DONE;

        pr_debug("%s: hw tuning done ...\n", mmc_hostname(host->mmc));
        tegra_sdhci_dump_vendor_regs(host);

you may enable dynamic debug flag from system layer.
for example,

# cd /sys/kernel/debug/dynamic_debug/
# echo file sdhci-tegra.c +p > control

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