2020-04-13 06:28:08

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH 0/2] Add software flow control support for STM32 UART

From: Manivannan Sadhasivam <[email protected]>

Hello,

This patchset adds software flow control support for STM32 UART controller.
This is necessary for the upcoming STM32MP1 based board called Stinger96
IoT-Box. On that board, a bluetooth chip is connected to one of the UART
controller but the CTS/RTS lines got swapped mistakenly. So in order to
workaround that hardware bug and also to support the usecase of using only
Tx/Rx pins, this patchset adds software flow control support.

This patchset has been validated w/ Stinger96 IoT-Box connected to Murata
WiFi-BT combo chip.

Thanks,
Mani

Manivannan Sadhasivam (2):
dt-bindings: serial: Add binding for software flow control in STM32
UART
tty: serial: Add software flow control support for STM32 USART

.../bindings/serial/st,stm32-uart.yaml | 15 +-
drivers/tty/serial/stm32-usart.c | 143 +++++++++++++++++-
drivers/tty/serial/stm32-usart.h | 4 +
3 files changed, 155 insertions(+), 7 deletions(-)

--
2.17.1


2020-04-13 10:29:00

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 0/2] Add software flow control support for STM32 UART

On Mon, Apr 13, 2020 at 7:06 AM <[email protected]> wrote:
>
> From: Manivannan Sadhasivam <[email protected]>
>
> Hello,
>
> This patchset adds software flow control support for STM32 UART controller.
> This is necessary for the upcoming STM32MP1 based board called Stinger96
> IoT-Box. On that board, a bluetooth chip is connected to one of the UART
> controller but the CTS/RTS lines got swapped mistakenly. So in order to
> workaround that hardware bug and also to support the usecase of using only
> Tx/Rx pins, this patchset adds software flow control support.
>
> This patchset has been validated w/ Stinger96 IoT-Box connected to Murata
> WiFi-BT combo chip.
>

I think it's a mix of terminology or so. Looking into the patches I
found that it's required to have GPIOs for SW flow control.
No, SW flow control does not require any additional signals, except RxD/TxD.

On top of that, it seems you adding mctrl-gpio functionality. Why
can't you use that one? And thus no bindings needs to be updated.

> Thanks,
> Mani
>
> Manivannan Sadhasivam (2):
> dt-bindings: serial: Add binding for software flow control in STM32
> UART
> tty: serial: Add software flow control support for STM32 USART
>
> .../bindings/serial/st,stm32-uart.yaml | 15 +-
> drivers/tty/serial/stm32-usart.c | 143 +++++++++++++++++-
> drivers/tty/serial/stm32-usart.h | 4 +
> 3 files changed, 155 insertions(+), 7 deletions(-)
>
> --
> 2.17.1
>


--
With Best Regards,
Andy Shevchenko

2020-04-16 21:24:54

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH 0/2] Add software flow control support for STM32 UART

Hi Andy,

On Mon, Apr 13, 2020 at 12:17:21PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 13, 2020 at 7:06 AM <[email protected]> wrote:
> >
> > From: Manivannan Sadhasivam <[email protected]>
> >
> > Hello,
> >
> > This patchset adds software flow control support for STM32 UART controller.
> > This is necessary for the upcoming STM32MP1 based board called Stinger96
> > IoT-Box. On that board, a bluetooth chip is connected to one of the UART
> > controller but the CTS/RTS lines got swapped mistakenly. So in order to
> > workaround that hardware bug and also to support the usecase of using only
> > Tx/Rx pins, this patchset adds software flow control support.
> >
> > This patchset has been validated w/ Stinger96 IoT-Box connected to Murata
> > WiFi-BT combo chip.
> >
>
> I think it's a mix of terminology or so. Looking into the patches I
> found that it's required to have GPIOs for SW flow control.
> No, SW flow control does not require any additional signals, except RxD/TxD.
>

Yikes. Yes I got it wrong. 'st,hw-flow-ctrl' property confused me :)

> On top of that, it seems you adding mctrl-gpio functionality. Why
> can't you use that one? And thus no bindings needs to be updated.
>

Sure. This looks feasible. Will submit a follow up patch.

Thanks,
Mani

> > Thanks,
> > Mani
> >
> > Manivannan Sadhasivam (2):
> > dt-bindings: serial: Add binding for software flow control in STM32
> > UART
> > tty: serial: Add software flow control support for STM32 USART
> >
> > .../bindings/serial/st,stm32-uart.yaml | 15 +-
> > drivers/tty/serial/stm32-usart.c | 143 +++++++++++++++++-
> > drivers/tty/serial/stm32-usart.h | 4 +
> > 3 files changed, 155 insertions(+), 7 deletions(-)
> >
> > --
> > 2.17.1
> >
>
>
> --
> With Best Regards,
> Andy Shevchenko