All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-02-03 17:10 ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:10 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
remove it at board level to keep current PIO behavior when needed.
For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
(no HW flow control pin available) are kept in PIO mode, while USART3
is now configured in DMA mode.
UART4 (console UART) has to be kept in irq mode, as DMA support for
console has been removed from the driver by commit e359b4411c28 
("serial: stm32: fix threaded interrupt handling"). 

For other stm32mp15x-based boards, current configuration is kept for
all UART instances.

Erwan Le Ray (16):
  ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
  ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
  ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
  ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
  ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
  ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
  ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
  ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
  ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
  ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
  ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
  ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
  ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
  ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
  ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
  ARM: dts: stm32: keep uart nodes behavior on
    stm32mp15xx-dhcor-avenger96

 arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
 .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
 .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
 arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
 ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
 ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
 arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
 arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
 arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
 arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
 .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
 arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
 .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
 arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
 .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
 arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
 16 files changed, 71 insertions(+)

-- 
2.17.1


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

* [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-02-03 17:10 ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:10 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
remove it at board level to keep current PIO behavior when needed.
For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
(no HW flow control pin available) are kept in PIO mode, while USART3
is now configured in DMA mode.
UART4 (console UART) has to be kept in irq mode, as DMA support for
console has been removed from the driver by commit e359b4411c28 
("serial: stm32: fix threaded interrupt handling"). 

For other stm32mp15x-based boards, current configuration is kept for
all UART instances.

Erwan Le Ray (16):
  ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
  ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
  ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
  ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
  ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
  ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
  ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
  ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
  ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
  ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
  ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
  ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
  ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
  ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
  ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
  ARM: dts: stm32: keep uart nodes behavior on
    stm32mp15xx-dhcor-avenger96

 arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
 .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
 .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
 arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
 ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
 ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
 arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
 arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
 arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
 arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
 .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
 arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
 .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
 arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
 .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
 arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
 16 files changed, 71 insertions(+)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 01/16] ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:10   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:10 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

Add DMA configuration in stm32mp15x uart nodes by selecting dma direct
mode and alternate REQ/ACK dma protocol for uart.

DMA direct mode allows to bypass DMA FIFO. Each DMA request immediately
initiates a transfer from/to the memory. This allows USART to get data
transferred, even when the transfer ends before the DMA FIFO completion.

Default REQ/ACK DMA protocol consists in maintaining ACK signal up to the
removal of REQuest and the transfer completion.
In case of alternative REQ/ACK protocol, ACK de-assertion does not wait the
removal of the REQuest, but only the transfer completion.
Due to a possible DMA stream lock when transferring data to/from STM32
USART/UART, select this alternative protocol in STM32 USART/UART nodes.

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
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 1cfc2f011e70..e86006ae137b 100644
--- a/arch/arm/boot/dts/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/stm32mp151.dtsi
@@ -455,6 +455,9 @@
 			interrupts-extended = <&exti 27 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART2_K>;
 			wakeup-source;
+			dmas = <&dmamux1 43 0x400 0x15>,
+			       <&dmamux1 44 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -464,6 +467,9 @@
 			interrupts-extended = <&exti 28 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART3_K>;
 			wakeup-source;
+			dmas = <&dmamux1 45 0x400 0x15>,
+			       <&dmamux1 46 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -473,6 +479,9 @@
 			interrupts-extended = <&exti 30 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART4_K>;
 			wakeup-source;
+			dmas = <&dmamux1 63 0x400 0x15>,
+			       <&dmamux1 64 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -482,6 +491,9 @@
 			interrupts-extended = <&exti 31 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART5_K>;
 			wakeup-source;
+			dmas = <&dmamux1 65 0x400 0x15>,
+			       <&dmamux1 66 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -588,6 +600,9 @@
 			interrupts-extended = <&exti 32 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART7_K>;
 			wakeup-source;
+			dmas = <&dmamux1 79 0x400 0x15>,
+			       <&dmamux1 80 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -597,6 +612,9 @@
 			interrupts-extended = <&exti 33 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART8_K>;
 			wakeup-source;
+			dmas = <&dmamux1 81 0x400 0x15>,
+			       <&dmamux1 82 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -678,6 +696,9 @@
 			interrupts-extended = <&exti 29 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART6_K>;
 			wakeup-source;
+			dmas = <&dmamux1 71 0x400 0x15>,
+			       <&dmamux1 72 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
-- 
2.17.1


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

* [PATCH 01/16] ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
@ 2022-02-03 17:10   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:10 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

Add DMA configuration in stm32mp15x uart nodes by selecting dma direct
mode and alternate REQ/ACK dma protocol for uart.

DMA direct mode allows to bypass DMA FIFO. Each DMA request immediately
initiates a transfer from/to the memory. This allows USART to get data
transferred, even when the transfer ends before the DMA FIFO completion.

Default REQ/ACK DMA protocol consists in maintaining ACK signal up to the
removal of REQuest and the transfer completion.
In case of alternative REQ/ACK protocol, ACK de-assertion does not wait the
removal of the REQuest, but only the transfer completion.
Due to a possible DMA stream lock when transferring data to/from STM32
USART/UART, select this alternative protocol in STM32 USART/UART nodes.

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
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 1cfc2f011e70..e86006ae137b 100644
--- a/arch/arm/boot/dts/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/stm32mp151.dtsi
@@ -455,6 +455,9 @@
 			interrupts-extended = <&exti 27 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART2_K>;
 			wakeup-source;
+			dmas = <&dmamux1 43 0x400 0x15>,
+			       <&dmamux1 44 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -464,6 +467,9 @@
 			interrupts-extended = <&exti 28 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART3_K>;
 			wakeup-source;
+			dmas = <&dmamux1 45 0x400 0x15>,
+			       <&dmamux1 46 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -473,6 +479,9 @@
 			interrupts-extended = <&exti 30 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART4_K>;
 			wakeup-source;
+			dmas = <&dmamux1 63 0x400 0x15>,
+			       <&dmamux1 64 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -482,6 +491,9 @@
 			interrupts-extended = <&exti 31 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART5_K>;
 			wakeup-source;
+			dmas = <&dmamux1 65 0x400 0x15>,
+			       <&dmamux1 66 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -588,6 +600,9 @@
 			interrupts-extended = <&exti 32 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART7_K>;
 			wakeup-source;
+			dmas = <&dmamux1 79 0x400 0x15>,
+			       <&dmamux1 80 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -597,6 +612,9 @@
 			interrupts-extended = <&exti 33 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc UART8_K>;
 			wakeup-source;
+			dmas = <&dmamux1 81 0x400 0x15>,
+			       <&dmamux1 82 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
@@ -678,6 +696,9 @@
 			interrupts-extended = <&exti 29 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&rcc USART6_K>;
 			wakeup-source;
+			dmas = <&dmamux1 71 0x400 0x15>,
+			       <&dmamux1 72 0x400 0x11>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 02/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-ed1 board device tree to keep
console in irq mode, as DMA support for console has been removed from
the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts
index 46b471d09c50..b1eb688a278a 100644
--- a/arch/arm/boot/dts/stm32mp157c-ed1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-ed1.dts
@@ -384,6 +384,8 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 02/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-ed1 board device tree to keep
console in irq mode, as DMA support for console has been removed from
the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts
index 46b471d09c50..b1eb688a278a 100644
--- a/arch/arm/boot/dts/stm32mp157c-ed1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-ed1.dts
@@ -384,6 +384,8 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


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

* [PATCH 03/16] ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dkx board device tree to keep
console in irq mode, as DMA support for console has been removed from
the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").
Delete also uart7 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
index 48beed0f1f30..7443859c54c6 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
@@ -650,6 +650,8 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -658,6 +660,8 @@
 	pinctrl-0 = <&uart7_pins_c>;
 	pinctrl-1 = <&uart7_sleep_pins_c>;
 	pinctrl-2 = <&uart7_idle_pins_c>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "disabled";
 };
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 03/16] ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dkx board device tree to keep
console in irq mode, as DMA support for console has been removed from
the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").
Delete also uart7 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
index 48beed0f1f30..7443859c54c6 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
@@ -650,6 +650,8 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -658,6 +660,8 @@
 	pinctrl-0 = <&uart7_pins_c>;
 	pinctrl-1 = <&uart7_sleep_pins_c>;
 	pinctrl-2 = <&uart7_idle_pins_c>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "disabled";
 };
 
-- 
2.17.1


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

* [PATCH 04/16] ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in icore-stm32mp1-ctouch2 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2.dts b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2.dts
index d3058a036c74..1f75f1d45181 100644
--- a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2.dts
+++ b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2.dts
@@ -43,5 +43,7 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/16] ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in icore-stm32mp1-ctouch2 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2.dts b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2.dts
index d3058a036c74..1f75f1d45181 100644
--- a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2.dts
+++ b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2.dts
@@ -43,5 +43,7 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


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

* [PATCH 05/16] ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in icore-stm32mp1-edimm2.2 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
index ec9f1d1cd50f..3a1295cfa978 100644
--- a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
+++ b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
@@ -43,5 +43,7 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


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

