Flash with initrd issue

Hi, I’m working on our custom board using Xavier NX. And I’m using l4t_initrd_flash.sh to flash both internel and externel emmc on our board. It is worked in our another custom board with Xavier NX R35.3.1.

But when I tried the same flash flow

ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=1 ${SCRIPT_DIR}/tools/kernel_flash/l4t_initrd_flash.sh 
    ${REUSE} --external-device mmcblk1 
    -c myboard_flash_external.xml 
    myboard internal

in this custom board, times up in Step 3: Start the flashing process because the board boot failed with kernel oops.

Here are the host flash log and the board uart log, thank you for help.
host flash log - 副本.txt (172.2 KB)
seriallog - 副本.log (85.7 KB)

by the way, in this board, I have flashed it with flash.sh and it works fine as normal boot

Hi,

你的問題應該是device tree還是哪裡沒有改好,所以USB device mode起不來、host找不到device然後timeout
kernel panic可能是別的問題
flash.sh的機制跟initrd flash不一樣,所以flash.sh能不能用跟這是兩回事、沒辦法代表什麼

Hi,
我们这块板卡设备树没有改动过usb相关的内容。想请问一下,这个会和硬件设计相关吗,因为这块板卡给usb都加上了detect gpio口,但是没有在设备树加上,因为之前没有用过,这个需要在设备树中添加相关内容吗

建議你先讀一下文件裡有關USB的部份,你直接照搬DevKit的device tree應該是很高機率沒辦法用
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/HR/JetsonModuleAdaptationAndBringUp/JetsonXavierNxSeries.html#porting-universal-serial-bus

谢谢,根据你发的这个文件指导,发现当初是硬件同事参照product design里面这个示意图认为这个pin87的gpio应该给usb3.2使用,于是就把micro usb的detect换成了另一个gpio。


但是网页文档里看设备树实际上micro usb用的vbus就是pin87这个gpio,但是我们bsp没有进行修改,所以才导致了问题的出现。这个分析应该没有问题吧

所以我需要做的是把设备树里

usb2-0 {
				mode = "otg";
				status = "okay";
#if TEGRA_XUSB_DT_VERSION >= DT_VERSION_3
				usb-role-switch;
				connector {
					compatible = "usb-b-connector", "gpio-usb-b-connector";
					label = "micro-USB";
					type = "micro";
					vbus-gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
				};
#endif
			};

的vbus-gpio改为实际硬件使用的gpio就可以了吗

Hi,

GPIO 用哪根都可以, 只是device tree要做調整 (如同你所說改vbus-gpio)

但是用initrd flash烧录还是会出现time out失败,还是因为这个kernel panic吧,不知道为什么会出现,正常上电启动该、用flash.sh来烧录都没有出现过这个问题

kernel panic這件事情你能確認一下燒錄的時候有沒有接著螢幕嗎 有的話先拔掉一下

如果沒有接的話請你去device tree把dpaux3 155f0000這個node disabled掉

没有接显示器,只接了micro usb和串口。

好的,我再试一下,谢谢

disabled掉这个node后可以正常使用initrd flash了
我突然想起来这个panic之前是遇到过的问题,可以看我这个帖子

当时把这个patch更新到内核里后,不用disabled这个节点boot就不会出现这个kernel panic了。但是没想到现在开始用initrd flash后又复现了。
这个问题官方会给出及时的优化吗?因为disabled掉dpaux3 155f0000这个node后I2C-8这个总线貌似就无法使用了

這個patch還在跟內部討論能不能直接merge. 目前只能暫時先打上去了

好的,谢谢你的帮助

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