linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] stm32 usart wakeup rework
@ 2021-03-19 18:42 Erwan Le Ray
  2021-03-19 18:42 ` [PATCH 1/5] serial: stm32: rework wakeup management Erwan Le Ray
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Erwan Le Ray @ 2021-03-19 18:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Thomas Gleixner, Marc Zyngier,
	Maxime Coquelin, Alexandre Torgue
  Cc: linux-serial, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Erwan Le Ray, Fabrice Gasnier, Valentin Caron,
	Patrice Chotard

This series reworks stm32 usart wakeup management.

Alexandre Torgue (1):
  serial: stm32: update wakeup IRQ management

Erwan Le Ray (4):
  serial: stm32: rework wakeup management
  serial: stm32: clean wakeup handling in serial_suspend
  irqchip/stm32: add usart instances exti direct event support
  ARM: dts: stm32: Add wakeup management on stm32mp15x UART nodes

 arch/arm/boot/dts/stm32mp151.dtsi | 24 ++++++++++++-------
 drivers/irqchip/irq-stm32-exti.c  |  7 ++++++
 drivers/tty/serial/stm32-usart.c  | 40 +++++++++++--------------------
 drivers/tty/serial/stm32-usart.h  |  2 +-
 4 files changed, 38 insertions(+), 35 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/5] serial: stm32: rework wakeup management
  2021-03-19 18:42 [PATCH 0/5] stm32 usart wakeup rework Erwan Le Ray
@ 2021-03-19 18:42 ` Erwan Le Ray
  2021-03-19 18:42 ` [PATCH 2/5] serial: stm32: clean wakeup handling in serial_suspend Erwan Le Ray
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Erwan Le Ray @ 2021-03-19 18:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Thomas Gleixner, Marc Zyngier,
	Maxime Coquelin, Alexandre Torgue
  Cc: linux-serial, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Erwan Le Ray, Fabrice Gasnier, Valentin Caron,
	Patrice Chotard

Rework wakeup management by activating uart as wakeup source when usart
device OR its tty virtual device parent is wakeup source.

This patch aim to avoid potential misalignment between serial and tty
wakeup flags.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>

diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 9db6708e3d9f..11656b6b7c0f 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -1534,7 +1534,7 @@ static int __maybe_unused stm32_usart_serial_suspend(struct device *dev)
 
 	uart_suspend_port(&stm32_usart_driver, port);
 
-	if (device_may_wakeup(dev))
+	if (device_may_wakeup(dev) || device_wakeup_path(dev))
 		stm32_usart_serial_en_wakeup(port, true);
 	else
 		stm32_usart_serial_en_wakeup(port, false);
@@ -1546,7 +1546,7 @@ static int __maybe_unused stm32_usart_serial_suspend(struct device *dev)
 	 * capabilities.
 	 */
 	if (console_suspend_enabled || !uart_console(port)) {
-		if (device_may_wakeup(dev))
+		if (device_may_wakeup(dev) || device_wakeup_path(dev))
 			pinctrl_pm_select_idle_state(dev);
 		else
 			pinctrl_pm_select_sleep_state(dev);
@@ -1561,7 +1561,7 @@ static int __maybe_unused stm32_usart_serial_resume(struct device *dev)
 
 	pinctrl_pm_select_default_state(dev);
 
-	if (device_may_wakeup(dev))
+	if (device_may_wakeup(dev) || device_wakeup_path(dev))
 		stm32_usart_serial_en_wakeup(port, false);
 
 	return uart_resume_port(&stm32_usart_driver, port);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/5] serial: stm32: clean wakeup handling in serial_suspend
  2021-03-19 18:42 [PATCH 0/5] stm32 usart wakeup rework Erwan Le Ray
  2021-03-19 18:42 ` [PATCH 1/5] serial: stm32: rework wakeup management Erwan Le Ray
@ 2021-03-19 18:42 ` Erwan Le Ray
  2021-03-19 18:42 ` [PATCH 3/5] irqchip/stm32: add usart instances exti direct event support Erwan Le Ray
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Erwan Le Ray @ 2021-03-19 18:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Thomas Gleixner, Marc Zyngier,
	Maxime Coquelin, Alexandre Torgue
  Cc: linux-serial, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Erwan Le Ray, Fabrice Gasnier, Valentin Caron,
	Patrice Chotard

