| /linux/Documentation/devicetree/bindings/serial/ |
| H A D | rs485.yaml | 4 $id: http://devicetree.org/schemas/serial/rs485.yaml# 7 title: RS485 serial communications 17 rs485-rts-delay: 31 rs485-rts-active-high: 35 rs485-rts-active-low: 39 rs485-rx-active-high: 44 linux,rs485-enabled-at-boot-time: 45 description: enables the rs485 feature at boot time. It can be disabled 49 rs485-rx-during-tx: 53 rs485-term-gpios: [all …]
|
| /linux/drivers/tty/serial/8250/ |
| H A D | 8250_dwlib.c | 17 #define DW_UART_TCR 0xac /* Transceiver Control Register (RS485) */ 138 static void dw8250_rs485_set_addr(struct uart_port *p, struct serial_rs485 *rs485, in dw8250_rs485_set_addr() argument 143 if (rs485->flags & SER_RS485_ADDRB) { in dw8250_rs485_set_addr() 148 if (rs485->flags & SER_RS485_ADDR_RECV) { in dw8250_rs485_set_addr() 149 u32 delta = p->rs485.flags ^ rs485->flags; in dw8250_rs485_set_addr() 152 * rs485 (param) is equal to uart_port's rs485 only during init in dw8250_rs485_set_addr() 155 if (unlikely(&p->rs485 == rs485)) in dw8250_rs485_set_addr() 156 delta = rs485->flags; in dw8250_rs485_set_addr() 159 (p->rs485.addr_recv != rs485->addr_recv)) in dw8250_rs485_set_addr() 160 dw8250_update_rar(p, rs485->addr_recv); in dw8250_rs485_set_addr() [all …]
|
| H A D | 8250_keba.c | 103 struct serial_rs485 *rs485) in kuart_rs485_config() argument 110 if (rs485->flags & SER_RS485_ENABLED) { in kuart_rs485_config() 111 if (rs485->flags & SER_RS485_MODE_RS422) in kuart_rs485_config() 131 * an external RS485 buffer. The DTR pin will be forced low in kuart_rs485_config() 208 * UART mixes 16550, 16750 and 16C950 (for RS485) standard => auto in kuart_probe() 214 * UART supports RS485, RS422 and RS232 with switching of physical in kuart_probe() 221 uart.port.rs485.flags = SER_RS485_ENABLED | in kuart_probe() 225 /* default mode priority is RS485 > RS422 > RS232 */ in kuart_probe() 230 uart.port.rs485.flags = SER_RS485_ENABLED | in kuart_probe() 237 uart.port.rs485.flags = SER_RS485_ENABLED | in kuart_probe() [all …]
|
| H A D | 8250_fintek.c | 51 #define RS485 0xF0 macro 198 struct serial_rs485 *rs485) in fintek_8250_rs485_config() argument 207 if (rs485->flags & SER_RS485_ENABLED) { in fintek_8250_rs485_config() 209 if (!(rs485->flags & SER_RS485_RTS_ON_SEND) == in fintek_8250_rs485_config() 210 !(rs485->flags & SER_RS485_RTS_AFTER_SEND)) in fintek_8250_rs485_config() 215 if (rs485->delay_rts_before_send) { in fintek_8250_rs485_config() 216 rs485->delay_rts_before_send = 1; in fintek_8250_rs485_config() 220 if (rs485->delay_rts_after_send) { in fintek_8250_rs485_config() 221 rs485->delay_rts_after_send = 1; in fintek_8250_rs485_config() 225 if (rs485->flags & SER_RS485_RTS_ON_SEND) in fintek_8250_rs485_config() [all …]
|
| H A D | 8250_exar.c | 212 CTI_PORT_TYPE_RS422_485, // RS422/RS485 ONLY 232 struct serial_rs485 *rs485); 398 struct serial_rs485 *rs485) in generic_rs485_config() argument 400 bool is_rs485 = !!(rs485->flags & SER_RS485_ENABLED); in generic_rs485_config() 590 * cti_tristate_disable() - Disable RS485 transciever tristate 594 * Most RS485 capable cards have a power on tristate jumper/switch that ensures 595 * the RS422/RS485 transceiver does not drive a multi-drop RS485 bus when it is 596 * not the master. When this jumper is installed the user must set the RS485 683 // 1x RS232, 1x RS422/RS485 in cti_get_port_type_xr17c15x_xr17v25x() 686 // 2x RS232, 2x RS422/RS485 in cti_get_port_type_xr17c15x_xr17v25x() [all …]
|
| H A D | 8250_lpc18xx.c | 36 struct serial_rs485 *rs485) in lpc18xx_rs485_config() argument 43 if (rs485->flags & SER_RS485_ENABLED) { in lpc18xx_rs485_config() 47 if (rs485->flags & SER_RS485_RTS_ON_SEND) in lpc18xx_rs485_config() 51 if (rs485->delay_rts_after_send) { in lpc18xx_rs485_config() 53 rs485_dly_reg = DIV_ROUND_UP(rs485->delay_rts_after_send in lpc18xx_rs485_config() 60 rs485->delay_rts_after_send = (rs485_dly_reg * MSEC_PER_SEC) in lpc18xx_rs485_config()
|
| /linux/Documentation/driver-api/serial/ |
| H A D | serial-rs485.rst | 2 RS485 Serial Communications 21 half-duplex hardware like an RS485 transceiver or any RS232-connected 32 The Linux kernel provides the struct serial_rs485 to handle RS485 33 communications. This data structure is used to set and configure RS485 36 The device tree can also provide RS485 boot time parameters 41 Any driver for devices capable of working both as RS232 and RS485 should 48 what RS485 features the driver supports for the ``struct uart_port``. 58 From user-level, RS485 configuration can be get/set using the previous 59 ioctls. For instance, to set RS485 you can use the following code:: 63 /* Include definition for RS485 ioctls: TIOCGRS485 and TIOCSRS485 */ [all …]
|
| /linux/arch/arm64/boot/dts/freescale/ |
| H A D | imx8mm-venice-gw72xx-0x-rs485.dtso | 5 * GW72xx RS485 HD: 9 * - UART4_TX is DE for RS485 transmitter 22 rs485-en-hog { 29 rs485-hd-hog { 41 linux,rs485-enabled-at-boot-time;
|
| H A D | imx8mm-venice-gw72xx-0x-rs422.dtso | 5 * GW72xx RS422 (RS485 full duplex): 9 * - UART4_TX is DE for RS485 transmitter 22 rs485-en-hog { 29 rs485-hd-hog { 41 linux,rs485-enabled-at-boot-time;
|
| H A D | imx8mm-venice-gw73xx-0x-rs422.dtso | 5 * GW73xx RS422 (RS485 full duplex): 9 * - UART4_TX is DE for RS485 transmitter 22 rs485-en-hog { 29 rs485-hd-hog { 41 linux,rs485-enabled-at-boot-time;
|
| H A D | imx8mm-venice-gw73xx-0x-rs485.dtso | 5 * GW73xx RS485 HD: 9 * - UART4_TX is DE for RS485 transmitter 22 rs485-en-hog { 29 rs485-hd-hog { 41 linux,rs485-enabled-at-boot-time;
|
| H A D | imx8mm-phygate-tauri-l-rs232-rs485.dtso | 6 * Tauri-L RS232 + RS485: 22 uart4-rs485-en-hog { 39 /* UART4 - RS485 */ 46 linux,rs485-enabled-at-boot-time;
|
| H A D | imx8mm-verdin-dev.dtsi | 136 /* Verdin UART_1, connector X50 through RS485 transceiver */ 138 linux,rs485-enabled-at-boot-time; 139 rs485-rts-active-low; 140 rs485-rx-during-tx;
|
| H A D | imx8mp-verdin-dev.dtsi | 228 /* Verdin UART_1, connector X50 through RS485 transceiver */ 230 linux,rs485-enabled-at-boot-time; 231 rs485-rts-active-low; 232 rs485-rx-during-tx;
|
| H A D | imx8mp-toradex-smarc-dev.dts | 261 /* SMARC SER0, RS485. Optional M.2 KEY E */ 263 linux,rs485-enabled-at-boot-time; 264 rs485-rts-active-low; 265 rs485-rx-during-tx;
|
| /linux/arch/arm/boot/dts/microchip/ |
| H A D | aks-cdu.dts | 32 linux,rs485-enabled-at-boot-time; 33 rs485-rts-delay = <0 0>; 38 linux,rs485-enabled-at-boot-time; 39 rs485-rts-delay = <0 0>; 44 linux,rs485-enabled-at-boot-time; 45 rs485-rts-delay = <0 0>;
|
| /linux/drivers/tty/serial/ |
| H A D | serial_core.c | 185 if (old != port->mctrl && !(port->rs485.flags & SER_RS485_ENABLED)) in uart_update_mctrl() 1292 static int uart_check_rs485_flags(struct uart_port *port, struct serial_rs485 *rs485) in uart_check_rs485_flags() argument 1294 u32 flags = rs485->flags; in uart_check_rs485_flags() 1307 if (!(rs485->flags & SER_RS485_ADDRB) && in uart_check_rs485_flags() 1308 (rs485->flags & (SER_RS485_ADDR_RECV|SER_RS485_ADDR_DEST))) in uart_check_rs485_flags() 1312 if (!(rs485->flags & SER_RS485_ADDR_RECV) && rs485->addr_recv) in uart_check_rs485_flags() 1314 if (!(rs485->flags & SER_RS485_ADDR_DEST) && rs485->addr_dest) in uart_check_rs485_flags() 1321 struct serial_rs485 *rs485) in uart_sanitize_serial_rs485_delays() argument 1352 uart_sanitize_serial_rs485(struct uart_port * port,struct serial_rs485 * rs485) uart_sanitize_serial_rs485() argument 1397 uart_set_rs485_termination(struct uart_port * port,const struct serial_rs485 * rs485) uart_set_rs485_termination() argument 1407 uart_set_rs485_rx_during_tx(struct uart_port * port,const struct serial_rs485 * rs485) uart_set_rs485_rx_during_tx() argument 1418 struct serial_rs485 *rs485 = &port->rs485; uart_rs485_config() local 1441 uart_get_rs485_config(struct uart_port * port,struct serial_rs485 __user * rs485) uart_get_rs485_config() argument 1457 struct serial_rs485 rs485; uart_set_rs485_config() local [all...] |
| H A D | omap-serial.c | 285 if (port->rs485.flags & SER_RS485_ENABLED) { in serial_omap_stop_tx() 296 res = (port->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? in serial_omap_stop_tx() 299 if (port->rs485.delay_rts_after_send > 0) in serial_omap_stop_tx() 301 port->rs485.delay_rts_after_send); in serial_omap_stop_tx() 338 if ((up->port.rs485.flags & SER_RS485_ENABLED) && in serial_omap_put_char() 339 !(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) in serial_omap_put_char() 367 if (port->rs485.flags & SER_RS485_ENABLED) { in serial_omap_start_tx() 373 res = (port->rs485.flags & SER_RS485_RTS_ON_SEND) ? 1 : 0; in serial_omap_start_tx() 376 if (port->rs485.delay_rts_before_send > 0) in serial_omap_start_tx() 377 mdelay(port->rs485.delay_rts_before_send); in serial_omap_start_tx() [all …]
|
| /linux/include/uapi/linux/ |
| H A D | serial.h | 112 * struct serial_rs485 - serial interface for controlling RS485 settings. 113 * @flags: RS485 feature flags. 116 * @addr_recv: Receive filter for RS485 addressing mode 118 * @addr_dest: Destination address for RS485 addressing mode 126 * Serial interface for controlling RS485 settings on chips with suitable 133 * * %SER_RS485_ENABLED - RS485 enabled. 136 * * %SER_RS485_RX_DURING_TX - Full-duplex RS485 line. 138 * * %SER_RS485_ADDRB - Enable RS485 addressing mode.
|
| /linux/drivers/usb/serial/ |
| H A D | xr_serial.c | 241 struct serial_rs485 rs485; member 651 rs485_enabled = !!(data->rs485.flags & SER_RS485_ENABLED); in xr_set_flow_mode() 655 if (data->rs485.flags & SER_RS485_RTS_ON_SEND) in xr_set_flow_mode() 825 static void xr_sanitize_serial_rs485(struct serial_rs485 *rs485) in xr_sanitize_serial_rs485() argument 827 if (!(rs485->flags & SER_RS485_ENABLED)) { in xr_sanitize_serial_rs485() 828 memset(rs485, 0, sizeof(*rs485)); in xr_sanitize_serial_rs485() 833 if (rs485->flags & SER_RS485_RTS_ON_SEND) in xr_sanitize_serial_rs485() 834 rs485->flags &= ~SER_RS485_RTS_AFTER_SEND; in xr_sanitize_serial_rs485() 836 rs485->flags |= SER_RS485_RTS_AFTER_SEND; in xr_sanitize_serial_rs485() 839 rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | in xr_sanitize_serial_rs485() [all …]
|
| /linux/arch/arm/boot/dts/nxp/mxs/ |
| H A D | imx28-duckbill-2-485.dts | 15 rs485-red { 16 label = "duckbill:red:rs485"; 20 rs485-green { 21 label = "duckbill:green:rs485";
|
| /linux/arch/arm/boot/dts/ti/omap/ |
| H A D | am335x-nano.dts | 171 rs485-rts-active-high; 172 rs485-rx-during-tx; 173 rs485-rts-delay = <1 1>; 174 linux,rs485-enabled-at-boot-time; 182 rs485-rts-active-high; 183 rs485-rts-delay = <1 1>; 184 linux,rs485-enabled-at-boot-time; 191 rs485-rts-active-high; 192 rs485-rx-during-tx; 193 rs485-rts-delay = <1 1>; [all …]
|
| H A D | am335x-regor.dtsi | 188 /* RS485 - UART1 */ 190 uart1_rs485_pins: pinmux-uart1-rs485-pins { 203 linux,rs485-enabled-at-boot-time; 208 rs485-rts-active-low;
|
| /linux/arch/arm/boot/dts/nxp/imx/ |
| H A D | imx6qdl-dhcom-drc02.dtsi | 30 rs485-rx-en-hog { 33 line-name = "rs485-rx-en"; 85 * On DRC02 this UART is used as RS485 interface and RS485_TX_En is 92 linux,rs485-enabled-at-boot-time; 122 * P: uart5 rs485-tx-en 123 * Q: uart5 rs485-rx-en
|
| H A D | imx6ull-dhcom-drc02.dts | 59 rs485-rx-en-hog { 62 line-name = "rs485-rx-en"; 94 /* Use UART as RS485 */ 97 linux,rs485-enabled-at-boot-time;
|