Jetson Nano custom board. SDMMC3 how to run up uSD/eMMC

Hello,

I have custom design with Jetson Nano (SOM from devkit 945-13450-0000-100). This design has two variants, A - uSD card mount, B - eMMC (never mount both parts). OS is on uSD card in SOM.

SOM connection:
pin 130 - SD_CARD_DET
pin 219 - SDDATA0
pin 221 - SDDATA1
pin 223 - SDDATA2
pin 225 - SDDATA3
pin 227 - SDCMD
pin 229 - SDCLK
pin 91 - EMMC_RST#
pin 197 - SD_PWR_EN
Schematic:
A) uSD card circuit:


B) eMMC circuit:

These memory is for files, not for OS. I tried run up only uSD card and it doesn’t recognize in system.
I change device tree, for SDMMC3 now I have (:
sdhci@700b0400 {
default-drv-type = <1>;
cd-gpios = <64 0>;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
nvidia,cd-wakeup-capable;
nvidia,update-pinctrl-settings;
nvidia,pmc-wakeup = <&tegra_pmc PMC_WAKE_TYPE_GPIO 35 PMC_TRIGGER_TYPE_NONE>;
uhs-mask = <0xc>;
no-sdio;
no-mmc;
disable-wp;
status = “okay”;
}

I have few question about device tree and section sdhci@700b0400:

  1. what does the line mean: default-drv-type = <1>;? This line is set the priority where the system is search?
  2. cd-gpios = <64 0>; I assume that this is place to set pin card detect (pin 130 = PI.00 = 64. Is it correct?
  3. what is “nvidia,cd-wakeup-capable;”?
  4. Which type pin I must set in: “nvidia,pmc-wakeup = <&tegra_pmc PMC_WAKE_TYPE_GPIO 35 PMC_TRIGGER_TYPE_NONE>;”
  5. Where I can set SD_PWR_EN?
  6. Which difference will be in device tree when I want to use only eMMC circuit (schematic B, memory for files, not for OS).
  7. What is parameters: sd-uhs-sdr* ?

After your answer on above question I will modify device tree then show logs from kernel.

You can use sdmmc3 as search keyword on this forum first.

I read few topic but I didn’t find answer for all above question.

Because only cd-gpios and vmmc-supply are really something you need to configure… the rest of your questions are not.

And what do you mean “I have custom design with Jetson Nano (SOM from devkit 945-13450-0000-100).”?

The design guide document is for the emmc module. What kind of customization are you trying to ask here?

I have custom carrier board design with Jetson nano. In the first message is schematic for circuit contain memory. On first time, I want to focus on schematic contain uSD card assembly. When it will works I want to run eMMC circuit (of course uSD will not use).

Yes, I know it is your custom board. But the problem is what kind of module you are using here?

Does the module you are using now have a sdcard slot on it?

Yes, this Jetson has uSD card in SOM and I want to have OS on this card.

So you make another custom carrier board that has sdcard slot again? Now you have two sdcard slot, one on SOM while another one on carrier board?

Yes, this Jetson has uSD card in SOM and I want to have OS on this card.

What does that mean you want a OS on this card? This sounds nothing to do with sdmmc3.

I have one custom design where is possibility to assembly uSD card slot or eMMC card which are connected to sdmm3 interface (in fist message were schematics contain assembly circuits). We will not assembly uSD and eMMD together on one PCB. Our SOM has uSD slot where is card with OS (operating system - Linux).

Please check this post. Or any other sdmmc3 post on nano forum. This is a very common question here. Not new issue.

If you have any problem after modifying dts, share the dmesg, full dts (de-compiled from dtb).

As my previous comment said, the only thing you need to care about is vmmc-supply, cd-gpios and if your vmmc-supply is a always-on, you need to add the always on property in your sdhci.

I tried run up SD card following your previous message and others topics of the forum.
I modified;
sdhci@700b0400 {
cd-gpios = <&gpio TEGRA_GPIO(I, 0) 0>;
status = “okay”;
nvidia,cd-wakeup-capable;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
//uhs-mask=<0x10>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
// max-clk-limit = <400000>;
nvidia,voltage-switch-gpio = <&gpio TEGRA_GPIO(J, 4) 0>;
mmc-ocr-mask = <0x03>;
};
and I comment cd inverted in sdhci (I have opposite logic than devkit)
sdmmc3: sdhci@700b0400 {
tap-delay = <1>;
trim-delay = <3>;
mmc-ocr-mask = <0>;
max-clk-limit = <204000000>;
ddr-clk-limit = <48000000>;
bus-width = <4>;
calib-3v3-offsets = <0x007D>;
calib-1v8-offsets = <0x7B7B>;
compad-vref-3v3 = <0x7>;
compad-vref-1v8 = <0x7>;
pll_source = “pll_p”, “pll_c4_out2”;
resets = <&tegra_car TEGRA210_CLK_SDMMC3>;
reset-names = “sdhci”;
clocks = <&tegra_car TEGRA210_CLK_SDMMC3>,
<&tegra_car TEGRA210_CLK_PLL_P>,
<&tegra_car TEGRA210_CLK_PLL_C4_OUT2>,
<&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
clock-names = “sdmmc”, “pll_p”, “pll_c4_out2”, “sdmmc_legacy_tm”;
keep-power-in-suspend;
ignore-pm-notify;
non-removable;
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 = <106>;/
/nvidia,max-tap-delay = <185>;/
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>;
pinctrl-2 = <&sdmmc3_clk_schmitt_enable_state>;
pinctrl-3 = <&sdmmc3_clk_schmitt_disable_state>;
pinctrl-4 = <&sdmmc3_drv_code_1_8V>;
pinctrl-5 = <&sdmmc3_default_drv_code_3_3V>;
pinctrl-6 = <&sdmmc3_e_33V_enable>;
pinctrl-7 = <&sdmmc3_e_33V_disable>;
};
After added these modifications Linux don’t boot correctly. Can you check below logs from UART? Based on log I think that is problem with correct recognize card with system. Do I think right ? What I must change?

Logs from UART:
sd_card_enable_in_device_tree_log_with_place_sd_card.txt (86.2 KB)
sd_card_enable_in_device_tree_log_no_place_sd_card.txt (83.8 KB)
sd_card_disable_in_decive_tree.txt (86.3 KB)

Wait a second here. What kind of module you are using now? Is it a devkit module which also has a sdcard?

Besides the module, for the sdmmc3, actually you only need to care about vmmc-supply, cd-gpios and if you want to support hotplug, you need to remove non-removable.

The rest of dts should be same and you shouldn’t change it.

I have som from devkit 945-13450-0000-100. Carrier board is our custom design. I want to have two uSD card.
I was reading a moment ago post Jetson Nano Enable SDMMC3 for SD card - #7 by WayneWWW. Is it means that I did the same mistake like in above link.
Our custom design have possibility to use eMMC on the same port - SDMMC3 (please see first message, there is schematic with two assembly).
My target is use only eMMC, without SD card.

Which card is the boot device card that connected on your module?

The one with size =59.5GB?

Yes, you are right. This card is in SOM.

The problem is somehow the “mmc0” on your board now is occupied by the extra sdcard slot you added on your custom board.

Thus, when device tries to find file system over “mmcblk0p1”, it goes to that card to find and it fails.

I would suggest you can use a emmc module first…

Ok, I can skip develop SD card and I can start with eMMC card on SDMMC3 (I assume that main memory where is Linux will be in SOM). Is it correct when I use SDMMC4 configuration device tree for to SDMMC3 like below (I changed only bus width and hs400 to hs200)?
uhs-mask = <0x0>;
mmc-hs200-enhanced-strobe;
built-in;
power-off-rail;
status = “okay”;
bus-width = <4>;
non-removable;
/delete-property/ nvidia,enable-hs533-mode;
no-sdio;
no-sd;
pll_source = “pll_p”, “pll_c4_out2”;
max-clk-limit = <0xbebc200>;
Do I have to change something in tegra210-sdhci.dtsi?

Still sdmmc3: sdhci@700b0400.

And I already said before. The only thing you need to care about is vmmc-supply, cd-gpios and if you want to support hotplug, you need to remove non-removable.

You shouldn’t change the other things. Search sdmmc3 on this forum and you will find lots lots of topics regarding to this.