Set DTR DSR and DCD as GPIO in Linux

Hello, I have to configure Colibri UART-A control signals as GPIO. UART_A_RXD and UART_A_TXD must be used for the serial.

In:

/* UART A */
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1_dte &pinctrl_uart1_ctrl>;
fsl,dte-mode;
fsl,uart-has-rtscts;
status = "disabled";
};

I remove "&pinctrl_uart1_ctrl" and put it in:

&iomuxc {
pinctrl-0 = <&pinctrl_weim_gpio_1 &pinctrl_weim_gpio_2
&pinctrl_weim_gpio_3 &pinctrl_weim_gpio_4
&pinctrl_weim_gpio_5 &pinctrl_weim_gpio_6
&pinctrl_gpio_1 &pinctrl_uart1_ctrl
&pinctrl_gpio_2
&pinctrl_usbh_oc_1 &pinctrl_usbc_id_1>;
};

It is correct?

Hi

The pinctrl_uart1_ctrl phandle point to this node. This does mux the pins to its UART control signal functionality.

So you would additionally need to change the muxing to GPIO functionality in that node. E.g. to something like this:

MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x1b0b0
MX6QDL_PAD_EIM_D24__GPIO3_IO24 0x1b0b0
MX6QDL_PAD_EIM_D25__GPIO3_IO25 0x1b0b0

Max

Hi Max,
thank you, right I must change muxing.

Can I use directly the node pinctrl_uart1_ctrl?

pinctrl_uart1_ctrl: uart1-ctrlgrp { /* Additional DTR, DSR, DCD */
fsl,pins = <
MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x1b0b0
MX6QDL_PAD_EIM_D24__GPIO3_IO24 0x1b0b0
MX6QDL_PAD_EIM_D25__GPIO3_IO25 0x1b0b0

;
};

Regards Davide

Hi

Yes, you can.

Max

Ok, thanks! I have another question, but I will open a new topic.
Regards Davide