UART232/485

cancel
Showing results for 
Search instead for 
Did you mean: 

UART232/485

261 Views
raje_embd13
Contributor I

#

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

#

Labels (1)
0 Kudos
4 Replies

159 Views
raje_embd13
Contributor I

Hi Igor,

Is this patch help's me : http://marc.info/?l=linux-kernel&m=142366865609389&q=raw

Thanks,

RajendraPrasad

0 Kudos

159 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Rajendra

yes it may help for rs485.

Best regards
igor

0 Kudos

159 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi  VenkataNagaRajendra

for run time control of gpios, seems it is necessary to write custom

application using LTC28xx driver, which would control these gpios.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

159 Views
raje_embd13
Contributor I

Hi Igor,

Yes, that's right. But where I can change / add  Or implement application . I need these guide lines

Thanks,

Rajendra

0 Kudos