Currently the documentation claims that a maximum of 1000 msecs is allowed for RTS delays. However nothing actually checks the values read from device tree/ACPI and so it is possible to set much higher values. There is already a maximum of 100 ms enforced for RTS delays that are set via the UART TIOCSRS485 ioctl. To be consistent with that use the same limit for DT/ACPI values. Although this change is visible to userspace the risk of breaking anything when reducing the max delays from 1000 to 100 ms should be very low, since 100 ms is already a very high maximum for delays that are usually rather in the usecs range. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Link: https://lore.kernel.org/r/20220710164442.2958979-7-LinoSanfilippo@gmx.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
# SPDX-License-Identifier: GPL-2.0
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/serial/rs485.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: RS485 serial communications Bindings
|
|
|
|
description: The RTS signal is capable of automatically controlling line
|
|
direction for the built-in half-duplex mode. The properties described
|
|
hereafter shall be given to a half-duplex capable UART node.
|
|
|
|
maintainers:
|
|
- Rob Herring <robh@kernel.org>
|
|
|
|
properties:
|
|
rs485-rts-delay:
|
|
description: prop-encoded-array <a b>
|
|
$ref: /schemas/types.yaml#/definitions/uint32-array
|
|
items:
|
|
items:
|
|
- description: Delay between rts signal and beginning of data sent in
|
|
milliseconds. It corresponds to the delay before sending data.
|
|
default: 0
|
|
maximum: 100
|
|
- description: Delay between end of data sent and rts signal in milliseconds.
|
|
It corresponds to the delay after sending data and actual release
|
|
of the line.
|
|
default: 0
|
|
maximum: 100
|
|
|
|
rs485-rts-active-low:
|
|
description: drive RTS low when sending (default is high).
|
|
$ref: /schemas/types.yaml#/definitions/flag
|
|
|
|
rs485-rx-active-high:
|
|
description: Polarity of receiver enable signal (when separate from RTS).
|
|
True indicates active high (default is low).
|
|
$ref: /schemas/types.yaml#/definitions/flag
|
|
|
|
linux,rs485-enabled-at-boot-time:
|
|
description: enables the rs485 feature at boot time. It can be disabled
|
|
later with proper ioctl.
|
|
$ref: /schemas/types.yaml#/definitions/flag
|
|
|
|
rs485-rx-during-tx:
|
|
description: enables the receiving of data even while sending data.
|
|
$ref: /schemas/types.yaml#/definitions/flag
|
|
|
|
rs485-term-gpios:
|
|
description: GPIO pin to enable RS485 bus termination.
|
|
maxItems: 1
|
|
|
|
additionalProperties: true
|
|
|
|
...
|