Re: [PATCH 4/7] dt_bindings: snps-dw-apb-uart: Add RS485

From: Rob Herring
Date: Wed Mar 02 2022 - 12:47:22 EST


On Wed, Mar 02, 2022 at 11:56:03AM +0200, Ilpo Järvinen wrote:
> Add RS485 enable & line polarity properties.
>
> Cc: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: devicetree@xxxxxxxxxxxxxxx
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> ---
> .../bindings/serial/snps-dw-apb-uart.yaml | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
> index 12137fe80acf..8d440afabb1f 100644
> --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
> +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
> @@ -103,6 +103,23 @@ properties:
> register. Define this if your serial port does not use this pin.
> type: boolean
>
> + snps,rs485-interface-en:
> + description: Use true RS-485 DE and RE signals (in contrast to RS-485
> + emulation using RTS). Requires IP version 4 or above.
> + type: boolean
> +

> + snps,de-active-high:
> + description: Defines the polarity of driver enable (DE_EN) signal.
> + Meaningful only with snps,rs485-interface-en. True indicates active
> + high.
> + type: boolean
> +
> + snps,re-active-high:
> + description: Defines the polarity of receiver enable (RE_EN) signal.
> + Meaningful only with snps,rs485-interface-en. True indicates active
> + high.
> + type: boolean

Seems plausible that other rs485 implementations could have varying
polarities too. IOW, should be common properties.

> +
> required:
> - compatible
> - reg
> --
> 2.30.2
>