[PATCH v3 01/10] dt-bindings: serial: stm32: add wakeup option

2019-06-13 Thread Erwan Le Ray
Add a note for enabling wakeup capabilities of usart Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt index 9d3efed..5ec80c1 100644 --- a/Documentation

[PATCH v3 02/10] dt-bindings: serial: add optional pinctrl states

2019-06-13 Thread Erwan Le Ray
From: Bich Hemon Add options for pinctrl states: - "sleep" for low power - "idle" for low power and wakeup capabilities enabled - "no_console_suspend" for enabling console messages in low power Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --

[PATCH v3 04/10] serial: stm32: add pm_runtime support

2019-06-13 Thread Erwan Le Ray
Use pm_runtime for clock management. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index a8f20ba..41898c4 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -810,13

[PATCH v3 07/10] ARM: dts: stm32: update uart4 pin configurations for low power

2019-06-13 Thread Erwan Le Ray
tate to optimize power - "idle" (wakeup capability): keep Rx pin in alternate function - "default" state remains untouched, to be used while the UART is active or in case the no_console_suspend mode is enabled Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray

[PATCH v3 10/10] ARM: dts: stm32: add wakeup capability on each usart/uart on stm32mp157c

2019-06-13 Thread Erwan Le Ray
- Mark all usart/uart devices as wakeup source. - Identify all dedicated interrupts with a specific interrupt name (either "event" or "wakeup"). - add interrupts-extended wakeup interrupt Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi

[PATCH v3 03/10] serial: stm32: select pinctrl state in each suspend/resume function

2019-06-13 Thread Erwan Le Ray
Select either pinctrl sleep state in suspend function or default state in resume function. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 9c2b04e..a8f20ba 100644 --- a/drivers/tty/serial/stm32-usart.c

[PATCH v3 08/10] ARM: dts: stm32: Update pin states for uart4 on stm32mp157c-ed1

2019-06-13 Thread Erwan Le Ray
From: Bich Hemon Add idle and no_console_suspend states to uart4 pin configuration Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts index 62a8c78..34cc847 100644 --- a/arch/arm/boot/dts

[PATCH v3 09/10] ARM: dts: stm32: Update UART4 pin states on stm32mp157a-dk1

2019-06-13 Thread Erwan Le Ray
From: Bich Hemon Add idle and no_console_suspend states to uart4 pin configuration. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157a-dk1.dts b/arch/arm/boot/dts/stm32mp157a-dk1.dts index 098dbfb..b851f80 100644 --- a/arch/arm/boot/dts

[PATCH v2 06/10] serial: stm32: add support for no_console_suspend

2019-06-11 Thread Erwan Le Ray
In order to display console messages in low power mode, console pins must be kept active after suspend call. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 0d43711..00e4d7a 100644 --- a/drivers/tty

[PATCH v2 09/10] ARM: dts: stm32: Update UART4 pin states on stm32mp157a-dk1

2019-06-11 Thread Erwan Le Ray
From: Bich Hemon Add idle and no_console_suspend states to uart4 pin configuration. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157a-dk1.dts b/arch/arm/boot/dts/stm32mp157a-dk1.dts index 098dbfb..b851f80 100644 --- a/arch/arm/boot/dts

[PATCH v2 02/10] dt-bindings: serial: add optional pinctrl states

2019-06-11 Thread Erwan Le Ray
From: Bich Hemon Add options for pinctrl states: - "sleep" for low power - "idle" for low power and wakeup capabilities enabled - "no_console_suspend" for enabling console messages in low power Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --

[PATCH v2 10/10] ARM: dts: stm32: add wakeup capability on each usart/uart on stm32mp157c

2019-06-11 Thread Erwan Le Ray
- Mark all usart/uart devices as wakeup source. - Identify all dedicated interrupts with a specific interrupt name (either "event" or "wakeup"). - add interrupts-extended wakeup interrupt Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi

[PATCH v2 05/10] serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP

2019-06-11 Thread Erwan Le Ray
Use __maybe_unused for power management related functionsinstead of fixes: 270e5a74fe4c ("serial: stm32: add wakeup mechanism") Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 60f3faf..0d43711 100644 --- a/drivers/

[PATCH v2 07/10] ARM: dts: stm32: update uart4 pin configurations for low power

2019-06-11 Thread Erwan Le Ray
tate to optimize power - "idle" (wakeup capability): keep Rx pin in alternate function - "default" state remains untouched, to be used while the UART is active or in case the no_console_suspend mode is enabled Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray

[PATCH v2 01/10] dt-bindings: serial: stm32: add wakeup option

2019-06-11 Thread Erwan Le Ray
Add a note for enabling wakeup capabilities of usart Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt index 9d3efed..5ec80c1 100644 --- a/Documentation

[PATCH v2 03/10] serial: stm32: select pinctrl state in each suspend/resume function

2019-06-11 Thread Erwan Le Ray
From: Bich Hemon Select either pinctrl sleep state in suspend function or default state in resume function. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 9c2b04e..04eda75 100644 --- a/drivers/tty

