mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
6abe9ea8a5
rs485 allows for robust half-duplex serial communication. It is often implemented by attaching an rs485 transceiver to a UART. The UART's RTS line is wired to the transceiver's Transmit Enable pin and determines whether the transceiver is sending or receiving. Examples for such transceivers are Maxim MAX13451E and TI SN65HVD1781A: https://datasheets.maximintegrated.com/en/ds/MAX13450E-MAX13451E.pdf http://www.ti.com/lit/ds/symlink/sn65hvd1781a-q1.pdf In the devicetree, the transceiver itself is not represented, only the UART is. A few rs485-specific dt-bindings already exist and these go into the UART's device node. This commit adds a binding to set the RTS polarity. Most (if not all) transceivers require the Transmit Enable pin be driven high for sending, but in some cases boards may negate the pin and RTS must then be driven low. Consequently the polarity defaults to active high but can be inverted with the newly added "rs485-rts-active-low" binding. Document this binding in rs485.txt and in the two drivers fsl-imx-uart and fsl-lpuart that are about to be amended with support for it. Curiously, the omap_serial driver defaults to active low and already supports an "rs485-rts-active-high" binding to invert the polarity. This is left unchanged to retain compatibility, but the binding is herewith documented. Cc: Mark Jackson <mpfj@newflow.co.uk> Cc: Michał Oleszczyk <oleszczyk.m@gmail.com> Cc: Rafael Gago Castano <rgc@hms.se> Cc: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lukas Wunner <lukas@wunner.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
36 lines
1.6 KiB
Plaintext
36 lines
1.6 KiB
Plaintext
OMAP UART controller
|
|
|
|
Required properties:
|
|
- compatible : should be "ti,omap2-uart" for OMAP2 controllers
|
|
- compatible : should be "ti,omap3-uart" for OMAP3 controllers
|
|
- compatible : should be "ti,omap4-uart" for OMAP4 controllers
|
|
- compatible : should be "ti,am4372-uart" for AM437x controllers
|
|
- compatible : should be "ti,am3352-uart" for AM335x controllers
|
|
- compatible : should be "ti,dra742-uart" for DRA7x controllers
|
|
- reg : address and length of the register space
|
|
- interrupts or interrupts-extended : Should contain the uart interrupt
|
|
specifier or both the interrupt
|
|
controller phandle and interrupt
|
|
specifier.
|
|
- ti,hwmods : Must be "uart<n>", n being the instance number (1-based)
|
|
|
|
Optional properties:
|
|
- clock-frequency : frequency of the clock input to the UART
|
|
- dmas : DMA specifier, consisting of a phandle to the DMA controller
|
|
node and a DMA channel number.
|
|
- dma-names : "rx" for receive channel, "tx" for transmit channel.
|
|
- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt
|
|
- rs485-rts-active-high: drive RTS high when sending (default is low).
|
|
|
|
Example:
|
|
|
|
uart4: serial@49042000 {
|
|
compatible = "ti,omap3-uart";
|
|
reg = <0x49042000 0x400>;
|
|
interrupts = <80>;
|
|
dmas = <&sdma 81 &sdma 82>;
|
|
dma-names = "tx", "rx";
|
|
ti,hwmods = "uart4";
|
|
clock-frequency = <48000000>;
|
|
};
|