* [PATCH 05/16] ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in icore-stm32mp1-edimm2.2 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
index ec9f1d1cd50f..3a1295cfa978 100644
--- a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
+++ b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
@@ -43,5 +43,7 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 06/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157a-iot-box board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157a-iot-box.dts b/arch/arm/boot/dts/stm32mp157a-iot-box.dts
index 70f394b4d3c0..6a5a4af25bd9 100644
--- a/arch/arm/boot/dts/stm32mp157a-iot-box.dts
+++ b/arch/arm/boot/dts/stm32mp157a-iot-box.dts
@@ -58,6 +58,8 @@
 	/delete-property/st,hw-flow-ctrl;
 	cts-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
 	rts-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 
 	bluetooth {
-- 
2.17.1


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

* [PATCH 06/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157a-iot-box board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157a-iot-box.dts b/arch/arm/boot/dts/stm32mp157a-iot-box.dts
index 70f394b4d3c0..6a5a4af25bd9 100644
--- a/arch/arm/boot/dts/stm32mp157a-iot-box.dts
+++ b/arch/arm/boot/dts/stm32mp157a-iot-box.dts
@@ -58,6 +58,8 @@
 	/delete-property/st,hw-flow-ctrl;
 	cts-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
 	rts-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 
 	bluetooth {
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 07/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp1-microdev2.0-of7 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").
Delete also uart8 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
index 5670b23812a2..fae656edd820 100644
--- a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
+++ b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
@@ -143,6 +143,8 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -150,5 +152,7 @@
 &uart8 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


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

* [PATCH 07/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp1-microdev2.0-of7 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").
Delete also uart8 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
index 5670b23812a2..fae656edd820 100644
--- a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
+++ b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
@@ -143,6 +143,8 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -150,5 +152,7 @@
 &uart8 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 08/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp1-microdev2.0 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").
Delete also uart8 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0.dts b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0.dts
index 7a75868164dc..b9d0d3d6ad15 100644
--- a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0.dts
+++ b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0.dts
@@ -44,6 +44,8 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -51,5 +53,7 @@
 &uart8 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


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

* [PATCH 08/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp1-microdev2.0 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").
Delete also uart8 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0.dts b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0.dts
index 7a75868164dc..b9d0d3d6ad15 100644
--- a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0.dts
+++ b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0.dts
@@ -44,6 +44,8 @@
 	pinctrl-0 = <&uart4_pins_a>;
 	pinctrl-1 = <&uart4_sleep_pins_a>;
 	pinctrl-2 = <&uart4_idle_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -51,5 +53,7 @@
 &uart8 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 09/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157a-stinger96 board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").
Delete also usart2 and uart7 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp157a-stinger96.dtsi b/arch/arm/boot/dts/stm32mp157a-stinger96.dtsi
index a4b14ef3caee..3a36f7fe0a2c 100644
--- a/arch/arm/boot/dts/stm32mp157a-stinger96.dtsi
+++ b/arch/arm/boot/dts/stm32mp157a-stinger96.dtsi
@@ -288,6 +288,8 @@
 	pinctrl-0 = <&usart2_pins_b>;
 	pinctrl-1 = <&usart2_sleep_pins_b>;
 	st,hw-flow-ctrl;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -296,6 +298,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_c>;
 	st,hw-flow-ctrl;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -303,6 +307,8 @@
 &uart7 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart7_pins_b>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


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

* [PATCH 09/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157a-stinger96 board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").
Delete also usart2 and uart7 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp157a-stinger96.dtsi b/arch/arm/boot/dts/stm32mp157a-stinger96.dtsi
index a4b14ef3caee..3a36f7fe0a2c 100644
--- a/arch/arm/boot/dts/stm32mp157a-stinger96.dtsi
+++ b/arch/arm/boot/dts/stm32mp157a-stinger96.dtsi
@@ -288,6 +288,8 @@
 	pinctrl-0 = <&usart2_pins_b>;
 	pinctrl-1 = <&usart2_sleep_pins_b>;
 	st,hw-flow-ctrl;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -296,6 +298,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_c>;
 	st,hw-flow-ctrl;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -303,6 +307,8 @@
 &uart7 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart7_pins_b>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 10/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-lxa-mc1 board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
index 1e9bf7eea0f1..e8d2ec41d537 100644
--- a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
@@ -248,5 +248,7 @@
 &uart4 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


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

* [PATCH 10/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-lxa-mc1 board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
index 1e9bf7eea0f1..e8d2ec41d537 100644
--- a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
@@ -248,5 +248,7 @@
 &uart4 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 11/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-odyssey board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157c-odyssey.dts b/arch/arm/boot/dts/stm32mp157c-odyssey.dts
index 554f5d3bcdc3..ed66d25b8bf3 100644
--- a/arch/arm/boot/dts/stm32mp157c-odyssey.dts
+++ b/arch/arm/boot/dts/stm32mp157c-odyssey.dts
@@ -81,6 +81,8 @@
 &uart4 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


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

* [PATCH 11/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-odyssey board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp157c-odyssey.dts b/arch/arm/boot/dts/stm32mp157c-odyssey.dts
index 554f5d3bcdc3..ed66d25b8bf3 100644
--- a/arch/arm/boot/dts/stm32mp157c-odyssey.dts
+++ b/arch/arm/boot/dts/stm32mp157c-odyssey.dts
@@ -81,6 +81,8 @@
 &uart4 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 12/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 nodes DMA property in stm32mp15xx-dhcom-drc02
board device tree to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi
index 4b10b013ffd5..35b1034aa3cf 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi
@@ -131,6 +131,8 @@
 &usart3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usart3_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -144,6 +146,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a>;
 	rts-gpios = <&gpioe 6 GPIO_ACTIVE_HIGH>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


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

* [PATCH 12/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 nodes DMA property in stm32mp15xx-dhcom-drc02
board device tree to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi
index 4b10b013ffd5..35b1034aa3cf 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi
@@ -131,6 +131,8 @@
 &usart3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usart3_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -144,6 +146,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a>;
 	rts-gpios = <&gpioe 6 GPIO_ACTIVE_HIGH>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 13/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 DMA property in stm32mp15xx-dhcom-pdk2 board
device tree to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
index fbf3826933e4..5f586f024060 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
@@ -287,6 +287,8 @@
 &usart3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usart3_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -294,6 +296,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
 	uart-has-rtscts;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


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

* [PATCH 13/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 DMA property in stm32mp15xx-dhcom-pdk2 board
device tree to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
index fbf3826933e4..5f586f024060 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
@@ -287,6 +287,8 @@
 &usart3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usart3_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -294,6 +296,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
 	uart-has-rtscts;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 14/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 nodes DMA property in stm32mp15xx-dhcom-picoitx
board device tree to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-picoitx.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-picoitx.dtsi
index ba816ef8b9b2..abc595350e71 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-picoitx.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-picoitx.dtsi
@@ -105,12 +105,16 @@
 &usart3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usart3_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
 &uart8 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 14/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 nodes DMA property in stm32mp15xx-dhcom-picoitx
board device tree to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-picoitx.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-picoitx.dtsi
index ba816ef8b9b2..abc595350e71 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-picoitx.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-picoitx.dtsi
@@ -105,12 +105,16 @@
 &usart3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usart3_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
 &uart8 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
-- 
2.17.1


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

* [PATCH 15/16] ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dhcom-som board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
index 8c41f819f776..3cd729e29699 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
@@ -521,5 +521,7 @@
 &uart4 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


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

* [PATCH 15/16] ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dhcom-som board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
index 8c41f819f776..3cd729e29699 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
@@ -521,5 +521,7 @@
 &uart4 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_a>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 16/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcor-avenger96
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:11   ` Erwan Le Ray
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dhcor-avenger96 board device
tree to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").
Delete also usart2 and uart7 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
index 6885948f3024..61e17f44ce81 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
@@ -376,6 +376,8 @@
 	label = "LS-UART1";
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_b>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -385,6 +387,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart7_pins_a>;
 	uart-has-rtscts;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -394,6 +398,8 @@
 	pinctrl-0 = <&usart2_pins_a>;
 	pinctrl-1 = <&usart2_sleep_pins_a>;
 	st,hw-flow-ctrl;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 
 	bluetooth {
-- 
2.17.1


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

* [PATCH 16/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcor-avenger96
@ 2022-02-03 17:11   ` Erwan Le Ray
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan Le Ray @ 2022-02-03 17:11 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Erwan Le Ray,
	Manivannan Sadhasivam, Marek Vasut, Marcin Sloniewski,
	Ahmad Fatoum, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dhcor-avenger96 board device
tree to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c28 ("serial: stm32: fix
threaded interrupt handling").
Delete also usart2 and uart7 DMA property to keep current behavior.

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

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
index 6885948f3024..61e17f44ce81 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
@@ -376,6 +376,8 @@
 	label = "LS-UART1";
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart4_pins_b>;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -385,6 +387,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart7_pins_a>;
 	uart-has-rtscts;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 };
 
@@ -394,6 +398,8 @@
 	pinctrl-0 = <&usart2_pins_a>;
 	pinctrl-1 = <&usart2_sleep_pins_a>;
 	st,hw-flow-ctrl;
+	/delete-property/dmas;
+	/delete-property/dma-names;
 	status = "okay";
 
 	bluetooth {
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 16/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcor-avenger96
  2022-02-03 17:11   ` Erwan Le Ray
@ 2022-02-03 17:25     ` Marek Vasut
  -1 siblings, 0 replies; 56+ messages in thread
From: Marek Vasut @ 2022-02-03 17:25 UTC (permalink / raw)
  To: Erwan Le Ray, Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam,
	Marcin Sloniewski, Ahmad Fatoum, Jagan Teki, devicetree,
	linux-stm32, linux-arm-kernel, linux-kernel

On 2/3/22 18:11, Erwan Le Ray wrote:
> DMA configuration is added to uart nodes in stm32mp15x device tree.
> Delete uart4 DMA property in stm32mp15xx-dhcor-avenger96 board device
> tree to keep console in irq mode, as DMA support for console has been
> removed from the driver by commit e359b4411c28 ("serial: stm32: fix
> threaded interrupt handling").
> Delete also usart2 and uart7 DMA property to keep current behavior.
> 
> Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
> index 6885948f3024..61e17f44ce81 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
> @@ -376,6 +376,8 @@
>   	label = "LS-UART1";
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&uart4_pins_b>;
> +	/delete-property/dmas;
> +	/delete-property/dma-names;
>   	status = "okay";
>   };
>   
> @@ -385,6 +387,8 @@
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&uart7_pins_a>;
>   	uart-has-rtscts;
> +	/delete-property/dmas;
> +	/delete-property/dma-names;
>   	status = "okay";
>   };
>   
> @@ -394,6 +398,8 @@
>   	pinctrl-0 = <&usart2_pins_a>;
>   	pinctrl-1 = <&usart2_sleep_pins_a>;
>   	st,hw-flow-ctrl;
> +	/delete-property/dmas;
> +	/delete-property/dma-names;
>   	status = "okay";
>   
>   	bluetooth {

Maybe you can squash all the DHSOM board changes into a single patch ?

That said, the change is fine on DHSOM.

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

* Re: [PATCH 16/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcor-avenger96
@ 2022-02-03 17:25     ` Marek Vasut
  0 siblings, 0 replies; 56+ messages in thread
From: Marek Vasut @ 2022-02-03 17:25 UTC (permalink / raw)
  To: Erwan Le Ray, Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam,
	Marcin Sloniewski, Ahmad Fatoum, Jagan Teki, devicetree,
	linux-stm32, linux-arm-kernel, linux-kernel

On 2/3/22 18:11, Erwan Le Ray wrote:
> DMA configuration is added to uart nodes in stm32mp15x device tree.
> Delete uart4 DMA property in stm32mp15xx-dhcor-avenger96 board device
> tree to keep console in irq mode, as DMA support for console has been
> removed from the driver by commit e359b4411c28 ("serial: stm32: fix
> threaded interrupt handling").
> Delete also usart2 and uart7 DMA property to keep current behavior.
> 
> Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
> index 6885948f3024..61e17f44ce81 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
> @@ -376,6 +376,8 @@
>   	label = "LS-UART1";
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&uart4_pins_b>;
> +	/delete-property/dmas;
> +	/delete-property/dma-names;
>   	status = "okay";
>   };
>   
> @@ -385,6 +387,8 @@
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&uart7_pins_a>;
>   	uart-has-rtscts;
> +	/delete-property/dmas;
> +	/delete-property/dma-names;
>   	status = "okay";
>   };
>   
> @@ -394,6 +398,8 @@
>   	pinctrl-0 = <&usart2_pins_a>;
>   	pinctrl-1 = <&usart2_sleep_pins_a>;
>   	st,hw-flow-ctrl;
> +	/delete-property/dmas;
> +	/delete-property/dma-names;
>   	status = "okay";
>   
>   	bluetooth {

Maybe you can squash all the DHSOM board changes into a single patch ?

That said, the change is fine on DHSOM.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-03 17:25   ` Ahmad Fatoum
  -1 siblings, 0 replies; 56+ messages in thread
From: Ahmad Fatoum @ 2022-02-03 17:25 UTC (permalink / raw)
  To: Erwan Le Ray, Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Pengutronix Kernel Team

Hello Erwan,

On 03.02.22 18:10, Erwan Le Ray wrote:
> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
> remove it at board level to keep current PIO behavior when needed.
> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
> (no HW flow control pin available) are kept in PIO mode, while USART3
> is now configured in DMA mode.
> UART4 (console UART) has to be kept in irq mode, as DMA support for
> console has been removed from the driver by commit e359b4411c28 
> ("serial: stm32: fix threaded interrupt handling"). 

Do I understand correctly that your first patch breaks consoles of
most/all boards, because they will briefly use DMA, which is refused
by the stm32-usart driver and then you add a patch for each board
to fix that breakage?

Such intermittent breakage makes bisection a hassle. /delete-property/
is a no-op when the property doesn't exist, so you could move the first
patch to the very end to avoid intermittent breakage.

I also think that the driver's behavior is a bit harsh. I think it would
be better for the UART driver to print a warning and fall back to
PIO for console instead of outright refusing and rendering the system
silent. That's not mutually exclusive with your patch series here, of course.

Cheers,
Ahmad

> 
> For other stm32mp15x-based boards, current configuration is kept for
> all UART instances.
> 
> Erwan Le Ray (16):
>   ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>   ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>   ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>   ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>   ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>   ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>   ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>   ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>   ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>   ARM: dts: stm32: keep uart nodes behavior on
>     stm32mp15xx-dhcor-avenger96
> 
>  arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>  .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>  .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>  arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>  ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>  ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>  arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>  arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>  arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>  arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>  .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>  arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>  .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>  arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>  .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>  arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>  16 files changed, 71 insertions(+)
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-02-03 17:25   ` Ahmad Fatoum
  0 siblings, 0 replies; 56+ messages in thread
From: Ahmad Fatoum @ 2022-02-03 17:25 UTC (permalink / raw)
  To: Erwan Le Ray, Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Pengutronix Kernel Team

Hello Erwan,

On 03.02.22 18:10, Erwan Le Ray wrote:
> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
> remove it at board level to keep current PIO behavior when needed.
> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
> (no HW flow control pin available) are kept in PIO mode, while USART3
> is now configured in DMA mode.
> UART4 (console UART) has to be kept in irq mode, as DMA support for
> console has been removed from the driver by commit e359b4411c28 
> ("serial: stm32: fix threaded interrupt handling"). 

Do I understand correctly that your first patch breaks consoles of
most/all boards, because they will briefly use DMA, which is refused
by the stm32-usart driver and then you add a patch for each board
to fix that breakage?

Such intermittent breakage makes bisection a hassle. /delete-property/
is a no-op when the property doesn't exist, so you could move the first
patch to the very end to avoid intermittent breakage.

I also think that the driver's behavior is a bit harsh. I think it would
be better for the UART driver to print a warning and fall back to
PIO for console instead of outright refusing and rendering the system
silent. That's not mutually exclusive with your patch series here, of course.

Cheers,
Ahmad

> 
> For other stm32mp15x-based boards, current configuration is kept for
> all UART instances.
> 
> Erwan Le Ray (16):
>   ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>   ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>   ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>   ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>   ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>   ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>   ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>   ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>   ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>   ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>   ARM: dts: stm32: keep uart nodes behavior on
>     stm32mp15xx-dhcor-avenger96
> 
>  arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>  .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>  .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>  arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>  ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>  ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>  arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>  arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>  arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>  arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>  .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>  arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>  .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>  arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>  .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>  arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>  16 files changed, 71 insertions(+)
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-02-03 17:25   ` Ahmad Fatoum
@ 2022-02-04 13:22     ` Alexandre TORGUE
  -1 siblings, 0 replies; 56+ messages in thread
From: Alexandre TORGUE @ 2022-02-04 13:22 UTC (permalink / raw)
  To: Ahmad Fatoum, Erwan Le Ray
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Pengutronix Kernel Team

Hi Ahmad

On 2/3/22 18:25, Ahmad Fatoum wrote:
> Hello Erwan,
> 
> On 03.02.22 18:10, Erwan Le Ray wrote:
>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>> remove it at board level to keep current PIO behavior when needed.
>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>> (no HW flow control pin available) are kept in PIO mode, while USART3
>> is now configured in DMA mode.
>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>> console has been removed from the driver by commit e359b4411c28
>> ("serial: stm32: fix threaded interrupt handling").
> 
> Do I understand correctly that your first patch breaks consoles of
> most/all boards, because they will briefly use DMA, which is refused
> by the stm32-usart driver and then you add a patch for each board
> to fix that breakage?

We have two solutions and both have pro/drawbacks. The first one (Erwan 
ones, can break the boot if the patch is taken "alone". Your proposition 
avoids this breakage but deletes a non define property (which is a bit 
weird). However I prefer to keep a functional behavior, and keep Ahmad 
proposition. Ahmad, just one question, dt-bindings check doesn't 
complain about it ?

Cheers
Alex

> 
> Such intermittent breakage makes bisection a hassle. /delete-property/
> is a no-op when the property doesn't exist, so you could move the first
> patch to the very end to avoid intermittent breakage.
> 
> I also think that the driver's behavior is a bit harsh. I think it would
> be better for the UART driver to print a warning and fall back to
> PIO for console instead of outright refusing and rendering the system
> silent. That's not mutually exclusive with your patch series here, of course.
> 
> Cheers,
> Ahmad
> 
>>
>> For other stm32mp15x-based boards, current configuration is kept for
>> all UART instances.
>>
>> Erwan Le Ray (16):
>>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>>    ARM: dts: stm32: keep uart nodes behavior on
>>      stm32mp15xx-dhcor-avenger96
>>
>>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>>   16 files changed, 71 insertions(+)
>>
> 
> 


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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-02-04 13:22     ` Alexandre TORGUE
  0 siblings, 0 replies; 56+ messages in thread
From: Alexandre TORGUE @ 2022-02-04 13:22 UTC (permalink / raw)
  To: Ahmad Fatoum, Erwan Le Ray
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Pengutronix Kernel Team

Hi Ahmad

On 2/3/22 18:25, Ahmad Fatoum wrote:
> Hello Erwan,
> 
> On 03.02.22 18:10, Erwan Le Ray wrote:
>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>> remove it at board level to keep current PIO behavior when needed.
>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>> (no HW flow control pin available) are kept in PIO mode, while USART3
>> is now configured in DMA mode.
>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>> console has been removed from the driver by commit e359b4411c28
>> ("serial: stm32: fix threaded interrupt handling").
> 
> Do I understand correctly that your first patch breaks consoles of
> most/all boards, because they will briefly use DMA, which is refused
> by the stm32-usart driver and then you add a patch for each board
> to fix that breakage?

We have two solutions and both have pro/drawbacks. The first one (Erwan 
ones, can break the boot if the patch is taken "alone". Your proposition 
avoids this breakage but deletes a non define property (which is a bit 
weird). However I prefer to keep a functional behavior, and keep Ahmad 
proposition. Ahmad, just one question, dt-bindings check doesn't 
complain about it ?

Cheers
Alex

> 
> Such intermittent breakage makes bisection a hassle. /delete-property/
> is a no-op when the property doesn't exist, so you could move the first
> patch to the very end to avoid intermittent breakage.
> 
> I also think that the driver's behavior is a bit harsh. I think it would
> be better for the UART driver to print a warning and fall back to
> PIO for console instead of outright refusing and rendering the system
> silent. That's not mutually exclusive with your patch series here, of course.
> 
> Cheers,
> Ahmad
> 
>>
>> For other stm32mp15x-based boards, current configuration is kept for
>> all UART instances.
>>
>> Erwan Le Ray (16):
>>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>>    ARM: dts: stm32: keep uart nodes behavior on
>>      stm32mp15xx-dhcor-avenger96
>>
>>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>>   16 files changed, 71 insertions(+)
>>
> 
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-02-04 13:22     ` Alexandre TORGUE
@ 2022-02-04 15:41       ` Erwan LE RAY
  -1 siblings, 0 replies; 56+ messages in thread
From: Erwan LE RAY @ 2022-02-04 15:41 UTC (permalink / raw)
  To: Alexandre TORGUE, Ahmad Fatoum
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Pengutronix Kernel Team

Hi Ahmad,


On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
> Hi Ahmad
> 
> On 2/3/22 18:25, Ahmad Fatoum wrote:
>> Hello Erwan,
>>
>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>> remove it at board level to keep current PIO behavior when needed.
>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>> is now configured in DMA mode.
>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>> console has been removed from the driver by commit e359b4411c28
>>> ("serial: stm32: fix threaded interrupt handling").
>>
>> Do I understand correctly that your first patch breaks consoles of
>> most/all boards, because they will briefly use DMA, which is refused
>> by the stm32-usart driver and then you add a patch for each board
>> to fix that breakage?
> 
> We have two solutions and both have pro/drawbacks. The first one (Erwan 
> ones, can break the boot if the patch is taken "alone". Your proposition 
> avoids this breakage but deletes a non define property (which is a bit 
> weird). However I prefer to keep a functional behavior, and keep Ahmad 
> proposition. Ahmad, just one question, dt-bindings check doesn't 
> complain about it ?
> 
> Cheers
> Alex
> 
>>
>> Such intermittent breakage makes bisection a hassle. /delete-property/
>> is a no-op when the property doesn't exist, so you could move the first
>> patch to the very end to avoid intermittent breakage.
>>
>> I also think that the driver's behavior is a bit harsh. I think it would
>> be better for the UART driver to print a warning and fall back to
>> PIO for console instead of outright refusing and rendering the system
>> silent. That's not mutually exclusive with your patch series here, of 
>> course.
>>
>> Cheers,
>> Ahmad
>>

The driver implementation will consider the request to probe the UART 
console in DMA mode as an error (-ENODEV), and will fallback this UART 
probe in irq mode.
Whatever the patch ordering, the boot will never be broken. The board dt 
patches aim to get a "proper" implementation, but from functional 
perspective the driver will manage a request to probe an UART console in 
DMA mode as an error and fall it back in irq mode.

Cheers, Erwan.

>>>
>>> For other stm32mp15x-based boards, current configuration is kept for
>>> all UART instances.
>>>
>>> Erwan Le Ray (16):
>>>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>>>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>>>    ARM: dts: stm32: keep uart nodes behavior on 
>>> stm32mp15xx-dhcom-picoitx
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>>>    ARM: dts: stm32: keep uart nodes behavior on
>>>      stm32mp15xx-dhcor-avenger96
>>>
>>>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>>>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>>>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>>>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>>>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>>>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>>>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>>>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>>>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>>>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>>>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>>>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>>>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>>>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>>>   16 files changed, 71 insertions(+)
>>>
>>
>>
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-02-04 15:41       ` Erwan LE RAY
  0 siblings, 0 replies; 56+ messages in thread
From: Erwan LE RAY @ 2022-02-04 15:41 UTC (permalink / raw)
  To: Alexandre TORGUE, Ahmad Fatoum
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Pengutronix Kernel Team

Hi Ahmad,


On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
> Hi Ahmad
> 
> On 2/3/22 18:25, Ahmad Fatoum wrote:
>> Hello Erwan,
>>
>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>> remove it at board level to keep current PIO behavior when needed.
>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>> is now configured in DMA mode.
>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>> console has been removed from the driver by commit e359b4411c28
>>> ("serial: stm32: fix threaded interrupt handling").
>>
>> Do I understand correctly that your first patch breaks consoles of
>> most/all boards, because they will briefly use DMA, which is refused
>> by the stm32-usart driver and then you add a patch for each board
>> to fix that breakage?
> 
> We have two solutions and both have pro/drawbacks. The first one (Erwan 
> ones, can break the boot if the patch is taken "alone". Your proposition 
> avoids this breakage but deletes a non define property (which is a bit 
> weird). However I prefer to keep a functional behavior, and keep Ahmad 
> proposition. Ahmad, just one question, dt-bindings check doesn't 
> complain about it ?
> 
> Cheers
> Alex
> 
>>
>> Such intermittent breakage makes bisection a hassle. /delete-property/
>> is a no-op when the property doesn't exist, so you could move the first
>> patch to the very end to avoid intermittent breakage.
>>
>> I also think that the driver's behavior is a bit harsh. I think it would
>> be better for the UART driver to print a warning and fall back to
>> PIO for console instead of outright refusing and rendering the system
>> silent. That's not mutually exclusive with your patch series here, of 
>> course.
>>
>> Cheers,
>> Ahmad
>>

The driver implementation will consider the request to probe the UART 
console in DMA mode as an error (-ENODEV), and will fallback this UART 
probe in irq mode.
Whatever the patch ordering, the boot will never be broken. The board dt 
patches aim to get a "proper" implementation, but from functional 
perspective the driver will manage a request to probe an UART console in 
DMA mode as an error and fall it back in irq mode.

Cheers, Erwan.

>>>
>>> For other stm32mp15x-based boards, current configuration is kept for
>>> all UART instances.
>>>
>>> Erwan Le Ray (16):
>>>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>>>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>>>    ARM: dts: stm32: keep uart nodes behavior on 
>>> stm32mp15xx-dhcom-picoitx
>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>>>    ARM: dts: stm32: keep uart nodes behavior on
>>>      stm32mp15xx-dhcor-avenger96
>>>
>>>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>>>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>>>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>>>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>>>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>>>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>>>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>>>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>>>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>>>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>>>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>>>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>>>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>>>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>>>   16 files changed, 71 insertions(+)
>>>
>>
>>
> 

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-02-04 15:41       ` Erwan LE RAY
@ 2022-02-04 15:47         ` Ahmad Fatoum
  -1 siblings, 0 replies; 56+ messages in thread
From: Ahmad Fatoum @ 2022-02-04 15:47 UTC (permalink / raw)
  To: Erwan LE RAY, Alexandre TORGUE
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Pengutronix Kernel Team

Hello Erwan,

On 04.02.22 16:41, Erwan LE RAY wrote:
> Hi Ahmad,
> 
> 
> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>> Hi Ahmad
>>
>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>> Hello Erwan,
>>>
>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>> remove it at board level to keep current PIO behavior when needed.
>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>>> is now configured in DMA mode.
>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>> console has been removed from the driver by commit e359b4411c28
>>>> ("serial: stm32: fix threaded interrupt handling").
>>>
>>> Do I understand correctly that your first patch breaks consoles of
>>> most/all boards, because they will briefly use DMA, which is refused
>>> by the stm32-usart driver and then you add a patch for each board
>>> to fix that breakage?
>>
>> We have two solutions and both have pro/drawbacks. The first one (Erwan ones, can break the boot if the patch is taken "alone". Your proposition avoids this breakage but deletes a non define property (which is a bit weird). However I prefer to keep a functional behavior, and keep Ahmad proposition. Ahmad, just one question, dt-bindings check doesn't complain about it ?
>>
>> Cheers
>> Alex
>>
>>>
>>> Such intermittent breakage makes bisection a hassle. /delete-property/
>>> is a no-op when the property doesn't exist, so you could move the first
>>> patch to the very end to avoid intermittent breakage.
>>>
>>> I also think that the driver's behavior is a bit harsh. I think it would
>>> be better for the UART driver to print a warning and fall back to
>>> PIO for console instead of outright refusing and rendering the system
>>> silent. That's not mutually exclusive with your patch series here, of course.
>>>
>>> Cheers,
>>> Ahmad
>>>
> 
> The driver implementation will consider the request to probe the UART console in DMA mode as an error (-ENODEV), and will fallback this UART probe in irq mode.
> Whatever the patch ordering, the boot will never be broken. The board dt patches aim to get a "proper" implementation, but from functional perspective the driver will manage a request to probe an UART console in DMA mode as an error and fall it back in irq mode.

Thanks for the clarification. In that case, your changes look good to me.

Cheers,
Ahmad

> 
> Cheers, Erwan.
> 
>>>>
>>>> For other stm32mp15x-based boards, current configuration is kept for
>>>> all UART instances.
>>>>
>>>> Erwan Le Ray (16):
>>>>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>>>>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>>>>    ARM: dts: stm32: keep uart nodes behavior on
>>>>      stm32mp15xx-dhcor-avenger96
>>>>
>>>>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>>>>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>>>>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>>>>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>>>>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>>>>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>>>>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>>>>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>>>>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>>>>   16 files changed, 71 insertions(+)
>>>>
>>>
>>>
>>
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-02-04 15:47         ` Ahmad Fatoum
  0 siblings, 0 replies; 56+ messages in thread
From: Ahmad Fatoum @ 2022-02-04 15:47 UTC (permalink / raw)
  To: Erwan LE RAY, Alexandre TORGUE
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel, Pengutronix Kernel Team

Hello Erwan,

On 04.02.22 16:41, Erwan LE RAY wrote:
> Hi Ahmad,
> 
> 
> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>> Hi Ahmad
>>
>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>> Hello Erwan,
>>>
>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>> remove it at board level to keep current PIO behavior when needed.
>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>>> is now configured in DMA mode.
>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>> console has been removed from the driver by commit e359b4411c28
>>>> ("serial: stm32: fix threaded interrupt handling").
>>>
>>> Do I understand correctly that your first patch breaks consoles of
>>> most/all boards, because they will briefly use DMA, which is refused
>>> by the stm32-usart driver and then you add a patch for each board
>>> to fix that breakage?
>>
>> We have two solutions and both have pro/drawbacks. The first one (Erwan ones, can break the boot if the patch is taken "alone". Your proposition avoids this breakage but deletes a non define property (which is a bit weird). However I prefer to keep a functional behavior, and keep Ahmad proposition. Ahmad, just one question, dt-bindings check doesn't complain about it ?
>>
>> Cheers
>> Alex
>>
>>>
>>> Such intermittent breakage makes bisection a hassle. /delete-property/
>>> is a no-op when the property doesn't exist, so you could move the first
>>> patch to the very end to avoid intermittent breakage.
>>>
>>> I also think that the driver's behavior is a bit harsh. I think it would
>>> be better for the UART driver to print a warning and fall back to
>>> PIO for console instead of outright refusing and rendering the system
>>> silent. That's not mutually exclusive with your patch series here, of course.
>>>
>>> Cheers,
>>> Ahmad
>>>
> 
> The driver implementation will consider the request to probe the UART console in DMA mode as an error (-ENODEV), and will fallback this UART probe in irq mode.
> Whatever the patch ordering, the boot will never be broken. The board dt patches aim to get a "proper" implementation, but from functional perspective the driver will manage a request to probe an UART console in DMA mode as an error and fall it back in irq mode.

Thanks for the clarification. In that case, your changes look good to me.

Cheers,
Ahmad

> 
> Cheers, Erwan.
> 
>>>>
>>>> For other stm32mp15x-based boards, current configuration is kept for
>>>> all UART instances.
>>>>
>>>> Erwan Le Ray (16):
>>>>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>>>>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>>>>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>>>>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>>>>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>>>>    ARM: dts: stm32: keep uart nodes behavior on
>>>>      stm32mp15xx-dhcor-avenger96
>>>>
>>>>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>>>>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>>>>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>>>>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>>>>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>>>>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>>>>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>>>>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>>>>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>>>>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>>>>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>>>>   16 files changed, 71 insertions(+)
>>>>
>>>
>>>
>>
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 10/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
  2022-02-03 17:11   ` Erwan Le Ray
@ 2022-02-04 15:49     ` Ahmad Fatoum
  -1 siblings, 0 replies; 56+ messages in thread
From: Ahmad Fatoum @ 2022-02-04 15:49 UTC (permalink / raw)
  To: Erwan Le Ray, Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

On 03.02.22 18:11, Erwan Le Ray wrote:
> DMA configuration is added to uart nodes in stm32mp15x device tree.
> Delete uart4 DMA property in stm32mp157c-lxa-mc1 board device tree to
> keep console in irq mode, as DMA support for console has been removed
> from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
> interrupt handling").
> 
> Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> 
> diff --git a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
> index 1e9bf7eea0f1..e8d2ec41d537 100644
> --- a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
> +++ b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
> @@ -248,5 +248,7 @@
>  &uart4 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&uart4_pins_a>;
> +	/delete-property/dmas;
> +	/delete-property/dma-names;
>  	status = "okay";
>  };


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH 10/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
@ 2022-02-04 15:49     ` Ahmad Fatoum
  0 siblings, 0 replies; 56+ messages in thread
From: Ahmad Fatoum @ 2022-02-04 15:49 UTC (permalink / raw)
  To: Erwan Le Ray, Alexandre Torgue
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Jagan Teki, devicetree, linux-stm32,
	linux-arm-kernel, linux-kernel

On 03.02.22 18:11, Erwan Le Ray wrote:
> DMA configuration is added to uart nodes in stm32mp15x device tree.
> Delete uart4 DMA property in stm32mp157c-lxa-mc1 board device tree to
> keep console in irq mode, as DMA support for console has been removed
> from the driver by commit e359b4411c28 ("serial: stm32: fix threaded
> interrupt handling").
> 
> Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> 
> diff --git a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
> index 1e9bf7eea0f1..e8d2ec41d537 100644
> --- a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
> +++ b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
> @@ -248,5 +248,7 @@
>  &uart4 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&uart4_pins_a>;
> +	/delete-property/dmas;
> +	/delete-property/dma-names;
>  	status = "okay";
>  };


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-02-03 17:10 ` Erwan Le Ray
@ 2022-02-14 10:02   ` Alexandre TORGUE
  -1 siblings, 0 replies; 56+ messages in thread
From: Alexandre TORGUE @ 2022-02-14 10:02 UTC (permalink / raw)
  To: Erwan Le Ray
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Ahmad Fatoum, Jagan Teki, devicetree,
	linux-stm32, linux-arm-kernel, linux-kernel

On 2/3/22 18:10, Erwan Le Ray wrote:
> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
> remove it at board level to keep current PIO behavior when needed.
> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
> (no HW flow control pin available) are kept in PIO mode, while USART3
> is now configured in DMA mode.
> UART4 (console UART) has to be kept in irq mode, as DMA support for
> console has been removed from the driver by commit e359b4411c28
> ("serial: stm32: fix threaded interrupt handling").
> 
> For other stm32mp15x-based boards, current configuration is kept for
> all UART instances.
> 
> Erwan Le Ray (16):
>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>    ARM: dts: stm32: keep uart nodes behavior on
>      stm32mp15xx-dhcor-avenger96
> 
>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>   16 files changed, 71 insertions(+)
> 
Series applied on stm32-next.

Thanks
Alex

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-02-14 10:02   ` Alexandre TORGUE
  0 siblings, 0 replies; 56+ messages in thread
From: Alexandre TORGUE @ 2022-02-14 10:02 UTC (permalink / raw)
  To: Erwan Le Ray
  Cc: Rob Herring, Maxime Coquelin, Manivannan Sadhasivam, Marek Vasut,
	Marcin Sloniewski, Ahmad Fatoum, Jagan Teki, devicetree,
	linux-stm32, linux-arm-kernel, linux-kernel

On 2/3/22 18:10, Erwan Le Ray wrote:
> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
> remove it at board level to keep current PIO behavior when needed.
> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
> (no HW flow control pin available) are kept in PIO mode, while USART3
> is now configured in DMA mode.
> UART4 (console UART) has to be kept in irq mode, as DMA support for
> console has been removed from the driver by commit e359b4411c28
> ("serial: stm32: fix threaded interrupt handling").
> 
> For other stm32mp15x-based boards, current configuration is kept for
> all UART instances.
> 
> Erwan Le Ray (16):
>    ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
>    ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
>    ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
>    ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
>    ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
>    ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
>    ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
>    ARM: dts: stm32: keep uart nodes behavior on
>      stm32mp15xx-dhcor-avenger96
> 
>   arch/arm/boot/dts/stm32mp151.dtsi             | 21 +++++++++++++++++++
>   .../stm32mp157a-icore-stm32mp1-ctouch2.dts    |  2 ++
>   .../stm32mp157a-icore-stm32mp1-edimm2.2.dts   |  2 ++
>   arch/arm/boot/dts/stm32mp157a-iot-box.dts     |  2 ++
>   ...157a-microgea-stm32mp1-microdev2.0-of7.dts |  4 ++++
>   ...32mp157a-microgea-stm32mp1-microdev2.0.dts |  4 ++++
>   arch/arm/boot/dts/stm32mp157a-stinger96.dtsi  |  6 ++++++
>   arch/arm/boot/dts/stm32mp157c-ed1.dts         |  2 ++
>   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts     |  2 ++
>   arch/arm/boot/dts/stm32mp157c-odyssey.dts     |  2 ++
>   .../arm/boot/dts/stm32mp15xx-dhcom-drc02.dtsi |  4 ++++
>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi |  4 ++++
>   .../boot/dts/stm32mp15xx-dhcom-picoitx.dtsi   |  4 ++++
>   arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi  |  2 ++
>   .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |  6 ++++++
>   arch/arm/boot/dts/stm32mp15xx-dkx.dtsi        |  4 ++++
>   16 files changed, 71 insertions(+)
> 
Series applied on stm32-next.

Thanks
Alex

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-02-04 15:41       ` Erwan LE RAY
@ 2022-11-08 11:59         ` Uwe Kleine-König
  -1 siblings, 0 replies; 56+ messages in thread
From: Uwe Kleine-König @ 2022-11-08 11:59 UTC (permalink / raw)
  To: Erwan LE RAY
  Cc: Alexandre TORGUE, Ahmad Fatoum, Marek Vasut, devicetree,
	Pengutronix Kernel Team, linux-kernel, Marcin Sloniewski,
	Rob Herring, Jagan Teki, Maxime Coquelin, Manivannan Sadhasivam,
	linux-stm32, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 3076 bytes --]

On Fri, Feb 04, 2022 at 04:41:55PM +0100, Erwan LE RAY wrote:
> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
> > Hi Ahmad
> > 
> > On 2/3/22 18:25, Ahmad Fatoum wrote:
> > > Hello Erwan,
> > > 
> > > On 03.02.22 18:10, Erwan Le Ray wrote:
> > > > Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
> > > > remove it at board level to keep current PIO behavior when needed.
> > > > For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
> > > > (no HW flow control pin available) are kept in PIO mode, while USART3
> > > > is now configured in DMA mode.
> > > > UART4 (console UART) has to be kept in irq mode, as DMA support for
> > > > console has been removed from the driver by commit e359b4411c28
> > > > ("serial: stm32: fix threaded interrupt handling").
> > > 
> > > Do I understand correctly that your first patch breaks consoles of
> > > most/all boards, because they will briefly use DMA, which is refused
> > > by the stm32-usart driver and then you add a patch for each board
> > > to fix that breakage?
> > 
> > We have two solutions and both have pro/drawbacks. The first one (Erwan
> > ones, can break the boot if the patch is taken "alone". Your proposition
> > avoids this breakage but deletes a non define property (which is a bit
> > weird). However I prefer to keep a functional behavior, and keep Ahmad
> > proposition. Ahmad, just one question, dt-bindings check doesn't
> > complain about it ?
> > 
> > Cheers
> > Alex
> > 
> > > 
> > > Such intermittent breakage makes bisection a hassle. /delete-property/
> > > is a no-op when the property doesn't exist, so you could move the first
> > > patch to the very end to avoid intermittent breakage.
> > > 
> > > I also think that the driver's behavior is a bit harsh. I think it would
> > > be better for the UART driver to print a warning and fall back to
> > > PIO for console instead of outright refusing and rendering the system
> > > silent. That's not mutually exclusive with your patch series here,
> > > of course.
> > > 
> > > Cheers,
> > > Ahmad
> > > 
> 
> The driver implementation will consider the request to probe the UART
> console in DMA mode as an error (-ENODEV), and will fallback this UART probe
> in irq mode.

> Whatever the patch ordering, the boot will never be broken. The board dt
> patches aim to get a "proper" implementation, but from functional
> perspective the driver will manage a request to probe an UART console in DMA
> mode as an error and fall it back in irq mode.

I didn't debug this further yet, but my machine (with an out-of-tree
dts) fails to boot 6.1-rc4 without removing the dma properties from the
console UART. This is a bug isn't it? The same dts created a working
setup with stm32mp157.dtsi from 5.15 + kernel 5.15.

I can debug this further, but maybe you know off-hand what the problem
is?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-11-08 11:59         ` Uwe Kleine-König
  0 siblings, 0 replies; 56+ messages in thread
From: Uwe Kleine-König @ 2022-11-08 11:59 UTC (permalink / raw)
  To: Erwan LE RAY
  Cc: Alexandre TORGUE, Ahmad Fatoum, Marek Vasut, devicetree,
	Pengutronix Kernel Team, linux-kernel, Marcin Sloniewski,
	Rob Herring, Jagan Teki, Maxime Coquelin, Manivannan Sadhasivam,
	linux-stm32, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 3076 bytes --]

On Fri, Feb 04, 2022 at 04:41:55PM +0100, Erwan LE RAY wrote:
> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
> > Hi Ahmad
> > 
> > On 2/3/22 18:25, Ahmad Fatoum wrote:
> > > Hello Erwan,
> > > 
> > > On 03.02.22 18:10, Erwan Le Ray wrote:
> > > > Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
> > > > remove it at board level to keep current PIO behavior when needed.
> > > > For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
> > > > (no HW flow control pin available) are kept in PIO mode, while USART3
> > > > is now configured in DMA mode.
> > > > UART4 (console UART) has to be kept in irq mode, as DMA support for
> > > > console has been removed from the driver by commit e359b4411c28
> > > > ("serial: stm32: fix threaded interrupt handling").
> > > 
> > > Do I understand correctly that your first patch breaks consoles of
> > > most/all boards, because they will briefly use DMA, which is refused
> > > by the stm32-usart driver and then you add a patch for each board
> > > to fix that breakage?
> > 
> > We have two solutions and both have pro/drawbacks. The first one (Erwan
> > ones, can break the boot if the patch is taken "alone". Your proposition
> > avoids this breakage but deletes a non define property (which is a bit
> > weird). However I prefer to keep a functional behavior, and keep Ahmad
> > proposition. Ahmad, just one question, dt-bindings check doesn't
> > complain about it ?
> > 
> > Cheers
> > Alex
> > 
> > > 
> > > Such intermittent breakage makes bisection a hassle. /delete-property/
> > > is a no-op when the property doesn't exist, so you could move the first
> > > patch to the very end to avoid intermittent breakage.
> > > 
> > > I also think that the driver's behavior is a bit harsh. I think it would
> > > be better for the UART driver to print a warning and fall back to
> > > PIO for console instead of outright refusing and rendering the system
> > > silent. That's not mutually exclusive with your patch series here,
> > > of course.
> > > 
> > > Cheers,
> > > Ahmad
> > > 
> 
> The driver implementation will consider the request to probe the UART
> console in DMA mode as an error (-ENODEV), and will fallback this UART probe
> in irq mode.

> Whatever the patch ordering, the boot will never be broken. The board dt
> patches aim to get a "proper" implementation, but from functional
> perspective the driver will manage a request to probe an UART console in DMA
> mode as an error and fall it back in irq mode.

I didn't debug this further yet, but my machine (with an out-of-tree
dts) fails to boot 6.1-rc4 without removing the dma properties from the
console UART. This is a bug isn't it? The same dts created a working
setup with stm32mp157.dtsi from 5.15 + kernel 5.15.

I can debug this further, but maybe you know off-hand what the problem
is?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-11-08 11:59         ` Uwe Kleine-König
@ 2022-11-08 15:28           ` Marek Vasut
  -1 siblings, 0 replies; 56+ messages in thread
From: Marek Vasut @ 2022-11-08 15:28 UTC (permalink / raw)
  To: Uwe Kleine-König, Erwan LE RAY
  Cc: Alexandre TORGUE, Ahmad Fatoum, devicetree,
	Pengutronix Kernel Team, linux-kernel, Marcin Sloniewski,
	Rob Herring, Jagan Teki, Maxime Coquelin, Manivannan Sadhasivam,
	linux-stm32, linux-arm-kernel, Amelie DELAUNAY

On 11/8/22 12:59, Uwe Kleine-König wrote:
> On Fri, Feb 04, 2022 at 04:41:55PM +0100, Erwan LE RAY wrote:
>> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>>> Hi Ahmad
>>>
>>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>>> Hello Erwan,
>>>>
>>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>>> remove it at board level to keep current PIO behavior when needed.
>>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>>>> is now configured in DMA mode.
>>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>>> console has been removed from the driver by commit e359b4411c28
>>>>> ("serial: stm32: fix threaded interrupt handling").
>>>>
>>>> Do I understand correctly that your first patch breaks consoles of
>>>> most/all boards, because they will briefly use DMA, which is refused
>>>> by the stm32-usart driver and then you add a patch for each board
>>>> to fix that breakage?
>>>
>>> We have two solutions and both have pro/drawbacks. The first one (Erwan
>>> ones, can break the boot if the patch is taken "alone". Your proposition
>>> avoids this breakage but deletes a non define property (which is a bit
>>> weird). However I prefer to keep a functional behavior, and keep Ahmad
>>> proposition. Ahmad, just one question, dt-bindings check doesn't
>>> complain about it ?
>>>
>>> Cheers
>>> Alex
>>>
>>>>
>>>> Such intermittent breakage makes bisection a hassle. /delete-property/
>>>> is a no-op when the property doesn't exist, so you could move the first
>>>> patch to the very end to avoid intermittent breakage.
>>>>
>>>> I also think that the driver's behavior is a bit harsh. I think it would
>>>> be better for the UART driver to print a warning and fall back to
>>>> PIO for console instead of outright refusing and rendering the system
>>>> silent. That's not mutually exclusive with your patch series here,
>>>> of course.
>>>>
>>>> Cheers,
>>>> Ahmad
>>>>
>>
>> The driver implementation will consider the request to probe the UART
>> console in DMA mode as an error (-ENODEV), and will fallback this UART probe
>> in irq mode.
> 
>> Whatever the patch ordering, the boot will never be broken. The board dt
>> patches aim to get a "proper" implementation, but from functional
>> perspective the driver will manage a request to probe an UART console in DMA
>> mode as an error and fall it back in irq mode.
> 
> I didn't debug this further yet, but my machine (with an out-of-tree
> dts) fails to boot 6.1-rc4 without removing the dma properties from the
> console UART. This is a bug isn't it? The same dts created a working
> setup with stm32mp157.dtsi from 5.15 + kernel 5.15.
> 
> I can debug this further, but maybe you know off-hand what the problem
> is?

+CC Amelie, as this might be related to the DMA series that landed recently:

$ git log --oneline v5.18..v6.0 -- drivers/dma/stm32*

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

* Re: [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-11-08 15:28           ` Marek Vasut
  0 siblings, 0 replies; 56+ messages in thread
From: Marek Vasut @ 2022-11-08 15:28 UTC (permalink / raw)
  To: Uwe Kleine-König, Erwan LE RAY
  Cc: Alexandre TORGUE, Ahmad Fatoum, devicetree,
	Pengutronix Kernel Team, linux-kernel, Marcin Sloniewski,
	Rob Herring, Jagan Teki, Maxime Coquelin, Manivannan Sadhasivam,
	linux-stm32, linux-arm-kernel, Amelie DELAUNAY

On 11/8/22 12:59, Uwe Kleine-König wrote:
> On Fri, Feb 04, 2022 at 04:41:55PM +0100, Erwan LE RAY wrote:
>> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>>> Hi Ahmad
>>>
>>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>>> Hello Erwan,
>>>>
>>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>>> remove it at board level to keep current PIO behavior when needed.
>>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>>>> is now configured in DMA mode.
>>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>>> console has been removed from the driver by commit e359b4411c28
>>>>> ("serial: stm32: fix threaded interrupt handling").
>>>>
>>>> Do I understand correctly that your first patch breaks consoles of
>>>> most/all boards, because they will briefly use DMA, which is refused
>>>> by the stm32-usart driver and then you add a patch for each board
>>>> to fix that breakage?
>>>
>>> We have two solutions and both have pro/drawbacks. The first one (Erwan
>>> ones, can break the boot if the patch is taken "alone". Your proposition
>>> avoids this breakage but deletes a non define property (which is a bit
>>> weird). However I prefer to keep a functional behavior, and keep Ahmad
>>> proposition. Ahmad, just one question, dt-bindings check doesn't
>>> complain about it ?
>>>
>>> Cheers
>>> Alex
>>>
>>>>
>>>> Such intermittent breakage makes bisection a hassle. /delete-property/
>>>> is a no-op when the property doesn't exist, so you could move the first
>>>> patch to the very end to avoid intermittent breakage.
>>>>
>>>> I also think that the driver's behavior is a bit harsh. I think it would
>>>> be better for the UART driver to print a warning and fall back to
>>>> PIO for console instead of outright refusing and rendering the system
>>>> silent. That's not mutually exclusive with your patch series here,
>>>> of course.
>>>>
>>>> Cheers,
>>>> Ahmad
>>>>
>>
>> The driver implementation will consider the request to probe the UART
>> console in DMA mode as an error (-ENODEV), and will fallback this UART probe
>> in irq mode.
> 
>> Whatever the patch ordering, the boot will never be broken. The board dt
>> patches aim to get a "proper" implementation, but from functional
>> perspective the driver will manage a request to probe an UART console in DMA
>> mode as an error and fall it back in irq mode.
> 
> I didn't debug this further yet, but my machine (with an out-of-tree
> dts) fails to boot 6.1-rc4 without removing the dma properties from the
> console UART. This is a bug isn't it? The same dts created a working
> setup with stm32mp157.dtsi from 5.15 + kernel 5.15.
> 
> I can debug this further, but maybe you know off-hand what the problem
> is?

+CC Amelie, as this might be related to the DMA series that landed recently:

$ git log --oneline v5.18..v6.0 -- drivers/dma/stm32*

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [Linux-stm32] [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-11-08 15:28           ` Marek Vasut
@ 2022-11-09 13:48             ` Amelie Delaunay
  -1 siblings, 0 replies; 56+ messages in thread
From: Amelie Delaunay @ 2022-11-09 13:48 UTC (permalink / raw)
  To: Marek Vasut, Uwe Kleine-König, Erwan LE RAY, Valentin Caron
  Cc: devicetree, Amelie DELAUNAY, Maxime Coquelin, linux-kernel,
	Marcin Sloniewski, Rob Herring, Jagan Teki,
	Pengutronix Kernel Team, Manivannan Sadhasivam, linux-stm32,
	linux-arm-kernel

On 11/8/22 16:28, Marek Vasut wrote:
> On 11/8/22 12:59, Uwe Kleine-König wrote:
>> On Fri, Feb 04, 2022 at 04:41:55PM +0100, Erwan LE RAY wrote:
>>> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>>>> Hi Ahmad
>>>>
>>>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>>>> Hello Erwan,
>>>>>
>>>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>>>> remove it at board level to keep current PIO behavior when needed.
>>>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>>>>> is now configured in DMA mode.
>>>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>>>> console has been removed from the driver by commit e359b4411c28
>>>>>> ("serial: stm32: fix threaded interrupt handling").
>>>>>
>>>>> Do I understand correctly that your first patch breaks consoles of
>>>>> most/all boards, because they will briefly use DMA, which is refused
>>>>> by the stm32-usart driver and then you add a patch for each board
>>>>> to fix that breakage?
>>>>
>>>> We have two solutions and both have pro/drawbacks. The first one (Erwan
>>>> ones, can break the boot if the patch is taken "alone". Your 
>>>> proposition
>>>> avoids this breakage but deletes a non define property (which is a bit
>>>> weird). However I prefer to keep a functional behavior, and keep Ahmad
>>>> proposition. Ahmad, just one question, dt-bindings check doesn't
>>>> complain about it ?
>>>>
>>>> Cheers
>>>> Alex
>>>>
>>>>>
>>>>> Such intermittent breakage makes bisection a hassle. /delete-property/
>>>>> is a no-op when the property doesn't exist, so you could move the 
>>>>> first
>>>>> patch to the very end to avoid intermittent breakage.
>>>>>
>>>>> I also think that the driver's behavior is a bit harsh. I think it 
>>>>> would
>>>>> be better for the UART driver to print a warning and fall back to
>>>>> PIO for console instead of outright refusing and rendering the system
>>>>> silent. That's not mutually exclusive with your patch series here,
>>>>> of course.
>>>>>
>>>>> Cheers,
>>>>> Ahmad
>>>>>
>>>
>>> The driver implementation will consider the request to probe the UART
>>> console in DMA mode as an error (-ENODEV), and will fallback this 
>>> UART probe
>>> in irq mode.
>>
>>> Whatever the patch ordering, the boot will never be broken. The board dt
>>> patches aim to get a "proper" implementation, but from functional
>>> perspective the driver will manage a request to probe an UART console 
>>> in DMA
>>> mode as an error and fall it back in irq mode.
>>
>> I didn't debug this further yet, but my machine (with an out-of-tree
>> dts) fails to boot 6.1-rc4 without removing the dma properties from the
>> console UART. This is a bug isn't it? The same dts created a working
>> setup with stm32mp157.dtsi from 5.15 + kernel 5.15.

Hi Uwe,

Could you confirm earlycon is enabled on your setup?

Without earlycon, boot is ok, even with dma properties, at least on 
stm32mp157c-dk2.

>>
>> I can debug this further, but maybe you know off-hand what the problem
>> is?
> 
> +CC Amelie, as this might be related to the DMA series that landed 
> recently:
> 
> $ git log --oneline v5.18..v6.0 -- drivers/dma/stm32*

Hi Marek,

We haven't yet investigated the issue, and if latest DMA updates could 
explain why earlycon breaks the boot.


+TO Valentin, as he's now in charge of UART driver.
Valentin and I will investigate this issue.

Regards,
Amelie

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

* Re: [Linux-stm32] [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-11-09 13:48             ` Amelie Delaunay
  0 siblings, 0 replies; 56+ messages in thread
From: Amelie Delaunay @ 2022-11-09 13:48 UTC (permalink / raw)
  To: Marek Vasut, Uwe Kleine-König, Erwan LE RAY, Valentin Caron
  Cc: devicetree, Amelie DELAUNAY, Maxime Coquelin, linux-kernel,
	Marcin Sloniewski, Rob Herring, Jagan Teki,
	Pengutronix Kernel Team, Manivannan Sadhasivam, linux-stm32,
	linux-arm-kernel

On 11/8/22 16:28, Marek Vasut wrote:
> On 11/8/22 12:59, Uwe Kleine-König wrote:
>> On Fri, Feb 04, 2022 at 04:41:55PM +0100, Erwan LE RAY wrote:
>>> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>>>> Hi Ahmad
>>>>
>>>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>>>> Hello Erwan,
>>>>>
>>>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>>>> remove it at board level to keep current PIO behavior when needed.
>>>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>>>> (no HW flow control pin available) are kept in PIO mode, while USART3
>>>>>> is now configured in DMA mode.
>>>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>>>> console has been removed from the driver by commit e359b4411c28
>>>>>> ("serial: stm32: fix threaded interrupt handling").
>>>>>
>>>>> Do I understand correctly that your first patch breaks consoles of
>>>>> most/all boards, because they will briefly use DMA, which is refused
>>>>> by the stm32-usart driver and then you add a patch for each board
>>>>> to fix that breakage?
>>>>
>>>> We have two solutions and both have pro/drawbacks. The first one (Erwan
>>>> ones, can break the boot if the patch is taken "alone". Your 
>>>> proposition
>>>> avoids this breakage but deletes a non define property (which is a bit
>>>> weird). However I prefer to keep a functional behavior, and keep Ahmad
>>>> proposition. Ahmad, just one question, dt-bindings check doesn't
>>>> complain about it ?
>>>>
>>>> Cheers
>>>> Alex
>>>>
>>>>>
>>>>> Such intermittent breakage makes bisection a hassle. /delete-property/
>>>>> is a no-op when the property doesn't exist, so you could move the 
>>>>> first
>>>>> patch to the very end to avoid intermittent breakage.
>>>>>
>>>>> I also think that the driver's behavior is a bit harsh. I think it 
>>>>> would
>>>>> be better for the UART driver to print a warning and fall back to
>>>>> PIO for console instead of outright refusing and rendering the system
>>>>> silent. That's not mutually exclusive with your patch series here,
>>>>> of course.
>>>>>
>>>>> Cheers,
>>>>> Ahmad
>>>>>
>>>
>>> The driver implementation will consider the request to probe the UART
>>> console in DMA mode as an error (-ENODEV), and will fallback this 
>>> UART probe
>>> in irq mode.
>>
>>> Whatever the patch ordering, the boot will never be broken. The board dt
>>> patches aim to get a "proper" implementation, but from functional
>>> perspective the driver will manage a request to probe an UART console 
>>> in DMA
>>> mode as an error and fall it back in irq mode.
>>
>> I didn't debug this further yet, but my machine (with an out-of-tree
>> dts) fails to boot 6.1-rc4 without removing the dma properties from the
>> console UART. This is a bug isn't it? The same dts created a working
>> setup with stm32mp157.dtsi from 5.15 + kernel 5.15.

Hi Uwe,

Could you confirm earlycon is enabled on your setup?

Without earlycon, boot is ok, even with dma properties, at least on 
stm32mp157c-dk2.

>>
>> I can debug this further, but maybe you know off-hand what the problem
>> is?
> 
> +CC Amelie, as this might be related to the DMA series that landed 
> recently:
> 
> $ git log --oneline v5.18..v6.0 -- drivers/dma/stm32*

Hi Marek,

We haven't yet investigated the issue, and if latest DMA updates could 
explain why earlycon breaks the boot.


+TO Valentin, as he's now in charge of UART driver.
Valentin and I will investigate this issue.

Regards,
Amelie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [Linux-stm32] [PATCH 00/16] STM32 configure UART nodes for DMA
  2022-11-09 13:48             ` Amelie Delaunay
@ 2022-11-21  8:48               ` Valentin CARON
  -1 siblings, 0 replies; 56+ messages in thread
From: Valentin CARON @ 2022-11-21  8:48 UTC (permalink / raw)
  To: Amelie Delaunay, Marek Vasut, Uwe Kleine-König, Erwan LE RAY
  Cc: devicetree, Amelie DELAUNAY, Maxime Coquelin, linux-kernel,
	Marcin Sloniewski, Rob Herring, Jagan Teki,
	Pengutronix Kernel Team, Manivannan Sadhasivam, linux-stm32,
	linux-arm-kernel

Hi Uwe,

We found the issue, thank you to have reported it.

stm32-usart driver was not tolerant to a probe defer from DMA when the 
earlycon is active.

You can find the patch here:
https://lore.kernel.org/lkml/20221118170602.1057863-1-valentin.caron@foss.st.com/

Valentin

On 11/9/22 14:48, Amelie Delaunay wrote:
> On 11/8/22 16:28, Marek Vasut wrote:
>> On 11/8/22 12:59, Uwe Kleine-König wrote:
>>> On Fri, Feb 04, 2022 at 04:41:55PM +0100, Erwan LE RAY wrote:
>>>> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>>>>> Hi Ahmad
>>>>>
>>>>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>>>>> Hello Erwan,
>>>>>>
>>>>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>>>>> remove it at board level to keep current PIO behavior when needed.
>>>>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>>>>> (no HW flow control pin available) are kept in PIO mode, while 
>>>>>>> USART3
>>>>>>> is now configured in DMA mode.
>>>>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>>>>> console has been removed from the driver by commit e359b4411c28
>>>>>>> ("serial: stm32: fix threaded interrupt handling").
>>>>>>
>>>>>> Do I understand correctly that your first patch breaks consoles of
>>>>>> most/all boards, because they will briefly use DMA, which is refused
>>>>>> by the stm32-usart driver and then you add a patch for each board
>>>>>> to fix that breakage?
>>>>>
>>>>> We have two solutions and both have pro/drawbacks. The first one 
>>>>> (Erwan
>>>>> ones, can break the boot if the patch is taken "alone". Your 
>>>>> proposition
>>>>> avoids this breakage but deletes a non define property (which is a 
>>>>> bit
>>>>> weird). However I prefer to keep a functional behavior, and keep 
>>>>> Ahmad
>>>>> proposition. Ahmad, just one question, dt-bindings check doesn't
>>>>> complain about it ?
>>>>>
>>>>> Cheers
>>>>> Alex
>>>>>
>>>>>>
>>>>>> Such intermittent breakage makes bisection a hassle. 
>>>>>> /delete-property/
>>>>>> is a no-op when the property doesn't exist, so you could move the 
>>>>>> first
>>>>>> patch to the very end to avoid intermittent breakage.
>>>>>>
>>>>>> I also think that the driver's behavior is a bit harsh. I think 
>>>>>> it would
>>>>>> be better for the UART driver to print a warning and fall back to
>>>>>> PIO for console instead of outright refusing and rendering the 
>>>>>> system
>>>>>> silent. That's not mutually exclusive with your patch series here,
>>>>>> of course.
>>>>>>
>>>>>> Cheers,
>>>>>> Ahmad
>>>>>>
>>>>
>>>> The driver implementation will consider the request to probe the UART
>>>> console in DMA mode as an error (-ENODEV), and will fallback this 
>>>> UART probe
>>>> in irq mode.
>>>
>>>> Whatever the patch ordering, the boot will never be broken. The 
>>>> board dt
>>>> patches aim to get a "proper" implementation, but from functional
>>>> perspective the driver will manage a request to probe an UART 
>>>> console in DMA
>>>> mode as an error and fall it back in irq mode.
>>>
>>> I didn't debug this further yet, but my machine (with an out-of-tree
>>> dts) fails to boot 6.1-rc4 without removing the dma properties from the
>>> console UART. This is a bug isn't it? The same dts created a working
>>> setup with stm32mp157.dtsi from 5.15 + kernel 5.15.
>
> Hi Uwe,
>
> Could you confirm earlycon is enabled on your setup?
>
> Without earlycon, boot is ok, even with dma properties, at least on 
> stm32mp157c-dk2.
>
>>>
>>> I can debug this further, but maybe you know off-hand what the problem
>>> is?
>>
>> +CC Amelie, as this might be related to the DMA series that landed 
>> recently:
>>
>> $ git log --oneline v5.18..v6.0 -- drivers/dma/stm32*
>
> Hi Marek,
>
> We haven't yet investigated the issue, and if latest DMA updates could 
> explain why earlycon breaks the boot.
>
>
> +TO Valentin, as he's now in charge of UART driver.
> Valentin and I will investigate this issue.
>
> Regards,
> Amelie

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

* Re: [Linux-stm32] [PATCH 00/16] STM32 configure UART nodes for DMA
@ 2022-11-21  8:48               ` Valentin CARON
  0 siblings, 0 replies; 56+ messages in thread
From: Valentin CARON @ 2022-11-21  8:48 UTC (permalink / raw)
  To: Amelie Delaunay, Marek Vasut, Uwe Kleine-König, Erwan LE RAY
  Cc: devicetree, Amelie DELAUNAY, Maxime Coquelin, linux-kernel,
	Marcin Sloniewski, Rob Herring, Jagan Teki,
	Pengutronix Kernel Team, Manivannan Sadhasivam, linux-stm32,
	linux-arm-kernel

Hi Uwe,

We found the issue, thank you to have reported it.

stm32-usart driver was not tolerant to a probe defer from DMA when the 
earlycon is active.

You can find the patch here:
https://lore.kernel.org/lkml/20221118170602.1057863-1-valentin.caron@foss.st.com/

Valentin

On 11/9/22 14:48, Amelie Delaunay wrote:
> On 11/8/22 16:28, Marek Vasut wrote:
>> On 11/8/22 12:59, Uwe Kleine-König wrote:
>>> On Fri, Feb 04, 2022 at 04:41:55PM +0100, Erwan LE RAY wrote:
>>>> On 2/4/22 2:22 PM, Alexandre TORGUE wrote:
>>>>> Hi Ahmad
>>>>>
>>>>> On 2/3/22 18:25, Ahmad Fatoum wrote:
>>>>>> Hello Erwan,
>>>>>>
>>>>>> On 03.02.22 18:10, Erwan Le Ray wrote:
>>>>>>> Add DMA configuration to UART nodes in stm32mp15x (SOC level) and
>>>>>>> remove it at board level to keep current PIO behavior when needed.
>>>>>>> For stm32-ed1 and stm32-dkx boards, UART4 (console) and UART7
>>>>>>> (no HW flow control pin available) are kept in PIO mode, while 
>>>>>>> USART3
>>>>>>> is now configured in DMA mode.
>>>>>>> UART4 (console UART) has to be kept in irq mode, as DMA support for
>>>>>>> console has been removed from the driver by commit e359b4411c28
>>>>>>> ("serial: stm32: fix threaded interrupt handling").
>>>>>>
>>>>>> Do I understand correctly that your first patch breaks consoles of
>>>>>> most/all boards, because they will briefly use DMA, which is refused
>>>>>> by the stm32-usart driver and then you add a patch for each board
>>>>>> to fix that breakage?
>>>>>
>>>>> We have two solutions and both have pro/drawbacks. The first one 
>>>>> (Erwan
>>>>> ones, can break the boot if the patch is taken "alone". Your 
>>>>> proposition
>>>>> avoids this breakage but deletes a non define property (which is a 
>>>>> bit
>>>>> weird). However I prefer to keep a functional behavior, and keep 
>>>>> Ahmad
>>>>> proposition. Ahmad, just one question, dt-bindings check doesn't
>>>>> complain about it ?
>>>>>
>>>>> Cheers
>>>>> Alex
>>>>>
>>>>>>
>>>>>> Such intermittent breakage makes bisection a hassle. 
>>>>>> /delete-property/
>>>>>> is a no-op when the property doesn't exist, so you could move the 
>>>>>> first
>>>>>> patch to the very end to avoid intermittent breakage.
>>>>>>
>>>>>> I also think that the driver's behavior is a bit harsh. I think 
>>>>>> it would
>>>>>> be better for the UART driver to print a warning and fall back to
>>>>>> PIO for console instead of outright refusing and rendering the 
>>>>>> system
>>>>>> silent. That's not mutually exclusive with your patch series here,
>>>>>> of course.
>>>>>>
>>>>>> Cheers,
>>>>>> Ahmad
>>>>>>
>>>>
>>>> The driver implementation will consider the request to probe the UART
>>>> console in DMA mode as an error (-ENODEV), and will fallback this 
>>>> UART probe
>>>> in irq mode.
>>>
>>>> Whatever the patch ordering, the boot will never be broken. The 
>>>> board dt
>>>> patches aim to get a "proper" implementation, but from functional
>>>> perspective the driver will manage a request to probe an UART 
>>>> console in DMA
>>>> mode as an error and fall it back in irq mode.
>>>
>>> I didn't debug this further yet, but my machine (with an out-of-tree
>>> dts) fails to boot 6.1-rc4 without removing the dma properties from the
>>> console UART. This is a bug isn't it? The same dts created a working
>>> setup with stm32mp157.dtsi from 5.15 + kernel 5.15.
>
> Hi Uwe,
>
> Could you confirm earlycon is enabled on your setup?
>
> Without earlycon, boot is ok, even with dma properties, at least on 
> stm32mp157c-dk2.
>
>>>
>>> I can debug this further, but maybe you know off-hand what the problem
>>> is?
>>
>> +CC Amelie, as this might be related to the DMA series that landed 
>> recently:
>>
>> $ git log --oneline v5.18..v6.0 -- drivers/dma/stm32*
>
> Hi Marek,
>
> We haven't yet investigated the issue, and if latest DMA updates could 
> explain why earlycon breaks the boot.
>
>
> +TO Valentin, as he's now in charge of UART driver.
> Valentin and I will investigate this issue.
>
> Regards,
> Amelie

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-11-21  8:50 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 17:10 [PATCH 00/16] STM32 configure UART nodes for DMA Erwan Le Ray
2022-02-03 17:10 ` Erwan Le Ray
2022-02-03 17:10 ` [PATCH 01/16] ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151 Erwan Le Ray
2022-02-03 17:10   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 02/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 03/16] ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 04/16] ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 05/16] ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 06/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 07/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 08/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 09/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 10/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-04 15:49   ` Ahmad Fatoum
2022-02-04 15:49     ` Ahmad Fatoum
2022-02-03 17:11 ` [PATCH 11/16] ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 12/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 13/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 14/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 15/16] ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:11 ` [PATCH 16/16] ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcor-avenger96 Erwan Le Ray
2022-02-03 17:11   ` Erwan Le Ray
2022-02-03 17:25   ` Marek Vasut
2022-02-03 17:25     ` Marek Vasut
2022-02-03 17:25 ` [PATCH 00/16] STM32 configure UART nodes for DMA Ahmad Fatoum
2022-02-03 17:25   ` Ahmad Fatoum
2022-02-04 13:22   ` Alexandre TORGUE
2022-02-04 13:22     ` Alexandre TORGUE
2022-02-04 15:41     ` Erwan LE RAY
2022-02-04 15:41       ` Erwan LE RAY
2022-02-04 15:47       ` Ahmad Fatoum
2022-02-04 15:47         ` Ahmad Fatoum
2022-11-08 11:59       ` Uwe Kleine-König
2022-11-08 11:59         ` Uwe Kleine-König
2022-11-08 15:28         ` Marek Vasut
2022-11-08 15:28           ` Marek Vasut
2022-11-09 13:48           ` [Linux-stm32] " Amelie Delaunay
2022-11-09 13:48             ` Amelie Delaunay
2022-11-21  8:48             ` Valentin CARON
2022-11-21  8:48               ` Valentin CARON
2022-02-14 10:02 ` Alexandre TORGUE
2022-02-14 10:02   ` Alexandre TORGUE

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.