All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: sc7180: Add wakeup support over UART RX
@ 2020-04-27  6:27 satya priya
  2020-04-27 16:56 ` Matthias Kaehlcke
  0 siblings, 1 reply; 3+ messages in thread
From: satya priya @ 2020-04-27  6:27 UTC (permalink / raw)
  To: agross, bjorn.andersson, robh+dt
  Cc: linux-arm-msm, devicetree, linux-kernel, akashast, rojay,
	msavaliy.qti.qualcomm.com, satya priya

Add the necessary pinctrl and interrupts to make UART
wakeup capable.

Signed-off-by: satya priya <skakit@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 4216b57..3a49603 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -637,9 +637,12 @@
 				reg = <0 0x0088c000 0 0x4000>;
 				clock-names = "se";
 				clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>;
-				pinctrl-names = "default";
+				pinctrl-names = "default", "sleep";
 				pinctrl-0 = <&qup_uart3_default>;
-				interrupts = <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>;
+				pinctrl-1 = <&qup_uart3_default>;
+				interrupts-extended =
+					<&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
+					<&tlmm 41 0>;
 				status = "disabled";
 			};
 
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


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

* Re: [PATCH] arm64: dts: sc7180: Add wakeup support over UART RX
  2020-04-27  6:27 [PATCH] arm64: dts: sc7180: Add wakeup support over UART RX satya priya
@ 2020-04-27 16:56 ` Matthias Kaehlcke
  2020-07-24  3:56   ` skakit
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Kaehlcke @ 2020-04-27 16:56 UTC (permalink / raw)
  To: satya priya
  Cc: agross, bjorn.andersson, robh+dt, linux-arm-msm, devicetree,
	linux-kernel, akashast, rojay, msavaliy.qti.qualcomm.com

Hi,

On Mon, Apr 27, 2020 at 11:57:24AM +0530, satya priya wrote:
> Add the necessary pinctrl and interrupts to make UART
> wakeup capable.
> 
> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/sc7180.dtsi | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index 4216b57..3a49603 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -637,9 +637,12 @@
>  				reg = <0 0x0088c000 0 0x4000>;
>  				clock-names = "se";
>  				clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>;
> -				pinctrl-names = "default";
> +				pinctrl-names = "default", "sleep";
>  				pinctrl-0 = <&qup_uart3_default>;
> -				interrupts = <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>;
> +				pinctrl-1 = <&qup_uart3_default>;

Why is the 'sleep' configuration needed if it's the same as 'default'?

> +				interrupts-extended =
> +					<&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
> +					<&tlmm 41 0>;
>  				status = "disabled";
>  			};

This patch only adds wakeup support for uart3, which seems an arbitrary
choice at SoC level. Either it should do it for all UARTs of the SC7180,
or in the .dtsi of devices that use UART3 and need it to be wakeup capable.

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

* Re: [PATCH] arm64: dts: sc7180: Add wakeup support over UART RX
  2020-04-27 16:56 ` Matthias Kaehlcke
@ 2020-07-24  3:56   ` skakit
  0 siblings, 0 replies; 3+ messages in thread
From: skakit @ 2020-07-24  3:56 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: agross, bjorn.andersson, robh+dt, linux-arm-msm, devicetree,
	linux-kernel, akashast, rojay

Hi Matthias,

On 2020-04-27 22:26, Matthias Kaehlcke wrote:
> Hi,
> 
> On Mon, Apr 27, 2020 at 11:57:24AM +0530, satya priya wrote:
>> Add the necessary pinctrl and interrupts to make UART
>> wakeup capable.
>> 
>> Signed-off-by: satya priya <skakit@codeaurora.org>
>> ---
>>  arch/arm64/boot/dts/qcom/sc7180.dtsi | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi 
>> b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> index 4216b57..3a49603 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> @@ -637,9 +637,12 @@
>>  				reg = <0 0x0088c000 0 0x4000>;
>>  				clock-names = "se";
>>  				clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>;
>> -				pinctrl-names = "default";
>> +				pinctrl-names = "default", "sleep";
>>  				pinctrl-0 = <&qup_uart3_default>;
>> -				interrupts = <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>;
>> +				pinctrl-1 = <&qup_uart3_default>;
> 
> Why is the 'sleep' configuration needed if it's the same as 'default'?

Sleep configuration is needed to make sure correct pinctrl setting is 
done for RX.
When we register wakeup interrupt, function select is changed to 0 or 
GPIO, and after that when state on is called, down the line it is 
checking the current state, if it's same as previous state(default), it 
won't do any thing and returns 0. Thus the pinctrl setting for RX 
remains with "GPIO" function select causing transfer failures.

int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *state)
{
         if (p->state == state)
                 return 0;

         return pinctrl_commit_state(p, state);
}
EXPORT_SYMBOL_GPL(pinctrl_select_state);

However, in V2 we have added sleep state separately to make wakeup 
feature work properly.

> 
>> +				interrupts-extended =
>> +					<&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
>> +					<&tlmm 41 0>;
>>  				status = "disabled";
>>  			};
> 
> This patch only adds wakeup support for uart3, which seems an arbitrary
> choice at SoC level. Either it should do it for all UARTs of the 
> SC7180,
> or in the .dtsi of devices that use UART3 and need it to be wakeup 
> capable.

Ok. Added wakeup support to all the UARTs of SC7180 in V2.

Thanks,
Satya Priya

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

end of thread, other threads:[~2020-07-24  3:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27  6:27 [PATCH] arm64: dts: sc7180: Add wakeup support over UART RX satya priya
2020-04-27 16:56 ` Matthias Kaehlcke
2020-07-24  3:56   ` skakit

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.