The Pixhawk serial ports are wired as follows on the mainboard schematic. I don't have the details handy on how they map at the various layers of the Pixhawk software stack.
SERIAL1 - IMX6 mavlink
SERIAL2 - Accessory port
SERIAL3 - GPS
SERIAL4 - Gimbal
SERIAL5 - nsh debug on accessory port
DSM - RC from IMX6
USB is the recommended interface on the accessory port where possible.
how the USB ports map to the iMX6 and Pixhawk2
There are two USB ports on the IMX6. One is multiplexed between the Pixhawk2 and the Gimbal bay, and the second goes to the accessory port.
over what peripheral does the iMX6 and Pixhawk2 communicate (so that I don't accidentally prevent those from communicating)
iMX6 and Pixhawk communicate over two serial ports during normal operation: a bidirectional port (Pixhawk's SERIAL1) speaking Mavlink for telemetry, parameters, and commands, and a unidirectional port speaking DSM for RC input.
USB is used for firmware update and log downloads.
whether iMX6 comes with FTDI and similar drivers (aka can I plug in an arduino directly? with what cable)
Yes, the kernel is built with drivers for FTDI and CDC-ACM USB serial devices. This covers all official Arduino devices, but some clones use other chips (CH340) that may not be supported.
Connect 3DRID to GND to set the USB port to host mode, and connect 5V, D+, D- and GND to the corresponding pins of the USB device.
If you have the 3DR accessory breakout board, use a jumper to connect 3DRID to ground, and use an OTG cable (1) (2) to connect the device to the breakout board.
It's recommended to use the
/dev/serial/by-id/ paths to access USB serial devices on the IMX6, as the enumeration order may change.
current limits on the power pins
There is a 1.1A resettable fuse on VBAT. 5V can supply at least 500mA.
voltage levels of the serial pins