You could refer to the following thread to do loopback test step-by-step.
Jetson Nano SPI Bus Not Working - #10 by KevinFFF
The thread is for Jetson Nano, but it should be the similar steps for Jetson Xavier NX.
You could refer to the following thread to do loopback test step-by-step.
Jetson Nano SPI Bus Not Working - #10 by KevinFFF
The thread is for Jetson Nano, but it should be the similar steps for Jetson Xavier NX.