[PATCH v2 04/10] serial: stm32: add pm_runtime support

2019-06-11 Thread Erwan Le Ray
Use pm_runtime for clock management. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 04eda75..60f3faf 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -809,13

[PATCH v2 08/10] ARM: dts: stm32: Update pin states for uart4 on stm32mp157c-ed1

2019-06-11 Thread Erwan Le Ray
From: Bich Hemon Add idle and no_console_suspend states to uart4 pin configuration Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts index 62a8c78..34cc847 100644 --- a/arch/arm/boot/dts

[PATCH v2 00/10] STM32 usart power improvements

2019-06-11 Thread Erwan Le Ray
UART4 pin states on stm32mp157a-dk1 Erwan Le Ray (6): dt-bindings: serial: stm32: add wakeup option serial: stm32: add pm_runtime support serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP serial: stm32: add support for no_console_suspend ARM: dts: stm32: update uart4 pin

Re: [PATCH] ARM: debug: stm32: add UART early console configuration

2019-06-10 Thread Erwan LE RAY
Hi Olof, Arnd and Kevin, Gentle reminder on my feedback request. Best regards, Erwan.

Re: [PATCH v3] serial: stm32: fix a recursive locking in stm32_config_rs485

2019-06-06 Thread Erwan LE RAY
off-by: Borut Seljak Hi Borut, Thanks for your patch. Acked-by: Erwan Le Ray Please correct a typo in commit message: "Fixes" instead "fixes" Erwan. > --- > drivers/tty/serial/stm32-usart.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/driv

Re: Fwd: [PATCH] serial: stm32: fix a recursive locking in stm32_config_rs485

2019-06-06 Thread Erwan LE RAY
Hi Borut, Please remove unused "flags" variable declaration. Erwan. On 6/4/19 3:55 PM, Erwan LE RAY wrote: > >> Hi Borut, >> >> Please add the following line in the commit message (before your >> sign-off) in a V2 of your patch: >> >> F

Re: Fwd: [PATCH -next] serial: stm32: Make stm32_get_databits static

2019-06-05 Thread Erwan LE RAY
OK for me. Erwan. On 6/5/19 9:08 AM, Fabrice Gasnier wrote: > Un autre qu'on avait pas vu... > > > Forwarded Message > Subject: [PATCH -next] serial: stm32: Make stm32_get_databits static > Date: Tue, 28 May 2019 17:04:49 +0800 > From: YueHaibing > To:

Re: Fwd: [PATCH] serial: stm32: fix a recursive locking in stm32_config_rs485

2019-06-04 Thread Erwan LE RAY
> Hi Borut, > > Please add the following line in the commit message (before your > sign-off) in a V2 of your patch: > > fixes: 1bcda09d291081 ("serial: stm32: add support for RS485 hardware > control mode") > > I'm OK with the patch itself. > > Erwan. > > > Subject: [PATCH] serial: stm32: fix

Re: Fwd: [PATCH] serial: stm32: fix a recursive locking in stm32_config_rs485

2019-06-04 Thread Erwan LE RAY
Hi Borut, Please add the following line in the commit message (before your sign-off) in a V2 of your patch: fixes: 1bcda09d291081 ("serial: stm32: add support for RS485 hardware control mode") I'm OK with the patch itself. Erwan. Subject: [PATCH] serial: stm32: fix a recursive locking in >

[PATCH 10/10] ARM: dts: stm32: add wakeup capability on each usart/uart on stm32mp157c

2019-06-04 Thread Erwan Le Ray
- Mark all usart/uart devices as wakeup source. - Identify all dedicated interrupts with a specific interrupt name (either "event" or "wakeup"). - add interrupts-extended wakeup interrupt Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi

[PATCH 09/10] ARM: dts: stm32: Update UART4 pin states on stm32mp157a-dk1

2019-06-04 Thread Erwan Le Ray
From: Bich Hemon Add idle and no_console_suspend states to uart4 pin configuration. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157a-dk1.dts b/arch/arm/boot/dts/stm32mp157a-dk1.dts index 098dbfb..b851f80 100644 --- a/arch/arm/boot/dts

[PATCH 06/10] serial: stm32: add support for no_console_suspend

2019-06-04 Thread Erwan Le Ray
In order to display console messages in low power mode, console pins must be kept active after suspend call. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index aa3da1c..573eae1 100644 --- a/drivers/tty

[PATCH 07/10] ARM: dts: stm32: update uart4 pin configurations for low power

2019-06-04 Thread Erwan Le Ray
tate to optimize power - "idle" (wakeup capability): keep Rx pin in alternate function - "default" state remains untouched, to be used while the UART is active or in case the no_console_suspend mode is enabled Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray

[PATCH 08/10] ARM: dts: stm32: Update pin states for uart4 on stm32mp157c-ed1

2019-06-04 Thread Erwan Le Ray
From: Bich Hemon Add idle and no_console_suspend states to uart4 pin configuration Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts index 62a8c78..34cc847 100644 --- a/arch/arm/boot/dts

[PATCH 05/10] serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP

