18bab661aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 28bab661aSEmmanuel Vadot/* 38bab661aSEmmanuel Vadot * Copyright 2022 Gateworks Corporation 48bab661aSEmmanuel Vadot * 58bab661aSEmmanuel Vadot * GW73xx RS232 with RTS/CTS hardware flow control: 68bab661aSEmmanuel Vadot * - GPIO4_0 rs485_en needs to be driven low (in-active) 78bab661aSEmmanuel Vadot * - UART4_TX becomes RTS 88bab661aSEmmanuel Vadot * - UART4_RX becomes CTS 98bab661aSEmmanuel Vadot */ 108bab661aSEmmanuel Vadot 118bab661aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 128bab661aSEmmanuel Vadot 138bab661aSEmmanuel Vadot#include "imx8mm-pinfunc.h" 148bab661aSEmmanuel Vadot 158bab661aSEmmanuel Vadot/dts-v1/; 168bab661aSEmmanuel Vadot/plugin/; 178bab661aSEmmanuel Vadot 188bab661aSEmmanuel Vadot&{/} { 198bab661aSEmmanuel Vadot compatible = "gw,imx8mm-gw73xx-0x"; 208bab661aSEmmanuel Vadot}; 218bab661aSEmmanuel Vadot 228bab661aSEmmanuel Vadot&gpio4 { 23*b2d2a78aSEmmanuel Vadot rs485-en-hog { 248bab661aSEmmanuel Vadot gpio-hog; 258bab661aSEmmanuel Vadot gpios = <0 GPIO_ACTIVE_HIGH>; 268bab661aSEmmanuel Vadot output-low; 278bab661aSEmmanuel Vadot line-name = "rs485_en"; 288bab661aSEmmanuel Vadot }; 298bab661aSEmmanuel Vadot}; 308bab661aSEmmanuel Vadot 318bab661aSEmmanuel Vadot&uart2 { 328bab661aSEmmanuel Vadot pinctrl-names = "default"; 338bab661aSEmmanuel Vadot pinctrl-0 = <&pinctrl_uart2>; 348bab661aSEmmanuel Vadot rts-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>; 358bab661aSEmmanuel Vadot cts-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>; 368bab661aSEmmanuel Vadot status = "okay"; 378bab661aSEmmanuel Vadot}; 388bab661aSEmmanuel Vadot 398bab661aSEmmanuel Vadot&uart4 { 408bab661aSEmmanuel Vadot status = "disabled"; 418bab661aSEmmanuel Vadot}; 428bab661aSEmmanuel Vadot 438bab661aSEmmanuel Vadot&iomuxc { 448bab661aSEmmanuel Vadot pinctrl_uart2: uart2grp { 458bab661aSEmmanuel Vadot fsl,pins = < 468bab661aSEmmanuel Vadot MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140 478bab661aSEmmanuel Vadot MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140 488bab661aSEmmanuel Vadot MX8MM_IOMUXC_UART4_TXD_GPIO5_IO29 0x140 498bab661aSEmmanuel Vadot MX8MM_IOMUXC_UART4_RXD_GPIO5_IO28 0x140 508bab661aSEmmanuel Vadot >; 518bab661aSEmmanuel Vadot }; 528bab661aSEmmanuel Vadot}; 53