Remove useless call to stm32_usart_serial_en_wakeup() routine in suspend
callback. When called with "false" argument, this routine is clearing UESM
and WUFIE bits if usart is not wakeup source. Those bits are already
cleared in set_termios(), and then in serial_resume() callback when usart
is wakeup source.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>

diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 11656b6b7c0f..cc054f07bd83 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -1536,8 +1536,6 @@ static int __maybe_unused stm32_usart_serial_suspend(struct device *dev)
 
 	if (device_may_wakeup(dev) || device_wakeup_path(dev))
 		stm32_usart_serial_en_wakeup(port, true);
-	else
-		stm32_usart_serial_en_wakeup(port, false);
 
 	/*
 	 * When "no_console_suspend" is enabled, keep the pinctrl default state
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/5] irqchip/stm32: add usart instances exti direct event support
  2021-03-19 18:42 [PATCH 0/5] stm32 usart wakeup rework Erwan Le Ray
  2021-03-19 18:42 ` [PATCH 1/5] serial: stm32: rework wakeup management Erwan Le Ray
  2021-03-19 18:42 ` [PATCH 2/5] serial: stm32: clean wakeup handling in serial_suspend Erwan Le Ray
@ 2021-03-19 18:42 ` Erwan Le Ray
  2021-04-07 12:38   ` [irqchip: irq/irqchip-next] irqchip/stm32: Add " irqchip-bot for Erwan Le Ray
  2021-03-19 18:42 ` [PATCH 4/5] serial: stm32: update wakeup IRQ management Erwan Le Ray
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Erwan Le Ray @ 2021-03-19 18:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Thomas Gleixner, Marc Zyngier,
	Maxime Coquelin, Alexandre Torgue
  Cc: linux-serial, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Erwan Le Ray, Fabrice Gasnier, Valentin Caron,
	Patrice Chotard

Add following usart instances exti direct event support (used for UART wake
up).
- exti 26 (USART1) is mapped to GIC 37
- exti 27 (USART2) is mapped to GIC 38
- exti 28 (USART3) is mapped to GIC 39
- exti 29 (USART6) is mapped to GIC 71
- exti 31 (UART5) is mapped to GIC 53
- exti 32 (UART7) is mapped to GIC 82
- exti 33 (UART8) is mapped to GIC 83

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>

diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index 8662d7b7b262..b9db90c4aa56 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -193,7 +193,14 @@ static const struct stm32_desc_irq stm32mp1_desc_irq[] = {
 	{ .exti = 23, .irq_parent = 72, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 24, .irq_parent = 95, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 25, .irq_parent = 107, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 26, .irq_parent = 37, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 27, .irq_parent = 38, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 28, .irq_parent = 39, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 29, .irq_parent = 71, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 30, .irq_parent = 52, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 31, .irq_parent = 53, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 32, .irq_parent = 82, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 33, .irq_parent = 83, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 47, .irq_parent = 93, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 48, .irq_parent = 138, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 50, .irq_parent = 139, .chip = &stm32_exti_h_chip_direct },
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/5] serial: stm32: update wakeup IRQ management
  2021-03-19 18:42 [PATCH 0/5] stm32 usart wakeup rework Erwan Le Ray
                   ` (2 preceding siblings ...)
  2021-03-19 18:42 ` [PATCH 3/5] irqchip/stm32: add usart instances exti direct event support Erwan Le Ray
@ 2021-03-19 18:42 ` Erwan Le Ray
  2021-03-19 18:42 ` [PATCH 5/5] ARM: dts: stm32: Add wakeup management on stm32mp15x UART nodes Erwan Le Ray
  2021-04-07 12:32 ` (subset) [PATCH 0/5] stm32 usart wakeup rework Marc Zyngier
  5 siblings, 0 replies; 8+ messages in thread
From: Erwan Le Ray @ 2021-03-19 18:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Thomas Gleixner, Marc Zyngier,
	Maxime Coquelin, Alexandre Torgue
  Cc: linux-serial, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Erwan Le Ray, Fabrice Gasnier, Valentin Caron,
	Patrice Chotard

From: Alexandre Torgue <alexandre.torgue@foss.st.com>

The wakeup specific IRQ management is no more needed to wake up the stm32
plaform. A relationship has been established between the EXTI and
the EVENT IRQ, just need to declare the EXTI interrupt instead of the
UART event IRQ.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>

diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index cc054f07bd83..cba4f4ddf164 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -924,7 +924,7 @@ static void stm32_usart_set_termios(struct uart_port *port,
 	}
 
 	/* Configure wake up from low power on start bit detection */
