Enabling RS485 on UART_1 for Verdin i.MX8M Plus (Mallow Carrier Board)

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your question regarding RS-485 on Verdin i.MX8M Plus with the Mallow carrier board.

1. Device Tree Changes

To enable RS-485 mode on UART_1, you need to update the device tree settings for UART4 (since UART_1 on the Verdin i.MX8M Plus corresponds to UART4 in the pin mapping).

Add or modify the following node in your device tree or device tree overlay:

&uart4 {
    status = "okay";
    linux,rs485-enabled-at-boot-time;
    rs485-rts-active-low;
};
  • linux,rs485-enabled-at-boot-time; enables RS-485 at boot.
  • rs485-rts-active-low; configures the RTS signal polarity, which is the typical setting for RS-485 transceivers.
  • Remove or avoid using rs485-rx-during-tx; unless you specifically need to receive while transmitting, as it can cause echo issues.

For reference:

2. Selecting the Correct Device Tree File

The exact device tree file to modify depends on your BSP version and configuration:

  • For Torizon or Toradex BSP Linux, you typically use a device tree overlay (.dts file which compiles to .dtbo).
  • For Verdin i.MX8M Plus on Mallow, the base device tree is usually:
    imx8mp-verdin-mallow.dts
    
  • If you are using a custom device tree overlay, you can place the above node in your overlay file.

For detailed information on the board and pin assignments:

General Steps:

  1. Create a device tree overlay (recommended for Torizon/Core Linux).
  2. Add the &uart4 node as shown above.
  3. Compile the overlay (dtc) and deploy it according to your platform’s procedure.
  4. Reboot and confirm RS-485 mode is active.

If you need more guidance on compiling and applying these overlays for your current environment, let me know your Linux variant (Torizon or BSP) and version!

Best regards,
Toradex AI Assistant.