AnsweredAssumed Answered

UART232/485

Question asked by VenkataNagaRajendra Vankamamidi on Aug 6, 2019
Latest reply on Aug 7, 2019 by igorpadykov

#

Hi ,

I am working on IMX6 dual.

In our Hardware the processor GPIO's are mapped to UART(LTC28xx). The Ltc28xx working in both  RS232/RS485. On my environment  RS485 mode is controlled by Processor GPIO pins.

The dtsi file is declared as below.

The Question is:: How to use these GPIO's in UART driver at run time to check pin status and control GPIO pins ?

 

 &uart1 {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_tcs_uart1>;
 status = "okay";
 uart1_sel {
 pins = "GPIO3_IO29"; /* RS232_485_SEL */
 output-enable;
 output-low;
 };
 uart1_en {
 pins = "GPIO2_IO10"; /* RS232_485_EN */
 output-enable;
 output-high;
 };
 uart1_speed {
 pins = "GPIO3_IO20"; /* RS232_SPEED, 1 - 1 mbps, 0 - 250 kbps */
 output-enable;
 output-high;
 };
 };

pinctrl_XXX_uart1: XXX-uart1 {
 fsl,pins = <
 MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
 MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
 MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x1b0b1
 MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x1b0b1

 

Thanks,

Prasad

#

Outcomes