Can UART 5 be assigned to iMX6? If yes, what /dev would it be? It would make communication easier. Instead of Mega -> M4 -> iMX6 it would become Mega -> iMX6
For that purpose is uart6 designed that unfortunately does not work yet as expected. It does not receive data from external device ( the Mega in your case). But there is a known patch that needs recompiling something and you have that recompiling experience now
Here is the discussion about uart6, seems easier than make UART 5 available. http://www.udoo.org/forum/index.php?threads/3196/
Well, I haven't had the experience of actually using the recompilation yet... Anyway, if you use uart6, does that also mean all the other uart6 pins (26-33) are useless? I need as many pins on the M4, and as little as possible on the iMX6.
Two pins is ok, that's a small price to pay. But the documentation lists at UART_6 a lot of other pins of UART_6: UART 6 This UART is user available, but it must be included in the device tree before the use. By default all of its pins are given to A9 in GPIO mode. PCB NAME SCHEMATICS SIGNAL NAME SCHEMATIC IMX6 PAD NAME REFERENCE MANUAL PAD NAME ALTERNATE UART_6_CTS_B 33 CSI0_DAT7 CSI0_DAT7 IOMUXC_SW_MUX_CTL_PAD_CSI_DATA07 ALT4 - UART6_CTS_B UART_6_RTS_B 32 CSI0_DAT6 CSI0_DAT6 IOMUXC_SW_MUX_CTL_PAD_CSI_DATA06 ALT4 - UART6_RTS_B UART_6_TX_DATA 31 CSI0_DAT5 CSI0_DAT5 IOMUXC_SW_MUX_CTL_PAD_CSI_DATA05 ALT4 - UART6_TX_DATA UART_6_RX_DATA 30 CSI0_DAT4 CSI0_DAT4 IOMUXC_SW_MUX_CTL_PAD_CSI_DATA04 ALT4 - UART6_RX_DATA UART_6_DCD_B 29 CSI0_DAT3 CSI0_DAT3 IOMUXC_SW_MUX_CTL_PAD_CSI_DATA03 ALT4 - UART6_DCD_B UART_6_DTR_B 28 CSI0_DAT2 CSI0_DAT2 IOMUXC_SW_MUX_CTL_PAD_CSI_DATA02 ALT4 - UART6_DTR_B UART_6_DSR_B 27 CSI0_DAT1 CSI0_DAT1 IOMUXC_SW_MUX_CTL_PAD_CSI_DATA01 ALT4 - UART6_DSR_B UART_6_RI_B 26 CSI0_DAT0 CSI0_DAT0 IOMUXC_SW_MUX_CTL_PAD_CSI_DATA00 ALT4 - UART6_RI_B
No, I can't, I'm powering the whole solution via a powerbank that has two USB outlets. Otherwise I'd need to get a separate battery to power the two boards. I'd rather not, cost-wise.