All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM
@ 2021-07-21 18:10 Marek Vasut
  2021-07-23 15:18 ` Alexandre TORGUE
  2021-07-30 13:39 ` Alexandre TORGUE
  0 siblings, 2 replies; 6+ messages in thread
From: Marek Vasut @ 2021-07-21 18:10 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: cniedermaier, Marek Vasut, Alexandre Torgue, Patrice Chotard,
	Patrick Delaunay, linux-stm32

While 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
fixed the LED0 assignment on the PDK2 board, the same commit did not
update the touchscreen IRQ line assignment, which is the same GPIO line,
shared between the LED0 output and touchscreen IRQ input. To make this
more convoluted, the same EXTI input (not the same GPIO line) is shared
between Button B which is Active-Low IRQ, and touchscreen IRQ which is
Edge-Falling IRQ, which cannot be used at the same time. In case the LCD
board with touchscreen is in use, which is the case here, LED0 must be
disabled, Button B must be polled, so the touchscreen interrupt works as
it should.

Update the touchscreen IRQ line assignment, disable LED0 and use polled
GPIO button driver for Button B, since the DT here describes baseboard
with LCD board.

Fixes: 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
---
 arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi | 24 +++++++++++--------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
index 4f6b94f10f4a9..fbf3826933e4d 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
@@ -38,7 +38,7 @@ gpio-keys-polled {
 		poll-interval = <20>;
 
 		/*
-		 * The EXTi IRQ line 3 is shared with touchscreen and ethernet,
+		 * The EXTi IRQ line 3 is shared with ethernet,
 		 * so mark this as polled GPIO key.
 		 */
 		button-0 {
@@ -47,6 +47,16 @@ button-0 {
 			gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
 		};
 
+		/*
+		 * The EXTi IRQ line 6 is shared with touchscreen,
+		 * so mark this as polled GPIO key.
+		 */
+		button-1 {
+			label = "TA2-GPIO-B";
+			linux,code = <KEY_B>;
+			gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
+		};
+
 		/*
 		 * The EXTi IRQ line 0 is shared with PMIC,
 		 * so mark this as polled GPIO key.
@@ -61,13 +71,6 @@ button-2 {
 	gpio-keys {
 		compatible = "gpio-keys";
 
-		button-1 {
-			label = "TA2-GPIO-B";
-			linux,code = <KEY_B>;
-			gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
-			wakeup-source;
-		};
-
 		button-3 {
 			label = "TA4-GPIO-D";
 			linux,code = <KEY_D>;
@@ -83,6 +86,7 @@ led-0 {
 			label = "green:led5";
 			gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
 			default-state = "off";
+			status = "disabled";
 		};
 
 		led-1 {
@@ -202,8 +206,8 @@ sgtl5000_rx_endpoint: endpoint@1 {
 	touchscreen@38 {
 		compatible = "edt,edt-ft5406";
 		reg = <0x38>;
-		interrupt-parent = <&gpiog>;
-		interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
+		interrupt-parent = <&gpioc>;
+		interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
 	};
 };
 
-- 
2.30.2


_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM
  2021-07-21 18:10 [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM Marek Vasut
@ 2021-07-23 15:18 ` Alexandre TORGUE
  2021-07-23 17:39   ` Marek Vasut
  2021-07-30 13:39 ` Alexandre TORGUE
  1 sibling, 1 reply; 6+ messages in thread
From: Alexandre TORGUE @ 2021-07-23 15:18 UTC (permalink / raw)
  To: Marek Vasut, linux-arm-kernel
  Cc: cniedermaier, Patrice Chotard, Patrick Delaunay, linux-stm32

Hi Marek

On 7/21/21 8:10 PM, Marek Vasut wrote:
> While 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
> fixed the LED0 assignment on the PDK2 board, the same commit did not
> update the touchscreen IRQ line assignment, which is the same GPIO line,
> shared between the LED0 output and touchscreen IRQ input. To make this
> more convoluted, the same EXTI input (not the same GPIO line) is shared
> between Button B which is Active-Low IRQ, and touchscreen IRQ which is
> Edge-Falling IRQ, which cannot be used at the same time. In case the LCD
> board with touchscreen is in use, which is the case here, LED0 must be
> disabled, Button B must be polled, so the touchscreen interrupt works as
> it should.
> 
> Update the touchscreen IRQ line assignment, disable LED0 and use polled
> GPIO button driver for Button B, since the DT here describes baseboard
> with LCD board.
> 
> Fixes: 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
> Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board")

I think you need to keep only one fixes tag.

> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: linux-stm32@st-md-mailman.stormreply.com
> To: linux-arm-kernel@lists.infradead.org
> ---
>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi | 24 +++++++++++--------
>   1 file changed, 14 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
> index 4f6b94f10f4a9..fbf3826933e4d 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
> @@ -38,7 +38,7 @@ gpio-keys-polled {
>   		poll-interval = <20>;
>   
>   		/*
> -		 * The EXTi IRQ line 3 is shared with touchscreen and ethernet,
> +		 * The EXTi IRQ line 3 is shared with ethernet,
>   		 * so mark this as polled GPIO key.
>   		 */
>   		button-0 {
> @@ -47,6 +47,16 @@ button-0 {
>   			gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
>   		};
>   
> +		/*
> +		 * The EXTi IRQ line 6 is shared with touchscreen,
> +		 * so mark this as polled GPIO key.
> +		 */
> +		button-1 {
> +			label = "TA2-GPIO-B";
> +			linux,code = <KEY_B>;
> +			gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
> +		};
> +
>   		/*
>   		 * The EXTi IRQ line 0 is shared with PMIC,
>   		 * so mark this as polled GPIO key.
> @@ -61,13 +71,6 @@ button-2 {
>   	gpio-keys {
>   		compatible = "gpio-keys";
>   
> -		button-1 {
> -			label = "TA2-GPIO-B";
> -			linux,code = <KEY_B>;
> -			gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
> -			wakeup-source;
> -		};
> -
>   		button-3 {
>   			label = "TA4-GPIO-D";
>   			linux,code = <KEY_D>;
> @@ -83,6 +86,7 @@ led-0 {
>   			label = "green:led5";
>   			gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
>   			default-state = "off";
> +			status = "disabled";
>   		};
>   
>   		led-1 {
> @@ -202,8 +206,8 @@ sgtl5000_rx_endpoint: endpoint@1 {
>   	touchscreen@38 {
>   		compatible = "edt,edt-ft5406";
>   		reg = <0x38>;
> -		interrupt-parent = <&gpiog>;
> -		interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
> +		interrupt-parent = <&gpioc>;
> +		interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
>   	};
>   };
>   
> 


_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM
  2021-07-23 15:18 ` Alexandre TORGUE
@ 2021-07-23 17:39   ` Marek Vasut
  2021-07-28  7:31     ` Alexandre TORGUE
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2021-07-23 17:39 UTC (permalink / raw)
  To: Alexandre TORGUE, linux-arm-kernel
  Cc: cniedermaier, Patrice Chotard, Patrick Delaunay, linux-stm32

On 7/23/21 5:18 PM, Alexandre TORGUE wrote:
> Hi Marek
> 
> On 7/21/21 8:10 PM, Marek Vasut wrote:
>> While 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
>> fixed the LED0 assignment on the PDK2 board, the same commit did not
>> update the touchscreen IRQ line assignment, which is the same GPIO line,
>> shared between the LED0 output and touchscreen IRQ input. To make this
>> more convoluted, the same EXTI input (not the same GPIO line) is shared
>> between Button B which is Active-Low IRQ, and touchscreen IRQ which is
>> Edge-Falling IRQ, which cannot be used at the same time. In case the LCD
>> board with touchscreen is in use, which is the case here, LED0 must be
>> disabled, Button B must be polled, so the touchscreen interrupt works as
>> it should.
>>
>> Update the touchscreen IRQ line assignment, disable LED0 and use polled
>> GPIO button driver for Button B, since the DT here describes baseboard
>> with LCD board.
>>
>> Fixes: 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
>> Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM 
>> STM32MP1 SoM and PDK2 board")
> 
> I think you need to keep only one fixes tag.

Then it is the first one (LED5) if you want to pick it, or shall I 
resend it ?

_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM
  2021-07-23 17:39   ` Marek Vasut
@ 2021-07-28  7:31     ` Alexandre TORGUE
  2021-07-28 17:05       ` Marek Vasut
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandre TORGUE @ 2021-07-28  7:31 UTC (permalink / raw)
  To: Marek Vasut, linux-arm-kernel
  Cc: cniedermaier, Patrice Chotard, Patrick Delaunay, linux-stm32

On 7/23/21 7:39 PM, Marek Vasut wrote:
> On 7/23/21 5:18 PM, Alexandre TORGUE wrote:
>> Hi Marek
>>
>> On 7/21/21 8:10 PM, Marek Vasut wrote:
>>> While 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
>>> fixed the LED0 assignment on the PDK2 board, the same commit did not
>>> update the touchscreen IRQ line assignment, which is the same GPIO line,
>>> shared between the LED0 output and touchscreen IRQ input. To make this
>>> more convoluted, the same EXTI input (not the same GPIO line) is shared
>>> between Button B which is Active-Low IRQ, and touchscreen IRQ which is
>>> Edge-Falling IRQ, which cannot be used at the same time. In case the LCD
>>> board with touchscreen is in use, which is the case here, LED0 must be
>>> disabled, Button B must be polled, so the touchscreen interrupt works as
>>> it should.
>>>
>>> Update the touchscreen IRQ line assignment, disable LED0 and use polled
>>> GPIO button driver for Button B, since the DT here describes baseboard
>>> with LCD board.
>>>
>>> Fixes: 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM 
>>> PDK2")
>>> Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM 
>>> STM32MP1 SoM and PDK2 board")
>>
>> I think you need to keep only one fixes tag.
> 
> Then it is the first one (LED5) if you want to pick it, or shall I 
> resend it ?

I'll do it.


_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM
  2021-07-28  7:31     ` Alexandre TORGUE
@ 2021-07-28 17:05       ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2021-07-28 17:05 UTC (permalink / raw)
  To: Alexandre TORGUE, linux-arm-kernel
  Cc: cniedermaier, Patrice Chotard, Patrick Delaunay, linux-stm32

On 7/28/21 9:31 AM, Alexandre TORGUE wrote:
> On 7/23/21 7:39 PM, Marek Vasut wrote:
>> On 7/23/21 5:18 PM, Alexandre TORGUE wrote:
>>> Hi Marek
>>>
>>> On 7/21/21 8:10 PM, Marek Vasut wrote:
>>>> While 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM 
>>>> PDK2")
>>>> fixed the LED0 assignment on the PDK2 board, the same commit did not
>>>> update the touchscreen IRQ line assignment, which is the same GPIO 
>>>> line,
>>>> shared between the LED0 output and touchscreen IRQ input. To make this
>>>> more convoluted, the same EXTI input (not the same GPIO line) is shared
>>>> between Button B which is Active-Low IRQ, and touchscreen IRQ which is
>>>> Edge-Falling IRQ, which cannot be used at the same time. In case the 
>>>> LCD
>>>> board with touchscreen is in use, which is the case here, LED0 must be
>>>> disabled, Button B must be polled, so the touchscreen interrupt 
>>>> works as
>>>> it should.
>>>>
>>>> Update the touchscreen IRQ line assignment, disable LED0 and use polled
>>>> GPIO button driver for Button B, since the DT here describes baseboard
>>>> with LCD board.
>>>>
>>>> Fixes: 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM 
>>>> PDK2")
>>>> Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM 
>>>> STM32MP1 SoM and PDK2 board")
>>>
>>> I think you need to keep only one fixes tag.
>>
>> Then it is the first one (LED5) if you want to pick it, or shall I 
>> resend it ?
> 
> I'll do it.

Thank you

_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM
  2021-07-21 18:10 [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM Marek Vasut
  2021-07-23 15:18 ` Alexandre TORGUE
@ 2021-07-30 13:39 ` Alexandre TORGUE
  1 sibling, 0 replies; 6+ messages in thread
From: Alexandre TORGUE @ 2021-07-30 13:39 UTC (permalink / raw)
  To: Marek Vasut, linux-arm-kernel
  Cc: cniedermaier, Patrice Chotard, Patrick Delaunay, linux-stm32

Hi Marek

On 7/21/21 8:10 PM, Marek Vasut wrote:
> While 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
> fixed the LED0 assignment on the PDK2 board, the same commit did not
> update the touchscreen IRQ line assignment, which is the same GPIO line,
> shared between the LED0 output and touchscreen IRQ input. To make this
> more convoluted, the same EXTI input (not the same GPIO line) is shared
> between Button B which is Active-Low IRQ, and touchscreen IRQ which is
> Edge-Falling IRQ, which cannot be used at the same time. In case the LCD
> board with touchscreen is in use, which is the case here, LED0 must be
> disabled, Button B must be polled, so the touchscreen interrupt works as
> it should.
> 
> Update the touchscreen IRQ line assignment, disable LED0 and use polled
> GPIO button driver for Button B, since the DT here describes baseboard
> with LCD board.
> 

Applied on stm32-fixes

regards
alex

> Fixes: 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2")
> Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board")
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: linux-stm32@st-md-mailman.stormreply.com
> To: linux-arm-kernel@lists.infradead.org
> ---
>   arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi | 24 +++++++++++--------
>   1 file changed, 14 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
> index 4f6b94f10f4a9..fbf3826933e4d 100644
> --- a/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
> +++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-pdk2.dtsi
> @@ -38,7 +38,7 @@ gpio-keys-polled {
>   		poll-interval = <20>;
>   
>   		/*
> -		 * The EXTi IRQ line 3 is shared with touchscreen and ethernet,
> +		 * The EXTi IRQ line 3 is shared with ethernet,
>   		 * so mark this as polled GPIO key.
>   		 */
>   		button-0 {
> @@ -47,6 +47,16 @@ button-0 {
>   			gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
>   		};
>   
> +		/*
> +		 * The EXTi IRQ line 6 is shared with touchscreen,
> +		 * so mark this as polled GPIO key.
> +		 */
> +		button-1 {
> +			label = "TA2-GPIO-B";
> +			linux,code = <KEY_B>;
> +			gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
> +		};
> +
>   		/*
>   		 * The EXTi IRQ line 0 is shared with PMIC,
>   		 * so mark this as polled GPIO key.
> @@ -61,13 +71,6 @@ button-2 {
>   	gpio-keys {
>   		compatible = "gpio-keys";
>   
> -		button-1 {
> -			label = "TA2-GPIO-B";
> -			linux,code = <KEY_B>;
> -			gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
> -			wakeup-source;
> -		};
> -
>   		button-3 {
>   			label = "TA4-GPIO-D";
>   			linux,code = <KEY_D>;
> @@ -83,6 +86,7 @@ led-0 {
>   			label = "green:led5";
>   			gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
>   			default-state = "off";
> +			status = "disabled";
>   		};
>   
>   		led-1 {
> @@ -202,8 +206,8 @@ sgtl5000_rx_endpoint: endpoint@1 {
>   	touchscreen@38 {
>   		compatible = "edt,edt-ft5406";
>   		reg = <0x38>;
> -		interrupt-parent = <&gpiog>;
> -		interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
> +		interrupt-parent = <&gpioc>;
> +		interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* GPIO E */
>   	};
>   };
>   
> 


_______________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2021-07-30 13:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 18:10 [PATCH] ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM Marek Vasut
2021-07-23 15:18 ` Alexandre TORGUE
2021-07-23 17:39   ` Marek Vasut
2021-07-28  7:31     ` Alexandre TORGUE
2021-07-28 17:05       ` Marek Vasut
2021-07-30 13:39 ` 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.