Jetson Nano SDMMC3 enable

Hi i try to turn on SDMMC3 controller on my Jetson Nano borad

so i modified kernel-dts/tegra210-porg-p3448-common.dtsi
change status to okay


sdhci@700b0400 {
                status = "okay";
                /delete-property/ keep-power-in-suspend;
                /delete-property/ non-removable;
                mmc-ddr-1_8v;
                mmc-ocr-mask = <3>;
                uhs-mask = <0x0>;
                tap-delay = <3>;
        };

then i build dts

make ARCH=arm64 O=$TEGRA_KERNEL_OUT dtbs

copy dtb files into my jetson to /boot and one tegra210-p3448-0000-p3449-0000-b00.dtb into /boot/dtb

after this i already flash it to partition 10

dd if=/boot/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb of=/dev/disk/by-partlabel/DTB

after reboot i can see in

cat /proc/device-tree/spi@7000d400/status 
okay

but dmesg tells me

dmesg | grep sdhc
[    0.529030] iommu: Adding device sdhci-tegra.0 to group 32
[    0.529094] platform sdhci-tegra.0: domain=ffffffc0f9566e58 allocates as[0]=ffffffc0f9428520
[    3.752935] sdhci: Secure Digital Host Controller Interface driver
[    3.752936] sdhci: Copyright(c) Pierre Ossman
[    3.752937] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.753429] sdhci-tegra sdhci-tegra.0: Got CD GPIO
[    3.753787] sdhci-tegra sdhci-tegra.0: Client registration for eMC Successful
[    3.753908] sdhci-tegra sdhci-tegra.0: wakeup init done, cdirq 300
[    3.802872] mmc0: SDHCI controller on sdhci-tegra.0 [sdhci-tegra.0] using ADMA 64-bit with 64 bit addr

and there are no other SDHCI controller like sdhci-tegra.2 which will be SDMMC3

so can anybody help me ?

image

Could you read your own comment again and see what you just checked?

I checked if DTB / device tree file was read properly if kernel know about it

Could you really check the node path you are checking carefully???

oh i can see difference sorry , my big fault

and if i tried correctly

cat  /proc/device-tree/sdhci@700b0400/status 
disabled

so where is the problem how can i check that DTB file read correctly ?

You can just copy your device tree to your host PC Linux_for_Tegra/kernel/dtb and reflash the board… it will take effect.

How can i reflash board?
i only download SD card image (Jetpack 4.6) like i can read on web
then i download right kernel source and build it and make changes on DTS files and rebuild it and then copy do the device via ssh and on device dd it to partition DTB

i didnt flash anything

just to clarify.

So you just bought a board from a vendor and that vendor told you to enable the sdcard by this method?

Do you want to learn the completed method to use a jetson nano? or you just want to enable the sdcard slot? (if your board got software corruption one day, you would still need to learn how to flash a board)

This is a very long story to explain and actually that sdcard image does not do any work for your board at all either…

We develop own board (at first time) , which use SDIO3 for wifi card
so i build kernel (with default config) , with proper wifi driver (modules Laird ) , change kernel on device (it works)
but SDHC controller is still off ,
Ok so now i will read how to flash my dtb changes into device

Hi,

Ok, it will be easier to explain if you are the one who made your own board. But actually it is a little bit too early for you to make your own board when you never ever flash the board before…

  1. there are 2 kinds of Jetson Nano module in the market. Sdcard module and eMMC module. The first one has sdcard slot on the module but no eMMC storage. The 2nd one is vice versa.

  2. sdcard module is only for NV developer kit to use. This thing shall not be used for production. (You won’t use it for production either due to reality limitation).

  3. sdcard image is only for this sdcard module to use. It won’t use for eMMC module.

  4. Sdcard Image does not really reflash the board because there are some bootloader software running on Jetson which is stored inside the module so replacing sdcard image won’t update them directly.

  5. Both sdcard module and eMMC module can be totally reflashed by using sdkmanager or manual flash from another ubuntu 18.04 x86 host PC.

document link:
sdkmanager: SDK Manager | NVIDIA Developer

manual flash: https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3273/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/quick_start.html#

These things are complicated but essential knowledge for jetson nano development.

thank you

i has development module

Thank you so i download sdk manager in docker beacuse i has newer ubuntu.
Thank u so much

OK i am smart now :D

i had download complete sdk and flash jetson nano from it . it was sucessfull !!! everything works GUI etc

and the i decompile dtb file

cd Linux_for_Tegra/kernel/dtb/
dtc -I dtb -O dts -o extracted.dts tegra210-p3448-0000-p3449-0000-b00.dtb

change

sdhci@700b0400 {
         status="okay"

then rebuild it

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

and flash DTB partion

sudo ./flash.sh -k DTB jetson-nano-devkit  mmcblk0p1

flash ends with no error
Linux boot but only on bash cmdline no GUI , only few commnads available.

in dmesg i can see SDMMC3 was enabled but system is not usable

if i try flash DTB agail vidth original DTB it works again but without SDMMC3

You could share the log from UART serial console first…

my uart debug log with edited and flashed DTB is here

jetson_2024-05-06_17-20-39-edited-dtb.log (30.2 KB)

here is uart log with DTB where is sdhci@700b0400 is disabled

in this boot jetson succesufully start into GUI

jetson_2024-05-06_17-32-22-original-dtb.log (30.9 KB)

i only change status from ‘okay’ to ‘disabled’ and back and flash DTB partition after it , nothing else

Could you remove the “quiet” in your /boot/extlinux/extlinux.conf and dump the log again?

With “quiet” there, most of kernel log is disabled in UART console.

1 Like

Ok here is log with sdhci3 enabled and no quiet

jetson_2024-05-06_19-22-46-sdhc-enabled-noquiet.log (86.9 KB)

it looks like shdc2 is marked as mmc0 and shdc0 (sdcard) is marked mmc1 so kernel cant found sd card as root filesystem

[    4.214787] mmc0: SDHCI controller on sdhci-tegra.2 [sdhci-tegra.2] using ADMA 64-bit with 64 bit addr
[    4.226997] mmc1: SDHCI controller on sdhci-tegra.0 [sdhci-tegra.0] using ADMA 64-bit with 64 bit addr

sd card is now mmc1

[    5.209374] mmc1: hw tuning done ...
[    5.213034] mmc1: new ultra high speed SDR104 SDXC card at address aaaa
[    5.220064] mmcblk1: mmc1:aaaa SD64G 59.5 GiB 
[    5.229744]  mmcblk1: p1

so it ends with

[   25.983483] ERROR: mmcblk0p1 not found

so how can i force naming of mmc controller ?

sdhci-tegra.2 → mmc1
sdhci-tegra.0 → mmc0

This post will tell you how to force naming.

sry it doesnt work

i added to DTS into section aliases


compile DTB and flash DTB partition
aliases for mmc0 and mmc1
but sdcard is still mmc1

[    4.228907] mmc1: hw tuning done ...
[    4.228938] mmc1: new ultra high speed SDR104 SDXC card at address aaaa
[    4.229268] mmcblk1: mmc1:aaaa SD64G 59.5 GiB 
[    4.233909]  mmcblk1: p1


and boot ends with

[   24.445152] ERROR: mmcblk0p1 not found