2019-06-04 Thread Erwan Le Ray
Use __maybe_unused for power management related functionsinstead of #if CONFIG_PM_SLEEP to simply the code. fixes: 270e5a74fe4c ("serial: stm32: add wakeup mechanism") Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c ind

[PATCH 04/10] serial: stm32: add pm_runtime support

2019-06-04 Thread Erwan Le Ray
Use pm_runtime for clock management. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 8a7c582..05d2ef6 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -765,13

[PATCH 00/10] STM32 usart power improvements

2019-06-04 Thread Erwan Le Ray
UART4 pin states on stm32mp157a-dk1 Erwan Le Ray (6): dt-bindings: serial: stm32: add wakeup option serial: stm32: add pm_runtime support serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP serial: stm32: add support for no_console_suspend ARM: dts: stm32: update uart4 pin

[PATCH 02/10] dt-bindings: serial: add optional pinctrl states

2019-06-04 Thread Erwan Le Ray
From: Bich Hemon Add options for pinctrl states: - "sleep" for low power - "idle" for low power and wakeup capabilities enabled - "no_console_suspend" for enabling console messages in low power Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --

[PATCH 01/10] dt-bindings: serial: stm32: add wakeup option

2019-06-04 Thread Erwan Le Ray
Add a note for enabling wakeup capabilities of usart Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt index 9d3efed..5ec80c1 100644 --- a/Documentation

[PATCH 03/10] serial: stm32: select pinctrl state in each suspend/resume function

2019-06-04 Thread Erwan Le Ray
From: Bich Hemon Select either pinctrl sleep state in suspend function or default state in resume function. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index e8d7a7b..8a7c582 100644 --- a/drivers/tty

[PATCH 1/1] dt-bindings: stm32: serial: Add optional reset

2019-05-24 Thread Erwan Le Ray
STM32 serial can be reset via reset controller. Add an optional reset property to stm32 usart bindings. Signed-off-by: Erwan Le Ray diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt index 9d3efed..a6b1948

[PATCH 3/7] serial: stm32: fix rx data length when parity enabled

2019-05-21 Thread Erwan Le Ray
- Fixes a rx data error when data length < 8 bits and parity is enabled. RDR register MSB is used for parity bit reception. - Adds a mask to ignore MSB when data is get from RDR. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray diff --git

[PATCH 2/7] serial: stm32: fix rx error handling

2019-05-21 Thread Erwan Le Ray
status. The status read for "n" frame was the status of "n+1" frame". - Fixes break detection was not triggered by the expected register. Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver") Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial

[PATCH 5/7] serial: stm32: Add support of TC bit status check

2019-05-21 Thread Erwan Le Ray
is added in stm32_transmit_char routine, in order to be cleared before transmitting in both dma and PIO tx modes. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c ind

[PATCH 4/7] serial: stm32: fix transmit_chars when tx is stopped

2019-05-21 Thread Erwan Le Ray
Disables the tx irq when the transmission is ended and updates stop_tx conditions for code cleanup. Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver") Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c ind

[PATCH 6/7] serial: stm32: fix wakeup source initialization

2019-05-21 Thread Erwan Le Ray
Fixes dedicated_irq_wakeup issue and deactivated uart as wakeup source by default. Fixes: 270e5a74fe4c ("serial: stm32: add wakeup mechanism") Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index d603be9..1334e42 100644 ---

[PATCH 1/7] serial: stm32: fix word length configuration

2019-05-21 Thread Erwan Le Ray
("serial: stm32: adding support for stm32f7") Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index e8d7a7b..e832185 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -599,6 +599,36 @@ s

[PATCH 7/7] serial: stm32: fix the get_irq error case

2019-05-21 Thread Erwan Le Ray
Checks the returned values of platform_get_irq() for both required "event" and optional "wakeup" IRQs during probe. This allows the driver probe to be deferred if needed. Removes redundant checks for 'cfg.has_wakeup'. Signed-off-by: Fabien Dessenne Signed-off-by: Erwan

[PATCH 0/7] usart various fixes for STM32

2019-05-21 Thread Erwan Le Ray
This series delivers fixes in various uart functions of stm32-usart driver. Erwan Le Ray (7): serial: stm32: fix word length configuration serial: stm32: fix rx error handling serial: stm32: fix rx data length when parity enabled serial: stm32: fix transmit_chars when tx is stopped

Re: [PATCH] ARM: debug: stm32: add UART early console configuration

2019-05-09 Thread Erwan LE RAY
Hi, > > On Wed, 10 Apr 2019 at 10:03, Erwan Le Ray wrote: >> - This patch allows to configure UART instance for early console by setting >> physical and virtual base addresses. >> - This patch adds UART early console support for stm32h7 and stm32mp157c. > *Newbie kernel sp

[PATCH] ARM: debug: stm32: add UART early console configuration

2019-04-10 Thread Erwan Le Ray
- This patch allows to configure UART instance for early console by setting physical and virtual base addresses. - This patch adds UART early console support for stm32h7 and stm32mp157c. Signed-off-by: Erwan Le Ray diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 6d6e033

<    1   2