We currently have a custom board where the USB pins are not connected as intended. According to the design reference, USB0 should be used for the micro USB for recovery mode, while USB1 should be used for the USB 3.2 hub. Unfortunately, these two ports are swapped in our design.
in the device tree there is a section that can change the usb ports:
“tegra234-p3509-a02.dtsi”
I wonder swapping USB0 and USB1 ports in the file will be flashed to bootloader in jetson or just in os kernel?
do I lose recovery mode completely if I swap USB0 and USB1 even on dev board with another ssd installed?
my purpose is testing usb host and making sure it is working before changing the design and making the next revision of the board.
Recovery mode is pure hardware event. None of device tree can save that thing if the hardware is wrong.
You can try to think about it… the device tree is just a binary for kernel to read. You just enter the recovery mode by pressing some button or jumper, there is totally no linux kernel running at that moment.
so in the device tree the mode for usb2-0 is “otg”.
if i change the mode for usb2-0 to “host”, does it affect the functionality of the microusb port for recovery mode? or as you said this is implemented in hardware level and can’t be changed by device tree?
If you are talking about “recovery mode”, which is for entering a mode for flashing. Then “device tree” has no effect to it as I already said in previous comment.
Device tree did not even exist when you try to enter the recovery mode.
It depends on the overall schematic. From what you shared, I only saw you use USB0 and USBSS0 for that hub.
I can only say your swapping for nvidia,usb2-companion is correct. But for the rest of parameters, that depends on your schematic, which I cannot tell.