Hi,
I am using a Jetson Nano production module with R32.2 kernel source code (as there are some custom drivers implemented) built on the host machine.
The problem is it takes a long time (sometimes 2 minutes 45 seconds +) to boot, when SD card is inserted. The kernel public source did not seem to have the correct SD card support implementation for Nano production modules, and following advice from here: https://devtalk.nvidia.com/default/topic/1062120/jetson-nano/microsd-card-not-detected-on-jetson-nano-production-module/post/5394938/#5394938, the kernel was patched for the required feature.
Since the kernel code was modified owing to an additional driver I am using, I had to change the patch (from the one provided in the forum, as mentioned above) slightly. Please find it below.
diff --git a/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi b/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi
--- a/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi 2019-09-18 13:21:25.000000000 +0200
+++ b/hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-p2530-common.dtsi 2019-09-18 13:26:22.723470000 +0200
@@ -131,7 +131,7 @@
uhs-mask = <0x1c>;
power-off-rail;
nvidia,update-pinctrl-settings;
- status = "disabled";
+ status = "okay";
};
sdhci@700b0200 {
diff --git a/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi b/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi
--- a/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi 2019-09-18 13:21:25.000000000 +0200
+++ b/hardware/nvidia/platform/t210/porg/kernel-dts/porg-plugin-manager/tegra210-porg-plugin-manager.dtsi 2019-09-18 13:28:08.251948000 +0200
@@ -313,7 +313,8 @@
override@1 {
target = <&sdhci2>;
_overlay_ {
- vmmc-supply = <&max77620_ldo6>;
+ status = "okay";
+ vqmmc-supply = <&max77620_ldo6>;
no-sdio;
no-mmc;
sd-uhs-sdr104;
diff --git a/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi b/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi
--- a/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi 2019-09-18 13:21:25.000000000 +0200
+++ b/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-porg-p3448-common.dtsi 2019-09-18 13:30:00.344454000 +0200
@@ -250,9 +250,14 @@
};
sdhci@700b0400 {
- status = "disabled";
+ status = "okay";
/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>;
+ tap-delay = <3>;
};
sdhci@700b0200 { /* SDMMC2 for Wifi */
I did not yet implement auto-mount-sd-card-on-startup by changing fstab. I plan to have a script (do not have it yet) which before running my startup application would mount the /dev/mmcblkp1 (sd card partition) at $HOME/sd_card
location. But at the moment I do this manually. It seems the sd card mounting works, but the device takes a long time to boot when the sd card is kept inserted. Here’s the output of systemd-analyze time
:
Startup finished in 11.261s (kernel) + 2.454s (userspace) = 13.715s
multi-user.target reached after 2.423s in userspace
The reboot command is however faster, with booting taking place in 30 seconds! Similar to the case when no SD card is inserted, and irrespective of whether the SD card patch is applied or not.
Could someone shed some light on what might be happening here?
P.S. I still boot from the internal flash memory and plan to use the SD card to store data which my startup application generates on specific conditions.