* [PATCH v2 1/5] doc: DT: Add Generic Serial Device Tree Bindings
[not found] <1461338544-29568-1-git-send-email-geert+renesas@glider.be>
@ 2016-04-22 15:22 ` Geert Uytterhoeven
2016-04-22 16:39 ` Arnd Bergmann
2016-04-22 15:22 ` [PATCH v2 2/5] serial: imx: Use generic uart-has-rtscts DT property Geert Uytterhoeven
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2016-04-22 15:22 UTC (permalink / raw)
To: linux-arm-kernel
Document a set of generic properties for describing UARTs in a
device tree:
1. The GPIO modem control properties are currently duplicated across
hardware-specific binding documentation,
2. The property for dedicated RTS/CTS hardware flow control lines is
already supported by several drivers, albeit with a vendor-specific
prefix, hence make it generic.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <rob@kernel.org>
---
v2:
- Add Acked-by,
- Drop out[12]-gpios.
---
.../devicetree/bindings/serial/serial.txt | 57 ++++++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/serial/serial.txt
diff --git a/Documentation/devicetree/bindings/serial/serial.txt b/Documentation/devicetree/bindings/serial/serial.txt
new file mode 100644
index 0000000000000000..fd970f76a7b8ef0c
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/serial.txt
@@ -0,0 +1,57 @@
+Generic Serial DT Bindings
+
+This document lists a set of generic properties for describing UARTs in a
+device tree. Whether these properties apply to a particular device depends on
+the DT bindings for the actual device.
+
+Optional properties:
+ - cts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
+ used as the UART's CTS line.
+ - dcd-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
+ used as the UART's DCD line.
+ - dsr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
+ used as the UART's DSR line.
+ - dtr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
+ used as the UART's DTR line.
+ - rng-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
+ used as the UART's RNG line.
+ - rts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
+ used as the UART's RTS line.
+
+ - uart-has-rtscts: The presence of this property indicates that the
+ UART has dedicated lines for RTS/CTS hardware flow control, and that
+ they are available for use (wired and enabled by pinmux configuration).
+ This depends on both the UART hardware and the board wiring.
+ Note that this property is mutually-exclusive with "cts-gpios" and
+ "rts-gpios" above.
+
+
+Examples:
+
+ uart1: serial at 48022000 {
+ compatible = "ti,am3352-uart", "ti,omap3-uart";
+ ti,hwmods = "uart2";
+ clock-frequency = <48000000>;
+ reg = <0x48022000 0x2000>;
+ interrupts = <73>;
+ dmas = <&edma 28 0>, <&edma 29 0>;
+ dma-names = "tx", "rx";
+ dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
+ dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
+ dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
+ rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
+ cts-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ rts-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ status = "okay";
+ };
+
+ scifa4: serial at e6c80000 {
+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+ reg = <0xe6c80000 0x100>;
+ interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>;
+ clock-names = "fck";
+ power-domains = <&pd_a3sp>;
+ uart-has-rtscts;
+ status = "okay";
+ };
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/5] serial: imx: Use generic uart-has-rtscts DT property
[not found] <1461338544-29568-1-git-send-email-geert+renesas@glider.be>
2016-04-22 15:22 ` [PATCH v2 1/5] doc: DT: Add Generic Serial Device Tree Bindings Geert Uytterhoeven
@ 2016-04-22 15:22 ` Geert Uytterhoeven
2016-04-25 12:50 ` Rob Herring
[not found] ` <1461338544-29568-4-git-send-email-geert+renesas@glider.be>
[not found] ` <1461338544-29568-6-git-send-email-geert+renesas@glider.be>
3 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2016-04-22 15:22 UTC (permalink / raw)
To: linux-arm-kernel
Convert the Freescale IMX UART driver from using the vendor-specific
"fsl,uart-has-rtscts" to the generic "uart-has-rtscts" DT property, as
documented by the Generic Serial DT Bindings.
The old vendor-specific property is still recognized by the driver for
backwards compatibility, but deprecated.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- No changes.
Documentation/devicetree/bindings/serial/fsl-imx-uart.txt | 4 ++--
drivers/tty/serial/imx.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt b/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt
index ed94c217c98d18a6..1e82802d8e322db5 100644
--- a/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt
+++ b/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt
@@ -6,7 +6,7 @@ Required properties:
- interrupts : Should contain uart interrupt
Optional properties:
-- fsl,uart-has-rtscts : Indicate the uart has rts and cts
+- uart-has-rtscts : Indicate the uart has rts and cts
- fsl,irda-mode : Indicate the uart supports irda mode
- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
in DCE mode by default.
@@ -24,6 +24,6 @@ uart1: serial at 73fbc000 {
compatible = "fsl,imx51-uart", "fsl,imx21-uart";
reg = <0x73fbc000 0x4000>;
interrupts = <31>;
- fsl,uart-has-rtscts;
+ uart-has-rtscts;
fsl,dte-mode;
};
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 231e7d5caf6c1845..9fc09d3de1e2428b 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1927,7 +1927,8 @@ static int serial_imx_probe_dt(struct imx_port *sport,
}
sport->port.line = ret;
- if (of_get_property(np, "fsl,uart-has-rtscts", NULL))
+ if (of_get_property(np, "uart-has-rtscts", NULL) ||
+ of_get_property(np, "fsl,uart-has-rtscts", NULL) /* deprecated */)
sport->have_rtscts = 1;
if (of_get_property(np, "fsl,dte-mode", NULL))
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 1/5] doc: DT: Add Generic Serial Device Tree Bindings
2016-04-22 15:22 ` [PATCH v2 1/5] doc: DT: Add Generic Serial Device Tree Bindings Geert Uytterhoeven
@ 2016-04-22 16:39 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-04-22 16:39 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 22 April 2016 17:22:20 Geert Uytterhoeven wrote:
> Document a set of generic properties for describing UARTs in a
> device tree:
> 1. The GPIO modem control properties are currently duplicated across
> hardware-specific binding documentation,
> 2. The property for dedicated RTS/CTS hardware flow control lines is
> already supported by several drivers, albeit with a vendor-specific
> prefix, hence make it generic.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Acked-by: Rob Herring <rob@kernel.org>
>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/5] serial: imx: Use generic uart-has-rtscts DT property
2016-04-22 15:22 ` [PATCH v2 2/5] serial: imx: Use generic uart-has-rtscts DT property Geert Uytterhoeven
@ 2016-04-25 12:50 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2016-04-25 12:50 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 22, 2016 at 05:22:21PM +0200, Geert Uytterhoeven wrote:
> Convert the Freescale IMX UART driver from using the vendor-specific
> "fsl,uart-has-rtscts" to the generic "uart-has-rtscts" DT property, as
> documented by the Generic Serial DT Bindings.
>
> The old vendor-specific property is still recognized by the driver for
> backwards compatibility, but deprecated.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v2:
> - No changes.
>
> Documentation/devicetree/bindings/serial/fsl-imx-uart.txt | 4 ++--
> drivers/tty/serial/imx.c | 3 ++-
> 2 files changed, 4 insertions(+), 3 deletions(-)
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/5] serial: mxs-auart: Use generic uart-has-rtscts DT property
[not found] ` <1461338544-29568-4-git-send-email-geert+renesas@glider.be>
@ 2016-04-25 12:51 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2016-04-25 12:51 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 22, 2016 at 05:22:22PM +0200, Geert Uytterhoeven wrote:
> Convert the Freescale MXS AUART driver from using the vendor-specific
> "fsl,uart-has-rtscts" to the generic "uart-has-rtscts" DT property, as
> documented by the Generic Serial DT Bindings.
>
> The old vendor-specific property is still recognized by the driver for
> backwards compatibility, but it is deprecated.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v2:
> - No changes.
>
> Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt | 2 +-
> drivers/tty/serial/mxs-auart.c | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 5/5] serial: sirf: Use generic uart-has-rtscts DT property
[not found] ` <1461338544-29568-6-git-send-email-geert+renesas@glider.be>
@ 2016-04-25 12:52 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2016-04-25 12:52 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 22, 2016 at 05:22:24PM +0200, Geert Uytterhoeven wrote:
> Convert the SiRF UART driver from using the vendor-specific
> "sirf,uart-has-rtscts" to the generic "uart-has-rtscts" DT property, as
> documented by the Generic Serial DT Bindings.
>
> The old vendor-specific property is still recognized by the driver for
> backwards compatibility, but deprecated.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v2:
> - No changes.
>
> Documentation/devicetree/bindings/serial/sirf-uart.txt | 8 ++++----
> drivers/tty/serial/sirfsoc_uart.c | 3 ++-
> 2 files changed, 6 insertions(+), 5 deletions(-)
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-25 12:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1461338544-29568-1-git-send-email-geert+renesas@glider.be>
2016-04-22 15:22 ` [PATCH v2 1/5] doc: DT: Add Generic Serial Device Tree Bindings Geert Uytterhoeven
2016-04-22 16:39 ` Arnd Bergmann
2016-04-22 15:22 ` [PATCH v2 2/5] serial: imx: Use generic uart-has-rtscts DT property Geert Uytterhoeven
2016-04-25 12:50 ` Rob Herring
[not found] ` <1461338544-29568-4-git-send-email-geert+renesas@glider.be>
2016-04-25 12:51 ` [PATCH v2 3/5] serial: mxs-auart: " Rob Herring
[not found] ` <1461338544-29568-6-git-send-email-geert+renesas@glider.be>
2016-04-25 12:52 ` [PATCH v2 5/5] serial: sirf: " Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).