All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map
@ 2021-03-12  3:42 Bjorn Andersson
  2021-03-12  3:42 ` [PATCH 2/2] arm64: dts: qcom: sm8350: Add wakeup-parent to tlmm Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bjorn Andersson @ 2021-03-12  3:42 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: linux-arm-msm, devicetree, linux-kernel, linux-gpio, Vinod Koul

From: Lina Iyer <ilina@codeaurora.org>

GPIOs that can be configured as wakeup sources, have their interrupt
lines routed to PDC interrupt controller. Provide the interrupt map of
the GPIO to its wakeup capable interrupt parent.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-sm8350.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-sm8350.c b/drivers/pinctrl/qcom/pinctrl-sm8350.c
index a406ed0ec7d3..4d8f8636c2b3 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8350.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8350.c
@@ -1603,6 +1603,25 @@ static const struct msm_pingroup sm8350_groups[] = {
 	[206] = SDC_PINGROUP(sdc2_data, 0x1cf000, 9, 0),
 };
 
+static const struct msm_gpio_wakeirq_map sm8350_pdc_map[] = {
+	{ 2, 117 }, { 7, 82 }, { 11, 83 }, { 14, 80 }, { 15, 146 },
+	{ 19, 121 }, { 23, 84 }, { 26, 86 }, { 27, 75 }, { 31, 85 },
+	{ 32, 97 }, { 34, 98 }, { 35, 131 }, { 36, 79 }, { 38, 99 },
+	{ 39, 92 }, { 40, 101 }, { 43, 137 }, { 44, 102 }, { 46, 96 },
+	{ 47, 93 }, { 50, 108 }, { 51, 127 }, { 55, 128 }, { 56, 81 },
+	{ 59, 112 }, { 60, 119 }, { 63, 73 }, { 67, 74 }, { 71, 134 },
+	{ 75, 103 }, { 79, 104 }, { 80, 126 }, { 81, 139 }, { 82, 140 },
+	{ 83, 141 }, { 84, 124 }, { 85, 109 }, { 86, 143 }, { 87, 138 },
+	{ 88, 122 }, { 89, 113 }, { 90, 114 }, { 91, 115 }, { 92, 76 },
+	{ 95, 147 }, { 96, 148 }, { 98, 149 }, { 99, 150 }, { 115, 125 },
+	{ 116, 106 }, { 117, 105 }, { 118, 116 }, { 119, 123 }, { 130, 145 },
+	{ 136, 72 }, { 140, 100 }, { 151, 110 }, { 153, 95 }, { 155, 107 },
+	{ 156, 94 }, { 157, 111 }, { 159, 118 }, { 162, 77 }, { 165, 78 },
+	{ 169, 70 }, { 172, 132 }, { 174, 87 }, { 175, 88 }, { 177, 89 },
+	{ 179, 120 }, { 180, 129 }, { 183, 90 }, { 185, 136 }, { 187, 142 },
+	{ 190, 144 }, { 198, 91 }, { 200, 133 }, { 202, 135 },
+};
+
 static const struct msm_pinctrl_soc_data sm8350_tlmm = {
 	.pins = sm8350_pins,
 	.npins = ARRAY_SIZE(sm8350_pins),
@@ -1611,6 +1630,8 @@ static const struct msm_pinctrl_soc_data sm8350_tlmm = {
 	.groups = sm8350_groups,
 	.ngroups = ARRAY_SIZE(sm8350_groups),
 	.ngpios = 204,
+	.wakeirq_map = sm8350_pdc_map,
+	.nwakeirq_map = ARRAY_SIZE(sm8350_pdc_map),
 };
 
 static int sm8350_tlmm_probe(struct platform_device *pdev)
-- 
2.29.2


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

* [PATCH 2/2] arm64: dts: qcom: sm8350: Add wakeup-parent to tlmm
  2021-03-12  3:42 [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map Bjorn Andersson
@ 2021-03-12  3:42 ` Bjorn Andersson
  2021-03-12  5:06   ` Vinod Koul
  2021-03-12  5:06 ` [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map Vinod Koul
  2021-03-15 16:15 ` Linus Walleij
  2 siblings, 1 reply; 5+ messages in thread
From: Bjorn Andersson @ 2021-03-12  3:42 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: Linus Walleij, linux-arm-msm, devicetree, linux-kernel,
	linux-gpio, Vinod Koul

Now that TLMM has the wakeup table, specify the Power Domain Controller
to be the wakeup-parent of TLMM.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 2c02f451379b..d6295212acf7 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -642,6 +642,7 @@ tlmm: pinctrl@f100000 {
 			interrupt-controller;
 			#interrupt-cells = <2>;
 			gpio-ranges = <&tlmm 0 0 203>;
+			wakeup-parent = <&pdc>;
 
 			qup_uart3_default_state: qup-uart3-default-state {
 				rx {
-- 
2.29.2


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

* Re: [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map
  2021-03-12  3:42 [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map Bjorn Andersson
  2021-03-12  3:42 ` [PATCH 2/2] arm64: dts: qcom: sm8350: Add wakeup-parent to tlmm Bjorn Andersson
@ 2021-03-12  5:06 ` Vinod Koul
  2021-03-15 16:15 ` Linus Walleij
  2 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2021-03-12  5:06 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Linus Walleij, linux-arm-msm, devicetree,
	linux-kernel, linux-gpio

On 11-03-21, 19:42, Bjorn Andersson wrote:
> From: Lina Iyer <ilina@codeaurora.org>
> 
> GPIOs that can be configured as wakeup sources, have their interrupt
> lines routed to PDC interrupt controller. Provide the interrupt map of
> the GPIO to its wakeup capable interrupt parent.

Reviewed-by: Vinod Koul <vkoul@kernel.org>

-- 
~Vinod

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

* Re: [PATCH 2/2] arm64: dts: qcom: sm8350: Add wakeup-parent to tlmm
  2021-03-12  3:42 ` [PATCH 2/2] arm64: dts: qcom: sm8350: Add wakeup-parent to tlmm Bjorn Andersson
@ 2021-03-12  5:06   ` Vinod Koul
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2021-03-12  5:06 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Linus Walleij, linux-arm-msm, devicetree,
	linux-kernel, linux-gpio

On 11-03-21, 19:42, Bjorn Andersson wrote:
> Now that TLMM has the wakeup table, specify the Power Domain Controller
> to be the wakeup-parent of TLMM.

Reviewed-by: Vinod Koul <vkoul@kernel.org>

-- 
~Vinod

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

* Re: [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map
  2021-03-12  3:42 [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map Bjorn Andersson
  2021-03-12  3:42 ` [PATCH 2/2] arm64: dts: qcom: sm8350: Add wakeup-parent to tlmm Bjorn Andersson
  2021-03-12  5:06 ` [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map Vinod Koul
@ 2021-03-15 16:15 ` Linus Walleij
  2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2021-03-15 16:15 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, MSM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel, open list:GPIO SUBSYSTEM, Vinod Koul

On Fri, Mar 12, 2021 at 4:41 AM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:

> From: Lina Iyer <ilina@codeaurora.org>
>
> GPIOs that can be configured as wakeup sources, have their interrupt
> lines routed to PDC interrupt controller. Provide the interrupt map of
> the GPIO to its wakeup capable interrupt parent.
>
> Signed-off-by: Lina Iyer <ilina@codeaurora.org>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

This patch 1/2 applied to the pin control tree.
Please take the DTS patch into the qcom SoC tree!

Yours,
Linus Walleij

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

end of thread, other threads:[~2021-03-15 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12  3:42 [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map Bjorn Andersson
2021-03-12  3:42 ` [PATCH 2/2] arm64: dts: qcom: sm8350: Add wakeup-parent to tlmm Bjorn Andersson
2021-03-12  5:06   ` Vinod Koul
2021-03-12  5:06 ` [PATCH 1/2] pinctrl: qcom: sm8350: add GPIO wakeup interrupt map Vinod Koul
2021-03-15 16:15 ` Linus Walleij

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.