[r36.3] Jetson AGX Orin Devkit SD Card r/w low bandwidth

Hi NVIDIA,

目前使用AGX Orin devkit Jetpack 6版本

測試 SD 卡讀寫速率大約都只有20 MB/s左右

先前在Jetpack 5 測試讀寫大約 89 / 59 MB/s

使用的SD Card : Transcend 128G(TS128GUSD460T)

這部分可以再麻煩協助釐清嗎?

Thanks.

Have you set the maximum performance on the system?

Hi @kayccc ,

調整成效能模式目前測試結果還是一樣

That seems to be an issue at R36.3 release, we’re doing the investigating now.

Please apply this patch to 36.3 kernel.

From e395d23e8b6d9696f3f4a14d8dcd65bbc81951c8 Mon Sep 17 00:00:00 2001
Date: Tue, 25 Jun 2024 13:13:43 +0800
Subject: [PATCH] mmc: host: Remove prod framework changes

Fixed specific vendor/brand sd can't
switch to ultra high speed

---
 .../drivers/mmc/host/sdhci-tegra.c            | 42 -------------------
 .../kernel-jammy-src/include/linux/mmc/host.h |  1 -
 2 files changed, 43 deletions(-)

diff --git a/kernel/kernel-jammy-src/drivers/mmc/host/sdhci-tegra.c b/kernel/kernel-jammy-src/drivers/mmc/host/sdhci-tegra.c
index 928ce47f9..01eec6ce1 100644
--- a/kernel/kernel-jammy-src/drivers/mmc/host/sdhci-tegra.c
+++ b/kernel/kernel-jammy-src/drivers/mmc/host/sdhci-tegra.c
@@ -27,7 +27,6 @@
 #include <linux/ktime.h>
 #include <linux/iommu.h>
 #include <linux/bitops.h>
-#include <linux/tegra_prod.h>
 
 #include <soc/tegra/common.h>
 
@@ -136,20 +135,6 @@
 					 SDHCI_TRNS_BLK_CNT_EN | \
 					 SDHCI_TRNS_DMA)
 
-static char prod_device_states[MMC_TIMING_COUNTER][20] = {
-	"prod_c_ds", /* MMC_TIMING_LEGACY */
-	"prod_c_hs", /* MMC_TIMING_MMC_HS */
-	"prod_c_hs", /* MMC_TIMING_SD_HS */
-	"prod_c_sdr12", /* MMC_TIMING_UHS_SDR12 */
-	"prod_c_sdr25", /* MMC_TIMING_UHS_SDR25 */
-	"prod_c_sdr50", /* MMC_TIMING_UHS_SDR50 */
-	"prod_c_sdr104", /* MMC_TIMING_UHS_SDR104 */
-	"prod_c_ddr52", /* MMC_TIMING_UHS_DDR50 */
-	"prod_c_ddr52", /* MMC_TIMING_MMC_DDR52 */
-	"prod_c_hs200", /* MMC_TIMING_MMC_HS200 */
-	"prod_c_hs400", /* MMC_TIMING_MMC_HS400 */
-};
-
 struct sdhci_tegra_soc_data {
 	const struct sdhci_pltfm_data *pdata;
 	u64 dma_mask;
@@ -199,7 +184,6 @@ struct sdhci_tegra {
 	bool enable_hwcq;
 	unsigned long curr_clk_rate;
 	u8 tuned_tap_delay;
-	struct tegra_prod *prods;
 	u32 streamid;
 
 };
@@ -401,19 +385,12 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask)
 	struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host);
 	const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
 	u32 misc_ctrl, clk_ctrl, pad_ctrl;
-	int err;
 
 	sdhci_and_cqhci_reset(host, mask);
 
 	if (!(mask & SDHCI_RESET_ALL))
 		return;
 
-		err = tegra_prod_set_by_name(&host->ioaddr, "prod",
-			tegra_host->prods);
-		if (err)
-			dev_err(mmc_dev(host->mmc),
-				"Failed to set prod-reset settings %d\n", err);
-
 	tegra_sdhci_set_tap(host, tegra_host->default_tap);
 
 	misc_ctrl = sdhci_readl(host, SDHCI_TEGRA_VENDOR_MISC_CTRL);
@@ -1053,10 +1030,8 @@ static void tegra_sdhci_set_uhs_signaling(struct sdhci_host *host,
 	bool set_default_tap = false;
 	bool set_dqs_trim = false;
 	bool do_hs400_dll_cal = false;
-	bool set_padpipe_clk_override = false;
 	u8 iter = TRIES_256;
 	u32 val;
-	int ret;
 
 	tegra_host->ddr_signaling = false;
 	switch (timing) {
@@ -1103,17 +1078,6 @@ static void tegra_sdhci_set_uhs_signaling(struct sdhci_host *host,
 	else
 		tegra_sdhci_set_tap(host, tegra_host->default_tap);
 
-	/*set padpipe_clk_override*/
-	if (set_padpipe_clk_override) {
-		ret = tegra_prod_set_by_name_partially(&host->ioaddr,
-				prod_device_states[timing], tegra_host->prods,
-				0, SDHCI_TEGRA_VENDOR_CLOCK_CTRL,
-				SDHCI_CLOCK_CTRL_PADPIPE_CLKEN_OVERRIDE);
-		if (ret < 0)
-			dev_err(mmc_dev(host->mmc),
-				"Failed to set padpipe clk override value for timing %d, %d\n",
-				timing, ret);
-	}
 	if (set_dqs_trim)
 		tegra_sdhci_set_dqs_trim(host, tegra_host->dqs_trim);
 
@@ -1184,12 +1148,6 @@ static int sdhci_tegra_start_signal_voltage_switch(struct mmc_host *mmc,
 static int tegra_sdhci_init_pinctrl_info(struct device *dev,
 					 struct sdhci_tegra *tegra_host)
 {
-	tegra_host->prods = devm_tegra_prod_get(dev);
-	if (IS_ERR_OR_NULL(tegra_host->prods)) {
-		dev_err(dev, "Prod-setting not available\n");
-		tegra_host->prods = NULL;
-	}
-
 	tegra_host->pinctrl_sdmmc = devm_pinctrl_get(dev);
 	if (IS_ERR(tegra_host->pinctrl_sdmmc)) {
 		dev_dbg(dev, "No pinctrl info, err: %ld\n",
diff --git a/kernel/kernel-jammy-src/include/linux/mmc/host.h b/kernel/kernel-jammy-src/include/linux/mmc/host.h
index 867aa18e9..a4ec7269b 100644
--- a/kernel/kernel-jammy-src/include/linux/mmc/host.h
+++ b/kernel/kernel-jammy-src/include/linux/mmc/host.h
@@ -63,7 +63,6 @@ struct mmc_ios {
 #define MMC_TIMING_MMC_HS400	10
 #define MMC_TIMING_SD_EXP	11
 #define MMC_TIMING_SD_EXP_1_2V	12
-#define MMC_TIMING_COUNTER	11
 
 	unsigned char	signal_voltage;		/* signalling voltage (1.8V or 3.3V) */
 
-- 
2.25.1
1 Like

Hi WayneWWW,

上完patch, sd card 讀寫速率已恢復正常

Thanks.

1 Like