linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150
@ 2022-02-26 18:40 Bhupesh Sharma
  2022-02-26 18:40 ` [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150 Bhupesh Sharma
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Bhupesh Sharma @ 2022-02-26 18:40 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt,
	Bjorn Andersson, Vinod Koul, Rob Herring

Changes since v1:
-----------------
- v1 can be found here: https://lore.kernel.org/linux-arm-msm/20220119203133.467264-1-bhupesh.sharma@linaro.org/
- Collect ACK from Rob on PATCH 1/4.
- Address review comments from Maulik.

This patchset adds the support for PDC interrupt controller found
on sm8150 SoCs from Qualcomm.

Here we add the device-tree bindings, pinctrl driver support
and the dts support for the same.

Cc: Maulik Shah <quic_mkshah@quicinc.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>

Bhupesh Sharma (4):
  dt-bindings: qcom,pdc: Add compatible for SM8150
  pinctrl: qcom: sm8150: Specify PDC map
  arm64: dts: qcom: sm8150: Add pdc interrupt controller node
  arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm

 .../interrupt-controller/qcom,pdc.txt         |  1 +
 arch/arm64/boot/dts/qcom/sm8150.dtsi          | 11 ++++++++++
 drivers/pinctrl/qcom/pinctrl-sm8150.c         | 22 +++++++++++++++++++
 3 files changed, 34 insertions(+)

-- 
2.35.1


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

* [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150
  2022-02-26 18:40 [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Bhupesh Sharma
@ 2022-02-26 18:40 ` Bhupesh Sharma
  2022-03-15 16:09   ` Bjorn Andersson
  2022-04-17 23:10   ` Linus Walleij
  2022-02-26 18:40 ` [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map Bhupesh Sharma
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 15+ messages in thread
From: Bhupesh Sharma @ 2022-02-26 18:40 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt,
	Bjorn Andersson, Vinod Koul, Rob Herring

Add the compatible string for SM8150 SoC from Qualcomm.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 .../devicetree/bindings/interrupt-controller/qcom,pdc.txt        | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt b/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt
index 98d89e53013d..bd3539644d3f 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt
@@ -21,6 +21,7 @@ Properties:
 		    - "qcom,sc7180-pdc": For SC7180
 		    - "qcom,sc7280-pdc": For SC7280
 		    - "qcom,sdm845-pdc": For SDM845
+		    - "qcom,sdm8150-pdc": For SM8150
 		    - "qcom,sdm8250-pdc": For SM8250
 		    - "qcom,sdm8350-pdc": For SM8350
 
-- 
2.35.1


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

* [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map
  2022-02-26 18:40 [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Bhupesh Sharma
  2022-02-26 18:40 ` [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150 Bhupesh Sharma
@ 2022-02-26 18:40 ` Bhupesh Sharma
  2022-03-15 16:10   ` Bjorn Andersson
  2022-04-17 23:11   ` Linus Walleij
  2022-02-26 18:40 ` [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node Bhupesh Sharma
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 15+ messages in thread
From: Bhupesh Sharma @ 2022-02-26 18:40 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt,
	Bjorn Andersson

Specify the PDC mapping for SM8150, so that gpio interrupts are
properly mapped to the wakeup IRQs of the PDC.

Cc: Maulik Shah <quic_mkshah@quicinc.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-sm8150.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-sm8150.c b/drivers/pinctrl/qcom/pinctrl-sm8150.c
index 7359bae68c69..1cc622694553 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8150.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8150.c
@@ -1500,6 +1500,25 @@ static const struct msm_pingroup sm8150_groups[] = {
 	[178] = SDC_QDSD_PINGROUP(sdc2_data, 0xB2000, 9, 0),
 };
 
+static const struct msm_gpio_wakeirq_map sm8150_pdc_map[] = {
+	{ 3, 31 }, { 5, 32 }, { 8, 33 }, { 9, 34 }, { 10, 100 },
+	{ 12, 104 }, { 24, 37 }, { 26, 38 }, { 27, 41 }, { 28, 42 },
+	{ 30, 39 }, { 36, 43 }, { 37, 44 }, { 38, 30 }, { 39, 118 },
+	{ 39, 125 }, { 41, 47 }, { 42, 48 }, { 46, 50 }, { 47, 49 },
+	{ 48, 51 }, { 49, 53 }, { 50, 52 }, { 51, 116 }, { 51, 123 },
+	{ 53, 54 }, { 54, 55 }, { 55, 56 }, { 56, 57 }, { 58, 58 },
+	{ 60, 60 }, { 61, 61 }, { 68, 62 }, { 70, 63 }, { 76, 71 },
+	{ 77, 66 }, { 81, 64 }, { 83, 65 }, { 86, 67 }, { 87, 84 },
+	{ 88, 117 }, { 88, 124 }, { 90, 69 }, { 91, 70 }, { 93, 75 },
+	{ 95, 72 }, { 96, 73 }, { 97, 74 }, { 101, 40 }, { 103, 77 },
+	{ 104, 78 }, { 108, 79 }, { 112, 80 }, { 113, 81 }, { 114, 82 },
+	{ 117, 85 }, { 118, 101 }, { 119, 87 }, { 120, 88 }, { 121, 89 },
+	{ 122, 90 }, { 123, 91 }, { 124, 92 }, { 125, 93 }, { 129, 94 },
+	{ 132, 105 }, { 133, 83 }, { 134, 36 }, { 136, 97 }, { 142, 103 },
+	{ 144, 115 }, { 144, 122 }, { 147, 102 }, { 150, 107 },
+	{ 152, 108 }, { 153, 109 }
+};
+
 static const struct msm_pinctrl_soc_data sm8150_pinctrl = {
 	.pins = sm8150_pins,
 	.npins = ARRAY_SIZE(sm8150_pins),
@@ -1510,6 +1529,9 @@ static const struct msm_pinctrl_soc_data sm8150_pinctrl = {
 	.ngpios = 176,
 	.tiles = sm8150_tiles,
 	.ntiles = ARRAY_SIZE(sm8150_tiles),
+	.wakeirq_map = sm8150_pdc_map,
+	.nwakeirq_map = ARRAY_SIZE(sm8150_pdc_map),
+	.wakeirq_dual_edge_errata = true,
 };
 
 static int sm8150_pinctrl_probe(struct platform_device *pdev)
-- 
2.35.1


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

* [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node
  2022-02-26 18:40 [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Bhupesh Sharma
  2022-02-26 18:40 ` [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150 Bhupesh Sharma
  2022-02-26 18:40 ` [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map Bhupesh Sharma
@ 2022-02-26 18:40 ` Bhupesh Sharma
  2022-03-15 16:18   ` Bjorn Andersson
  2022-02-26 18:40 ` [PATCH v2 4/4] arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm Bhupesh Sharma
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Bhupesh Sharma @ 2022-02-26 18:40 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt,
	Bjorn Andersson, Vinod Koul, Rob Herring

Add pdc interrupt controller for sm8150.

Cc: Maulik Shah <quic_mkshah@quicinc.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 6012322a5984..aaeacd379460 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -1626,6 +1626,16 @@ system-cache-controller@9200000 {
 			interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		pdc: interrupt-controller@b220000 {
+			compatible = "qcom,sm8150-pdc", "qcom,pdc";
+			reg = <0 0x0b220000 0 0x400>;
+			qcom,pdc-ranges = <0 480 94>, <94 609 31>,
+					  <125 63 1>;
+			#interrupt-cells = <2>;
+			interrupt-parent = <&intc>;
+			interrupt-controller;
+		};
+
 		ufs_mem_hc: ufshc@1d84000 {
 			compatible = "qcom,sm8150-ufshc", "qcom,ufshc",
 				     "jedec,ufs-2.0";
-- 
2.35.1


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

* [PATCH v2 4/4] arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm
  2022-02-26 18:40 [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Bhupesh Sharma
                   ` (2 preceding siblings ...)
  2022-02-26 18:40 ` [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node Bhupesh Sharma
@ 2022-02-26 18:40 ` Bhupesh Sharma
  2022-03-15 16:19   ` Bjorn Andersson
  2022-03-15  1:06 ` [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Linus Walleij
  2022-03-15  3:45 ` Vinod Koul
  5 siblings, 1 reply; 15+ messages in thread
From: Bhupesh Sharma @ 2022-02-26 18:40 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt,
	Bjorn Andersson, Vinod Koul, Rob Herring

Several wakeup gpios supported by the Top Level Mode Multiplexer (TLMM)
block on sm8150 can be used as interrupt sources and these interrupts
are routed to the PDC interrupt controller.

So, specify PDC as the interrupt parent for the TLMM block.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index aaeacd379460..6e6fa7811c7a 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -1937,6 +1937,7 @@ tlmm: pinctrl@3100000 {
 			#gpio-cells = <2>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
+			wakeup-parent = <&pdc>;
 
 			qup_i2c0_default: qup-i2c0-default {
 				mux {
-- 
2.35.1


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

* Re: [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150
  2022-02-26 18:40 [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Bhupesh Sharma
                   ` (3 preceding siblings ...)
  2022-02-26 18:40 ` [PATCH v2 4/4] arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm Bhupesh Sharma
@ 2022-03-15  1:06 ` Linus Walleij
  2022-03-15  3:45 ` Vinod Koul
  5 siblings, 0 replies; 15+ messages in thread
From: Linus Walleij @ 2022-03-15  1:06 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, robh+dt, Bjorn Andersson,
	Vinod Koul, Rob Herring

On Sat, Feb 26, 2022 at 7:40 PM Bhupesh Sharma
<bhupesh.sharma@linaro.org> wrote:

> Changes since v1:
> -----------------
> - v1 can be found here: https://lore.kernel.org/linux-arm-msm/20220119203133.467264-1-bhupesh.sharma@linaro.org/
> - Collect ACK from Rob on PATCH 1/4.
> - Address review comments from Maulik.

Looks good to me, but I need Bjorns ACK before merging this.

Yours,
Linus Walleij

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

* Re: [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150
  2022-02-26 18:40 [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Bhupesh Sharma
                   ` (4 preceding siblings ...)
  2022-03-15  1:06 ` [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Linus Walleij
@ 2022-03-15  3:45 ` Vinod Koul
  5 siblings, 0 replies; 15+ messages in thread
From: Vinod Koul @ 2022-03-15  3:45 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt,
	Bjorn Andersson, Rob Herring

On 27-02-22, 00:10, Bhupesh Sharma wrote:
> Changes since v1:
> -----------------
> - v1 can be found here: https://lore.kernel.org/linux-arm-msm/20220119203133.467264-1-bhupesh.sharma@linaro.org/
> - Collect ACK from Rob on PATCH 1/4.
> - Address review comments from Maulik.
> 
> This patchset adds the support for PDC interrupt controller found
> on sm8150 SoCs from Qualcomm.
> 
> Here we add the device-tree bindings, pinctrl driver support
> and the dts support for the same.

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

-- 
~Vinod

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

* Re: [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150
  2022-02-26 18:40 ` [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150 Bhupesh Sharma
@ 2022-03-15 16:09   ` Bjorn Andersson
  2022-04-17 23:10   ` Linus Walleij
  1 sibling, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2022-03-15 16:09 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt, Vinod Koul,
	Rob Herring

On Sat 26 Feb 12:40 CST 2022, Bhupesh Sharma wrote:

> Add the compatible string for SM8150 SoC from Qualcomm.
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Marc Zyngier <maz@kernel.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  .../devicetree/bindings/interrupt-controller/qcom,pdc.txt        | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt b/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt
> index 98d89e53013d..bd3539644d3f 100644
> --- a/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt
> +++ b/Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.txt
> @@ -21,6 +21,7 @@ Properties:
>  		    - "qcom,sc7180-pdc": For SC7180
>  		    - "qcom,sc7280-pdc": For SC7280
>  		    - "qcom,sdm845-pdc": For SDM845
> +		    - "qcom,sdm8150-pdc": For SM8150
>  		    - "qcom,sdm8250-pdc": For SM8250
>  		    - "qcom,sdm8350-pdc": For SM8350
>  
> -- 
> 2.35.1
> 

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

* Re: [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map
  2022-02-26 18:40 ` [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map Bhupesh Sharma
@ 2022-03-15 16:10   ` Bjorn Andersson
  2022-04-17 23:11   ` Linus Walleij
  1 sibling, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2022-03-15 16:10 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt

On Sat 26 Feb 12:40 CST 2022, Bhupesh Sharma wrote:

> Specify the PDC mapping for SM8150, so that gpio interrupts are
> properly mapped to the wakeup IRQs of the PDC.
> 
> Cc: Maulik Shah <quic_mkshah@quicinc.com>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>

Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/pinctrl/qcom/pinctrl-sm8150.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-sm8150.c b/drivers/pinctrl/qcom/pinctrl-sm8150.c
> index 7359bae68c69..1cc622694553 100644
> --- a/drivers/pinctrl/qcom/pinctrl-sm8150.c
> +++ b/drivers/pinctrl/qcom/pinctrl-sm8150.c
> @@ -1500,6 +1500,25 @@ static const struct msm_pingroup sm8150_groups[] = {
>  	[178] = SDC_QDSD_PINGROUP(sdc2_data, 0xB2000, 9, 0),
>  };
>  
> +static const struct msm_gpio_wakeirq_map sm8150_pdc_map[] = {
> +	{ 3, 31 }, { 5, 32 }, { 8, 33 }, { 9, 34 }, { 10, 100 },
> +	{ 12, 104 }, { 24, 37 }, { 26, 38 }, { 27, 41 }, { 28, 42 },
> +	{ 30, 39 }, { 36, 43 }, { 37, 44 }, { 38, 30 }, { 39, 118 },
> +	{ 39, 125 }, { 41, 47 }, { 42, 48 }, { 46, 50 }, { 47, 49 },
> +	{ 48, 51 }, { 49, 53 }, { 50, 52 }, { 51, 116 }, { 51, 123 },
> +	{ 53, 54 }, { 54, 55 }, { 55, 56 }, { 56, 57 }, { 58, 58 },
> +	{ 60, 60 }, { 61, 61 }, { 68, 62 }, { 70, 63 }, { 76, 71 },
> +	{ 77, 66 }, { 81, 64 }, { 83, 65 }, { 86, 67 }, { 87, 84 },
> +	{ 88, 117 }, { 88, 124 }, { 90, 69 }, { 91, 70 }, { 93, 75 },
> +	{ 95, 72 }, { 96, 73 }, { 97, 74 }, { 101, 40 }, { 103, 77 },
> +	{ 104, 78 }, { 108, 79 }, { 112, 80 }, { 113, 81 }, { 114, 82 },
> +	{ 117, 85 }, { 118, 101 }, { 119, 87 }, { 120, 88 }, { 121, 89 },
> +	{ 122, 90 }, { 123, 91 }, { 124, 92 }, { 125, 93 }, { 129, 94 },
> +	{ 132, 105 }, { 133, 83 }, { 134, 36 }, { 136, 97 }, { 142, 103 },
> +	{ 144, 115 }, { 144, 122 }, { 147, 102 }, { 150, 107 },
> +	{ 152, 108 }, { 153, 109 }
> +};
> +
>  static const struct msm_pinctrl_soc_data sm8150_pinctrl = {
>  	.pins = sm8150_pins,
>  	.npins = ARRAY_SIZE(sm8150_pins),
> @@ -1510,6 +1529,9 @@ static const struct msm_pinctrl_soc_data sm8150_pinctrl = {
>  	.ngpios = 176,
>  	.tiles = sm8150_tiles,
>  	.ntiles = ARRAY_SIZE(sm8150_tiles),
> +	.wakeirq_map = sm8150_pdc_map,
> +	.nwakeirq_map = ARRAY_SIZE(sm8150_pdc_map),
> +	.wakeirq_dual_edge_errata = true,
>  };
>  
>  static int sm8150_pinctrl_probe(struct platform_device *pdev)
> -- 
> 2.35.1
> 

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

* Re: [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node
  2022-02-26 18:40 ` [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node Bhupesh Sharma
@ 2022-03-15 16:18   ` Bjorn Andersson
  2022-03-17  5:51     ` Bhupesh Sharma
  0 siblings, 1 reply; 15+ messages in thread
From: Bjorn Andersson @ 2022-03-15 16:18 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt, Vinod Koul,
	Rob Herring

On Sat 26 Feb 12:40 CST 2022, Bhupesh Sharma wrote:

> Add pdc interrupt controller for sm8150.
> 
> Cc: Maulik Shah <quic_mkshah@quicinc.com>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> index 6012322a5984..aaeacd379460 100644
> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> @@ -1626,6 +1626,16 @@ system-cache-controller@9200000 {
>  			interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
>  		};
>  
> +		pdc: interrupt-controller@b220000 {
> +			compatible = "qcom,sm8150-pdc", "qcom,pdc";
> +			reg = <0 0x0b220000 0 0x400>;
> +			qcom,pdc-ranges = <0 480 94>, <94 609 31>,
> +					  <125 63 1>;

When I look at the platform documentation I get the impression that this
should be: <0 480 94>, <94 609 32>;

Can you confirm that the last signal is correctly described?

Regards,
Bjorn

> +			#interrupt-cells = <2>;
> +			interrupt-parent = <&intc>;
> +			interrupt-controller;
> +		};
> +
>  		ufs_mem_hc: ufshc@1d84000 {
>  			compatible = "qcom,sm8150-ufshc", "qcom,ufshc",
>  				     "jedec,ufs-2.0";
> -- 
> 2.35.1
> 

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

* Re: [PATCH v2 4/4] arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm
  2022-02-26 18:40 ` [PATCH v2 4/4] arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm Bhupesh Sharma
@ 2022-03-15 16:19   ` Bjorn Andersson
  0 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2022-03-15 16:19 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt, Vinod Koul,
	Rob Herring

On Sat 26 Feb 12:40 CST 2022, Bhupesh Sharma wrote:

> Several wakeup gpios supported by the Top Level Mode Multiplexer (TLMM)
> block on sm8150 can be used as interrupt sources and these interrupts
> are routed to the PDC interrupt controller.
> 
> So, specify PDC as the interrupt parent for the TLMM block.
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  arch/arm64/boot/dts/qcom/sm8150.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> index aaeacd379460..6e6fa7811c7a 100644
> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> @@ -1937,6 +1937,7 @@ tlmm: pinctrl@3100000 {
>  			#gpio-cells = <2>;
>  			interrupt-controller;
>  			#interrupt-cells = <2>;
> +			wakeup-parent = <&pdc>;
>  
>  			qup_i2c0_default: qup-i2c0-default {
>  				mux {
> -- 
> 2.35.1
> 

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

* Re: [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node
  2022-03-15 16:18   ` Bjorn Andersson
@ 2022-03-17  5:51     ` Bhupesh Sharma
  2022-03-24 12:25       ` Bjorn Andersson
  0 siblings, 1 reply; 15+ messages in thread
From: Bhupesh Sharma @ 2022-03-17  5:51 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt, Vinod Koul,
	Rob Herring

Hi Bjorn,

Thanks for your review.

On Tue, 15 Mar 2022 at 21:48, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Sat 26 Feb 12:40 CST 2022, Bhupesh Sharma wrote:
>
> > Add pdc interrupt controller for sm8150.
> >
> > Cc: Maulik Shah <quic_mkshah@quicinc.com>
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: Vinod Koul <vkoul@kernel.org>
> > Cc: Rob Herring <robh@kernel.org>
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > index 6012322a5984..aaeacd379460 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > @@ -1626,6 +1626,16 @@ system-cache-controller@9200000 {
> >                       interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
> >               };
> >
> > +             pdc: interrupt-controller@b220000 {
> > +                     compatible = "qcom,sm8150-pdc", "qcom,pdc";
> > +                     reg = <0 0x0b220000 0 0x400>;
> > +                     qcom,pdc-ranges = <0 480 94>, <94 609 31>,
> > +                                       <125 63 1>;
>
> When I look at the platform documentation I get the impression that this
> should be: <0 480 94>, <94 609 32>;
>
> Can you confirm that the last signal is correctly described?

Yes, I confirmed by double checking the entries in downstream 'pdc-sm8150.c'.
The pdc pins in the 2nd range start from 94 and end at 124, so a total
of 31 entries, but both 94 and 124 pins included.

Or, am I missing something?

Thanks,
Bhupesh

> > +                     #interrupt-cells = <2>;
> > +                     interrupt-parent = <&intc>;
> > +                     interrupt-controller;
> > +             };
> > +
> >               ufs_mem_hc: ufshc@1d84000 {
> >                       compatible = "qcom,sm8150-ufshc", "qcom,ufshc",
> >                                    "jedec,ufs-2.0";
> > --
> > 2.35.1
> >

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

* Re: [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node
  2022-03-17  5:51     ` Bhupesh Sharma
@ 2022-03-24 12:25       ` Bjorn Andersson
  0 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2022-03-24 12:25 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, linus.walleij, robh+dt, Vinod Koul,
	Rob Herring

On Wed 16 Mar 22:51 PDT 2022, Bhupesh Sharma wrote:

> Hi Bjorn,
> 
> Thanks for your review.
> 
> On Tue, 15 Mar 2022 at 21:48, Bjorn Andersson
> <bjorn.andersson@linaro.org> wrote:
> >
> > On Sat 26 Feb 12:40 CST 2022, Bhupesh Sharma wrote:
> >
> > > Add pdc interrupt controller for sm8150.
> > >
> > > Cc: Maulik Shah <quic_mkshah@quicinc.com>
> > > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > Cc: Vinod Koul <vkoul@kernel.org>
> > > Cc: Rob Herring <robh@kernel.org>
> > > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> > > ---
> > >  arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 ++++++++++
> > >  1 file changed, 10 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > > index 6012322a5984..aaeacd379460 100644
> > > --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> > > @@ -1626,6 +1626,16 @@ system-cache-controller@9200000 {
> > >                       interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
> > >               };
> > >
> > > +             pdc: interrupt-controller@b220000 {
> > > +                     compatible = "qcom,sm8150-pdc", "qcom,pdc";
> > > +                     reg = <0 0x0b220000 0 0x400>;
> > > +                     qcom,pdc-ranges = <0 480 94>, <94 609 31>,
> > > +                                       <125 63 1>;
> >
> > When I look at the platform documentation I get the impression that this
> > should be: <0 480 94>, <94 609 32>;
> >
> > Can you confirm that the last signal is correctly described?
> 
> Yes, I confirmed by double checking the entries in downstream 'pdc-sm8150.c'.
> The pdc pins in the 2nd range start from 94 and end at 124, so a total
> of 31 entries, but both 94 and 124 pins included.
> 
> Or, am I missing something?
> 

Thanks for double checking, let's follow the downstream kernel.
I will merge the patch as you proposed it.

Thanks,
Bjorn

> Thanks,
> Bhupesh
> 
> > > +                     #interrupt-cells = <2>;
> > > +                     interrupt-parent = <&intc>;
> > > +                     interrupt-controller;
> > > +             };
> > > +
> > >               ufs_mem_hc: ufshc@1d84000 {
> > >                       compatible = "qcom,sm8150-ufshc", "qcom,ufshc",
> > >                                    "jedec,ufs-2.0";
> > > --
> > > 2.35.1
> > >

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

* Re: [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150
  2022-02-26 18:40 ` [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150 Bhupesh Sharma
  2022-03-15 16:09   ` Bjorn Andersson
@ 2022-04-17 23:10   ` Linus Walleij
  1 sibling, 0 replies; 15+ messages in thread
From: Linus Walleij @ 2022-04-17 23:10 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, robh+dt, Bjorn Andersson,
	Vinod Koul, Rob Herring

On Sat, Feb 26, 2022 at 7:40 PM Bhupesh Sharma
<bhupesh.sharma@linaro.org> wrote:

> Add the compatible string for SM8150 SoC from Qualcomm.
>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Marc Zyngier <maz@kernel.org>
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>

Patch applied!

Yours,
Linus Walleij

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

* Re: [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map
  2022-02-26 18:40 ` [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map Bhupesh Sharma
  2022-03-15 16:10   ` Bjorn Andersson
@ 2022-04-17 23:11   ` Linus Walleij
  1 sibling, 0 replies; 15+ messages in thread
From: Linus Walleij @ 2022-04-17 23:11 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	maz, quic_mkshah, linux-gpio, robh+dt, Bjorn Andersson

On Sat, Feb 26, 2022 at 7:40 PM Bhupesh Sharma
<bhupesh.sharma@linaro.org> wrote:

> Specify the PDC mapping for SM8150, so that gpio interrupts are
> properly mapped to the wakeup IRQs of the PDC.
>
> Cc: Maulik Shah <quic_mkshah@quicinc.com>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>

Patch applied!

Yours,
Linus Walleij

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

end of thread, other threads:[~2022-04-17 23:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26 18:40 [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Bhupesh Sharma
2022-02-26 18:40 ` [PATCH v2 1/4] dt-bindings: qcom,pdc: Add compatible for SM8150 Bhupesh Sharma
2022-03-15 16:09   ` Bjorn Andersson
2022-04-17 23:10   ` Linus Walleij
2022-02-26 18:40 ` [PATCH v2 2/4] pinctrl: qcom: sm8150: Specify PDC map Bhupesh Sharma
2022-03-15 16:10   ` Bjorn Andersson
2022-04-17 23:11   ` Linus Walleij
2022-02-26 18:40 ` [PATCH v2 3/4] arm64: dts: qcom: sm8150: Add pdc interrupt controller node Bhupesh Sharma
2022-03-15 16:18   ` Bjorn Andersson
2022-03-17  5:51     ` Bhupesh Sharma
2022-03-24 12:25       ` Bjorn Andersson
2022-02-26 18:40 ` [PATCH v2 4/4] arm64: dts: qcom: sm8150: Add PDC as the interrupt parent for tlmm Bhupesh Sharma
2022-03-15 16:19   ` Bjorn Andersson
2022-03-15  1:06 ` [PATCH v2 0/4] Add support for PDC interrupt controller for sm8150 Linus Walleij
2022-03-15  3:45 ` Vinod Koul

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).