1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 3 * Copyright 2022 Gateworks Corporation 4 * 5 * GW72xx RS485 HD: 6 * - GPIO1_0 rs485_term selects on-chip termi 7 * - GPIO4_0 rs485_en needs to be driven high 8 * - GPIO4_2 rs485_hd needs to be driven high 9 * - UART4_TX is DE for RS485 transmitter 10 * - RS485_EN needs to be pulled high 11 * - RS485_HALF needs to be pulled high 12 */ 13 14 #include <dt-bindings/gpio/gpio.h> 15 16 #include "imx8mm-pinfunc.h" 17 18 /dts-v1/; 19 /plugin/; 20 21 &gpio4 { 22 rs485-en-hog { 23 gpio-hog; 24 gpios = <0 GPIO_ACTIVE_HIGH>; 25 output-high; 26 line-name = "rs485_en"; 27 }; 28 29 rs485-hd-hog { 30 gpio-hog; 31 gpios = <2 GPIO_ACTIVE_HIGH>; 32 output-high; 33 line-name = "rs485_hd"; 34 }; 35 }; 36 37 &uart2 { 38 pinctrl-names = "default"; 39 pinctrl-0 = <&pinctrl_uart2>; 40 rts-gpios = <&gpio5 29 GPIO_ACTIVE_HIG 41 linux,rs485-enabled-at-boot-time; 42 status = "okay"; 43 }; 44 45 &uart4 { 46 status = "disabled"; 47 }; 48 49 &iomuxc { 50 pinctrl_uart2: uart2grp { 51 fsl,pins = < 52 MX8MM_IOMUXC_UART2_RXD 53 MX8MM_IOMUXC_UART2_TXD 54 MX8MM_IOMUXC_UART4_TXD 55 >; 56 }; 57 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.