Many of the Carrier Boards for Jetson Nano /TX2 NX and Xavier NX Modules do not have native support for External Micro SD card. One such carrier board that we stock at Hubtronics can be found here. This carrier board has a Micro SD card slot on it but it doesn't work directly with default Jetpack SDK OS. The solution is to modify the device tree of the underlying kernel and introduce a new device node in the tree. If you want to know more about the Device Tree in Linux, refer to this tutorial

Below is a step by step procedure to Enable Micro SD card on Jetson Nano OS.


INSTALL SDK MANAGER IN UBUNTU 18.04 HOST PC


Resources and the guides of SDK Manager:https://developer.nvidia.com/nvidia-sdk-manager

Set the Jetson Nano enter recovery mode then connect it to the host PC. Flash an Jetson OS, do not check the SDK option.


Modify the DTB。

This option should be done in the Ubuntu PC

Install dtc tool
sudo apt-get install device-tree-compiler
decompile the dts file (please use the correct path according to the Jetpack4.6)
cd ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/dtb

dtc -I dtb -O dts -o tegra210-p3448-0002-p3449-0000-b00.dts tegra210-p3448-0002-p3449-0000-b00.dtb 


Modify the tegra210-p3448-0002-p3449-0000-b00.dts file, you should modify the codes as below which are marked in red.


  sdhci@700b0400 {
compatible = "nvidia,tegra210-sdhci";
reg = <0x0 0x700b0400 0x0 0x200>;
interrupts = <0x0 0x13 0x4>;
aux-device-name = "sdhci-tegra.2";
iommus = <0x30 0x1b>;
nvidia,runtime-pm-type = <0x0>;
clocks = <0x26 0x45 0x26 0xf3 0x26 0x136 0x26 0xc1>;
clock-names = "sdmmc", "pll_p", "pll_c4_out2", "sdmmc_legacy_tm";
resets = <0x26 0x45>;
reset-names = "sdhci";
status = "okay";
tap-delay = <0x3>;
trim-delay = <0x3>;
mmc-ocr-mask = <0x3>;
max-clk-limit = <0xc28cb00>;
ddr-clk-limit = <0x2dc6c00>;
bus-width = <0x4>;
calib-3v3-offsets = <0x7d>;
calib-1v8-offsets = <0x7b7b>;
compad-vref-3v3 = <0x7>;
compad-vref-1v8 = <0x7>;
pll_source = "pll_p", "pll_c4_out2";
ignore-pm-notify;
cap-mmc-highspeed;
cap-sd-highspeed;
nvidia,en-io-trim-volt;
nvidia,en-periodic-calib;
cd-inverted;
wp-inverted;
pwrdet-support;
nvidia,min-tap-delay = <0x6a>;
nvidia,max-tap-delay = <0xb9>;
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 = <0x8c>;
pinctrl-1 = <0x8d>;
pinctrl-2 = <0x8e>;
pinctrl-3 = <0x8f>;
pinctrl-4 = <0x90>;
pinctrl-5 = <0x91>;
pinctrl-6 = <0x92>;
pinctrl-7 = <0x93>;
vqmmc-supply = <0x3b>;
vmmc-supply = <0x4c>;
cd-gpios = <0x5b 0xc2 0x0>;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-ddr-1_8v;
no-mmc;
uhs-mask = <0xc>;
linux,phandle = <0xba>;
phandle = <0xba>;
Compile the dtb file

dtc -I dts -O dtb -o tegra210-p3448-0002-p3449-0000-b00.dtb tegra210-p3448-0002-p3449-0000-b00.dts

Flash the OS again with the following command:

cd ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra
sudo ./flash.sh jetson-nano-emmc mmcblk0p1        


Change the booting order to SD card(Optional), this operation is done in Jetson Nano
                sudo vi /boot/extlinux/extlinux.conf
find APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0
change mmclk0p1 to mmclk1p1, save and then reboot the OS.