* [PATCHv2 0/2] serial: uartps: Make flowcontrol configurable
@ 2019-04-02 5:06 shubhrajyoti.datta
2019-04-02 5:06 ` [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts shubhrajyoti.datta
2019-04-02 5:06 ` [PATCHv2 2/2] serial: uartps: Add support for nortscts shubhrajyoti.datta
0 siblings, 2 replies; 7+ messages in thread
From: shubhrajyoti.datta @ 2019-04-02 5:06 UTC (permalink / raw)
To: devicetree
Cc: michal.simek, gregkh, jslaby, robh+dt, linux-serial,
Shubhrajyoti Datta
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Add support for nortscts.
To add support for same.
Shubhrajyoti Datta (2):
dt-bindings: xilinx-uartps: Add support for noctsrts
serial: uartps: Add support for nortscts
Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
drivers/tty/serial/xilinx_uartps.c | 12 ++++++++++++
2 files changed, 16 insertions(+)
--
2.1.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts
2019-04-02 5:06 [PATCHv2 0/2] serial: uartps: Make flowcontrol configurable shubhrajyoti.datta
@ 2019-04-02 5:06 ` shubhrajyoti.datta
2019-04-06 6:06 ` Rob Herring
2019-04-02 5:06 ` [PATCHv2 2/2] serial: uartps: Add support for nortscts shubhrajyoti.datta
1 sibling, 1 reply; 7+ messages in thread
From: shubhrajyoti.datta @ 2019-04-02 5:06 UTC (permalink / raw)
To: devicetree
Cc: michal.simek, gregkh, jslaby, robh+dt, linux-serial,
Shubhrajyoti Datta
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Vivado has a configurationo for selecting the flow control.
Add a dt binding to check for the same.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
index 227bb77..5161a05 100644
--- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
+++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
@@ -12,6 +12,10 @@ Required properties:
See ../clocks/clock-bindings.txt for details.
+Optional properties:
+- xlnx,nortscts: The presence of this property indicates that the
+ UART does not support modem lines for RTS/CTS hardware flow control.
+
Example:
uart@e0000000 {
compatible = "cdns,uart-r1p8";
--
2.1.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCHv2 2/2] serial: uartps: Add support for nortscts
2019-04-02 5:06 [PATCHv2 0/2] serial: uartps: Make flowcontrol configurable shubhrajyoti.datta
2019-04-02 5:06 ` [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts shubhrajyoti.datta
@ 2019-04-02 5:06 ` shubhrajyoti.datta
1 sibling, 0 replies; 7+ messages in thread
From: shubhrajyoti.datta @ 2019-04-02 5:06 UTC (permalink / raw)
To: devicetree
Cc: michal.simek, gregkh, jslaby, robh+dt, linux-serial,
Shubhrajyoti Datta
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Having modem control is configurable. Add support for the same by
adding a nortscts property.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
drivers/tty/serial/xilinx_uartps.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 9a7f943..1035339 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -193,6 +193,7 @@ struct cdns_uart {
int id;
struct notifier_block clk_rate_change_nb;
u32 quirks;
+ bool nortscts;
};
struct cdns_platform_data {
u32 quirks;
@@ -1004,6 +1005,11 @@ static void cdns_uart_config_port(struct uart_port *port, int flags)
*/
static unsigned int cdns_uart_get_mctrl(struct uart_port *port)
{
+ struct cdns_uart *cdns_uart_data = port->private_data;
+
+ if (cdns_uart_data->nortscts)
+ return 0;
+
return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
}
@@ -1011,6 +1017,10 @@ static void cdns_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
{
u32 val;
u32 mode_reg;
+ struct cdns_uart *cdns_uart_data = port->private_data;
+
+ if (cdns_uart_data->nortscts)
+ return;
val = readl(port->membase + CDNS_UART_MODEMCR);
mode_reg = readl(port->membase + CDNS_UART_MR);
@@ -1669,6 +1679,8 @@ static int cdns_uart_probe(struct platform_device *pdev)
console_port = NULL;
#endif
+ cdns_uart_data->nortscts = of_property_read_bool(pdev->dev.of_node,
+ "xlnx,uart-nortscts");
return 0;
err_out_pm_disable:
--
2.1.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts
2019-04-02 5:06 ` [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts shubhrajyoti.datta
@ 2019-04-06 6:06 ` Rob Herring
2019-04-08 3:26 ` Shubhrajyoti Datta
2020-09-10 5:56 ` Shubhrajyoti Datta
0 siblings, 2 replies; 7+ messages in thread
From: Rob Herring @ 2019-04-06 6:06 UTC (permalink / raw)
To: shubhrajyoti.datta
Cc: devicetree, michal.simek, gregkh, jslaby, linux-serial,
Shubhrajyoti Datta
On Tue, Apr 02, 2019 at 10:36:17AM +0530, shubhrajyoti.datta@gmail.com wrote:
> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
>
> Vivado has a configurationo for selecting the flow control.
Vivado is ?
> Add a dt binding to check for the same.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> ---
> Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> index 227bb77..5161a05 100644
> --- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
> +++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> @@ -12,6 +12,10 @@ Required properties:
> See ../clocks/clock-bindings.txt for details.
>
>
> +Optional properties:
> +- xlnx,nortscts: The presence of this property indicates that the
> + UART does not support modem lines for RTS/CTS hardware flow control.
We already have 'uart-has-rtscts'. Please use that. Maybe you need a new
compatible as I'd guess current users assume RTS/CTS is present.
> +
> Example:
> uart@e0000000 {
> compatible = "cdns,uart-r1p8";
> --
> 2.1.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts
2019-04-06 6:06 ` Rob Herring
@ 2019-04-08 3:26 ` Shubhrajyoti Datta
2019-04-08 18:36 ` Rob Herring
2020-09-10 5:56 ` Shubhrajyoti Datta
1 sibling, 1 reply; 7+ messages in thread
From: Shubhrajyoti Datta @ 2019-04-08 3:26 UTC (permalink / raw)
To: Rob Herring
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Michal Simek, Greg Kroah-Hartman, jslaby, linux-serial,
Shubhrajyoti Datta
Hi Rob,
Thanks for the review.
On Sat, Apr 6, 2019 at 11:36 AM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Apr 02, 2019 at 10:36:17AM +0530, shubhrajyoti.datta@gmail.com wrote:
> > From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> >
> > Vivado has a configurationo for selecting the flow control.
>
> Vivado is ?
>
> > Add a dt binding to check for the same.
> >
> > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> > ---
> > Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > index 227bb77..5161a05 100644
> > --- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > +++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > @@ -12,6 +12,10 @@ Required properties:
> > See ../clocks/clock-bindings.txt for details.
> >
> >
> > +Optional properties:
> > +- xlnx,nortscts: The presence of this property indicates that the
> > + UART does not support modem lines for RTS/CTS hardware flow control.
>
> We already have 'uart-has-rtscts'. Please use that. Maybe you need a new
> compatible as I'd guess current users assume RTS/CTS is present.
the setting in vivado (tool helps configure the board) which says no
flowcontrol.
this just keeps the lines in a unknown state.
this issue with 'uart-has-rtscts' is backward compatibility
current code assumes rts / cts is
present. If not preset then it will return false. So I thought of
having a property with the inverse.
>
> > +
> > Example:
> > uart@e0000000 {
> > compatible = "cdns,uart-r1p8";
> > --
> > 2.1.1
> >
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts
2019-04-08 3:26 ` Shubhrajyoti Datta
@ 2019-04-08 18:36 ` Rob Herring
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2019-04-08 18:36 UTC (permalink / raw)
To: Shubhrajyoti Datta
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Michal Simek, Greg Kroah-Hartman, Jiri Slaby,
open list:SERIAL DRIVERS, Shubhrajyoti Datta
On Sun, Apr 7, 2019 at 10:26 PM Shubhrajyoti Datta
<shubhrajyoti.datta@gmail.com> wrote:
>
> Hi Rob,
> Thanks for the review.
>
> On Sat, Apr 6, 2019 at 11:36 AM Rob Herring <robh@kernel.org> wrote:
> >
> > On Tue, Apr 02, 2019 at 10:36:17AM +0530, shubhrajyoti.datta@gmail.com wrote:
> > > From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> > >
> > > Vivado has a configurationo for selecting the flow control.
> >
> > Vivado is ?
> >
> > > Add a dt binding to check for the same.
> > >
> > > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> > > ---
> > > Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > > index 227bb77..5161a05 100644
> > > --- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > > +++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > > @@ -12,6 +12,10 @@ Required properties:
> > > See ../clocks/clock-bindings.txt for details.
> > >
> > >
> > > +Optional properties:
> > > +- xlnx,nortscts: The presence of this property indicates that the
> > > + UART does not support modem lines for RTS/CTS hardware flow control.
> >
> > We already have 'uart-has-rtscts'. Please use that. Maybe you need a new
> > compatible as I'd guess current users assume RTS/CTS is present.
>
> the setting in vivado (tool helps configure the board) which says no
> flowcontrol.
> this just keeps the lines in a unknown state.
>
> this issue with 'uart-has-rtscts' is backward compatibility
> current code assumes rts / cts is
> present. If not preset then it will return false. So I thought of
> having a property with the inverse.
Searching more, we also have 'cts-override' (in snps-dw-apb-uart.txt).
How about using that? You don't really need to care about RTS as
setting it will just have no effect.
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts
2019-04-06 6:06 ` Rob Herring
2019-04-08 3:26 ` Shubhrajyoti Datta
@ 2020-09-10 5:56 ` Shubhrajyoti Datta
1 sibling, 0 replies; 7+ messages in thread
From: Shubhrajyoti Datta @ 2020-09-10 5:56 UTC (permalink / raw)
To: Rob Herring
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Michal Simek, Greg Kroah-Hartman, jslaby, linux-serial,
Shubhrajyoti Datta
Hi Rob,
Thanks for the review.
On Sat, Apr 6, 2019 at 11:36 AM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Apr 02, 2019 at 10:36:17AM +0530, shubhrajyoti.datta@gmail.com wrote:
> > From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> >
> > Vivado has a configurationo for selecting the flow control.
>
> Vivado is ?
>
> > Add a dt binding to check for the same.
> >
> > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> > ---
> > Documentation/devicetree/bindings/serial/cdns,uart.txt | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > index 227bb77..5161a05 100644
> > --- a/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > +++ b/Documentation/devicetree/bindings/serial/cdns,uart.txt
> > @@ -12,6 +12,10 @@ Required properties:
> > See ../clocks/clock-bindings.txt for details.
> >
> >
> > +Optional properties:
> > +- xlnx,nortscts: The presence of this property indicates that the
> > + UART does not support modem lines for RTS/CTS hardware flow control.
>
> We already have 'uart-has-rtscts'. Please use that. Maybe you need a new
> compatible as I'd guess current users assume RTS/CTS is present.
>
Current behavior is it is with 'uart-has-rtscts . However to keep
backward compatibility.
I added nortscts .
Let me know if we can tackle that or can we change the default behavior?
> > +
> > Example:
> > uart@e0000000 {
> > compatible = "cdns,uart-r1p8";
> > --
> > 2.1.1
> >
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-09-10 5:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-02 5:06 [PATCHv2 0/2] serial: uartps: Make flowcontrol configurable shubhrajyoti.datta
2019-04-02 5:06 ` [PATCHv2 1/2] dt-bindings: xilinx-uartps: Add support for noctsrts shubhrajyoti.datta
2019-04-06 6:06 ` Rob Herring
2019-04-08 3:26 ` Shubhrajyoti Datta
2019-04-08 18:36 ` Rob Herring
2020-09-10 5:56 ` Shubhrajyoti Datta
2019-04-02 5:06 ` [PATCHv2 2/2] serial: uartps: Add support for nortscts shubhrajyoti.datta
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).