linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] MPM pin mappings
@ 2023-08-09 19:38 Konrad Dybcio
  2023-08-09 19:38 ` [PATCH 1/5] pinctrl: qcom: msm8998: Fix MPM mappings Konrad Dybcio
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-09 19:38 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: Marijn Suijten, linux-arm-msm, linux-gpio, linux-kernel,
	Konrad Dybcio

This series adds the MPM wakeirq mappings for some SoCs and fixes my
"big oops" within the 8998 driver.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (5):
      pinctrl: qcom: msm8998: Fix MPM mappings
      pinctrl: qcom: msm8996: Add MPM pin mappings
      pinctrl: qcom: sm6115: Add MPM pin mappings
      pinctrl: qcom: sm6125: Add MPM pin mappings
      pinctrl: qcom: sdm660: Add MPM pin mappings

 drivers/pinctrl/qcom/pinctrl-msm8996.c | 15 +++++++++++++++
 drivers/pinctrl/qcom/pinctrl-msm8998.c | 19 ++++++++++---------
 drivers/pinctrl/qcom/pinctrl-sdm660.c  | 14 ++++++++++++++
 drivers/pinctrl/qcom/pinctrl-sm6115.c  | 12 ++++++++++++
 drivers/pinctrl/qcom/pinctrl-sm6125.c  | 14 ++++++++++++++
 5 files changed, 65 insertions(+), 9 deletions(-)
---
base-commit: 21ef7b1e17d039053edaeaf41142423810572741
change-id: 20230809-topic-mpm_mappings-31ff2856244a

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@linaro.org>


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

* [PATCH 1/5] pinctrl: qcom: msm8998: Fix MPM mappings
  2023-08-09 19:38 [PATCH 0/5] MPM pin mappings Konrad Dybcio
@ 2023-08-09 19:38 ` Konrad Dybcio
  2023-08-10  7:14   ` Stephan Gerhold
  2023-08-09 19:38 ` [PATCH 2/5] pinctrl: qcom: msm8996: Add MPM pin mappings Konrad Dybcio
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-09 19:38 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: Marijn Suijten, linux-arm-msm, linux-gpio, linux-kernel,
	Konrad Dybcio

Commit 29f6e7e379fd ("pinctrl: qcom: msm8998: Add MPM pin mappings")
added a map of pins <-> wakeirqs. The values in each tuple were swapped
and the last one was missing. Fix that.

