Fail to flash NVME SSD on Custom Board

I flashed the NVME according to the contents below.

The actual command that was executed is as follows
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-agx-eip external

However, an error occurred as shown below and it did not complete normally.

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.1#

The differences between AGX Orin EVK and Custom Board are as follows:

  1. Change UPHY settings
    => hsio-uphy-config-0(devkit) → hsio-uphy-config-16(custom board)
  2. USB Port
    => USB0 (Pin No. F12&F13)

I was using flash on the internal eMMC without any problems via flash.sh
Do you need to change the configuration?
Or do you need to change the USB Port?

Please directly get the serial console log from UART during flash.

This log will tell what is wrong during flash.

I’m sharing the console log so please review it.

insmod /lib/modules/5.15.136-tegra/kernel/drivers/nvme/host/nvme-core.ko
insmod /lib/modules/5.15.136-tegra/kernel/drivers/nvme/host/nvme.ko
[ 9.369798] nvme 0005:01:00.0: Adding to iommu group 7
[ 9.370122] nvme nvme0: pci function 0005:01:00.0
[ 9.370425] nvme 0005:01:00.0: enabling device (0000 → 0002)
[ 9.386403] nvme nvme0: allocated 64 MiB host memory buffer.
[ 9.401354] nvme nvme0: 8/0/0 default/read/poll queues
insmod /lib/modules/5.15.136-tegra/kernel/drivers/thermal/tegra/tegra-bpmp-thermal.ko
insmod /lib/modules/5.15.136-tegra/kernel/drivers/pwm/pwm-tegra.ko
insmod /lib/modules/5.15.136-tegra/kernel/drivers/hwmon/pwm-fan.ko
insmod /lib/modules/5.15.136-tegra/kernel/drivers/usb/gadget/libcomposite.ko
insmod /lib/modules/5.15.136-tegra/kernel/drivers/usb/typec/typec.ko
insmod /lib/modules/5.15.136-tegra/kernel/drivers/usb/typec/ucsi/typec_ucsi.ko
insmod /lib/modules/5.15.136-tegra/kernel/drivers/usb/typec/ucsi/ucsi_ccg.ko
insmod /lib/modules/5.15.136-tegra/kernel/drivers/usb/gadget/udc/tegra-xudc.ko
[ 9.451256] tegra-xudc 3550000.usb: Adding toins /lib/modmmuules/5oup.15.13
6-tegra/kernel/net/ipv6/ipv6.ko
insmod /lib/modules/5.15.136-tegra/updates/drivers/nvpps/nvpps.ko
[ 9.465800] NET: Registered PF_INET6 protocol family
insmod 9.46 /lib/modules/5.15.136-tegrmena/updates/dringivers/th net/ether6
net 9idi.46vet637net/nveth9] In-et.ko AM
AM) with IPv6
[ 9.469995] nvpps c6a0000.nvpps: nvpps_probe
[ 9.470091] nvpps c6a0000.nvpps: primary-emac found ethernet@6800000
[ 9.470104] nvpps c6a0000.nvpps: primary emac base address 0x68100insmod /l[ .47ib/010ule7] .15.136-tegra/kernel/drivers/usb/typec/stusb160x.ko 000
tes/drs: using ptp notifier meinstho /ln eib/ulemac ets/5.15.136-theregra/u@68pda00
ivepla[ rm/teg.47ra/0108] mcegra-mcps e.kc6a
0000.nvpps: tsc_res_ns(32)
[ 9.47011insmodps c6amod000vppules/5s: .136-tPPSa/updaIO tesivers/spi/spi-tnotegrovia210-qdeduad.ko in
, only Timer mode available
[ 9.470392] nvpps c6a0000.nvpps: nvpps cdev(506:0)
[ 9.470412] nvpps c6a0000.nvpps: TSC config ptx 0x113
[ 9.484636] nvethernet 2310000.ethernet: Adding to iommu group 10
[ 9.484764] nvethernet 2310000.ethernet: failed to read MDIO address
[ 9.484768] nvethernet 2310000.ethernet: setting to default DMA bit mask
[ 9.484774] nvethernet 2310000.ethernet: max-platform-mtu DT entry missing, setting default 1500
[ 9.486807] nvethernet 2310000.ethernet: failed to get phy reset gpio error: -2
[ 9.493564] nvethernet 2310000.ethernet: Ethernet MAC address: 48:b0:2d:e5:db:d2
[ 9.495059] nvethernet 2310000.ethernet: Macsec not enabled
[ 9.495060] nvethernet 2310000.ethernet: Macsec: Reduced MTU: 1466 Max: 1500
[ 9.496884] nvethernet 2310000.ethernet: RGMII (HW ver: 53) created with 8 DMA channels
[ 9.532687] tegra-qspi 3270000.spi: Adding to iommu group 11
[ 9.534643] spi-nor spi0.0: mx25u51279g (65536 Kbytes)
[ 10.552691] using random self ethernet address
[ 10.552698] using random host ethernet address
[ 10.555895] usb0: HOST MAC 96:23:82:d4:84:ca
[ 10.555901] usb0: MAC 36:5b:97:2b:d9:af
[ 10.557058] tegra-xudc 3550000.usb: EP 0 (type: ctrl, dir: out) enabled
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.1#

Please attach your “full log” since the start of the flash attempt. Not such partial log.

Also, I mean attach a file. Not copy & paste.

Full log is attached as TEXT FILE since the start of the flash attempt.
There are two attached files as below..

  1. AGX ORIN’s CONSOLE
    ssd_flash_custom_board_log.txt (85.5 KB)

  2. PC’s TERMINAL LOG
    ssd_flash_PC_log.txt (289.4 KB)

Please review..

Initrd flash requires the usb device mode to work fine. And that thing is not working according to your log.

What is the design of your custom board of USB2-0 there? Does that one support USB device mode?

It is not same as flash.sh case which flashes eMMC on the board. Also, what I am talking about is not recovery mode either.

Below is part of the USB configuration of the custom board.

Only USB0 is used for flash purposes.

Could you please advise on how to support USB Device mode?

please read document to modify device tree. Default one is for NV devkit and usb2-0 is type C on devkit.

Hi

To set device mode, I add the following to the device tree.

		connector {
                	compatible = "gpio-usb-b-connector";
                	label = "micro-USB";
                	type = "micro";
                	vbus-gpio = <&gpio TEGRA234_MAIN_GPIO(H, 0) GPIO_ACTIVE_LOW>;
                 	id-gpio = <&gpio TEGRA234_MAIN_GPIO(R, 1) GPIO_ACTIVE_HIGH>;
               	};

GPIO H0 and GPIO R1 are set as gpio inputs in the pinmux table, and GPIO H0 is set to Low and GPIO R1 is set to High.

But SSD flashing is still not working.

I attach device tree that I used.
tegra234-p3737-0000+p3701-0000.zip (3.3 KB)

Could you check it please?

Thanks

  1. please attach your log file. We won’t tell what is wrong by just reading one dts file.

  2. Please convert back your dtb to dts by using dtc tool. That one will tell what is the final dtb looks like. Your zip file only gave partial result which may not be the one running in the end.

Hi

I attach PC/Console log and dts file that convert back from dtb.
eip.zip (51.5 KB)
eip_ssd_dl_agx_log.txt (86.8 KB)
eip_ssd_dl_PC_log.txt (289.4 KB)

Thanks.

If you have any additional review on this issue, please let me know

I’m planning to make a revision of the custom board soon, and if any H/W modifications are needed, I’d like to reflect them..

Please help me..

When your UART console stuck in above situaton.

If you hotplug your micro usb cable, will there be any new log printed out?

And what is the role from below node?

/sys/class/usb_role/usb2-0-role-switch/role

Hi,

There is no new log when hotplug my micro usb cable.
And role is “device”.

bash-5.1# cat /sys/class/usb_role/usb2-0-role-switch/role
device

Thanks.

some thoughts:

Make sure this is also not causing issue for flashing NVMe. As this UPHY setting “may” make your NVME unavailable for flashing.

we had similar issue when our design team wrongly designed UPHY and we tried flashing for enabing Jetson as End Point device. But flashing was failing, as NVMe was not available for flashing for this UPHY. They had designed it for RP mode only in the hardware connection design.

Just to clarify.

  1. Their NVMe is detected. The log has it

insmod /lib/modules/5.15.136-tegra/kernel/drivers/nvme/host/nvme.ko
[ 10.163036] nvme 0005:01:00.0: Adding to iommu group 7
[ 10.163219] nvme nvme0: pci function 0005:01:00.0
[ 10.163443] nvme 0005:01:00.0: enabling device (0000 → 0002)
[ 10.179389] nvme nvme0: allocated 64 MiB host memory buffer.
[ 10.194546] nvme nvme0: 8/0/0 default/read/poll queues

  1. It is still usb device mode problem. Could hardware folks check the vbus /id pin really has correct result so that role switch can go fine?

VBUS_DET is assigned to GPIO_R1, and ID is assigned to GPIO_M0.
And these pins are not used for other purposes.
GPIO R1 is connected to GND through a pull down resistor, and GPIO_R1 is connected to the 1.8V power rail through a pull up resistor.
The state of the two pins is fixed.

When monitoring the two pins from the time of power-on, the values ​​were measured to be the same as the expected value without any change.

Is there a problem with the GPIO assignment?

0x3520360

what is the value of this register when issue happened?

Hi,

When issue happened, I can’t read register because I can’t use devmem command on board.
Could you let me know how to read register?

Thanks.

busybox devmem 0x3520360