Slow SD Card

Hi Wayne,

Can you let me know which directory and file name I should be modifying?

Thank you,

You can locate the file by searching your dts file name first.

Hi Wayne,
The closest one I found is Downloads/Linux_for_Tegra/source/public/hardware/nvidia/soc/t210/kernel-dts/tegra210-soc/tegra210-soc-base-dtsi file, see attached screencapture. Is this the right one? If it is, Can you tell me if the following steps are correct?

  1. modify it and save it to tegra210-p3448-0002-p3449-0000-b0.dts from dtsi file
  2. DTC the file and save the dtb file in the sdk manager to flash it on the SOM.

No using the dtc anymore… I posted the kernel customization page in previous comments to let you follow the instructions to build dtb.

Also, not the “closest” file to search. You should just use the dtb name to search the dts name.

For example, if the dtb that is in use on your jetson nano is tegra210-p3448-0002-p3449-0000-b01.dtb, then you should use tegra210-p3448-0002-p3449-0000-b01.dts as a start point to trace the dts file.

Hi Wayne,
I found the dts file but it seem incorrect when I open it, see attached.
tegra210-p3448-0000-p3449-0000-b00.dts (3.4 KB)

This is not what you are using… didn’t you say you are using tegra210-p3448-0002-p3449-0000-b01.dts?

If you are new to dts structure, then you need to know the rules.

The “dts” file is the final file for your dtb. But it will include many other dtsi files.

For example, A.dts may include B.dtsi, and C.dtsi. B and C dtsi can also include more child dtsi.
A.dts may not have the sdmmc properties and they may be inside B.dtsi or even some other child dtsi. That is why you need to trace the code. Also, the parent dts can overwrite the properties from child dtsi. For example, I disable sdmmc in B.dtsi but enable it again in A.dts, then it will take the result from A.dts but not the child B.dtsi. Thus, the finalized dts will have a enabled sdmmc.

Hi Wayne,

Thank you for clarification and explanation. I have been modifying /nvidia/nvidia_sdk/JetPack_4.5.1_Linux_JETSON_NANO/Linux_for_Tegra/kernel/dtb/tegra210p3448-0002-p3449-0000-b00.dts. It gave syntax error when I dtc it, after added cd-gpios = <&gpio TEGRA_GPIO(Y, 2) 0>; for GPIO12 (always ground as card detect). I must be working from the wrong file, please help.

I noticed in the same file, it is dtc ok with cd-gpios = <0x5b 0xc9 0x00>; inside the sdhci@700b0000 {}.

Hi,

I already told you we are not using dtc to compile the dts now. The document is already posted in previous comment. Did you see it or not?

Sorry, I was just trying to answer your question here. [quote=“WayneWWW, post:49, topic:174992, full:true”]
This is not what you are using… didn’t you say you are using tegra210-p3448-0002-p3449-0000-b01.dts?
[/quote]

The syntax error is due to you are using the dtc to build the code but not the file itself.
dtc only knows the hex value but cannot know what is &gpio or TEGRA_GPIO.

Sorry, I am tracing back to the beginning of this conversation to add cd-gpios = <&gpio TEGRA_GPIO(Y, 2) 0> to dts file and rebuild the kernel. Currently, I needed to go back to JetPack 4.4.1 since I just found out the 4.5.1 does not work with our application.

I have rebuilt the DT from the link MicroSD card not detected on Jetson Nano production module - #14 by jetson_user. The target Nano did not detect SD card. Only after dtc to the dts file and remove max-clk linmit. Then I can then see SD card. But speed is very slow. I attached the dmesg and ios file to this, please help.
clock (9 Bytes)
dmesg no sd card.txt (127.9 KB)
ios (240 Bytes)
speed (2 Bytes)

I just want to know did you learn how to build dtb from dts source after 5/14? Not using the dtc tool.

I rebuilt them by:

  1. On a Linux host system, download the source file, public_source.tbz2.
  2. Un-tar source and the kernel.
  3. make change to the 3 files below:
    tegra210–p235-common.dtsi (changed status to okay, added sd uhs-sdr12 to 104).
    tegra210-prog-plugin-manager.dtsi (added vqmmc-supply line).
    tegra210-prog-p3448-common.dtsi (added four sd-uhs-sdr lines and max-clk-limit = 204MHz).
  4. make ARCHarm64 O=sd_card_kernel tegra_deconfig
  5. make ARCH=arm64 O=srcard_kernel -j4
  6. replace the image file on jetpack 4.4.1 with image file inside the sd_card_kernel folder
  7. replace the dtb folder on jetpack 4.4.1 with dts folder inside the sd_card_kernel folder
  8. rename the dts to dtb.
  9. flash the target with "sudo ./flash.sh -k DTB Jeson-nano-emmc mmcblk0p1.”

rename the dts to dtb.

What are you doing exactly? Why do you have to “rename a dts to dtb”?

You should use the “make” command to build the dtb but not rename anything from dts to dtb.

Also, you just replace the dtb you need but no need to copy the whole folder to your sd_card_kernel.

Sorry, I meant copied the dts folder to Jetpack folder and rename the dts folder to dtb folder.

Can you share your latest dts file here?

Sorry, the machine is at the office. I will send it tomorrow.

It is strange, without max-clk-limit, it detect sd card but very slow. With the max-clk-limit, it does not recognize Sd card. Noted the cd-gpios pin is connect to gpio 12. For Gpio8 pin is floating or pull high.

Thank you,