Flash external emmc error

Hi,
I‘ve been working on flash our custom board using Xavier NX. And we use initrd flash to flash the internal and external emmc on our board.
But I get a problem in flash the external emmc, it seems it can not recongnize the right external emmc(emmc1). The flash host log and board uart log is attached below.
host flash log - 副本.txt (186.5 KB)
seriallog - 副本.log (46.7 KB)

I noticed that in flash flow, when board boot up, it shows mmc2 on 3440000. But we only have one external emmc. And using initrd flash we assign the external device is mmcblk1 not mmcblk2. And in we used the sdmmc3 pin to external emmc which is 3440000.

And when using flash.sh to flash the board, there is no mmc2 existing, I wonder how to fix this. Thank you for help!

[    5.878359] sdhci-tegra 3400000.sdhci: Got CD GPIO
[    5.878593] sdhci-tegra 3400000.sdhci: BWMGR client registration for eMC Successful
[    5.878848] irq: IRQ258: trimming hierarchy from :pmc@c360000
[    5.879790] sdhci-tegra 3460000.sdhci: BWMGR client registration for eMC Successful
[    5.880478] sdhci-tegra 3440000.sdhci: BWMGR client registration for eMC Successful
[    5.882991] tegra194-isp5 13e10000.host1x:isp@14800000: initialized
[    5.890397] irq: IRQ259: trimming hierarchy from :interrupt-controller@3881000
[    5.891183] sdhci-tegra 3400000.sdhci: wakeup init done, cdirq 259
[    5.893093] tegra194-vi5 15c10000.vi: initialized
[    5.902321] mmc0: CQHCI version 5.10
[    5.906664] tegradc 15200000.display: disp0 connected to head0->sor1
[    5.912583] generic_infoframe_type: 0x87
[    5.913534] nvethernet 2490000.ethernet: Adding to iommu group 28
[    5.916162] tegradc 15200000.display: DT parsed successfully
[    5.922851] nvethernet 2490000.ethernet: failed to read skip mac reset flag, default 0
[    5.928090] tegradc 15200000.display: Display dc.(____ptrval____) registered with id=0
[    5.934786] mmc0: SDHCI controller on 3460000.sdhci [3460000.sdhci] using ADMA 64-bit
[    5.935976] nvethernet 2490000.ethernet: failed to read MDIO address
[    5.945470] tegra_nvdisp_bandwidth_register_max_config: max config iso bw = 15681600 KB/s
[    5.948963] mmc2: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit
[    5.951844] nvethernet 2490000.ethernet: setting to default DMA bit mask
[    5.951850] nvethernet 2490000.ethernet: set default TXQ to TC mapping
[    5.951854] nvethernet 2490000.ethernet: Setting default PTP RX queue
[    5.951873] nvethernet 2490000.ethernet: Failed to read DMA Tx ring size, using default [1024]
[    5.958114] tegra_nvdisp_bandwidth_register_max_config: max config EMC floor = 933000000 Hz
[    5.966646] nvethernet 2490000.ethernet: Failed to read DMA Rx ring size, using default [1024]
[    5.966671] nvethernet 2490000.ethernet: missing nvidia,pad_auto_cal_pu_offset, setting default 0
[    5.970902] mmc1: SDHCI controller on 3400000.sdhci [3400000.sdhci] using ADMA 64-bit
[    5.974230] tegra_nvdisp_bandwidth_register_max_config: max config hubclk = 300000000 Hz
[    5.981066] nvethernet 2490000.ethernet: missing nvidia,pad_auto_cal_pd_offset, setting default 0
[    5.989005] nvethernet 2490000.ethernet: failed to get eqos_rx_m clk
[    5.994261] tegradc 15200000.display: vblank syncpt # 11 for dc 0
[    6.002163] nvethernet 2490000.ethernet: failed to get eqos_rx_input clk
[    6.002173] nvethernet 2490000.ethernet: failed to get eqos_tx_divider clk
[    6.010384] tegradc 15200000.display: vpulse3 syncpt # 12 for dc 0
[    6.020303] nvethernet 2490000.ethernet: Ethernet MAC address: 48:b0:2d:87:b6:40
[    6.028927] tegradc 15200000.display: hdmi: invalid prod list prod_list_hdmi_board
[    6.041516] mmc2: new HS200 MMC card at address 0001
[    6.041969] mmcblk2: mmc2:0001 IS128G 116 GiB
[    6.042199] mmcblk2boot0: mmc2:0001 IS128G partition 1 4.00 MiB
[    6.042373] mmcblk2boot1: mmc2:0001 IS128G partition 2 4.00 MiB
[    6.042540] mmcblk2rpmb: mmc2:0001 IS128G partition 3 4.00 MiB, chardev (510:0)
[    6.043633] tegradc 15200000.display: hdmi: tegra_hdmi_tmds_range_read(bd) failed
[    6.050275] tegradc 15200000.display: probed
[    6.057970] mmc0: Command Queue Engine enabled
[    6.057975] mmc0: periodic cache flush enabled
[    6.057988] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[    6.058450] mmcblk0: mmc0:0001 DG4016 14.7 GiB
[    6.058612] mmcblk0boot0: mmc0:0001 DG4016 partition 1 4.00 MiB
[    6.058770] mmcblk0boot1: mmc0:0001 DG4016 partition 2 4.00 MiB
[    6.058903] mmcblk0rpmb: mmc0:0001 DG4016 partition 3 4.00 MiB, chardev (510:1)