Fixes: 29f6e7e379fd ("pinctrl: qcom: msm8998: Add MPM pin mappings")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-msm8998.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-msm8998.c b/drivers/pinctrl/qcom/pinctrl-msm8998.c
index b7cbf32b3125..08d6e555652a 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8998.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8998.c
@@ -1496,15 +1496,16 @@ static const struct msm_pingroup msm8998_groups[] = {
 };
 
 static const struct msm_gpio_wakeirq_map msm8998_mpm_map[] = {
-	{ 1, 3 }, { 5, 4 }, { 9, 5 }, { 11, 6 }, { 22, 8 }, { 24, 9 }, { 26, 10 },
-	{ 34, 11 }, { 36, 12 }, { 37, 13 }, { 38, 14 }, { 40, 15 }, { 42, 16 }, { 46, 17 },
-	{ 50, 18 }, { 53, 19 }, { 54, 20 }, { 56, 21 }, { 57, 22 }, { 58, 23 }, { 59, 24 },
-	{ 60, 25 }, { 61, 26 }, { 62, 27 }, { 63, 28 }, { 64, 29 }, { 66, 7 }, { 71, 30 },
-	{ 73, 31 }, { 77, 32 }, { 78, 33 }, { 79, 34 }, { 80, 35 }, { 82, 36 }, { 86, 37 },
-	{ 91, 38 }, { 92, 39 }, { 95, 40 }, { 97, 41 }, { 101, 42 }, { 104, 43 }, { 106, 44 },
-	{ 108, 45 }, { 110, 48 }, { 112, 46 }, { 113, 47 }, { 115, 51 }, { 116, 54 }, { 117, 55 },
-	{ 118, 56 }, { 119, 57 }, { 120, 58 }, { 121, 59 }, { 122, 60 }, { 123, 61 }, { 124, 62 },
-	{ 125, 63 }, { 126, 64 }, { 127, 50 }, { 129, 65 }, { 131, 66 }, { 132, 67 }, { 133, 68 },
+	{ 3, 1 }, { 4, 5 }, { 5, 9 }, { 6, 11 }, { 8, 22 }, { 9, 24 }, { 10, 26 },
+	{ 11, 34 }, { 12, 36 }, { 13, 37 }, { 14, 38 }, { 15, 40 }, { 16, 42 }, { 17, 46 },
+	{ 18, 50 }, { 19, 53 }, { 20, 54 }, { 21, 56 }, { 22, 57 }, { 23, 58 }, { 24, 59 },
+	{ 25, 60 }, { 26, 61 }, { 27, 62 }, { 28, 63 }, { 29, 64 }, { 7, 66 }, { 30, 71 },
+	{ 31, 73 }, { 32, 77 }, { 33, 78 }, { 34, 79 }, { 35, 80 }, { 36, 82 }, { 37, 86 },
+	{ 38, 91 }, { 39, 92 }, { 40, 95 }, { 41, 97 }, { 42, 101 }, { 43, 104 }, { 44, 106 },
+	{ 45, 108 }, { 48, 110 }, { 46, 112 }, { 47, 113 }, { 51, 115 }, { 54, 116 }, { 55, 117 },
+	{ 56, 118 }, { 57, 119 }, { 58, 120 }, { 59, 121 }, { 60, 122 }, { 61, 123 }, { 62, 124 },
+	{ 63, 125 }, { 64, 126 }, { 50, 127 }, { 65, 129 }, { 66, 131 }, { 67, 132 }, { 68, 133 },
+	{ 69, 145 },
 };
 
 static const struct msm_pinctrl_soc_data msm8998_pinctrl = {

-- 
2.41.0


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

* [PATCH 2/5] pinctrl: qcom: msm8996: Add MPM pin mappings
  2023-08-09 19:38 [PATCH 0/5] MPM pin mappings Konrad Dybcio
  2023-08-09 19:38 ` [PATCH 1/5] pinctrl: qcom: msm8998: Fix MPM mappings Konrad Dybcio
@ 2023-08-09 19:38 ` Konrad Dybcio
  2023-08-09 19:38 ` [PATCH 3/5] pinctrl: qcom: sm6115: " Konrad Dybcio
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-09 19:38 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: Marijn Suijten, linux-arm-msm, linux-gpio, linux-kernel,
	Konrad Dybcio

Add pin <-> wakeirq mappings to allow for waking up the AP from sleep
through MPM-connected pins.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-msm8996.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-msm8996.c b/drivers/pinctrl/qcom/pinctrl-msm8996.c
index 46cc0b49dbab..a3f7e8ed9112 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8996.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8996.c
@@ -1880,6 +1880,19 @@ static const struct msm_pingroup msm8996_groups[] = {
 	SDC_QDSD_PINGROUP(sdc1_rclk, 0x12c000, 15, 0),
 };
 
+static const struct msm_gpio_wakeirq_map msm8996_mpm_map[] = {
+	{ 3, 1 }, { 4, 5 }, { 5, 9 }, { 6, 11 }, { 7, 66 }, { 8, 22 }, { 9, 24 }, { 10, 26 },
+	{ 11, 34 }, { 12, 36 }, { 13, 37 }, { 14, 38 }, { 15, 40 }, { 16, 42 }, { 17, 46 },
+	{ 18, 50 }, { 19, 53 }, { 20, 54 }, { 21, 56 }, { 22, 57 }, { 23, 58 }, { 24, 59 },
+	{ 25, 60 }, { 26, 61 }, { 27, 62 }, { 28, 63 }, { 29, 64 }, { 30, 71 }, { 31, 73 },
+	{ 32, 77 }, { 33, 78 }, { 34, 79 }, { 35, 80 }, { 36, 82 }, { 37, 86 }, { 38, 91 },
+	{ 39, 92 }, { 40, 95 }, { 41, 97 }, { 42, 101 }, { 43, 104 }, { 44, 106 }, { 45, 108 },
+	{ 46, 112 }, { 47, 113 }, { 48, 110 }, { 50, 127 }, { 51, 115 }, { 54, 116 },
+	{ 55, 117 }, { 56, 118 }, { 57, 119 }, { 58, 120 }, { 59, 121 }, { 60, 122 },
+	{ 61, 123 }, { 62, 124 }, { 63, 125 }, { 64, 126 }, { 65, 129 }, { 66, 131 },
+	{ 67, 132 }, { 68, 133 }, { 69, 145 },
+};
+
 static const struct msm_pinctrl_soc_data msm8996_pinctrl = {
 	.pins = msm8996_pins,
 	.npins = ARRAY_SIZE(msm8996_pins),
@@ -1888,6 +1901,8 @@ static const struct msm_pinctrl_soc_data msm8996_pinctrl = {
 	.groups = msm8996_groups,
 	.ngroups = ARRAY_SIZE(msm8996_groups),
 	.ngpios = 150,
+	.wakeirq_map = msm8996_mpm_map,
+	.nwakeirq_map = ARRAY_SIZE(msm8996_mpm_map),
 };
 
 static int msm8996_pinctrl_probe(struct platform_device *pdev)

-- 
2.41.0


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

* [PATCH 3/5] pinctrl: qcom: sm6115: Add MPM pin mappings
  2023-08-09 19:38 [PATCH 0/5] MPM pin mappings Konrad Dybcio
  2023-08-09 19:38 ` [PATCH 1/5] pinctrl: qcom: msm8998: Fix MPM mappings Konrad Dybcio
  2023-08-09 19:38 ` [PATCH 2/5] pinctrl: qcom: msm8996: Add MPM pin mappings Konrad Dybcio
@ 2023-08-09 19:38 ` Konrad Dybcio
  2023-08-10  7:19   ` Stephan Gerhold
  2023-08-09 19:38 ` [PATCH 4/5] pinctrl: qcom: sm6125: " Konrad Dybcio
  2023-08-09 19:38 ` [PATCH 5/5] pinctrl: qcom: sdm660: " Konrad Dybcio
  4 siblings, 1 reply; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-09 19:38 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: Marijn Suijten, linux-arm-msm, linux-gpio, linux-kernel,
	Konrad Dybcio

Add pin <-> wakeirq mappings to allow for waking up the AP from sleep
through MPM-connected pins.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-sm6115.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-sm6115.c b/drivers/pinctrl/qcom/pinctrl-sm6115.c
index 2a06025f4885..4e91c75ad952 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6115.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6115.c
@@ -867,6 +867,16 @@ static const struct msm_pingroup sm6115_groups[] = {
 	[120] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x73000, 9, 0),
 };
 
+static const struct msm_gpio_wakeirq_map sm6115_mpm_map[] = {
+	{ 0, 84 }, { 3, 75 }, { 4, 16 }, { 6, 59 }, { 8, 63 }, { 11, 17 }, { 13, 18 },
+	{ 14, 51 }, { 17, 20 }, { 18, 52 }, { 19, 53 }, { 24, 6 }, { 25, 71 }, { 27, 73 },
+	{ 28, 41 }, { 31, 27 }, { 32, 54 }, { 33, 55 }, { 34, 56 }, { 35, 57 }, { 36, 58 },
+	{ 39, 28 }, { 46, 29 }, { 62, 60 }, { 63, 61 }, { 64, 62 }, { 65, 30 }, { 66, 31 },
+	{ 67, 32 }, { 69, 33 }, { 70, 34 }, { 72, 72 }, { 75, 35 }, { 79, 36 }, { 80, 21 },
+	{ 81, 38 }, { 83, 9 }, { 84, 39 }, { 85, 40 }, { 86, 19 }, { 87, 42 }, { 88, 43 },
+	{ 89, 45 }, { 91, 74 }, { 93, 46 }, { 94, 47 }, { 95, 48 }, { 96, 49 }, { 97, 50 },
+};
+
 static const struct msm_pinctrl_soc_data sm6115_tlmm = {
 	.pins = sm6115_pins,
 	.npins = ARRAY_SIZE(sm6115_pins),
@@ -877,6 +887,8 @@ static const struct msm_pinctrl_soc_data sm6115_tlmm = {
 	.ngpios = 114,
 	.tiles = sm6115_tiles,
 	.ntiles = ARRAY_SIZE(sm6115_tiles),
+	.wakeirq_map = sm6115_mpm_map,
+	.nwakeirq_map = ARRAY_SIZE(sm6115_mpm_map),
 };
 
 static int sm6115_tlmm_probe(struct platform_device *pdev)

-- 
2.41.0


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

* [PATCH 4/5] pinctrl: qcom: sm6125: Add MPM pin mappings
  2023-08-09 19:38 [PATCH 0/5] MPM pin mappings Konrad Dybcio
                   ` (2 preceding siblings ...)
  2023-08-09 19:38 ` [PATCH 3/5] pinctrl: qcom: sm6115: " Konrad Dybcio
@ 2023-08-09 19:38 ` Konrad Dybcio
  2023-08-09 19:38 ` [PATCH 5/5] pinctrl: qcom: sdm660: " Konrad Dybcio
  4 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-09 19:38 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: Marijn Suijten, linux-arm-msm, linux-gpio, linux-kernel,
	Konrad Dybcio

Add pin <-> wakeirq mappings to allow for waking up the AP from sleep
through MPM-connected pins.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-sm6125.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-sm6125.c b/drivers/pinctrl/qcom/pinctrl-sm6125.c
index d5e2b896954c..ea377f025d60 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6125.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6125.c
@@ -1221,6 +1221,18 @@ static const struct msm_pingroup sm6125_groups[] = {
 	[140] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x58b000, 9, 0),
 };
 
+static const struct msm_gpio_wakeirq_map sm6125_mpm_map[] = {
+	{ 5, 43 }, { 6, 45 }, { 7, 59 }, { 8, 72 }, { 9, 83 }, { 13, 124 }, { 14, 1 }, { 15, 3 },
+	{ 16, 4 }, { 17, 9 }, { 18, 13 }, { 19, 15 }, { 20, 17 }, { 21, 19 }, { 22, 21 },
+	{ 23, 14 }, { 24, 25 }, { 25, 26 }, { 26, 27 }, { 27, 29 }, { 28, 33 }, { 29, 36 },
+	{ 30, 42 }, { 31, 44 }, { 32, 47 }, { 33, 50 }, { 34, 70 }, { 35, 75 }, { 36, 79 },
+	{ 37, 80 }, { 38, 81 }, { 39, 82 }, { 40, 85 }, { 41, 86 }, { 42, 88 }, { 43, 89 },
+	{ 44, 91 }, { 45, 92 }, { 46, 93 }, { 47, 94 }, { 48, 95 }, { 49, 96 }, { 50, 98 },
+	{ 51, 99 }, { 52, 101 }, { 53, 102 }, { 54, 105 }, { 55, 107 }, { 56, 110 }, { 57, 111 },
+	{ 58, 112 }, { 59, 118 }, { 60, 122 }, { 61, 123 }, { 62, 126 }, { 63, 128 }, { 64, 100 },
+	{ 65, 130 }, { 66, 131 }, { 67, 132 }, { 70, 97 }, { 71, 120 }, { 84, 22 },
+};
+
 static const struct msm_pinctrl_soc_data sm6125_tlmm = {
 	.pins = sm6125_pins,
 	.npins = ARRAY_SIZE(sm6125_pins),
@@ -1231,6 +1243,8 @@ static const struct msm_pinctrl_soc_data sm6125_tlmm = {
 	.ngpios = 134,
 	.tiles = sm6125_tiles,
 	.ntiles = ARRAY_SIZE(sm6125_tiles),
+	.wakeirq_map = sm6125_mpm_map,
+	.nwakeirq_map = ARRAY_SIZE(sm6125_mpm_map),
 };
 
 static int sm6125_tlmm_probe(struct platform_device *pdev)

-- 
2.41.0


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

* [PATCH 5/5] pinctrl: qcom: sdm660: Add MPM pin mappings
  2023-08-09 19:38 [PATCH 0/5] MPM pin mappings Konrad Dybcio
                   ` (3 preceding siblings ...)
  2023-08-09 19:38 ` [PATCH 4/5] pinctrl: qcom: sm6125: " Konrad Dybcio
@ 2023-08-09 19:38 ` Konrad Dybcio
  4 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-09 19:38 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij
  Cc: Marijn Suijten, linux-arm-msm, linux-gpio, linux-kernel,
	Konrad Dybcio

Add pin <-> wakeirq mappings to allow for waking up the AP from sleep
through MPM-connected pins.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-sdm660.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-sdm660.c b/drivers/pinctrl/qcom/pinctrl-sdm660.c
index c2e0d5c034ac..5deabe8ca581 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdm660.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdm660.c
@@ -1399,6 +1399,18 @@ static const struct msm_pingroup sdm660_groups[] = {
 	SDC_QDSD_PINGROUP(sdc1_rclk, 0x9a000, 15, 0),
 };
 
+static const struct msm_gpio_wakeirq_map sdm660_mpm_map[] = {
+	{ 3, 1 }, { 4, 5 }, { 5, 9 }, { 6, 10 }, { 7, 66 }, { 8, 22 }, { 9, 25 }, { 10, 28 },
+	{ 11, 58 }, { 13, 41 }, { 14, 43 }, { 15, 40 }, { 16, 42 }, { 17, 46 }, { 18, 50 },
+	{ 19, 44 }, { 21, 56 }, { 22, 45 }, { 23, 68 }, { 24, 69 }, { 25, 70 }, { 26, 71 },
+	{ 27, 72 }, { 28, 73 }, { 29, 64 }, { 30, 2 }, { 31, 13 }, { 32, 111 }, { 33, 74 },
+	{ 34, 75 }, { 35, 76 }, { 36, 82 }, { 37, 17 }, { 38, 77 }, { 39, 47 }, { 40, 54 },
+	{ 41, 48 }, { 42, 101 }, { 43, 49 }, { 44, 51 }, { 45, 86 }, { 46, 90 }, { 47, 91 },
+	{ 48, 52 }, { 50, 55 }, { 51, 6 }, { 53, 65 }, { 55, 67 }, { 56, 83 }, { 57, 84 },
+	{ 58, 85 }, { 59, 87 }, { 63, 21 }, { 64, 78 }, { 65, 113 }, { 66, 60 }, { 67, 98 },
+	{ 68, 30 }, { 70, 31 }, { 71, 29 }, { 76, 107 }, { 83, 109 }, { 84, 103 }, { 85, 105 },
+};
+
 static const struct msm_pinctrl_soc_data sdm660_pinctrl = {
 	.pins = sdm660_pins,
 	.npins = ARRAY_SIZE(sdm660_pins),
@@ -1409,6 +1421,8 @@ static const struct msm_pinctrl_soc_data sdm660_pinctrl = {
 	.ngpios = 114,
 	.tiles = sdm660_tiles,
 	.ntiles = ARRAY_SIZE(sdm660_tiles),
+	.wakeirq_map = sdm660_mpm_map,
+	.nwakeirq_map = ARRAY_SIZE(sdm660_mpm_map),
 };
 
 static int sdm660_pinctrl_probe(struct platform_device *pdev)

-- 
2.41.0


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

* Re: [PATCH 1/5] pinctrl: qcom: msm8998: Fix MPM mappings
  2023-08-09 19:38 ` [PATCH 1/5] pinctrl: qcom: msm8998: Fix MPM mappings Konrad Dybcio
@ 2023-08-10  7:14   ` Stephan Gerhold
  2023-08-31 20:48     ` Konrad Dybcio
  0 siblings, 1 reply; 11+ messages in thread
From: Stephan Gerhold @ 2023-08-10  7:14 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Andy Gross, Bjorn Andersson, Linus Walleij, Marijn Suijten,
	linux-arm-msm, linux-gpio, linux-kernel

On Wed, Aug 09, 2023 at 09:38:54PM +0200, Konrad Dybcio wrote:
> Commit 29f6e7e379fd ("pinctrl: qcom: msm8998: Add MPM pin mappings")
> added a map of pins <-> wakeirqs. The values in each tuple were swapped
> and the last one was missing. Fix that.
> 
> Fixes: 29f6e7e379fd ("pinctrl: qcom: msm8998: Add MPM pin mappings")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  drivers/pinctrl/qcom/pinctrl-msm8998.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-msm8998.c b/drivers/pinctrl/qcom/pinctrl-msm8998.c
> index b7cbf32b3125..08d6e555652a 100644
> --- a/drivers/pinctrl/qcom/pinctrl-msm8998.c
> +++ b/drivers/pinctrl/qcom/pinctrl-msm8998.c
> @@ -1496,15 +1496,16 @@ static const struct msm_pingroup msm8998_groups[] = {
>  };
>  
>  static const struct msm_gpio_wakeirq_map msm8998_mpm_map[] = {
> -	{ 1, 3 }, { 5, 4 }, { 9, 5 }, { 11, 6 }, { 22, 8 }, { 24, 9 }, { 26, 10 },
> -	{ 34, 11 }, { 36, 12 }, { 37, 13 }, { 38, 14 }, { 40, 15 }, { 42, 16 }, { 46, 17 },
> -	{ 50, 18 }, { 53, 19 }, { 54, 20 }, { 56, 21 }, { 57, 22 }, { 58, 23 }, { 59, 24 },
> -	{ 60, 25 }, { 61, 26 }, { 62, 27 }, { 63, 28 }, { 64, 29 }, { 66, 7 }, { 71, 30 },
> -	{ 73, 31 }, { 77, 32 }, { 78, 33 }, { 79, 34 }, { 80, 35 }, { 82, 36 }, { 86, 37 },
> -	{ 91, 38 }, { 92, 39 }, { 95, 40 }, { 97, 41 }, { 101, 42 }, { 104, 43 }, { 106, 44 },
> -	{ 108, 45 }, { 110, 48 }, { 112, 46 }, { 113, 47 }, { 115, 51 }, { 116, 54 }, { 117, 55 },
> -	{ 118, 56 }, { 119, 57 }, { 120, 58 }, { 121, 59 }, { 122, 60 }, { 123, 61 }, { 124, 62 },
> -	{ 125, 63 }, { 126, 64 }, { 127, 50 }, { 129, 65 }, { 131, 66 }, { 132, 67 }, { 133, 68 },
> +	{ 3, 1 }, { 4, 5 }, { 5, 9 }, { 6, 11 }, { 8, 22 }, { 9, 24 }, { 10, 26 },
> +	{ 11, 34 }, { 12, 36 }, { 13, 37 }, { 14, 38 }, { 15, 40 }, { 16, 42 }, { 17, 46 },
> +	{ 18, 50 }, { 19, 53 }, { 20, 54 }, { 21, 56 }, { 22, 57 }, { 23, 58 }, { 24, 59 },
> +	{ 25, 60 }, { 26, 61 }, { 27, 62 }, { 28, 63 }, { 29, 64 }, { 7, 66 }, { 30, 71 },
> +	{ 31, 73 }, { 32, 77 }, { 33, 78 }, { 34, 79 }, { 35, 80 }, { 36, 82 }, { 37, 86 },
> +	{ 38, 91 }, { 39, 92 }, { 40, 95 }, { 41, 97 }, { 42, 101 }, { 43, 104 }, { 44, 106 },
> +	{ 45, 108 }, { 48, 110 }, { 46, 112 }, { 47, 113 }, { 51, 115 }, { 54, 116 }, { 55, 117 },
> +	{ 56, 118 }, { 57, 119 }, { 58, 120 }, { 59, 121 }, { 60, 122 }, { 61, 123 }, { 62, 124 },
> +	{ 63, 125 }, { 64, 126 }, { 50, 127 }, { 65, 129 }, { 66, 131 }, { 67, 132 }, { 68, 133 },
> +	{ 69, 145 },
>  };

Are you sure this is correct?

/**
 * struct msm_gpio_wakeirq_map - Map of GPIOs and their wakeup pins
 * @gpio:          The GPIOs that are wakeup capable
 * @wakeirq:       The interrupt at the always-on interrupt controller
 */
struct msm_gpio_wakeirq_map {
	unsigned int gpio;
	unsigned int wakeirq;
};

MSM8998 has 150 GPIOs and 96 MPM IRQs. The tuple { 69, 145 } can't be
right because 145 is not a valid MPM pin. It's a valid GPIO though so
the original order was correct. Maybe replace "Fixes:" with "Breaks:"? :D

Thanks,
Stephan

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

* Re: [PATCH 3/5] pinctrl: qcom: sm6115: Add MPM pin mappings
  2023-08-09 19:38 ` [PATCH 3/5] pinctrl: qcom: sm6115: " Konrad Dybcio
@ 2023-08-10  7:19   ` Stephan Gerhold
  2023-08-10 12:32     ` Konrad Dybcio
  2023-08-31 21:22     ` Konrad Dybcio
  0 siblings, 2 replies; 11+ messages in thread
From: Stephan Gerhold @ 2023-08-10  7:19 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Andy Gross, Bjorn Andersson, Linus Walleij, Marijn Suijten,
	linux-arm-msm, linux-gpio, linux-kernel

On Wed, Aug 09, 2023 at 09:38:56PM +0200, Konrad Dybcio wrote:
> Add pin <-> wakeirq mappings to allow for waking up the AP from sleep
> through MPM-connected pins.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  drivers/pinctrl/qcom/pinctrl-sm6115.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-sm6115.c b/drivers/pinctrl/qcom/pinctrl-sm6115.c
> index 2a06025f4885..4e91c75ad952 100644
> --- a/drivers/pinctrl/qcom/pinctrl-sm6115.c
> +++ b/drivers/pinctrl/qcom/pinctrl-sm6115.c
> @@ -867,6 +867,16 @@ static const struct msm_pingroup sm6115_groups[] = {
>  	[120] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x73000, 9, 0),
>  };
>  
> +static const struct msm_gpio_wakeirq_map sm6115_mpm_map[] = {
> +	{ 0, 84 }, { 3, 75 }, { 4, 16 }, { 6, 59 }, { 8, 63 }, { 11, 17 }, { 13, 18 },
> +	{ 14, 51 }, { 17, 20 }, { 18, 52 }, { 19, 53 }, { 24, 6 }, { 25, 71 }, { 27, 73 },
> +	{ 28, 41 }, { 31, 27 }, { 32, 54 }, { 33, 55 }, { 34, 56 }, { 35, 57 }, { 36, 58 },
> +	{ 39, 28 }, { 46, 29 }, { 62, 60 }, { 63, 61 }, { 64, 62 }, { 65, 30 }, { 66, 31 },
> +	{ 67, 32 }, { 69, 33 }, { 70, 34 }, { 72, 72 }, { 75, 35 }, { 79, 36 }, { 80, 21 },
> +	{ 81, 38 }, { 83, 9 }, { 84, 39 }, { 85, 40 }, { 86, 19 }, { 87, 42 }, { 88, 43 },
> +	{ 89, 45 }, { 91, 74 }, { 93, 46 }, { 94, 47 }, { 95, 48 }, { 96, 49 }, { 97, 50 },
> +};

Did you omit the mappings for GPIO 99-112 here on purpose?

The order here looks fine BTW. Maybe downstream changed the order and
you got confused? :)

Thanks,
Stephan

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

* Re: [PATCH 3/5] pinctrl: qcom: sm6115: Add MPM pin mappings
  2023-08-10  7:19   ` Stephan Gerhold
@ 2023-08-10 12:32     ` Konrad Dybcio
  2023-08-31 21:22     ` Konrad Dybcio
  1 sibling, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-10 12:32 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Andy Gross, Bjorn Andersson, Linus Walleij, Marijn Suijten,
	linux-arm-msm, linux-gpio, linux-kernel

On 10.08.2023 09:19, Stephan Gerhold wrote:
> On Wed, Aug 09, 2023 at 09:38:56PM +0200, Konrad Dybcio wrote:
>> Add pin <-> wakeirq mappings to allow for waking up the AP from sleep
>> through MPM-connected pins.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  drivers/pinctrl/qcom/pinctrl-sm6115.c | 12 ++++++++++++
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/pinctrl/qcom/pinctrl-sm6115.c b/drivers/pinctrl/qcom/pinctrl-sm6115.c
>> index 2a06025f4885..4e91c75ad952 100644
>> --- a/drivers/pinctrl/qcom/pinctrl-sm6115.c
>> +++ b/drivers/pinctrl/qcom/pinctrl-sm6115.c
>> @@ -867,6 +867,16 @@ static const struct msm_pingroup sm6115_groups[] = {
>>  	[120] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x73000, 9, 0),
>>  };
>>  
>> +static const struct msm_gpio_wakeirq_map sm6115_mpm_map[] = {
>> +	{ 0, 84 }, { 3, 75 }, { 4, 16 }, { 6, 59 }, { 8, 63 }, { 11, 17 }, { 13, 18 },
>> +	{ 14, 51 }, { 17, 20 }, { 18, 52 }, { 19, 53 }, { 24, 6 }, { 25, 71 }, { 27, 73 },
>> +	{ 28, 41 }, { 31, 27 }, { 32, 54 }, { 33, 55 }, { 34, 56 }, { 35, 57 }, { 36, 58 },
>> +	{ 39, 28 }, { 46, 29 }, { 62, 60 }, { 63, 61 }, { 64, 62 }, { 65, 30 }, { 66, 31 },
>> +	{ 67, 32 }, { 69, 33 }, { 70, 34 }, { 72, 72 }, { 75, 35 }, { 79, 36 }, { 80, 21 },
>> +	{ 81, 38 }, { 83, 9 }, { 84, 39 }, { 85, 40 }, { 86, 19 }, { 87, 42 }, { 88, 43 },
>> +	{ 89, 45 }, { 91, 74 }, { 93, 46 }, { 94, 47 }, { 95, 48 }, { 96, 49 }, { 97, 50 },
>> +};
> 
> Did you omit the mappings for GPIO 99-112 here on purpose?
My downstream didn't have that. I'll take a look.

> 
> The order here looks fine BTW. Maybe downstream changed the order and
> you got confused? :)
Yes it changed between iterations, more than one time I think..

