Hi,
I’m having troubles setting up an SD card connection over SDMMC3.
In the OS I can spot the SD card (it shows up under /dev/mmcblk1) and I can inspect basic things like size and the name of the SD card, but I cannot mount (it gives an I/O error). Also when trying to format using fdisk, it disappears again.
Our hardware setup can be seen below.
We’ve done some changes to the device tree (looking at threads like MicroSD card not detected on Jetson Nano production module), these can be seen below. Also tried with nvidia,function=“sdmmc3” in the pinmux file, to no avail.
diff --git a/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts b/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
index f44fa10..084d718 100644
--- a/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
+++ b/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
@@ -900,8 +900,8 @@
gpio-controller;
#gpio-cells = <2>;
reg = <0x77>;
- interrupt-parent = <&gpio>;
- interrupts = <TEGRA_GPIO(Z, 2) 0x0>;
+ //interrupt-parent = <&gpio>; //remove
+ //interrupts = <TEGRA_GPIO(Z, 2) 0x0>; //remove GPIO Z2 is used for SD card detection
#interrupt-cells = <2>;
interrupt-controller;
vcc-supply = <&battery_reg>;
diff --git a/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-b00.dtsi b/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-b00.dtsi
index 4fe15ed..92345ea 100644
--- a/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-b00.dtsi
+++ b/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0002-b00.dtsi
@@ -354,7 +354,7 @@
pz2 {
nvidia,pins = "pz2";
- nvidia,function = "sdmmc3";
+ nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
diff --git a/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi b/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
index c7c26d3..2d2e5cc 100644
--- a/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
+++ b/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pwm-fan.dtsi
@@ -26,7 +26,7 @@
step_time = <100>; /* mesecs */
state_cap = <7>;
active_pwm_max = <255>;
- tach_gpio = <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PZ2 */
+ //tach_gpio = <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PZ2 */ //remove
pwm_gpio = <&gpio TEGRA_GPIO(E, 7) GPIO_ACTIVE_LOW>; /* TEGRA_GPIO_PE7 */
pwm_polarity = <PWM_POLARITY_NORMAL>;
suspend_state = <0>;
diff --git a/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi b/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
index 2dc032f..f9c19af 100644
--- a/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
+++ b/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
@@ -183,6 +183,7 @@
_overlay_ {
keep-power-in-suspend;
non-removable;
+ status="okay"; //add
};
};
};
@@ -215,6 +216,7 @@
override@1 {
target = <&sdhci2>;
_overlay_ {
+ status="okay"; //add
vqmmc-supply = <&max77620_ldo6>;
no-sdio;
no-mmc;
diff --git a/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts b/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
index 30ccb03..248c276 100644
--- a/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
+++ b/platform/t210/porg/kernel-dts/tegra210-p3448-0002-p3449-0000-b00.dts
@@ -38,6 +38,10 @@
status = "disabled";
};
+ sdhci@700b0400 { /* SDMMC3 for SD card */ //added for sd card on JN30(fd)
+ status = "okay";
+ };
+
spi@70410000 { /* QSPI */
status = "disabled";
};
diff --git a/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi b/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
index bf4875b..70239ef 100644
--- a/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
+++ b/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
@@ -278,13 +278,14 @@
max-clk-limit = <0xbebc200>;
};
- sdhci@700b0400 {
- status = "disabled";
+ sdhci@700b0400 { /* SDMMC3 for SD card on NANO */
+ status = "okay"; //change
/delete-property/ keep-power-in-suspend;
/delete-property/ non-removable;
mmc-ddr-1_8v;
mmc-ocr-mask = <3>;
uhs-mask = <0x0>;
+ //max-clk-limit = <400000>; //remove it for all SD card to work with full speed
tap-delay = <3>;
};
diff --git a/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi b/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
index c65c30e..1eacc7f 100644
--- a/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
+++ b/soc/t210/kernel-dts/tegra210-soc/tegra210-sdhci.dtsi
@@ -65,6 +65,7 @@
};
sdmmc3: sdhci@700b0400 {
+ status="okay"; //add
tap-delay = <1>;
trim-delay = <3>;
mmc-ocr-mask = <0>;
@@ -75,6 +76,7 @@
calib-1v8-offsets = <0x7B7B>;
compad-vref-3v3 = <0x7>;
compad-vref-1v8 = <0x7>;
+ cd-gpios = <&gpio TEGRA_GPIO(Z, 2) 0>; //add
pll_source = "pll_p", "pll_c4_out2";
resets = <&tegra_car TEGRA210_CLK_SDMMC3>;
reset-names = "sdhci";
@@ -93,8 +95,8 @@
cd-inverted;
wp-inverted;
pwrdet-support;
- nvidia,min-tap-delay = <106>;
- nvidia,max-tap-delay = <185>;
+ //nvidia,min-tap-delay = <106>; //removed for all SD cards to work
+ //nvidia,max-tap-delay = <185>; //removed for all SD cards to work
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 = <&sdmmc3_schmitt_enable_state>;
pinctrl-1 = <&sdmmc3_schmitt_disable_state>;
diff --git a/soc/t210/kernel-dts/tegra210b01-soc/tegra210b01-soc-common-platform.dtsi b/soc/t210/kernel-dts/tegra210b01-soc/tegra210b01-soc-common-platform.dtsi
index e6da401..fe767f0 100644
--- a/soc/t210/kernel-dts/tegra210b01-soc/tegra210b01-soc-common-platform.dtsi
+++ b/soc/t210/kernel-dts/tegra210b01-soc/tegra210b01-soc-common-platform.dtsi
@@ -501,8 +501,8 @@
sdhci@700b0400 {
tap-delay = <11>;
trim-delay = <18>;
- nvidia,min-tap-delay = <91>;
- nvidia,max-tap-delay = <149>;
+ //nvidia,min-tap-delay = <91>; //removed for all SD cards to work
+ //nvidia,max-tap-delay = <149>; //removed for all SD cards to work
status = "disabled";
};
I’ve also attached the dmesg output during startup + while attempting to mount.
dmesg.log (88.1 KB)