-	if (stm32_port->wakeirq > 0) {
+	if (stm32_port->wakeup_src) {
 		cr3 &= ~USART_CR3_WUS_MASK;
 		cr3 |= USART_CR3_WUS_START_BIT;
 	}
@@ -1044,11 +1044,8 @@ static int stm32_usart_init_port(struct stm32_port *stm32port,
 	if (ret)
 		return ret;
 
-	if (stm32port->info->cfg.has_wakeup) {
-		stm32port->wakeirq = platform_get_irq_optional(pdev, 1);
-		if (stm32port->wakeirq <= 0 && stm32port->wakeirq != -ENXIO)
-			return stm32port->wakeirq ? : -ENODEV;
-	}
+	stm32port->wakeup_src = stm32port->info->cfg.has_wakeup &&
+		of_property_read_bool(pdev->dev.of_node, "wakeup-source");
 
 	stm32port->fifoen = stm32port->info->cfg.has_fifo;
 
@@ -1283,17 +1280,11 @@ static int stm32_usart_serial_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (stm32port->wakeirq > 0) {
-		ret = device_init_wakeup(&pdev->dev, true);
-		if (ret)
-			goto err_uninit;
-
-		ret = dev_pm_set_dedicated_wake_irq(&pdev->dev,
-						    stm32port->wakeirq);
+	if (stm32port->wakeup_src) {
+		device_set_wakeup_capable(&pdev->dev, true);
+		ret = dev_pm_set_wake_irq(&pdev->dev, stm32port->port.irq);
 		if (ret)
 			goto err_nowup;
-
-		device_set_wakeup_enable(&pdev->dev, false);
 	}
 
 	ret = stm32_usart_of_dma_rx_probe(stm32port, pdev);
@@ -1343,14 +1334,13 @@ static int stm32_usart_serial_probe(struct platform_device *pdev)
 				  TX_BUF_L, stm32port->tx_buf,
 				  stm32port->tx_dma_buf);
 
-	if (stm32port->wakeirq > 0)
+	if (stm32port->wakeup_src)
 		dev_pm_clear_wake_irq(&pdev->dev);
 
 err_nowup:
-	if (stm32port->wakeirq > 0)
-		device_init_wakeup(&pdev->dev, false);
+	if (stm32port->wakeup_src)
+		device_set_wakeup_capable(&pdev->dev, false);
 
-err_uninit:
 	stm32_usart_deinit_port(stm32port);
 
 	return ret;
@@ -1396,7 +1386,7 @@ static int stm32_usart_serial_remove(struct platform_device *pdev)
 				  TX_BUF_L, stm32_port->tx_buf,
 				  stm32_port->tx_dma_buf);
 
-	if (stm32_port->wakeirq > 0) {
+	if (stm32_port->wakeup_src) {
 		dev_pm_clear_wake_irq(&pdev->dev);
 		device_init_wakeup(&pdev->dev, false);
 	}
@@ -1512,7 +1502,7 @@ static void __maybe_unused stm32_usart_serial_en_wakeup(struct uart_port *port,
 	struct stm32_port *stm32_port = to_stm32_port(port);
 	const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
 
-	if (stm32_port->wakeirq <= 0)
+	if (!stm32_port->wakeup_src)
 		return;
 
 	/*
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h
index 94b568aa46bb..a86773f1a4c4 100644
--- a/drivers/tty/serial/stm32-usart.h
+++ b/drivers/tty/serial/stm32-usart.h
@@ -269,7 +269,7 @@ struct stm32_port {
 	bool tx_dma_busy;	 /* dma tx busy               */
 	bool hw_flow_control;
 	bool fifoen;
-	int wakeirq;
+	bool wakeup_src;
 	int rdr_mask;		/* receive data register mask */
 	struct mctrl_gpios *gpios; /* modem control gpios */
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/5] ARM: dts: stm32: Add wakeup management on stm32mp15x UART nodes
  2021-03-19 18:42 [PATCH 0/5] stm32 usart wakeup rework Erwan Le Ray
                   ` (3 preceding siblings ...)
  2021-03-19 18:42 ` [PATCH 4/5] serial: stm32: update wakeup IRQ management Erwan Le Ray
@ 2021-03-19 18:42 ` Erwan Le Ray
  2021-04-07 12:32 ` (subset) [PATCH 0/5] stm32 usart wakeup rework Marc Zyngier
  5 siblings, 0 replies; 8+ messages in thread
From: Erwan Le Ray @ 2021-03-19 18:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Thomas Gleixner, Marc Zyngier,
	Maxime Coquelin, Alexandre Torgue
  Cc: linux-serial, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Erwan Le Ray, Fabrice Gasnier, Valentin Caron,
	Patrice Chotard

Add EXTI lines to the following UART nodes which are used for
wakeup from CStop.
- EXTI line 26 to USART1
- EXTI line 27 to USART2
- EXTI line 28 to USART3
- EXTI line 29 to USART6
- EXTI line 30 to UART4
- EXTI line 31 to UART5
- EXTI line 32 to UART7
- EXTI line 33 to UART8

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>

diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
index 4b8031782555..e242d7211059 100644
--- a/arch/arm/boot/dts/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/stm32mp151.dtsi
@@ -452,32 +452,36 @@
 		usart2: serial@4000e000 {
 			compatible = "st,stm32h7-uart";
 			reg = <0x4000e000 0x400>;
-			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&exti 27 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART2_K>;
+			wakeup-source;
 			status = "disabled";
 		};
 
 		usart3: serial@4000f000 {
 			compatible = "st,stm32h7-uart";
 			reg = <0x4000f000 0x400>;
-			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&exti 28 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART3_K>;
+			wakeup-source;
 			status = "disabled";
 		};
 
 		uart4: serial@40010000 {
 			compatible = "st,stm32h7-uart";
 			reg = <0x40010000 0x400>;
-			interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&exti 30 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART4_K>;
+			wakeup-source;
 			status = "disabled";
 		};
 
 		uart5: serial@40011000 {
 			compatible = "st,stm32h7-uart";
 			reg = <0x40011000 0x400>;
-			interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&exti 31 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART5_K>;
+			wakeup-source;
 			status = "disabled";
 		};
 
@@ -577,16 +581,18 @@
 		uart7: serial@40018000 {
 			compatible = "st,stm32h7-uart";
 			reg = <0x40018000 0x400>;
-			interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&exti 32 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART7_K>;
+			wakeup-source;
 			status = "disabled";
 		};
 
 		uart8: serial@40019000 {
 			compatible = "st,stm32h7-uart";
 			reg = <0x40019000 0x400>;
-			interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&exti 33 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART8_K>;
+			wakeup-source;
 			status = "disabled";
 		};
 
@@ -665,8 +671,9 @@
 		usart6: serial@44003000 {
 			compatible = "st,stm32h7-uart";
 			reg = <0x44003000 0x400>;
-			interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&exti 29 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART6_K>;
+			wakeup-source;
 			status = "disabled";
 		};
 
@@ -1505,8 +1512,9 @@
 		usart1: serial@5c000000 {
 			compatible = "st,stm32h7-uart";
 			reg = <0x5c000000 0x400>;
-			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts-extended = <&exti 26 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART1_K>;
+			wakeup-source;
 			status = "disabled";
 		};
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: (subset) [PATCH 0/5] stm32 usart wakeup rework
  2021-03-19 18:42 [PATCH 0/5] stm32 usart wakeup rework Erwan Le Ray
                   ` (4 preceding siblings ...)
  2021-03-19 18:42 ` [PATCH 5/5] ARM: dts: stm32: Add wakeup management on stm32mp15x UART nodes Erwan Le Ray
@ 2021-04-07 12:32 ` Marc Zyngier
  5 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-07 12:32 UTC (permalink / raw)
  To: Rob Herring, Alexandre Torgue, Erwan Le Ray, Greg Kroah-Hartman,
	Maxime Coquelin, Thomas Gleixner
  Cc: linux-arm-kernel, linux-stm32, linux-serial, Valentin Caron,
	devicetree, linux-kernel, Fabrice Gasnier, Patrice Chotard

On Fri, 19 Mar 2021 19:42:48 +0100, Erwan Le Ray wrote:
> This series reworks stm32 usart wakeup management.
> 
> Alexandre Torgue (1):
>   serial: stm32: update wakeup IRQ management
> 
> Erwan Le Ray (4):
>   serial: stm32: rework wakeup management
>   serial: stm32: clean wakeup handling in serial_suspend
>   irqchip/stm32: add usart instances exti direct event support
>   ARM: dts: stm32: Add wakeup management on stm32mp15x UART nodes
> 
> [...]

Applied to irq/irqchip-next, thanks!

[3/5] irqchip/stm32: add usart instances exti direct event support
      commit: e12c455055e9abc7403ce532616c0124a9d85ee7

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [irqchip: irq/irqchip-next] irqchip/stm32: Add usart instances exti direct event support
  2021-03-19 18:42 ` [PATCH 3/5] irqchip/stm32: add usart instances exti direct event support Erwan Le Ray
@ 2021-04-07 12:38   ` irqchip-bot for Erwan Le Ray
  0 siblings, 0 replies; 8+ messages in thread
From: irqchip-bot for Erwan Le Ray @ 2021-04-07 12:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Erwan Le Ray, Marc Zyngier, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     e12c455055e9abc7403ce532616c0124a9d85ee7
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/e12c455055e9abc7403ce532616c0124a9d85ee7
Author:        Erwan Le Ray <erwan.leray@foss.st.com>
AuthorDate:    Fri, 19 Mar 2021 19:42:51 +01:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 07 Apr 2021 13:25:52 +01:00

irqchip/stm32: Add usart instances exti direct event support

Add following usart instances exti direct event support (used for UART wake
up).
- exti 26 (USART1) is mapped to GIC 37
- exti 27 (USART2) is mapped to GIC 38
- exti 28 (USART3) is mapped to GIC 39
- exti 29 (USART6) is mapped to GIC 71
- exti 31 (UART5) is mapped to GIC 53
- exti 32 (UART7) is mapped to GIC 82
- exti 33 (UART8) is mapped to GIC 83

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210319184253.5841-4-erwan.leray@foss.st.com
---
 drivers/irqchip/irq-stm32-exti.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index 8662d7b..b9db90c 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -193,7 +193,14 @@ static const struct stm32_desc_irq stm32mp1_desc_irq[] = {
 	{ .exti = 23, .irq_parent = 72, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 24, .irq_parent = 95, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 25, .irq_parent = 107, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 26, .irq_parent = 37, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 27, .irq_parent = 38, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 28, .irq_parent = 39, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 29, .irq_parent = 71, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 30, .irq_parent = 52, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 31, .irq_parent = 53, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 32, .irq_parent = 82, .chip = &stm32_exti_h_chip_direct },
+	{ .exti = 33, .irq_parent = 83, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 47, .irq_parent = 93, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 48, .irq_parent = 138, .chip = &stm32_exti_h_chip_direct },
 	{ .exti = 50, .irq_parent = 139, .chip = &stm32_exti_h_chip_direct },

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-07 12:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 18:42 [PATCH 0/5] stm32 usart wakeup rework Erwan Le Ray
2021-03-19 18:42 ` [PATCH 1/5] serial: stm32: rework wakeup management Erwan Le Ray
2021-03-19 18:42 ` [PATCH 2/5] serial: stm32: clean wakeup handling in serial_suspend Erwan Le Ray
2021-03-19 18:42 ` [PATCH 3/5] irqchip/stm32: add usart instances exti direct event support Erwan Le Ray
2021-04-07 12:38   ` [irqchip: irq/irqchip-next] irqchip/stm32: Add " irqchip-bot for Erwan Le Ray
2021-03-19 18:42 ` [PATCH 4/5] serial: stm32: update wakeup IRQ management Erwan Le Ray
2021-03-19 18:42 ` [PATCH 5/5] ARM: dts: stm32: Add wakeup management on stm32mp15x UART nodes Erwan Le Ray
2021-04-07 12:32 ` (subset) [PATCH 0/5] stm32 usart wakeup rework Marc Zyngier

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).