Still thinking about that 8998 thing..

Konrad

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

* Re: [PATCH 1/5] pinctrl: qcom: msm8998: Fix MPM mappings
  2023-08-10  7:14   ` Stephan Gerhold
@ 2023-08-31 20:48     ` Konrad Dybcio
  0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-31 20:48 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Andy Gross, Bjorn Andersson, Linus Walleij, Marijn Suijten,
	linux-arm-msm, linux-gpio, linux-kernel

On 10.08.2023 09:14, Stephan Gerhold wrote:
> On Wed, Aug 09, 2023 at 09:38:54PM +0200, Konrad Dybcio wrote:
>> Commit 29f6e7e379fd ("pinctrl: qcom: msm8998: Add MPM pin mappings")
>> added a map of pins <-> wakeirqs. The values in each tuple were swapped
>> and the last one was missing. Fix that.
>>
>> Fixes: 29f6e7e379fd ("pinctrl: qcom: msm8998: Add MPM pin mappings")
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  drivers/pinctrl/qcom/pinctrl-msm8998.c | 19 ++++++++++---------
>>  1 file changed, 10 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/pinctrl/qcom/pinctrl-msm8998.c b/drivers/pinctrl/qcom/pinctrl-msm8998.c
>> index b7cbf32b3125..08d6e555652a 100644
>> --- a/drivers/pinctrl/qcom/pinctrl-msm8998.c
>> +++ b/drivers/pinctrl/qcom/pinctrl-msm8998.c
>> @@ -1496,15 +1496,16 @@ static const struct msm_pingroup msm8998_groups[] = {
>>  };
>>  
>>  static const struct msm_gpio_wakeirq_map msm8998_mpm_map[] = {
>> -	{ 1, 3 }, { 5, 4 }, { 9, 5 }, { 11, 6 }, { 22, 8 }, { 24, 9 }, { 26, 10 },
>> -	{ 34, 11 }, { 36, 12 }, { 37, 13 }, { 38, 14 }, { 40, 15 }, { 42, 16 }, { 46, 17 },
>> -	{ 50, 18 }, { 53, 19 }, { 54, 20 }, { 56, 21 }, { 57, 22 }, { 58, 23 }, { 59, 24 },
>> -	{ 60, 25 }, { 61, 26 }, { 62, 27 }, { 63, 28 }, { 64, 29 }, { 66, 7 }, { 71, 30 },
>> -	{ 73, 31 }, { 77, 32 }, { 78, 33 }, { 79, 34 }, { 80, 35 }, { 82, 36 }, { 86, 37 },
>> -	{ 91, 38 }, { 92, 39 }, { 95, 40 }, { 97, 41 }, { 101, 42 }, { 104, 43 }, { 106, 44 },
>> -	{ 108, 45 }, { 110, 48 }, { 112, 46 }, { 113, 47 }, { 115, 51 }, { 116, 54 }, { 117, 55 },
>> -	{ 118, 56 }, { 119, 57 }, { 120, 58 }, { 121, 59 }, { 122, 60 }, { 123, 61 }, { 124, 62 },
>> -	{ 125, 63 }, { 126, 64 }, { 127, 50 }, { 129, 65 }, { 131, 66 }, { 132, 67 }, { 133, 68 },
>> +	{ 3, 1 }, { 4, 5 }, { 5, 9 }, { 6, 11 }, { 8, 22 }, { 9, 24 }, { 10, 26 },
>> +	{ 11, 34 }, { 12, 36 }, { 13, 37 }, { 14, 38 }, { 15, 40 }, { 16, 42 }, { 17, 46 },
>> +	{ 18, 50 }, { 19, 53 }, { 20, 54 }, { 21, 56 }, { 22, 57 }, { 23, 58 }, { 24, 59 },
>> +	{ 25, 60 }, { 26, 61 }, { 27, 62 }, { 28, 63 }, { 29, 64 }, { 7, 66 }, { 30, 71 },
>> +	{ 31, 73 }, { 32, 77 }, { 33, 78 }, { 34, 79 }, { 35, 80 }, { 36, 82 }, { 37, 86 },
>> +	{ 38, 91 }, { 39, 92 }, { 40, 95 }, { 41, 97 }, { 42, 101 }, { 43, 104 }, { 44, 106 },
>> +	{ 45, 108 }, { 48, 110 }, { 46, 112 }, { 47, 113 }, { 51, 115 }, { 54, 116 }, { 55, 117 },
>> +	{ 56, 118 }, { 57, 119 }, { 58, 120 }, { 59, 121 }, { 60, 122 }, { 61, 123 }, { 62, 124 },
>> +	{ 63, 125 }, { 64, 126 }, { 50, 127 }, { 65, 129 }, { 66, 131 }, { 67, 132 }, { 68, 133 },
>> +	{ 69, 145 },
>>  };
> 
> Are you sure this is correct?
> 
> /**
>  * struct msm_gpio_wakeirq_map - Map of GPIOs and their wakeup pins
>  * @gpio:          The GPIOs that are wakeup capable
>  * @wakeirq:       The interrupt at the always-on interrupt controller
>  */
> struct msm_gpio_wakeirq_map {
> 	unsigned int gpio;
> 	unsigned int wakeirq;
> };
> 
> MSM8998 has 150 GPIOs and 96 MPM IRQs. The tuple { 69, 145 } can't be
> right because 145 is not a valid MPM pin. It's a valid GPIO though so
> the original order was correct. Maybe replace "Fixes:" with "Breaks:"? :D
Went over this again, this is totally a "Breaks"

