Does Jetson TX2 NX support setup-device-mode and full-device-mode when USB-C is connected?

You might find this useful, which describes the Linux “Gadget” API:
https://forums.developer.nvidia.com/t/xavier-nx-bridge-usb-otg-connected-host-identifies-pcie-connected-nvme-ssd-as-disk/254268/5

This is a custom USB device mode in which the type-B connectors (OTG ports can work with type-A or type-B, but they have an ID pin to detect which type) where the Jetson can pretend to be various devices (this is custom, not standard). Often an OTG connector can accept either device (type-B cable) or be a normal host (type-A cable plugged in), but some of the models are wired only for device mode (the lane routing will not necessarily go to the right chip for working in host mode for some OTG connectors).