flash.sh cannot flash anything other than mmcblk0p1.

If you want to flash a external emmc, try to use initrdflash. Before flash, you have to make sure your mmc1 is able to show up when kernel boots up.

I use the initrdflash to flash, but the mmc2 show up on 3440000 rather than mmc1, but in our initrdflash we assign the external device as mmcblk1, so the initrd flash failed.

  1. 請問你的device tree是不是改壞了. 正常狀況下3400000跟3460000不會同時enabled.

  2. 那你就用mmcblk2就好…

device tree只是enabled了3440000这个node,而且用flash.sh烧录后mmc1还是正常挂在3440000上的,也没有mmc2出现,不知道为什么一使用initrd flash后boot就会出现,是因为板卡是第一次烧录的原因吗。之前用烧录过系统的板卡再用initrd flash烧录都是可以正常完成的

Hi,

你的device tree在燒錄的時候跟開機的時候沒有跑一致吧…

又经过多次烧录,发现有时候就是正常的,有时候又是出现这个mmc2导致initrd flash失败,这个可能和硬件设计相关吗

你可以確認一下你的有時候正常跟有時候失敗的狀況的log有何不同嗎?

或是直接附兩份log上來讓我們確認

失败的log就是上面上传的两份
这里是烧录成功的host log和板卡uart log
flash_1-4_0_20240112-141922.log (47.8 KB)
seriallog - success.log (82.4 KB)

我先請問你一個問題 你這塊到底是xavier NX sdcard module還是emmc module?

emmc module

請問你有把cvm eeprom裡面的內容改掉過嗎?

現在這個問題還是跟我前面說的一樣, 照理來說3400000跟3460000不會同時被開起來.

如果是sdcard module, 就會是3460000開著, 如果是emmc module, 就會是 3400000開著

這個的code是由tegra194-p3668-p3509-overlay.dts 處理.
你這部份沒有照我們預期的跑導致多出一個額外的controller跑去跟你的3440000搶 mmc1的位子.

拿到的模组都是供应商直接提供的全新模组,没有对cvm eeprom有什么改动,这是现在读取的eeprom的内容

nvidia@nvidia:~$ sudo i2cdump -y 0 0x50
[sudo] password for nvidia:
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 01 00 fc 00 54 0e 01 00 03 47 00 00 00 00 00 00    ?.?.T??.?G......
10: 00 00 00 00 36 39 39 2d 31 33 36 36 38 2d 30 30    ....699-13668-00
20: 30 31 2d 33 30 31 20 47 2e 30 00 00 00 00 00 00    01-301 G.0......
30: 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
40: ff ff ff ff 41 b6 87 2d b0 48 31 34 32 32 35 32    ....A??-?H142252
50: 32 30 33 39 35 30 37 00 00 00 00 00 00 00 00 00    2039507.........
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
90: 00 00 00 00 00 00 4e 56 43 42 1c 00 4d 31 00 00    ......NVCB?.M1..
a0: ff ff ff ff ff ff ff ff ff ff ff ff 41 b6 87 2d    ............A??-
b0: b0 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ?H..............
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3e    ...............>

喔抱歉, 我這邊搞錯版本了. rel-35的overlay dts沒有作用

我們的作法是直接分成tegra194-p3668-0001-p3509-0000.dtb 跟tegra194-p3668-0000-p3509-0000.dtb 兩種dtb.

0001那份是emmc用的, 0000那份是sd卡module用的

請手動關掉你沒有在用的那個controller.

好的我会试一试,谢谢

1 Like

按照tegra194-p3668-0001-p3509-0000.dtb把没有用的节点disabled掉后,多次验证用initrd flash烧录外置emmc没有再出现类似的情况了。
还有疑惑的是,在之前我们的板卡没有disabled这个节点的时候,用flash.sh进行烧录,没有出现过外置emmc识别异常的情况,是只有在initrd flash烧录外置emmc的时候使板卡boot过程中出现,是因为initrd flash的原理导致的吗

厄 這兩者在device tree處理上沒有什麼差別.

請問你flash.sh之後每次都有確認mmc長在哪個node上面嗎? 因為initrd flash在燒錄的時候就得100% 知道你加的eMMC在mmc1還是mmc2. 但flash.sh其實沒有在管這件事情, 它也燒不進你們自己加的eMMC裡面

是的,因为之前我们的策略是flash.sh烧录内置emmc后,手动再对外置emmc进行分区格式化,都是添加的这个节点上的mmc1,也没有出现过mmc2

    sdhci@3440000 {
        status = "okay";
        non-removable;
        no-sdio;
        no-sd;
    };

现在用initrd同时烧录内置emmc和外置emmc的时候,在烧录过程的boot中才出现了mmc2对应3440000这个节点的现象

是的因为一开始我们也是手动对新加的emmc进行初始化。但是不知道为什么用initrd flash后就会才出现这个现象导致烧录失败,不过disabled掉不用的sdhci节点后应该也没有这个问题了

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.