Konrad

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

* Re: [PATCH 3/5] pinctrl: qcom: sm6115: Add MPM pin mappings
  2023-08-10  7:19   ` Stephan Gerhold
  2023-08-10 12:32     ` Konrad Dybcio
@ 2023-08-31 21:22     ` Konrad Dybcio
  1 sibling, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-08-31 21:22 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Andy Gross, Bjorn Andersson, Linus Walleij, Marijn Suijten,
	linux-arm-msm, linux-gpio, linux-kernel

On 10.08.2023 09:19, Stephan Gerhold wrote:
> On Wed, Aug 09, 2023 at 09:38:56PM +0200, Konrad Dybcio wrote:
>> Add pin <-> wakeirq mappings to allow for waking up the AP from sleep
>> through MPM-connected pins.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  drivers/pinctrl/qcom/pinctrl-sm6115.c | 12 ++++++++++++
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/pinctrl/qcom/pinctrl-sm6115.c b/drivers/pinctrl/qcom/pinctrl-sm6115.c
>> index 2a06025f4885..4e91c75ad952 100644
>> --- a/drivers/pinctrl/qcom/pinctrl-sm6115.c
>> +++ b/drivers/pinctrl/qcom/pinctrl-sm6115.c
>> @@ -867,6 +867,16 @@ static const struct msm_pingroup sm6115_groups[] = {
>>  	[120] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x73000, 9, 0),
>>  };
>>  
>> +static const struct msm_gpio_wakeirq_map sm6115_mpm_map[] = {
>> +	{ 0, 84 }, { 3, 75 }, { 4, 16 }, { 6, 59 }, { 8, 63 }, { 11, 17 }, { 13, 18 },
>> +	{ 14, 51 }, { 17, 20 }, { 18, 52 }, { 19, 53 }, { 24, 6 }, { 25, 71 }, { 27, 73 },
>> +	{ 28, 41 }, { 31, 27 }, { 32, 54 }, { 33, 55 }, { 34, 56 }, { 35, 57 }, { 36, 58 },
>> +	{ 39, 28 }, { 46, 29 }, { 62, 60 }, { 63, 61 }, { 64, 62 }, { 65, 30 }, { 66, 31 },
>> +	{ 67, 32 }, { 69, 33 }, { 70, 34 }, { 72, 72 }, { 75, 35 }, { 79, 36 }, { 80, 21 },
>> +	{ 81, 38 }, { 83, 9 }, { 84, 39 }, { 85, 40 }, { 86, 19 }, { 87, 42 }, { 88, 43 },
>> +	{ 89, 45 }, { 91, 74 }, { 93, 46 }, { 94, 47 }, { 95, 48 }, { 96, 49 }, { 97, 50 },
>> +};
> 
> Did you omit the mappings for GPIO 99-112 here on purpose?
> 
> The order here looks fine BTW. Maybe downstream changed the order and
> you got confused? :)
I checked more downstreams and still couldn't find it, I'll skip it
for now.

Konrad

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

end of thread, other threads:[~2023-08-31 21:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 19:38 [PATCH 0/5] MPM pin mappings Konrad Dybcio
2023-08-09 19:38 ` [PATCH 1/5] pinctrl: qcom: msm8998: Fix MPM mappings Konrad Dybcio
2023-08-10  7:14   ` Stephan Gerhold
2023-08-31 20:48     ` Konrad Dybcio
2023-08-09 19:38 ` [PATCH 2/5] pinctrl: qcom: msm8996: Add MPM pin mappings Konrad Dybcio
2023-08-09 19:38 ` [PATCH 3/5] pinctrl: qcom: sm6115: " Konrad Dybcio
2023-08-10  7:19   ` Stephan Gerhold
2023-08-10 12:32     ` Konrad Dybcio
2023-08-31 21:22     ` Konrad Dybcio
2023-08-09 19:38 ` [PATCH 4/5] pinctrl: qcom: sm6125: " Konrad Dybcio
2023-08-09 19:38 ` [PATCH 5/5] pinctrl: qcom: sdm660: " Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).