Enable serial ports on Colibri imx8

I am currently looking to replace the Colibri T20 for the Colibri iMX8 module.
i currently use 5 serial ports on the T20 with WEC7.
By default the iMX8 is configured for 3 serial ports UART_A to C.
So i need to enable 2 more serial ports.

From the Pinout designer, i have 2 serial ports which should be available and don’t conflict with any other pins required.
UART_D and UART_M4 (only RX and TX required)

I am assuming this is possible using device tree changes, but i cannot find the appropriate documentation.

Greetings @ObiTwo,

Your intuition is correct, you’ll need to do some device tree modifications in order to enable the additional UARTs you need. The tricky part is you’ll need to consult both the Colibri i.MX8X datasheet and the i.MX8X device tree to see what changes you’ll need to make. Essentially you need to identify which pins you want to reconfigure as UARTs. Then you’ll need to see what they’re currently being used as in the device tree by default. After that you can then remove/disable them from whatever default interface they’re in and then redefine them as new UART interfaces.

On Torizon once you’ve identified all this you can then create a device tree overlay to patch in this new behavior.

More details on overlays:

So I guess to help paint an example for your use-case. If we look in the Colibri i.MX8X data sheet we see that SODIMM pins 28 and 30 can act as a RX/TX for another UART. We then look in the Colibri i.MX8X device tree source: imx8qxp-colibri.dtsi « freescale « dts « boot « arm64 « arch - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

We see that pins 28 & 30 are defaulted used as PWMs. So you’ll need to create an overlay that disables the PWMs and then defines a new UART interface with the now freed pins.

Best Regards,