I’m trying to enable two more UARTs on the Colibri iMX7. I’ve read the Device Tree customization article and edited the file imx7-colibri-eval-v3.dtsi to include
&uart4 {
status = "okay";
};
&uart6 {
status = "okay";
};
and then, added the code below to the file imx7-colibri.dtsi
The .dtb file is generated after compiling. After changing the device tree file in the module, I can see two more serial interfaces under /dev/tty*
root@colibri-imx7:~# ls /dev/ttymxc*
/dev/ttymxc0 /dev/ttymxc1 /dev/ttymxc2 /dev/ttymxc3 /dev/ttymxc5
But when I try to echo some message to ttymx3 or ttymxc5, nothing happens, it looks like the pins aren’t working as RX and TX, for both UARTs. It works fine for the other interfaces (mxc0, mxc1 and mxc2), which are enabled by default. I’m no expert in Linux, just tried to follow the guides, but I’m having trouble with this. Any help is appreciated
You should also disable the whole “original” interface related to that pins, or remove required pins from it.
For example:
iMX 7 UART4 TX/RX pins shared with ecspi3.SS0/ecspi3.SCLK
So you can disable ecspi3 by changing its status to “disabled”
@imx7-colibri-eval-v3.dtsi
&ecspi3 {
- status = "okay";
+ status = "disabled"
mcp2515: can@0 {
compatible = "microchip,mcp2515";
In last case it makes ecspi3 unusable, so it doesn’t have to much sense here. It better to disable the whole escpi3. However in other situations you can remove some pins from interface while keeping it functional.
Thanks for your answer, but I’m still having trouble with this. Did the modifications you’ve suggested, disabled ecspi3, but still I can’t send nor receive anything in those interfaces I’m trying to enable. I’ve also checked the file imx7-colibri.dtsi and I found the following code:
Which makes me think theat info is actually being transmitted, since there are some bytes in tx in both uart4 and uart6, but nothing received. And in the carried board the rx and tx pins for each uart are shorted, so that I can transmit and receive with the Colibri iMX7. This setup works for both uart2 and uart3, by the way, but not for uart4 and uart6. I’m feeling that this is a very simple thing to do, just enabling some mode UARTs, but I can’t find a way to actually do this.
You need to select the correct muxing option through the defines available for the pads. E.g. SODIMM 86 has pad name I2C2_SCL. You can search by PAD_I2C2_SCL in arch/arm/boot/dts/imx7d-pinfunc.h to find all its muxing options. Also I would use the pin configuration as we use on our regular UARTs: 0x79. See also the Pinmux iMX7 section of the Device Tree Customization article.
Given that you are using the UARTs in DTE mode too, your muxing should look like this: